{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/teliax/json-schema/teliax-internal-handlers-porting-detail-response-schema.json",
  "title": "internal_handlers.PortingDetailResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/teliax-customer-porting-api-openapi.yml#/components/schemas/internal_handlers.PortingDetailResponse",
  "type": "object",
  "properties": {
    "customer_actions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/github_com_ringer-warp_api-gateway_internal_repository.ManagedCustomerAction"
      }
    },
    "group_state": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/github_com_ringer-warp_api-gateway_internal_repository.PortRequestGroup"
      }
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/internal_handlers.PortCarrierGroup"
      }
    },
    "project": {
      "$ref": "#/$defs/github_com_ringer-warp_api-gateway_internal_tniq.PortProjectResponse"
    },
    "request": {
      "$ref": "#/$defs/github_com_ringer-warp_api-gateway_internal_repository.PortRequest"
    },
    "resume": {
      "$ref": "#/$defs/internal_handlers.PortingResumeDescriptor"
    }
  },
  "$defs": {
    "github_com_ringer-warp_api-gateway_internal_repository.ManagedCustomerAction": {
      "type": "object",
      "properties": {
        "allowed_response": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "group_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "opened_at": {
          "type": "string"
        },
        "required_document_type": {
          "type": "string"
        },
        "tns": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "github_com_ringer-warp_api-gateway_internal_repository.PortRequest": {
      "type": "object",
      "properties": {
        "can_resume": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string"
        },
        "derived_status": {
          "type": "string"
        },
        "desired_due_date": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "last_synced_at": {
          "type": "string"
        },
        "managed_version": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "next_step": {
          "type": "string"
        },
        "tniq_project_id": {
          "type": "string"
        },
        "tniq_spid": {
          "type": "string"
        },
        "warp_customer_id": {
          "type": "string"
        }
      }
    },
    "github_com_ringer-warp_api-gateway_internal_repository.PortRequestGroup": {
      "type": "object",
      "properties": {
        "btn": {
          "type": "string"
        },
        "business_name": {
          "type": "string"
        },
        "credential_tn_set_hash": {
          "type": "string"
        },
        "details_applied_at": {
          "type": "string"
        },
        "end_user_name": {
          "type": "string"
        },
        "loa_document_id": {
          "type": "string"
        },
        "loa_revision": {
          "type": "integer"
        },
        "loa_signed_at": {
          "type": "string"
        },
        "loa_signer_name": {
          "type": "string"
        },
        "loa_tn_set_hash": {
          "type": "string"
        },
        "losing_carrier_name": {
          "type": "string"
        },
        "losing_spid": {
          "type": "string"
        },
        "masked_account_tail": {
          "type": "string"
        },
        "pin_present": {
          "type": "boolean"
        },
        "service_address": {
          "type": "string"
        },
        "tn_count": {
          "type": "integer"
        },
        "tn_set_hash": {
          "type": "string"
        }
      }
    },
    "github_com_ringer-warp_api-gateway_internal_tniq.PortProjectDetail": {
      "type": "object",
      "properties": {
        "account_number": {
          "description": "Sensitive — present in TNIQ responses today (ringer-tniq#153); never log.",
          "type": "string"
        },
        "btn": {
          "type": "string"
        },
        "business_name": {
          "type": "string"
        },
        "can_activate": {
          "type": "boolean"
        },
        "current_lrn": {
          "type": "string"
        },
        "current_ocn": {
          "type": "string"
        },
        "current_spid": {
          "type": "string"
        },
        "end_user_name": {
          "type": "string"
        },
        "foc_date": {
          "type": "string"
        },
        "lifecycle_state": {
          "type": "string"
        },
        "lifecycle_state_display": {
          "type": "string"
        },
        "locality": {
          "type": "string"
        },
        "npa": {
          "type": "string"
        },
        "nxx": {
          "type": "string"
        },
        "pin": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "tn": {
          "type": "string"
        },
        "validation_errors": {
          "type": "object",
          "additionalProperties": true
        },
        "validation_status": {
          "type": "string"
        }
      }
    },
    "github_com_ringer-warp_api-gateway_internal_tniq.PortProjectResponse": {
      "type": "object",
      "properties": {
        "activated_tns": {
          "type": "integer"
        },
        "can_activate": {
          "type": "boolean"
        },
        "can_cancel": {
          "type": "boolean"
        },
        "can_submit": {
          "type": "boolean"
        },
        "cancelled_tns": {
          "type": "integer"
        },
        "customer_id": {
          "type": "string"
        },
        "derived_status": {
          "type": "string"
        },
        "derived_status_display": {
          "type": "string"
        },
        "desired_due_date": {
          "type": "string"
        },
        "error_tns": {
          "type": "integer"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "spid": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "submit_blocker_reason": {
          "type": "string"
        },
        "submitted_tns": {
          "type": "integer"
        },
        "total_tns": {
          "type": "integer"
        },
        "valid_tns": {
          "type": "integer"
        }
      }
    },
    "internal_handlers.PortCarrierGroup": {
      "type": "object",
      "properties": {
        "spid": {
          "type": "string"
        },
        "tns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/github_com_ringer-warp_api-gateway_internal_tniq.PortProjectDetail"
          }
        }
      }
    },
    "internal_handlers.PortingResumeDescriptor": {
      "type": "object",
      "properties": {
        "allowed": {
          "type": "boolean"
        },
        "reason": {
          "type": "string",
          "enum": [
            "project_temporarily_unavailable",
            "project_counts_unavailable",
            "numbers_missing",
            "validation_in_progress",
            "validation_errors",
            "group_details_missing",
            "loa_missing",
            "due_date_missing",
            "ready_to_review"
          ]
        },
        "step": {
          "type": "string",
          "enum": [
            "NUMBERS",
            "VALIDATION",
            "CARRIER_DETAILS",
            "DOCUMENTS",
            "SCHEDULE",
            "REVIEW"
          ]
        }
      }
    }
  }
}