-- ======================
-- VERIFICATION: Package
-- ======================
CREATE TABLE "unified_verification_package" (
  "unified_connection_id"  VARCHAR NOT NULL,
  "unified_webhook_id"     VARCHAR NOT NULL,
  "unified_external_xref"  VARCHAR,
  "unified_integration_type" VARCHAR NOT NULL,
  "unified_raw_id"         VARCHAR,
  "unified_id"             VARCHAR NOT NULL,
  "id"                     VARCHAR,
  "created_at"             TIMESTAMP_NTZ,
  "updated_at"             TIMESTAMP_NTZ,
  "name"                   VARCHAR,
  "type"                   VARCHAR,
  "aliases"                VARIANT,
  "tags"                   VARIANT,
  "description"            VARCHAR,
  "parameters"             VARIANT,
  "average_processing_times" VARIANT,
  "has_redirect_url"       BOOLEAN,
  "has_target_url"         BOOLEAN,
  "needs_ip_address"       BOOLEAN,
  "cost_amount"            FLOAT,
  "currency"               VARCHAR,
  "max_score"              FLOAT,
  "info_url"               VARCHAR,
  "valid_regions"          VARIANT,
  "raw"                    VARIANT,
  UNIQUE ("unified_connection_id", "unified_id")
);
-- ======================
-- VERIFICATION: Request
-- ======================
CREATE TABLE "unified_verification_request" (
  "unified_connection_id"  VARCHAR NOT NULL,
  "unified_webhook_id"     VARCHAR NOT NULL,
  "unified_external_xref"  VARCHAR,
  "unified_integration_type" VARCHAR NOT NULL,
  "unified_raw_id"         VARCHAR,
  "unified_id"             VARCHAR NOT NULL,
  "id"                     VARCHAR,
  "created_at"             TIMESTAMP_NTZ,
  "updated_at"             TIMESTAMP_NTZ,
  "package_id"             VARCHAR,
  "parameters"             VARIANT,
  "target_url"             VARCHAR,
  "candidate_id"           VARCHAR,
  "profile_ip_address"     VARCHAR,
  "profile_name"           VARCHAR,
  "profile_date_of_birth"  VARCHAR,
  "profile_addresses"      VARIANT,
  "profile_gender"         VARCHAR,
  "profile_emails"         VARIANT,
  "profile_telephones"     VARIANT,
  "profile_national_identifier" VARCHAR,
  "response_completed_at"  TIMESTAMP_NTZ,
  "response_expires_at"    TIMESTAMP_NTZ,
  "response_issued_at"     TIMESTAMP_NTZ,
  "response_status"        VARCHAR,
  "response_score"         FLOAT,
  "response_redirect_url"  VARCHAR,
  "response_download_urls" VARIANT,
  "response_details"       VARIANT,
  "response_source"        VARCHAR,
  "raw"                    VARIANT,
  UNIQUE ("unified_connection_id", "unified_id")
);
