@zyphe-sdk/core 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.d.ts CHANGED
@@ -42,7 +42,6 @@ export interface paths {
42
42
  };
43
43
  get?: never;
44
44
  put?: never;
45
- /** Create a verification request */
46
45
  post: operations["createVerificationRequest"];
47
46
  delete?: never;
48
47
  options?: never;
@@ -127,10 +126,8 @@ export interface paths {
127
126
  };
128
127
  get?: never;
129
128
  put?: never;
130
- /**
131
- * Submits the user's document selection (country and document type) to complete the document selection step.
132
- * @description Call this after `next-step` returns a `document-selection` step, then call `next-step` again to proceed.
133
- */
129
+ /** Submits the user's document selection (country and document type) to complete the document selection step.
130
+ * Call this after `next-step` returns a `document-selection` step, then call `next-step` again to proceed. */
134
131
  post: operations["sdk_process_dv_selection"];
135
132
  delete?: never;
136
133
  options?: never;
@@ -518,6 +515,123 @@ export interface paths {
518
515
  patch?: never;
519
516
  trace?: never;
520
517
  };
518
+ "/sdk/organizations/{organization_id}/transactions": {
519
+ parameters: {
520
+ query?: never;
521
+ header?: never;
522
+ path?: never;
523
+ cookie?: never;
524
+ };
525
+ get?: never;
526
+ put?: never;
527
+ /**
528
+ * Ingest a transaction event and return the synchronous monitoring verdict
529
+ * @description Persists the event, runs the organization's enabled monitoring rules, and returns the
530
+ * Allow/Review/Block decision with full fired-rule provenance. Idempotent on `externalId`:
531
+ * replays return the original result without re-evaluating or double-billing. Billed per
532
+ * ingested transaction.
533
+ */
534
+ post: operations["sdkIngestTransaction"];
535
+ delete?: never;
536
+ options?: never;
537
+ head?: never;
538
+ patch?: never;
539
+ trace?: never;
540
+ };
541
+ "/sdk/organizations/{organization_id}/transactions/{transaction_id}": {
542
+ parameters: {
543
+ query?: never;
544
+ header?: never;
545
+ path?: never;
546
+ cookie?: never;
547
+ };
548
+ /** Fetch one monitored transaction */
549
+ get: operations["sdkGetTransaction"];
550
+ put?: never;
551
+ post?: never;
552
+ delete?: never;
553
+ options?: never;
554
+ head?: never;
555
+ /**
556
+ * Update a transaction's payment lifecycle status
557
+ * @description Client-updatable payment status (`PENDING`/`SETTLED`/`FAILED`/`CANCELED`/`REVERSED`).
558
+ * A terminal-negative transition (`FAILED`/`CANCELED`/`REVERSED`) emits the one-time compensating
559
+ * velocity decrement that backs the transaction out of the rolling counters; `SETTLED` is a
560
+ * counter no-op because ingestion already counted it. Retrying the same `PATCH` is safe and is the
561
+ * supported recovery if the decrement could not be buffered.
562
+ */
563
+ patch: operations["sdkUpdateTransactionStatus"];
564
+ trace?: never;
565
+ };
566
+ "/sdk/organizations/{organization_id}/tin-checks": {
567
+ parameters: {
568
+ query?: never;
569
+ header?: never;
570
+ path?: never;
571
+ cookie?: never;
572
+ };
573
+ /**
574
+ * List the TIN checks an organization has run
575
+ * @description Newest first, whether they were run from the dashboard or with an API key. Each check carries
576
+ * its results; the TIN is masked to its last four digits.
577
+ */
578
+ get: operations["sdkListTinChecks"];
579
+ put?: never;
580
+ /**
581
+ * Check a TIN and a name against IRS records
582
+ * @description The API-key counterpart of `runTinCheck`: the same check, billed the same way, answered with
583
+ * the same body. A check run with an API key names no member, so its `createdByEmail` is absent.
584
+ * Sandbox checks (`sandbox=true`) are free and answered from sample data: send `mock` to state
585
+ * what the check should answer.
586
+ */
587
+ post: operations["sdkRunTinCheck"];
588
+ delete?: never;
589
+ options?: never;
590
+ head?: never;
591
+ patch?: never;
592
+ trace?: never;
593
+ };
594
+ "/sdk/organizations/{organization_id}/tin-checks/quote": {
595
+ parameters: {
596
+ query?: never;
597
+ header?: never;
598
+ path?: never;
599
+ cookie?: never;
600
+ };
601
+ /**
602
+ * Get the price of a TIN check
603
+ * @description What the next check costs this organization, in credits. Zero in the sandbox.
604
+ */
605
+ get: operations["sdkGetTinCheckQuote"];
606
+ put?: never;
607
+ post?: never;
608
+ delete?: never;
609
+ options?: never;
610
+ head?: never;
611
+ patch?: never;
612
+ trace?: never;
613
+ };
614
+ "/sdk/organizations/{organization_id}/tin-checks/{check_id}": {
615
+ parameters: {
616
+ query?: never;
617
+ header?: never;
618
+ path?: never;
619
+ cookie?: never;
620
+ };
621
+ /**
622
+ * Get one TIN check
623
+ * @description The check with everything it found. `404` when the id is unknown in this organization and
624
+ * environment.
625
+ */
626
+ get: operations["sdkGetTinCheck"];
627
+ put?: never;
628
+ post?: never;
629
+ delete?: never;
630
+ options?: never;
631
+ head?: never;
632
+ patch?: never;
633
+ trace?: never;
634
+ };
521
635
  }
522
636
  export type webhooks = Record<string, never>;
523
637
  export interface components {
@@ -528,6 +642,7 @@ export interface components {
528
642
  ActionConfig: {
529
643
  /** @enum {string} */
530
644
  actionType: "setStatus";
645
+ /** @description The new status value. */
531
646
  value: components["schemas"]["ActionStatus"];
532
647
  } | {
533
648
  /** @enum {string} */
@@ -595,9 +710,24 @@ export interface components {
595
710
  /**
596
711
  * @description Selected adverse-media provider, parsed from the `adverse_media_provider` config
597
712
  * value so it can be matched exhaustively instead of compared as a string.
713
+ *
714
+ * Resolved per screening: an organization's own selection when it has one, otherwise the
715
+ * platform default in the `adverse_media_provider` config key. [`Self::None`] is the default at
716
+ * both levels, so adverse media is something a deployment opts into rather than something it
717
+ * discovers it has been paying for.
718
+ * @enum {string}
719
+ */
720
+ AdverseMediaProviderKind: "NONE" | "VERIFY" | "ONE_MEDIA_CHECK" | "GROK" | "DILISENSE";
721
+ /**
722
+ * @description Which tier decided the adverse-media provider a screening used.
723
+ *
724
+ * Reported alongside the resolved provider so an operator reading the admin surface can tell
725
+ * "this organization chose this" from "this organization is following the platform", and so a
726
+ * stored value nobody can parse any more is visible as the fallback it is rather than passing
727
+ * for a deliberate setting.
598
728
  * @enum {string}
599
729
  */
600
- AdverseMediaProviderKind: "VERIFY" | "ONE_MEDIA_CHECK" | "GROK";
730
+ AdverseMediaProviderSource: "organization" | "platform" | "unrecognized";
601
731
  /** @description A single adverse-media article persisted on an AML result.
602
732
  *
603
733
  * This mirrors the provider's article shape but lives in `zyphe-shared` (which
@@ -617,16 +747,44 @@ export interface components {
617
747
  topics?: string[];
618
748
  url: string;
619
749
  };
750
+ /** @description How many articles a provider counted under one of its own topic categories.
751
+ *
752
+ * Kept as the provider stated it, label and all: a category is the provider's filing of a
753
+ * story, not a fact about the subject, and collapsing six exact figures into one total would
754
+ * throw away the only numbers the provider stands behind. The labels are provider-specific
755
+ * (dilisense returns `financial_crime`, `terrorism`, …; LSEG returns its own topic names), so
756
+ * nothing downstream should branch on them — they are evidence for a reviewer and for the
757
+ * review panel to read. */
758
+ AmlAdverseMediaCategoryCount: {
759
+ count: number;
760
+ label: string;
761
+ };
620
762
  /** @description Adverse-media screening outcome attached to an AML result. */
621
763
  AmlAdverseMediaResult: {
622
764
  articles?: components["schemas"]["AmlAdverseMediaArticle"][];
765
+ /** @description Per-category article counts as the provider reported them, when it reports any.
766
+ *
767
+ * Empty for providers that return no category breakdown, and on every result persisted
768
+ * before this field existed. */
769
+ categoryCounts?: components["schemas"]["AmlAdverseMediaCategoryCount"][];
623
770
  /** Format: date-time */
624
771
  checkedAt: string;
625
772
  /** @description Whether the screening returned any adverse-media articles (the gating signal). */
626
773
  hasHit: boolean;
774
+ /** @description Provider that produced the result. */
627
775
  provider: components["schemas"]["AdverseMediaProviderKind"];
628
776
  totalArticleCount: number;
629
777
  totalEventCount: number;
778
+ /**
779
+ * Format: date-time
780
+ * @description The earliest publication date the check considered. `None` means the whole index was
781
+ * searched.
782
+ *
783
+ * Stored because it is half the question: "no financial-crime coverage" over three years
784
+ * and over all history are different answers, and a count read back without the window it
785
+ * was taken in is a number with no claim attached.
786
+ */
787
+ windowStart?: string | null;
630
788
  };
631
789
  /** @description Outcome of the latest agentic (Prosecutor → Defender → Judge) review of this screening,
632
790
  * persisted on the result so the dispatcher does not re-review an unchanged screening and so
@@ -634,9 +792,17 @@ export interface components {
634
792
  * moderation forcing, it lapses when a re-screen bumps `checked_at` past `reviewed_at`
635
793
  * (see [`AmlRiskResult::agent_review_in_force`]). */
636
794
  AmlAgentReview: {
795
+ /** @description The action actually enacted, post-guard and post-normalization. */
637
796
  enactedAction: components["schemas"]["AmlAgentReviewAction"];
638
- /** @description Decision-policy version that produced the verdict (audit traceability). */
639
- policyVersion: string;
797
+ /** @description Legacy single decision-policy version. Only present on reviews persisted before
798
+ * prompt versioning became per-prompt; new reviews record [`Self::prompt_versions`]. */
799
+ policyVersion?: string | null;
800
+ /** @description Version of each role prompt that produced the verdict, keyed by prompt type
801
+ * (audit traceability: each entry resolves the exact stored prompt row). Empty on
802
+ * legacy reviews, which carry [`Self::policy_version`] instead. */
803
+ promptVersions?: {
804
+ [key: string]: string;
805
+ };
640
806
  rationale: string;
641
807
  /** Format: float */
642
808
  residualRiskScore: number;
@@ -645,6 +811,7 @@ export interface components {
645
811
  /** @description True when the agentic mode gated the action out (Suggest): the verdict is a suggestion
646
812
  * for a human reviewer, nothing was enacted. */
647
813
  suggested: boolean;
814
+ /** @description The Judge's verdict action. */
648
815
  verdictAction: components["schemas"]["AmlAgentReviewAction"];
649
816
  };
650
817
  /**
@@ -738,8 +905,17 @@ export interface components {
738
905
  topics?: components["schemas"]["FieldWithControl"];
739
906
  };
740
907
  AmlQueryMetadata: {
741
- dateOfBirth: string;
908
+ /** @description `None` when the subject was screened on name alone. This records what was actually queried,
909
+ * so a reviewer can tell a name-only screening from one that matched on a birth date too. */
910
+ dateOfBirth?: string | null;
742
911
  firstName: string;
912
+ /** @description The gender actually sent to the provider — already canonicalised by
913
+ * `normalize_gender_for_screening`, so `None` covers both "not declared" and "declared but
914
+ * unmappable, therefore omitted from the query". Recording the *sent* value rather than the
915
+ * declared one is what makes this field carry its weight twice: a reviewer sees exactly how
916
+ * narrow the screening was, and the worker's "has the query changed?" gate re-screens when
917
+ * the gender changes — which it would not do if the field were absent here. */
918
+ gender?: string | null;
743
919
  lastName: string;
744
920
  };
745
921
  AmlResult: {
@@ -748,7 +924,7 @@ export interface components {
748
924
  adverseMedia?: boolean;
749
925
  /** Format: date-time */
750
926
  createdAt: string;
751
- data?: components["schemas"]["AmlRiskResult"] | null;
927
+ data?: null | components["schemas"]["AmlRiskResult"];
752
928
  /** Format: uuid */
753
929
  id: string;
754
930
  /**
@@ -760,6 +936,8 @@ export interface components {
760
936
  namedPersonRef?: string | null;
761
937
  pep: boolean;
762
938
  sanctions: boolean;
939
+ /** @description The screened subject (`PERSON`/`COMPANY`). Always populated on fresh responses;
940
+ * `#[serde(default)]` (→ `Person`) only covers legacy cached payloads that predate it. */
763
941
  subjectType?: components["schemas"]["AmlSubjectType"];
764
942
  /** Format: date-time */
765
943
  updatedAt: string;
@@ -767,14 +945,14 @@ export interface components {
767
945
  verificationRequestId?: string | null;
768
946
  };
769
947
  AmlRiskMetadata: {
770
- adverseMedia?: components["schemas"]["AmlAdverseMediaResult"] | null;
771
- agentReview?: components["schemas"]["AmlAgentReview"] | null;
948
+ adverseMedia?: null | components["schemas"]["AmlAdverseMediaResult"];
949
+ agentReview?: null | components["schemas"]["AmlAgentReview"];
772
950
  /** Format: date-time */
773
951
  checkedAt: string;
774
- companyQuery?: components["schemas"]["AmlCompanyQueryMetadata"] | null;
952
+ companyQuery?: null | components["schemas"]["AmlCompanyQueryMetadata"];
775
953
  controls: components["schemas"]["ResultControlOperation"][];
776
- moderation?: components["schemas"]["AmlModerationStatus"] | null;
777
- query?: components["schemas"]["AmlQueryMetadata"] | null;
954
+ moderation?: null | components["schemas"]["AmlModerationStatus"];
955
+ query?: null | components["schemas"]["AmlQueryMetadata"];
778
956
  summary: components["schemas"]["AmlCheckSummary"];
779
957
  };
780
958
  AmlRiskResult: {
@@ -817,6 +995,10 @@ export interface components {
817
995
  * @description When this derivation last became active. Informational; `None` for legacy rows.
818
996
  */
819
997
  addedAt?: string | null;
998
+ /** @description Stable key of the score definition the matched `ScoreTag` row belongs to (e.g. `risk`,
999
+ * `aml`, or a custom key). `None` on rows persisted before this field existed — consumers
1000
+ * treat that as unknown (the frontend falls back to the default `risk` definition). */
1001
+ definitionKey?: string | null;
820
1002
  /** Format: uuid */
821
1003
  id: string;
822
1004
  /**
@@ -824,6 +1006,7 @@ export interface components {
824
1006
  * @description Tombstone. `None` == active. This is the active predicate.
825
1007
  */
826
1008
  removedAt?: string | null;
1009
+ /** @description Provenance / reference key. Absent in legacy rows → `Legacy` (sticky). */
827
1010
  source?: components["schemas"]["RiskTagSource"];
828
1011
  tag: string;
829
1012
  /** Format: double */
@@ -840,7 +1023,7 @@ export interface components {
840
1023
  * (e.g., `AuditAction::FlowCreated` → `"FLOW_CREATED"`).
841
1024
  * @enum {string}
842
1025
  */
843
- AuditAction: "VIEWED" | "CREATED" | "UPDATED" | "DELETED" | "AUTH_LOGIN" | "AUTH_LOGIN_FAILED" | "AUTH_LOGOUT" | "AUTH_PASSWORD_CHANGED" | "AUTH_PASSKEY_REGISTERED" | "AUTH_MAGIC_LINK_REQUESTED" | "AUTH_PASSWORD_RESET_REQUESTED" | "AUTH_EMAIL_VERIFIED" | "IDENTITY_ROLE_CHANGED" | "IDENTITY_DEACTIVATED" | "IDENTITY_DELETED" | "ORG_CREATED" | "ORG_SETTINGS_UPDATED" | "ORG_MEMBER_INVITED" | "ORG_MEMBER_REMOVED" | "ORG_MEMBER_ROLE_CHANGED" | "ORG_INVITE_REVOKED" | "API_KEY_CREATED" | "API_KEY_UPDATED" | "API_KEY_DELETED" | "BOT_CREATED" | "BOT_DELETED" | "BOT_TOKEN_REGENERATED" | "FLOW_CREATED" | "FLOW_UPDATED" | "FLOW_DELETED" | "FLOW_STEP_ADDED" | "FLOW_STEP_UPDATED" | "FLOW_STEP_DELETED" | "FLOW_SHARED" | "FLOW_SHARE_REVOKED" | "PARTNER_INVITED" | "PARTNER_INVITE_ACCEPTED" | "PARTNER_INVITE_REVOKED" | "PARTNER_INVITE_REJECTED" | "VR_CREATED" | "VR_STATUS_CHANGED" | "VR_MANUALLY_REVIEWED" | "DV_RESULT_REVIEW_REQUESTED" | "VR_CANCELLED" | "DV_RESULT_STATUS_CHANGED" | "DV_RESULT_MANUAL_REVIEW" | "DV_RESULT_REPLAYED" | "AML_RESULT_STATUS_CHANGED" | "AML_RESULT_MODERATED" | "AML_FIELD_REVIEWED" | "AML_AGENT_REVIEWED" | "POA_RESULT_STATUS_CHANGED" | "SPID_RESULT_STATUS_CHANGED" | "FORM_RESULT_STATUS_CHANGED" | "FORM_RESULT_SUBMITTED" | "KYB_APPLICATION_SUBMITTED" | "KYB_DOCUMENT_REQUEST_CREATED" | "KYB_DOCUMENT_UPLOADED" | "KYB_CLARIFICATION_SUBMITTED" | "KYB_DOCUMENT_REQUEST_REVIEWED" | "KYB_ASSIGNED" | "KYB_STAGE_CHANGED" | "KYB_COMMUNICATION_SENT" | "KYB_MODERATION_STATUS_UPDATED" | "KYB_PEP_SANCTIONS_STATUS_UPDATED" | "KYB_REPORT_UPLOADED" | "KYB_AUTO_COMPLETED" | "KYB_APPROVED" | "KYB_MANUAL_REVIEW_DECISION" | "KYB_VERIFICATION_FIELD_OVERRIDDEN" | "KYB_METADATA_PATCHED" | "KYB_BUSINESS_INFORMATION_EDITED" | "KYB_UBOS_ADDED" | "KYB_UBO_REMOVED" | "KYB_DIRECTORS_ADDED" | "KYB_DIRECTOR_REMOVED" | "KYB_AGENT_REVIEWED" | "KYC_GRANT_CREATED" | "CONSENT_GRANTED" | "BLOCKLIST_ENTRY_CREATED" | "BLOCKLIST_ENTRY_DELETED" | "RISK_WEIGHT_UPDATED" | "RISK_FACTOR_UPDATED" | "DOCUMENT_DOWNLOADED" | "FLOW_RESULT_EXPORTED" | "FLOW_RISK_SCORE_CHANGED" | "FLOW_RISK_STATUS_CHANGED" | "RISK_TAG_ADDED" | "RISK_TAG_RETRACTED" | "UNKNOWN";
1026
+ AuditAction: "VIEWED" | "CREATED" | "UPDATED" | "DELETED" | "AUTH_LOGIN" | "AUTH_LOGIN_FAILED" | "AUTH_LOGOUT" | "AUTH_PASSWORD_CHANGED" | "AUTH_PASSKEY_REGISTERED" | "AUTH_MAGIC_LINK_REQUESTED" | "AUTH_PASSWORD_RESET_REQUESTED" | "AUTH_EMAIL_VERIFIED" | "IDENTITY_ROLE_CHANGED" | "IDENTITY_DEACTIVATED" | "IDENTITY_DELETED" | "ORG_CREATED" | "ORG_SETTINGS_UPDATED" | "ORG_MEMBER_INVITED" | "ORG_MEMBER_REMOVED" | "ORG_MEMBER_ROLE_CHANGED" | "ORG_INVITE_REVOKED" | "API_KEY_CREATED" | "API_KEY_UPDATED" | "API_KEY_DELETED" | "BOT_CREATED" | "BOT_DELETED" | "BOT_TOKEN_REGENERATED" | "FLOW_CREATED" | "FLOW_UPDATED" | "FLOW_DELETED" | "FLOW_STEP_ADDED" | "FLOW_STEP_UPDATED" | "FLOW_STEP_DELETED" | "FLOW_SHARED" | "FLOW_SHARE_REVOKED" | "PARTNER_INVITED" | "PARTNER_INVITE_ACCEPTED" | "PARTNER_INVITE_REVOKED" | "PARTNER_INVITE_REJECTED" | "VR_CREATED" | "VR_STATUS_CHANGED" | "VR_MANUALLY_REVIEWED" | "DV_RESULT_REVIEW_REQUESTED" | "VR_CANCELLED" | "DV_RESULT_STATUS_CHANGED" | "DV_RESULT_MANUAL_REVIEW" | "DV_RESULT_REPLAYED" | "AML_RESULT_STATUS_CHANGED" | "AML_RESULT_MODERATED" | "AML_FIELD_REVIEWED" | "AML_AGENT_REVIEWED" | "TIN_CHECK_RUN" | "POA_RESULT_STATUS_CHANGED" | "SPID_RESULT_STATUS_CHANGED" | "FORM_RESULT_STATUS_CHANGED" | "FORM_RESULT_SUBMITTED" | "KYB_APPLICATION_SUBMITTED" | "KYB_DOCUMENT_REQUEST_CREATED" | "KYB_DOCUMENT_UPLOADED" | "KYB_CLARIFICATION_SUBMITTED" | "KYB_DOCUMENT_REQUEST_REVIEWED" | "KYB_ASSIGNED" | "KYB_STAGE_CHANGED" | "KYB_COMMUNICATION_SENT" | "KYB_MODERATION_STATUS_UPDATED" | "KYB_PEP_SANCTIONS_STATUS_UPDATED" | "KYB_REPORT_UPLOADED" | "KYB_AUTO_COMPLETED" | "KYB_APPROVED" | "KYB_MANUAL_REVIEW_DECISION" | "KYB_VERIFICATION_FIELD_OVERRIDDEN" | "KYB_DOCUMENT_CHECK_OVERRIDDEN" | "KYB_METADATA_PATCHED" | "KYB_SCREENING_STRATEGY_CHANGED" | "KYB_BUSINESS_INFORMATION_EDITED" | "KYB_UBOS_ADDED" | "KYB_UBO_REMOVED" | "KYB_DIRECTORS_ADDED" | "KYB_DIRECTOR_REMOVED" | "KYB_AGENT_REVIEWED" | "KYB_DOCUMENT_CATALOG_REFRESHED" | "KYB_DOCUMENTS_PURCHASED" | "KYC_GRANT_CREATED" | "CONSENT_GRANTED" | "BLOCKLIST_ENTRY_CREATED" | "BLOCKLIST_ENTRY_DELETED" | "RISK_WEIGHT_UPDATED" | "RISK_FACTOR_UPDATED" | "DOCUMENT_DOWNLOADED" | "FLOW_RESULT_EXPORTED" | "FLOW_RISK_SCORE_CHANGED" | "FLOW_RISK_STATUS_CHANGED" | "RISK_TAG_ADDED" | "RISK_TAG_RETRACTED" | "TM_RULE_TRIGGERED" | "TM_ALERT_RAISED" | "TM_AGENT_REVIEWED" | "TM_AGENT_REVIEW_STARTED" | "TM_AGENT_RESOLVED" | "TM_ALERT_DISPOSITIONED" | "TM_ALERT_ESCALATED" | "TM_RULE_DISABLED" | "UNKNOWN";
844
1027
  /** @description A single entry in the audit log, returned by the query API. */
845
1028
  AuditLogEntry: {
846
1029
  action: components["schemas"]["AuditAction"];
@@ -859,13 +1042,13 @@ export interface components {
859
1042
  isSandbox?: boolean | null;
860
1043
  /** Format: uuid */
861
1044
  organizationId?: string | null;
862
- outcomeStatus?: Omit<components["schemas"]["AuditOutcome"], "type"> | null;
1045
+ outcomeStatus?: null | components["schemas"]["AuditOutcome"];
863
1046
  /** Format: uuid */
864
1047
  resourceId?: string | null;
865
1048
  resourceType: components["schemas"]["AuditResourceType"];
866
1049
  /** @description Login-session identifier (`fid`). Stable across token refreshes within one browser session. */
867
1050
  sessionId?: string | null;
868
- source?: Omit<components["schemas"]["AuditSource"], "type"> | null;
1051
+ source?: null | components["schemas"]["AuditSource"];
869
1052
  };
870
1053
  /** @description The outcome of the operation that produced an audit entry.
871
1054
  *
@@ -875,12 +1058,12 @@ export interface components {
875
1058
  * ## Variants
876
1059
  * - `httpSuccess { status }` — HTTP response with 2xx status code.
877
1060
  * - `httpError { status, code, tag }` — HTTP response with a non-2xx status.
878
- * `status` is the numeric HTTP code; `code` and `tag` come from the
879
- * [`BaxeError`] payload so investigators can see the application-level
880
- * error identity without reading the response body.
1061
+ * `status` is the numeric HTTP code; `code` and `tag` come from the
1062
+ * [`BaxeError`] payload so investigators can see the application-level
1063
+ * error identity without reading the response body.
881
1064
  * - `workerOk` — background worker completed successfully.
882
1065
  * - `workerError { variant }` — background worker failed; `variant` is the
883
- * Rust error-enum variant name (e.g. `"VaultLocked"`, `"UpsertDvResult"`). */
1066
+ * Rust error-enum variant name (e.g. `"VaultLocked"`, `"UpsertDvResult"`). */
884
1067
  AuditOutcome: {
885
1068
  /**
886
1069
  * Format: int32
@@ -922,7 +1105,7 @@ export interface components {
922
1105
  * and as a catch-all for unrecognised values from the database.
923
1106
  * @enum {string}
924
1107
  */
925
- AuditResourceType: "Search" | "Identity" | "Organization" | "OrganizationSettings" | "OrganizationTheme" | "OrganizationInvite" | "OrganizationBilling" | "SubscriptionPlan" | "KybJurisdictionPricing" | "ApiKey" | "Bot" | "Flow" | "FlowStep" | "FlowResult" | "FlowPartnerInvite" | "VerificationRequest" | "DvResult" | "AmlResult" | "PoaResult" | "KybResult" | "FormResult" | "Form" | "RiskWeight" | "ContextualFactor" | "ScoreDefinition" | "ScoreTag" | "AuditLog" | "ChatMessage" | "DocumentSelection" | "GeolocationResult" | "PhoneVerification" | "SpidResult" | "WalletVerification" | "Vault" | "KybUboData" | "DocumentDefinition" | "ConfigOverride" | "ShortUrl" | "Cache" | "Unknown";
1108
+ AuditResourceType: "Search" | "Identity" | "Organization" | "OrganizationSettings" | "OrganizationTheme" | "OrganizationInvite" | "OrganizationBilling" | "SubscriptionPlan" | "KybJurisdictionPricing" | "TopupPack" | "ApiKey" | "Bot" | "Flow" | "FlowStep" | "FlowResult" | "FlowPartnerInvite" | "VerificationRequest" | "DvResult" | "AmlResult" | "TinCheck" | "PoaResult" | "KybResult" | "FormResult" | "Form" | "RiskWeight" | "ContextualFactor" | "ScoreDefinition" | "ScoreTag" | "AuditLog" | "ChatMessage" | "DocumentSelection" | "GeolocationResult" | "PhoneVerification" | "SpidResult" | "WalletVerification" | "Vault" | "KybUboData" | "DocumentDefinition" | "ConfigOverride" | "AgentReviewPolicy" | "ShortUrl" | "Cache" | "Transaction" | "TmRule" | "TmList" | "TmSettings" | "TmAlert" | "TmRuleTemplate" | "DisposableEmailDomain" | "RegistrationOffer" | "RegistrationOfferLink" | "WebhookEndpoint" | "WebhookOrganizationSecret" | "Unknown";
926
1109
  /** @description The origin/trigger of an audit event.
927
1110
  *
928
1111
  * All audit events MUST have a source - this allows filtering/excluding events
@@ -940,9 +1123,11 @@ export interface components {
940
1123
  /** @enum {string} */
941
1124
  type: "HTTP";
942
1125
  } | {
1126
+ /** @description The scenario/context that triggered the worker. */
943
1127
  scenario: components["schemas"]["WorkerScenario"];
944
1128
  /** @enum {string} */
945
1129
  type: "WORKER";
1130
+ /** @description The type of worker that emitted this event. */
946
1131
  workerType: components["schemas"]["WorkerType"];
947
1132
  } | {
948
1133
  /** @description Name of the scheduled task (e.g. "AML_REFRESH", "CLEANUP"). */
@@ -992,10 +1177,10 @@ export interface components {
992
1177
  * @description Describes the visibility scope of a bot token.
993
1178
  *
994
1179
  * - `Organization` — the bot is connected to one specific organisation and is
995
- * only visible in that organisation's bot list.
1180
+ * only visible in that organisation's bot list.
996
1181
  * - `Platform` — the bot is a platform-root identity (no
997
- * `default_organization_id`) and is visible in every organisation's bot
998
- * list.
1182
+ * `default_organization_id`) and is visible in every organisation's bot
1183
+ * list.
999
1184
  *
1000
1185
  * Stored inside the `credentialData` JSONB of the `BOT_TOKEN` credential row.
1001
1186
  * `Organization` is the default to ensure backward-compatible deserialization
@@ -1005,6 +1190,7 @@ export interface components {
1005
1190
  BotTokenScope: "ORGANIZATION" | "PLATFORM";
1006
1191
  /** @description A condition branch for switch operators. */
1007
1192
  BranchCondition: {
1193
+ /** @description The condition to evaluate. */
1008
1194
  condition: components["schemas"]["Condition"];
1009
1195
  /** @description The label of the edge to follow if this condition matches. */
1010
1196
  label: string;
@@ -1023,8 +1209,11 @@ export interface components {
1023
1209
  catalogValue?: string | null;
1024
1210
  /** @description Sources that disagree with one another for this field. */
1025
1211
  disagreementSources?: components["schemas"]["BusinessInfoDisagreementSource"][];
1212
+ /** @description Every persisted observation used for this field, including conflicting documents. */
1213
+ documentSources?: components["schemas"]["DocumentFieldSource"][];
1026
1214
  /** @description The value extracted from the uploaded document(s). */
1027
1215
  documentValue?: string | null;
1216
+ /** @description Whether the submitted value matches the document value. */
1028
1217
  matchType: components["schemas"]["BusinessInfoMatchType"];
1029
1218
  /** @description The user-submitted value for this field. */
1030
1219
  submittedValue?: string | null;
@@ -1050,6 +1239,18 @@ export interface components {
1050
1239
  incorporationDate: string;
1051
1240
  postZipCode: string;
1052
1241
  registrationNumber: string;
1242
+ /** @description ISO 3166-2 subdivision code, bare (`"DE"`, `"NY"`) and meaningful only together with
1243
+ * `country`.
1244
+ *
1245
+ * Required for countries whose company register is subdivision-level rather than national --
1246
+ * today only the US, which has no federal register at all -- and absent for every other
1247
+ * country. `None` on the vast majority of records, and on every record written before this
1248
+ * field existed, which is why it defaults rather than being required by serde.
1249
+ *
1250
+ * Deliberately separate from `country` instead of overloading it with a qualified `US-DE`:
1251
+ * `country` is one of the eight fields the business-info cross-check hands to the LLM to
1252
+ * compare against the register, and it is shown to the applicant in the form. */
1253
+ subdivision?: string | null;
1053
1254
  };
1054
1255
  /** @description Parsed representation of the client's clarification response stored inside
1055
1256
  * `reviewReason` JSON. Present only on document requests of that type after
@@ -1096,6 +1297,59 @@ export interface components {
1096
1297
  ts?: string | null;
1097
1298
  visitScheme?: string | null;
1098
1299
  };
1300
+ /** @description A single company search hit. Provider-neutral: it never carries which registry
1301
+ * or provider produced the match. */
1302
+ CompanySearchCandidate: {
1303
+ /** @description Street line, when the register publishes one.
1304
+ *
1305
+ * Absent more often than you would expect: it is built from `addressLine1`, or `street` +
1306
+ * number, and plenty of registers return an address block carrying neither — only `city` and
1307
+ * a postcode. `city` is therefore the field a picker can actually rely on. */
1308
+ address?: string | null;
1309
+ /** @description Town or city of the registered address.
1310
+ *
1311
+ * Carried separately from `address` rather than folded into it because it is the part that
1312
+ * survives: a chooser showing several same-named companies needs *something* placing them
1313
+ * apart, and the city is present on hits whose street line is not. */
1314
+ city?: string | null;
1315
+ countryCode: string;
1316
+ /** @description Registration number / provider id — pass back as `candidateId` to prefill. */
1317
+ id: string;
1318
+ legalName: string;
1319
+ /** @description Opaque hint about why this matched (e.g. `"name"`), when the provider reports it.
1320
+ *
1321
+ * `"mock"` marks the selectable mock company every sandbox search offers: it is not a register
1322
+ * hit, and selecting it serves canned data for the rest of the journey. */
1323
+ matchKind?: string | null;
1324
+ };
1325
+ /** @description Response for `GET .../kyb/company-search`. `available: false` (with an empty
1326
+ * candidate list) signals the widget to hide the search box — the kill switch is
1327
+ * off or no provider serves the country. It is never an error. */
1328
+ CompanySearchResponse: {
1329
+ available: boolean;
1330
+ candidates: components["schemas"]["CompanySearchCandidate"][];
1331
+ /** @description The subdivisions this country's company registers are addressed by, when it has no national
1332
+ * one — the US registers every company with a state, so `US` alone names no register.
1333
+ *
1334
+ * Served rather than left to each client to hardcode: the list belongs to the one module that
1335
+ * can keep it honest, and a client's private copy rots silently the moment coverage changes.
1336
+ * Empty for every country that needs no subdivision, which is nearly all of them.
1337
+ *
1338
+ * Present on two shapes of answer: alongside results (so a picker can be shown pre-emptively),
1339
+ * and alongside an **empty** candidate list with `available: true`, which is how a search that
1340
+ * named no subdivision is answered — "pick a state", not "unavailable" and not an error. */
1341
+ subdivisions?: components["schemas"]["SubdivisionOption"][];
1342
+ };
1343
+ /**
1344
+ * @description The registry's lifecycle state for a company, normalized across providers so no caller has to
1345
+ * know which register produced it.
1346
+ *
1347
+ * Variants are declared least-to-most severe and `Ord` follows that order, so a company sitting
1348
+ * in several states at once (bankruptcy proceedings that ended in a strike-off) reports the worst
1349
+ * one and a single value is enough to gate approval.
1350
+ * @enum {string}
1351
+ */
1352
+ CompanyStatus: "ACTIVE" | "RESTRUCTURING" | "LIQUIDATION" | "BANKRUPTCY" | "DISSOLVED";
1099
1353
  /** @description A condition that can be evaluated against workflow context.
1100
1354
  *
1101
1355
  * Conditions are serialized as JSON with a tagged `op` field.
@@ -1110,11 +1364,11 @@ export interface components {
1110
1364
  * ## Compound condition
1111
1365
  * ```json
1112
1366
  * {
1113
- * "op": "AND",
1114
- * "conditions": [
1115
- * { "op": "EQ", "field": "dv_step.status", "value": "PASSED" },
1116
- * { "op": "IN", "field": "dv_step.countryCode", "values": ["IT", "DE", "FR"] }
1117
- * ]
1367
+ * "op": "AND",
1368
+ * "conditions": [
1369
+ * { "op": "EQ", "field": "dv_step.status", "value": "PASSED" },
1370
+ * { "op": "IN", "field": "dv_step.countryCode", "values": ["IT", "DE", "FR"] }
1371
+ * ]
1118
1372
  * }
1119
1373
  * ``` */
1120
1374
  Condition: {
@@ -1122,36 +1376,42 @@ export interface components {
1122
1376
  field: string;
1123
1377
  /** @enum {string} */
1124
1378
  op: "EQ";
1379
+ /** @description Value to compare against */
1125
1380
  value: components["schemas"]["WorkflowValue"];
1126
1381
  } | {
1127
1382
  /** @description Field path */
1128
1383
  field: string;
1129
1384
  /** @enum {string} */
1130
1385
  op: "NE";
1386
+ /** @description Value to compare against */
1131
1387
  value: components["schemas"]["WorkflowValue"];
1132
1388
  } | {
1133
1389
  /** @description Field path */
1134
1390
  field: string;
1135
1391
  /** @enum {string} */
1136
1392
  op: "GT";
1393
+ /** @description Value to compare against */
1137
1394
  value: components["schemas"]["WorkflowValue"];
1138
1395
  } | {
1139
1396
  /** @description Field path */
1140
1397
  field: string;
1141
1398
  /** @enum {string} */
1142
1399
  op: "LT";
1400
+ /** @description Value to compare against */
1143
1401
  value: components["schemas"]["WorkflowValue"];
1144
1402
  } | {
1145
1403
  /** @description Field path */
1146
1404
  field: string;
1147
1405
  /** @enum {string} */
1148
1406
  op: "GTE";
1407
+ /** @description Value to compare against */
1149
1408
  value: components["schemas"]["WorkflowValue"];
1150
1409
  } | {
1151
1410
  /** @description Field path */
1152
1411
  field: string;
1153
1412
  /** @enum {string} */
1154
1413
  op: "LTE";
1414
+ /** @description Value to compare against */
1155
1415
  value: components["schemas"]["WorkflowValue"];
1156
1416
  } | {
1157
1417
  /** @description Conditions to AND together */
@@ -1164,6 +1424,7 @@ export interface components {
1164
1424
  /** @enum {string} */
1165
1425
  op: "OR";
1166
1426
  } | {
1427
+ /** @description Condition to negate */
1167
1428
  condition: components["schemas"]["Condition"];
1168
1429
  /** @enum {string} */
1169
1430
  op: "NOT";
@@ -1175,12 +1436,14 @@ export interface components {
1175
1436
  /** @description List of values to check against */
1176
1437
  values: components["schemas"]["WorkflowValue"][];
1177
1438
  } | {
1439
+ /** @description Condition to check against each element */
1178
1440
  condition: components["schemas"]["Condition"];
1179
1441
  /** @description Field path to an array */
1180
1442
  field: string;
1181
1443
  /** @enum {string} */
1182
1444
  op: "ANY";
1183
1445
  } | {
1446
+ /** @description Condition to check against each element */
1184
1447
  condition: components["schemas"]["Condition"];
1185
1448
  /** @description Field path to an array */
1186
1449
  field: string;
@@ -1203,6 +1466,7 @@ export interface components {
1203
1466
  field: string;
1204
1467
  /** @enum {string} */
1205
1468
  op: "CONTAINS";
1469
+ /** @description Substring to look for (must be a string) */
1206
1470
  value: components["schemas"]["WorkflowValue"];
1207
1471
  } | {
1208
1472
  /** @enum {string} */
@@ -1219,6 +1483,29 @@ export interface components {
1219
1483
  accepted: string[];
1220
1484
  blocked: string[];
1221
1485
  };
1486
+ /** @description Request body for `POST /flow/{flow_id}/vr/{verification_request_id}/dv/session` (Didit only,
1487
+ * §1.2). Both fields are optional and only meaningful on a deployment whose active DV provider
1488
+ * is Didit. */
1489
+ CreateDvSessionPayload: {
1490
+ /** @description Preferred hosted-flow language. Filtered against Didit's supported codes server-side;
1491
+ * an unsupported code is silently dropped rather than rejected (D17). */
1492
+ language?: string | null;
1493
+ /** @description Sandbox-only outcome control (e.g. `"approve"`, `"decline_document_expired"`). Ignored
1494
+ * outside sandbox. */
1495
+ sandboxScenario?: string | null;
1496
+ };
1497
+ /** @description Response for `POST /flow/{flow_id}/vr/{verification_request_id}/dv/session`. The frontend
1498
+ * embeds `url` in an iframe and later posts `sessionToken` + `interviewId` (= `session_id`) to
1499
+ * `process-dv-document`, exactly like the Incode session flow. */
1500
+ CreateDvSessionResponse: {
1501
+ /** @description What the minted session can do. Replaces the old `provider` field (D5) — the client only
1502
+ * ever needed to know the capture mode and whether it should expect a proxy, not which
1503
+ * concrete provider is behind it. */
1504
+ capture: components["schemas"]["DvCapture"];
1505
+ sessionId: string;
1506
+ sessionToken: string;
1507
+ url: string;
1508
+ };
1222
1509
  /** @description Request to create a payment-mode Stripe Checkout session for a one-time credit top-up
1223
1510
  * purchase (`POST .../billing/topup/checkout`). */
1224
1511
  CreateTopupCheckoutRequest: {
@@ -1278,20 +1565,33 @@ export interface components {
1278
1565
  };
1279
1566
  /** @example usd */
1280
1567
  Currency: string;
1281
- CustomDocumentConfig: {
1282
- enabled?: boolean;
1283
- /** Format: uuid */
1284
- id: string;
1285
- name: string;
1286
- required?: boolean;
1568
+ /** @description A director/legal-representative suggestion prefilled from the provider's data.
1569
+ * The applicant confirms/edits before it becomes a declared director. */
1570
+ DirectorCandidate: {
1571
+ /** @description `"YYYY-MM-DD"`, when the provider reported a birth date. Registers list officers with a
1572
+ * birth date far more consistently than they identify graph owners, so this is usually
1573
+ * populated — and passing it on is what keeps a director's AML screening from degrading to
1574
+ * name-only for want of data we were handed. */
1575
+ birthDate?: string | null;
1576
+ /** @description The register's own split of the name. Present far more often than not for legal
1577
+ * representatives, and always preferred over splitting `full_name` on whitespace — the
1578
+ * heuristic mangles multi-word surnames ("ALVES DE CASTRO") that the register got right. */
1579
+ firstName?: string | null;
1580
+ fullName: string;
1581
+ lastName?: string | null;
1582
+ role?: string | null;
1287
1583
  };
1288
1584
  DirectorDefinition: {
1289
- country: string;
1290
- dateOfBirth: string;
1585
+ /** @description `None` when the register reported no nationality. See [`UboDefinition::country`]. */
1586
+ country?: string | null;
1587
+ /** @description Optional for the same reason as [`UboDefinition::date_of_birth`]: a register-sourced
1588
+ * director is recorded as published, and registers list officers without identity details. */
1589
+ dateOfBirth?: string | null;
1291
1590
  /** @description Email of the director. `None` for a name-only director added without an email. */
1292
1591
  emailAddress?: string | null;
1293
1592
  firstName: string;
1294
- gender: string;
1593
+ /** @description `None` for any register-sourced director — see [`UboDefinition::gender`]. */
1594
+ gender?: string | null;
1295
1595
  /**
1296
1596
  * Format: uuid
1297
1597
  * @description Stable identifier for this director within the KYB result. See [`UboDefinition::id`].
@@ -1299,6 +1599,71 @@ export interface components {
1299
1599
  id?: string | null;
1300
1600
  lastName: string;
1301
1601
  };
1602
+ /** @description Response for `POST .../kyb/discover-ubos`. The graph runs asynchronously: the widget
1603
+ * polls `GET .../kyb/discovery` for the terminal result. `status` is the created (or
1604
+ * existing, on an idempotent re-call) GRAPH row's status. */
1605
+ DiscoverKybUbosResponse: {
1606
+ /** Format: uuid */
1607
+ discoveryId: string;
1608
+ /** @description `PENDING` | `COMPLETED` | `FAILED`. */
1609
+ status: string;
1610
+ };
1611
+ /**
1612
+ * @description One deterministic document-authenticity check of the `docauth` suite, selectable per DV
1613
+ * step through [`DvConfig::docauth_checks`].
1614
+ *
1615
+ * The suite is a list rather than a switch because its checks answer different questions,
1616
+ * need different inputs, and fail for different reasons — an administrator calibrating one
1617
+ * against their own traffic should not have to accept the others to get it. New checks are
1618
+ * added here as variants; a stored config that names none of them runs none of them.
1619
+ * @enum {string}
1620
+ */
1621
+ DocauthCheck: "SCREEN_REPLAY" | "PORTRAIT_GENDER" | "PORTRAIT_AGE";
1622
+ /** @description Provenance of a model-driven document extraction, small enough to live on the DV result
1623
+ * row itself.
1624
+ *
1625
+ * This deliberately carries identifiers and the verdict's own reasoning, never the evidence:
1626
+ * the Textract OCR text and the document images stay in the S3 response log. `ProcessAdditionalData`
1627
+ * is a `JSONB` column read by every result list and detail query, so its size is paid on reads
1628
+ * that have no interest in the raw inputs. */
1629
+ DocscanExtractionProvenance: {
1630
+ /**
1631
+ * Format: double
1632
+ * @description The model's own confidence, after the deterministic ceilings in `validate_and_cap`.
1633
+ */
1634
+ confidence: number;
1635
+ /** @description Bedrock model id the extraction ran against. */
1636
+ model: string;
1637
+ /** @description Which sides Textract actually returned text for. An absent side is missing
1638
+ * corroboration, not a contradiction — see the extraction prompt's `Input` section. */
1639
+ ocrSides: components["schemas"]["OcrSides"];
1640
+ /**
1641
+ * Format: int64
1642
+ * @description Wall-clock duration of the extraction, including OCR and any schema retry.
1643
+ */
1644
+ processingTimeMs: number;
1645
+ /** @description Whether the prompt came from the organization's own override or the platform default.
1646
+ * The version alone cannot tell these apart, and the organization-to-platform fallback is
1647
+ * silent — without this, two organizations disagreeing looks the same as model variance. */
1648
+ promptScope: components["schemas"]["ExtractionPromptScope"];
1649
+ /** @description Version of the `DOCSCAN`/`EXTRACTOR` policy row that produced this result. */
1650
+ promptVersion: string;
1651
+ /** @description Bedrock token usage for the successful attempt. */
1652
+ usage: components["schemas"]["ExtractionUsage"];
1653
+ /** @description Why the confidence landed where it did. Without this, a score below the configured
1654
+ * threshold is unexplainable from the UI: the reason otherwise exists only inside
1655
+ * `providerMetadata.responseJson`, which is reachable only by downloading the response log. */
1656
+ warnings?: string[];
1657
+ };
1658
+ /**
1659
+ * @description Bedrock vision models that platform admins may select for a DV step.
1660
+ *
1661
+ * The serialized values are stable product-level names. Provider model IDs are kept
1662
+ * behind [`DocscanLlmModel::bedrock_model_id`] so flow configurations are not coupled
1663
+ * to a vendor's API spelling.
1664
+ * @enum {string}
1665
+ */
1666
+ DocscanLlmModel: "KIMI_K2_5" | "QWEN3_VL" | "UNKNOWN";
1302
1667
  Document: {
1303
1668
  /** Format: date-time */
1304
1669
  createdAt: string;
@@ -1316,16 +1681,89 @@ export interface components {
1316
1681
  /** Format: uuid */
1317
1682
  vaultId: string;
1318
1683
  };
1319
- DocumentConfig: {
1320
- /** @description Whether this document is requested on demand by a reviewer (excluded from the
1321
- * required-document gate and the end-user's upload form) instead of being demanded upfront.
1684
+ /** @description One purchasable register document, as reported by
1685
+ * `GET .../kyb/{kyb_result_id}/document-catalog`.
1686
+ *
1687
+ * **`quotedCredits` is the whole of what this type says about price.** How that number was
1688
+ * reached — the provider's own figure and its unit, the FX rate, Zyphe's margin, whether the
1689
+ * provider would currently bill us anything at all — is internal pricing policy and deliberately
1690
+ * has no field here. `owned` / `purchasedAt` / `reissuable` are facts about the *requesting
1691
+ * organization's own* copy, not about ours. A field added here later has to be weighed the same
1692
+ * way, as [`GetKybDiscoveryResponse::for_applicant`] forces every new field to be classified in
1693
+ * one place. */
1694
+ DocumentCatalogEntry: {
1695
+ /** @description The provider's category key (`financialStatements`, `certifiedTradeRegisterExtract`, …). */
1696
+ category: string;
1697
+ description?: string | null;
1698
+ /** @description The filing date as the register states it, verbatim — a label, not a timestamp. */
1699
+ documentDate?: string | null;
1700
+ /** @description The provider's opaque document id. Regenerated per catalogue fetch and explicitly not
1701
+ * stable long-term, so it is only ever safe to buy from a catalogue just refreshed. */
1702
+ documentId: string;
1703
+ /**
1704
+ * Format: int64
1705
+ * @description How long the register is expected to take, per the provider.
1706
+ */
1707
+ estimatedDeliverySeconds?: number | null;
1708
+ /** @description The register's own word for the container (`pdf`, `zip`). Advisory: a filing listed `zip`
1709
+ * is regularly delivered as PDF. */
1710
+ format?: string | null;
1711
+ name?: string | null;
1712
+ /** @description This organization already holds a copy. */
1713
+ owned: boolean;
1714
+ /**
1715
+ * Format: uuid
1716
+ * @description The receipt holding it, for the download route.
1717
+ */
1718
+ purchaseId?: string | null;
1719
+ /**
1720
+ * Format: date-time
1721
+ * @description When this organization bought that copy.
1722
+ */
1723
+ purchasedAt?: string | null;
1724
+ /**
1725
+ * Format: int32
1726
+ * @description The price, in **Zyphe credits**. The provider's unit never crosses this boundary.
1727
+ */
1728
+ quotedCredits: number;
1729
+ /** @description A fresh copy can be bought. `false` while this organization's own copy is still current —
1730
+ * inside the freshness window a re-purchase returns what it already holds. */
1731
+ reissuable: boolean;
1732
+ /** @description The provider's stable per-country classifier, when it reports one. Safer to key on than
1733
+ * `name`, which is in the register's own language. */
1734
+ subType?: string | null;
1735
+ };
1736
+ /** @description Response for `GET .../kyb/{kyb_result_id}/document-catalog`. */
1737
+ DocumentCatalogResponse: {
1738
+ entries: components["schemas"]["DocumentCatalogEntry"][];
1739
+ /** Format: date-time */
1740
+ fetchedAt?: string | null;
1741
+ /** @description `PENDING` while registers are still answering, `COMPLETED` once they have, `FAILED` if the
1742
+ * fetch failed, `NONE` when no catalogue was ever requested for this KYB result.
1322
1743
  *
1323
- * Configurable per document. `None` means "unset" — the backend then applies the document's
1324
- * default: `proofOfAttorney` defaults to on-demand (`true`), every other default document
1325
- * defaults to upfront (`false`). An explicit value overrides that default. */
1326
- onDemand?: boolean | null;
1327
- required?: boolean;
1744
+ * Registers answer independently, so `PENDING` does not mean empty: entries already listed
1745
+ * are real and buyable while more are still arriving. */
1746
+ status: string;
1747
+ /**
1748
+ * Format: uuid
1749
+ * @description The KYB's anchor verification request — the websocket room a `discovery-update` push lands
1750
+ * in. Reported here, off the catalogue row itself, rather than only in a dispatch response,
1751
+ * so a dashboard that was reloaded while a fetch or a purchase was still running can still
1752
+ * join the room and see it settle. `None` before any catalogue was requested, when there is
1753
+ * nothing outstanding to wait for either.
1754
+ */
1755
+ verificationRequestId?: string | null;
1328
1756
  };
1757
+ /**
1758
+ * @description Named categories of identity documents.
1759
+ *
1760
+ * Served in the OpenAPI schema even though no response field carries one: the cluster is
1761
+ * derived at flow-evaluation time from a result's numeric `documentType` and exposed to JDM
1762
+ * conditions as `<step>.documentClass`. Clients that let an operator author those conditions
1763
+ * need the exact value set, and generating it beats transcribing it.
1764
+ * @enum {string}
1765
+ */
1766
+ DocumentClusterName: "ID_CARDS" | "PASSPORTS" | "DRIVER_LICENSES" | "VISAS" | "UNKNOWN";
1329
1767
  DocumentData: {
1330
1768
  documentCan?: string;
1331
1769
  documentClassCode?: string;
@@ -1338,6 +1776,23 @@ export interface components {
1338
1776
  issuingState: string;
1339
1777
  mrzStrings?: string;
1340
1778
  };
1779
+ /** @description Response for `GET .../kyb/{kyb_result_id}/documents/{purchase_id}/download`.
1780
+ *
1781
+ * The signed URL is *returned*, not redirected to. The dashboard authenticates with a bearer
1782
+ * token that a plain browser navigation cannot carry, so a redirect would have to be followed by
1783
+ * an unauthenticated request — and the caller would get a `401` instead of a document. Handing
1784
+ * back the URL lets the client fetch it through the authenticated API and then open it. */
1785
+ DocumentDownloadResponse: {
1786
+ /** @description Short-lived and single-purpose. Not cacheable, and not worth persisting: re-reading this
1787
+ * endpoint signs a fresh one for free. */
1788
+ url: string;
1789
+ };
1790
+ /** @description A document observation used by a cross-check. Legacy observations have no extraction ID. */
1791
+ DocumentFieldSource: {
1792
+ /** Format: uuid */
1793
+ extractionId?: string | null;
1794
+ value: string;
1795
+ };
1341
1796
  DocumentFormatFilter: {
1342
1797
  formats: string[];
1343
1798
  };
@@ -1345,6 +1800,34 @@ export interface components {
1345
1800
  path: string;
1346
1801
  type: string;
1347
1802
  };
1803
+ /** @description One document's outcome in a purchase request. Mirrors [`ExpansionDecision`]: a mixed batch
1804
+ * reports per item rather than failing wholesale. */
1805
+ DocumentPurchaseDecision: {
1806
+ accepted: boolean;
1807
+ documentId: string;
1808
+ /**
1809
+ * Format: uuid
1810
+ * @description The receipt row, when the purchase was accepted.
1811
+ */
1812
+ purchaseId?: string | null;
1813
+ /**
1814
+ * Format: int32
1815
+ * @description What this document was quoted at, in Zyphe credits.
1816
+ */
1817
+ quotedCredits?: number | null;
1818
+ reason?: null | components["schemas"]["DocumentRejectReason"];
1819
+ /** @description `PENDING` | `COMPLETED` | `FAILED`. Registers quote minutes, so `PENDING` is the norm. */
1820
+ status?: string | null;
1821
+ };
1822
+ /**
1823
+ * @description Why a document cannot be bought — a closed enum, so the catalogue and the dispatch report can
1824
+ * never disagree on the wording of a refusal.
1825
+ *
1826
+ * No variant names an internal pricing cause: a customer learns that a purchase was refused and
1827
+ * what to do about it, never how we arrive at a price.
1828
+ * @enum {string}
1829
+ */
1830
+ DocumentRejectReason: "unknownDocumentId" | "alreadyOwned" | "purchaseInFlight" | "catalogUnavailable" | "providerError" | "priceChanged" | "insufficientCredits";
1348
1831
  /** @description Status of various document scan checks.
1349
1832
  *
1350
1833
  * # Deserialization
@@ -1359,15 +1842,19 @@ export interface components {
1359
1842
  * **Legacy Regula format:**
1360
1843
  * ```json
1361
1844
  * {
1362
- * "overallStatus": 0,
1363
- * "detailsOptical": { "docType": 1, "expiry": 0, "mrz": 2, ... },
1364
- * "optical": 0, "portrait": 1, "rfid": 2, ...
1845
+ * "overallStatus": 0,
1846
+ * "detailsOptical": { "docType": 1, "expiry": 0, "mrz": 2, ... },
1847
+ * "optical": 0, "portrait": 1, "rfid": 2, ...
1365
1848
  * }
1366
1849
  * ``` */
1367
1850
  DocumentScanStatus: {
1851
+ /** @description Document type detection result */
1368
1852
  documentType: components["schemas"]["CheckStatus"];
1853
+ /** @description Expiry date validation result */
1369
1854
  expiry: components["schemas"]["CheckStatus"];
1855
+ /** @description MRZ validation result */
1370
1856
  mrz: components["schemas"]["CheckStatus"];
1857
+ /** @description Overall verification result */
1371
1858
  overall: components["schemas"]["CheckStatus"];
1372
1859
  };
1373
1860
  DocumentSelectionConfig: {
@@ -1411,9 +1898,55 @@ export interface components {
1411
1898
  presignedUrl?: string | null;
1412
1899
  s3Key?: string | null;
1413
1900
  };
1901
+ /**
1902
+ * @description How intensively a business must be investigated before it can be onboarded — the risk-based
1903
+ * tier every AML/CFT regime expects, orthogonal to [`ScreeningStrategy`].
1904
+ *
1905
+ * The two answer different questions: `ScreeningStrategy` selects *which* population must be
1906
+ * screened, this selects *how deeply* the file must be investigated. A listed company screened
1907
+ * on its directors can still sit at any level.
1908
+ *
1909
+ * This records the tier only. Nothing in the platform varies its checks by level yet — the
1910
+ * approval guard, the required-document set and the screening depth are all still uniform. Adding
1911
+ * the key first means the decision has somewhere to live (an operator can set it through the
1912
+ * existing admin metadata PATCH today, and it survives on the result) while the per-level
1913
+ * behaviour lands incrementally.
1914
+ * @enum {string}
1915
+ */
1916
+ DueDiligenceLevel: "simplified" | "standard" | "enhanced";
1917
+ /** @description Client-facing projection of [`DvCapabilities`]: the capability descriptor served in place of
1918
+ * the deleted `DvProvider` enum (D5). `DocumentScanProviderType` never reaches a client — this
1919
+ * is the shape that does. */
1920
+ DvCapture: {
1921
+ capture: components["schemas"]["DvCaptureMode"];
1922
+ providesAuthenticity: boolean;
1923
+ providesLiveness: boolean;
1924
+ usesProxy: boolean;
1925
+ };
1926
+ /**
1927
+ * @description How a provider is driven for one attempt.
1928
+ * @enum {string}
1929
+ */
1930
+ DvCaptureMode: "DIRECT" | "SESSION";
1414
1931
  DvConfig: {
1415
1932
  /** @default DISABLED */
1416
1933
  amlAgenticMode: components["schemas"]["KybAgenticMode"];
1934
+ capture?: null | components["schemas"]["DvCapture"];
1935
+ /** @description Which `docauth` checks run on this step's scans. Empty — the default, and what every
1936
+ * step that predates the field deserializes to — runs none, and the DV result is
1937
+ * byte-for-byte what it was before the suite existed. The replay detector fails the scan
1938
+ * on its verdict; the portrait checks only lower the document score (see each variant).
1939
+ *
1940
+ * Administrator-only and off by default on purpose: the checks' thresholds come from
1941
+ * synthetic captures and have not been calibrated against real cameras, displays and
1942
+ * document portraits, so on a live flow each will turn away some genuine holders until
1943
+ * they are. Enabling one is a per-flow, deliberate decision, made a check at a time — see
1944
+ * [`DocauthCheck`] for what each needs and where it is blind.
1945
+ *
1946
+ * Ignored when the active DV provider is Incode, which brings its own authenticity block.
1947
+ * Also ignored on Didit: the Didit workflow used by Zyphe brings only the OCR (ID
1948
+ * Verification) feature, and document authenticity stays out of scope there. */
1949
+ docauthChecks?: components["schemas"]["DocauthCheck"][];
1417
1950
  /** Format: uuid */
1418
1951
  documentSelectionStepId?: string;
1419
1952
  /** @description Incode configuration ID the frontend must use when creating the capture session.
@@ -1421,7 +1954,10 @@ export interface components {
1421
1954
  * Computed server-side during rehydration from `poa_from_govcheck` and the
1422
1955
  * sandbox/live environment (see [`crate::types::dto::DvConfig`] rehydration in
1423
1956
  * the core handler). It is never persisted: it defaults to `None` and is skipped
1424
- * when serializing `None`, so storing a config round-trips cleanly. */
1957
+ * when serializing `None`, so storing a config round-trips cleanly.
1958
+ *
1959
+ * Unused on Didit: the deployment-wide Didit workflow id is resolved server-side from
1960
+ * config when the create-session endpoint is called, and is never served to the client. */
1425
1961
  incodeConfigurationId?: string | null;
1426
1962
  /**
1427
1963
  * Format: int64
@@ -1433,6 +1969,9 @@ export interface components {
1433
1969
  labels?: {
1434
1970
  [key: string]: string;
1435
1971
  };
1972
+ /** @description Vision model used for LLM document extraction. Absent from configs written before the
1973
+ * field existed, which therefore take [`DocscanLlmModel`]'s default. */
1974
+ llmModel?: components["schemas"]["DocscanLlmModel"];
1436
1975
  /**
1437
1976
  * Format: int32
1438
1977
  * @example 5
@@ -1442,9 +1981,14 @@ export interface components {
1442
1981
  minimumAge: number;
1443
1982
  /** @description When true, route Incode through the government-validation flow and, after the
1444
1983
  * document scan, produce a PoA result (source DLDV) from the driver's-license
1445
- * address validation. Backward compatible: missing key deserializes to false. */
1984
+ * address validation. Backward compatible: missing key deserializes to false.
1985
+ *
1986
+ * Incode-only: the LLM extractor has no government-validation call, so this is
1987
+ * ignored when the active DV provider is the LLM one. Also ignored on Didit: the
1988
+ * worker keeps `run_government_validation`'s `GovCheckNotSupported` default and never
1989
+ * enqueues a govcheck PoA job for a Didit session. */
1446
1990
  poaFromGovcheck?: boolean;
1447
- processImagesOverrides?: components["schemas"]["ProcessImagesOverrides"] | null;
1991
+ processImagesOverrides?: null | components["schemas"]["ProcessImagesOverrides"];
1448
1992
  requiredDocumentFields?: components["schemas"]["RequiredDocumentField"][];
1449
1993
  /**
1450
1994
  * Format: int64
@@ -1457,12 +2001,12 @@ export interface components {
1457
2001
  reverificationLeadSeconds?: number | null;
1458
2002
  thresholds?: {
1459
2003
  documentScorePercent?: number;
1460
- } | null;
2004
+ };
1461
2005
  };
1462
2006
  /** @enum {string} */
1463
2007
  DvConfigThreshold: "documentScorePercent";
1464
2008
  /** @enum {string} */
1465
- DvReason: "UNKNOWN" | "WRONG_DOCUMENT_TYPE" | "COUNTRY_FILTER" | "FACE_MATCH_CHECK" | "FACE_MATCH_CHECK_ONE_CLICK" | "OVERALL_STATUS" | "DOCUMENT_COUNTRY_MISMATCH" | "DOCUMENT_COUNTRY_MISSING" | "DATE_OF_EXPIRY_NOT_VALID" | "DATE_OF_EXPIRY_NOT_READABLE" | "DATE_OF_EXPIRY_FIELD_MISSING" | "DOCUMENT_ALREADY_USED_BY_ANOTHER_USER" | "DOCUMENT_FINGERPRINT_COMPUTATION" | "SECURITY_CHECK_FAILED" | "DOCUMENT_ALTERATION_DETECTED" | "DOCUMENT_TAMPERING_DETECTED" | "FAKE_DOCUMENT_DETECTED" | "SCREEN_REPLAY_ATTACK_DETECTED" | "PAPER_COPY_DETECTED" | "DOCUMENT_SCORE_BELOW_THRESHOLD" | "DOCUMENT_TYPE_NOT_DEFINED" | "DOCUMENT_NOT_FOUND" | "DATE_OF_BIRTH_BELOW_MINIMUM_AGE" | "DOCUMENT_TYPE_CHECK" | "ELECTRONIC_DEVICE" | "SECURITY_TEXT" | "IMAGE_PATTERNS" | "PHOTO_EMBEDDINGS" | "BLACK_AND_WHITE_COPY" | "UNIQUENESS_CHECK" | "REQUIRED_FIELDS_MISMATCH" | "LIVENESS_CHECK_FAILED" | "LIVENESS_ANTISPOOF_FAILED" | "LIVENESS_BRIGHTNESS_FAILED" | "LIVENESS_EYES_CLOSED_FAILED" | "LIVENESS_WEARING_SUNGLASSES_FAILED" | "LIVENESS_FACE_OCCLUDED_FAILED" | "LIVENESS_SHARPNESS_FAILED" | "LIVENESS_FACE_CONSISTENCY_FAILED";
2009
+ DvReason: "UNKNOWN" | "WRONG_DOCUMENT_TYPE" | "COUNTRY_FILTER" | "FACE_MATCH_CHECK" | "FACE_MATCH_CHECK_ONE_CLICK" | "OVERALL_STATUS" | "DOCUMENT_COUNTRY_MISMATCH" | "DOCUMENT_COUNTRY_MISSING" | "DATE_OF_EXPIRY_NOT_VALID" | "DATE_OF_EXPIRY_NOT_READABLE" | "DATE_OF_EXPIRY_FIELD_MISSING" | "DOCUMENT_ALREADY_USED_BY_ANOTHER_USER" | "DOCUMENT_FINGERPRINT_COMPUTATION" | "SECURITY_CHECK_FAILED" | "CROSS_CHECK_FAILED" | "DOCUMENT_ALTERATION_DETECTED" | "DOCUMENT_TAMPERING_DETECTED" | "FAKE_DOCUMENT_DETECTED" | "SCREEN_REPLAY_ATTACK_DETECTED" | "PAPER_COPY_DETECTED" | "DOCUMENT_SCORE_BELOW_THRESHOLD" | "DOCUMENT_TYPE_NOT_DEFINED" | "DOCUMENT_NOT_FOUND" | "DATE_OF_BIRTH_BELOW_MINIMUM_AGE" | "DOCUMENT_TYPE_CHECK" | "ELECTRONIC_DEVICE" | "SECURITY_TEXT" | "IMAGE_PATTERNS" | "PHOTO_EMBEDDINGS" | "BLACK_AND_WHITE_COPY" | "UNIQUENESS_CHECK" | "REQUIRED_FIELDS_MISMATCH" | "LIVENESS_CHECK_FAILED" | "LIVENESS_ANTISPOOF_FAILED" | "LIVENESS_BRIGHTNESS_FAILED" | "LIVENESS_EYES_CLOSED_FAILED" | "LIVENESS_WEARING_SUNGLASSES_FAILED" | "LIVENESS_FACE_OCCLUDED_FAILED" | "LIVENESS_SHARPNESS_FAILED" | "LIVENESS_FACE_CONSISTENCY_FAILED" | "MISSING_FRONT_IMAGE" | "DUPLICATE_IMAGE_SIDE" | "INVALID_IMAGE_DATA" | "IMAGE_TOO_LARGE" | "UNSUPPORTED_IMAGE_FORMAT" | "DOCUMENT_INCOMPLETE";
1466
2010
  DvResult: {
1467
2011
  adminComment?: string | null;
1468
2012
  authenticityChecks: number[][];
@@ -1480,7 +2024,7 @@ export interface components {
1480
2024
  documentScorePercent?: number | null;
1481
2025
  /** Format: int32 */
1482
2026
  documentType?: number | null;
1483
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
2027
+ flowStep?: null | components["schemas"]["FlowStep"];
1484
2028
  /** Format: uuid */
1485
2029
  flowStepId?: string | null;
1486
2030
  /** Format: uuid */
@@ -1521,7 +2065,7 @@ export interface components {
1521
2065
  /** Format: int32 */
1522
2066
  documentType?: number | null;
1523
2067
  issuingCountry?: string | null;
1524
- livenessStatus?: components["schemas"]["ResultStatus"] | null;
2068
+ livenessStatus?: null | components["schemas"]["ResultStatus"];
1525
2069
  /** Format: int32 */
1526
2070
  numberOfAttempts: number;
1527
2071
  status: components["schemas"]["ResultStatus"];
@@ -1529,9 +2073,17 @@ export interface components {
1529
2073
  [key: string]: boolean;
1530
2074
  };
1531
2075
  /** @enum {string} */
1532
- ErrorTags: "unexpected" | "bad_request" | "permission_denied" | "request_deserialization" | "database" | "invalid_email_or_password" | "user_not_confirmed" | "verify_password" | "send_email" | "open_session" | "read_session" | "close_session" | "user_disabled" | "missing_authorization_header" | "invalid_authorization_header" | "token_generation" | "user_not_found" | "email_already_taken" | "invalid_invite" | "wrong_invite_user" | "invite_not_found" | "email_already_verified" | "flow_not_found" | "flow_step_not_found" | "organization_not_found" | "storage" | "verification_request_not_found" | "document_reader" | "websocket" | "organization_settings_not_found" | "theme_not_found" | "start_job" | "result_not_found" | "kyc_grant_not_found" | "document_not_found" | "service_invocation" | "trigger_webhook" | "too_many_invites" | "invite_already_used" | "invite_already_accepted" | "invite_already_revoked" | "invite_revoked" | "invite_expired" | "invite_already_exists" | "share_already_revoked" | "form_not_found" | "form_in_use" | "flow_step_configuration_not_found" | "identity_not_found" | "step_order_violation" | "serialization" | "mock_data" | "api_key_not_found" | "not_implemented" | "access_grant" | "rate_limit_exceeded" | "missing_api_key" | "invalid_api_key" | "origin_not_allowed" | "step_already_completed" | "send_sms" | "send_notification" | "parse_error" | "inviter_organization_not_found" | "forbidden" | "passkey_authentication" | "internal" | "invalid_email" | "graph_validation" | "external_api" | "share_already_has_write_access" | "share_does_not_have_write_access" | "write_access_already_revoked" | "invite_required" | "billing" | "product_not_active";
2076
+ ErrorTags: "unexpected" | "bad_request" | "permission_denied" | "request_deserialization" | "database" | "invalid_email_or_password" | "user_not_confirmed" | "verify_password" | "send_email" | "open_session" | "read_session" | "close_session" | "user_disabled" | "missing_authorization_header" | "invalid_authorization_header" | "token_generation" | "user_not_found" | "email_already_taken" | "invalid_invite" | "wrong_invite_user" | "invite_not_found" | "email_already_verified" | "flow_not_found" | "flow_step_not_found" | "organization_not_found" | "storage" | "verification_request_not_found" | "document_reader" | "sse" | "organization_settings_not_found" | "theme_not_found" | "start_job" | "result_not_found" | "kyc_grant_not_found" | "document_not_found" | "service_invocation" | "trigger_webhook" | "too_many_invites" | "invite_already_used" | "invite_already_accepted" | "invite_already_revoked" | "invite_revoked" | "invite_expired" | "invite_already_exists" | "share_already_revoked" | "form_not_found" | "form_in_use" | "flow_step_configuration_not_found" | "identity_not_found" | "step_order_violation" | "serialization" | "mock_data" | "api_key_not_found" | "not_implemented" | "access_grant" | "rate_limit_exceeded" | "missing_api_key" | "invalid_api_key" | "origin_not_allowed" | "step_already_completed" | "send_sms" | "send_notification" | "parse_error" | "inviter_organization_not_found" | "forbidden" | "passkey_authentication" | "internal" | "invalid_email" | "disposable_email" | "graph_validation" | "external_api" | "share_already_has_write_access" | "share_does_not_have_write_access" | "write_access_already_revoked" | "invite_required" | "billing" | "billing_email_required" | "product_not_active" | "registration_offer_not_found" | "registration_offer_unavailable" | "registration_offer_invalid_terms" | "tin_check_invalid_tin" | "tin_check_unavailable";
2077
+ /**
2078
+ * @description The honest distinction between a price and a ceiling (§4.1): the provider prices `graph` as
2079
+ * `pricingMode: "variable"` for most countries, so the only defensible pre-flight number is a
2080
+ * budget cap, never a price. Never render a `variableCap`/`unknown` estimate as if it were one.
2081
+ * @enum {string}
2082
+ */
2083
+ EstimateBasis: "fixedPrice" | "variableCap" | "unknown";
1533
2084
  /** @description Represents an executed action with its ID and type. */
1534
2085
  ExecutedAction: {
2086
+ /** @description The type of action that was executed. */
1535
2087
  actionConfig: components["schemas"]["ActionConfig"];
1536
2088
  /**
1537
2089
  * Format: uuid
@@ -1539,37 +2091,192 @@ export interface components {
1539
2091
  */
1540
2092
  actionId: string;
1541
2093
  };
1542
- /** @description A FORM factor key: a fixed string, or the submitted answer value itself (so each distinct
1543
- * answer maps to its own FORM factor — e.g. a country select).
1544
- *
1545
- * `AnswerValue` on a `Select` field authors one `ScoreFactor` row per enumerated
1546
- * `SelectOptions.values` entry at form-sync time (`form_risk_sync::DesiredRisk::from_sections`),
1547
- * sharing the factor's multiplier, so any of those answers resolves to a real multiplier at
1548
- * score time.
2094
+ /** @description One node's expandability + cost verdict, as reported by `GET .../expansion-preview` (§4.1).
1549
2095
  *
1550
- * **Remaining gap (D-13):** a field has no enumerable option set to author against when it is
1551
- * not a `Select` (e.g. free-text `Text`), or when it is a `Select` with `isOtherAllowed: true`
1552
- * and the submitted answer is the free-text "Other" value. In those cases the emitted
1553
- * `AnswerValue` key in `FormResult.riskFactorKeys` has no matching `ScoreFactor` row, the score-time
1554
- * lookup returns `None`, and the factor's multiplier is silently skipped (undercounting the
1555
- * contextual multiplier). Form-sync logs a warning when this applies to a saved field. */
1556
- FactorKey: {
1557
- /** @enum {string} */
1558
- type: "fixed";
1559
- value: string;
1560
- } | {
1561
- /** @enum {string} */
1562
- type: "answerValue";
1563
- };
1564
- FieldControlOperation: {
2096
+ * **C1 fix, load-bearing:** `countryCode`/pricing here are always **this node's own** country
2097
+ * (`OwnershipCompany.country_code` on the graph node), never the subject company's. Provider node
2098
+ * ids are country-prefixed (`"FR:12345"`) for the same reason — a Cayman parent of an Italian
2099
+ * subject prices and gates as Cayman, not Italy. */
2100
+ ExpansionCandidate: {
2101
+ /** @description Report-only, never a rejection: the provider's 24h dedup makes re-expanding an already
2102
+ * `found` node near-free, and a reviewer may legitimately re-pull it. */
2103
+ alreadyExpanded: boolean;
2104
+ countryCode: string;
2105
+ estimateBasis: components["schemas"]["EstimateBasis"];
2106
+ /**
2107
+ * Format: int32
2108
+ * @description **Zyphe** credits (provider credit cents × EUR→credit FX rate × Zyphe margin) — never the
2109
+ * provider's own credits. `None` when `expandable` is `false`: a rejected node has no
2110
+ * defensible price to show.
2111
+ */
2112
+ estimatedCredits?: number | null;
2113
+ expandable: boolean;
2114
+ expectedLatency?: null | components["schemas"]["ExpansionLatency"];
2115
+ legalName: string;
2116
+ nodeId: string;
2117
+ /** @description The provider's node-status flag (`found`, `budget_truncated`, `placeholder`, …) as stored
2118
+ * on the graph — free-form, see `OwnershipFlags::status`. */
2119
+ nodeStatus: string;
2120
+ reason?: null | components["schemas"]["ExpansionRejectReason"];
2121
+ };
2122
+ /** @description One node's accept/reject verdict in the dispatch report (§4.2). `discoveryId`/`status` are
2123
+ * `None` for a node rejected BEFORE dispatch (no row was ever created). A node rejected BY the
2124
+ * dispatch itself (`providerError`/`budgetExceeded`) is `accepted:false` but does carry both —
2125
+ * the row exists and is `FAILED`. */
2126
+ ExpansionDecision: {
2127
+ accepted: boolean;
2128
+ /**
2129
+ * Format: int32
2130
+ * @description Present when the row finalized inline; otherwise it arrives via the websocket push or the
2131
+ * `GET .../kyb/discovery` read.
2132
+ */
2133
+ chargedCredits?: number | null;
1565
2134
  /** Format: uuid */
1566
- identityId: string;
1567
- operation: components["schemas"]["FieldControlOperationType"];
1568
- /** Format: date-time */
1569
- timestamp: string;
1570
- zid: string;
2135
+ discoveryId?: string | null;
2136
+ estimateBasis?: null | components["schemas"]["EstimateBasis"];
2137
+ /**
2138
+ * Format: int32
2139
+ * @description **Zyphe** credits, same basis as [`ExpansionCandidate::estimated_credits`] — never the
2140
+ * provider's own credits.
2141
+ */
2142
+ estimatedCredits?: number | null;
2143
+ nodeId: string;
2144
+ reason?: null | components["schemas"]["ExpansionRejectReason"];
2145
+ /** @description `PENDING` | `COMPLETED` | `FAILED`. Present once a row exists, including a node whose
2146
+ * dispatch itself failed (`providerError`/`budgetExceeded`) — that row is `FAILED`. */
2147
+ status?: string | null;
1571
2148
  };
1572
- FieldControlOperationType: {
2149
+ /**
2150
+ * @description How long an accepted expansion is expected to take to resolve. Not cosmetic: it changes what
2151
+ * the operator is agreeing to when they click. `None` when the node was not accepted — there is
2152
+ * nothing to wait for.
2153
+ * @enum {string}
2154
+ */
2155
+ ExpansionLatency: "fast" | "slow" | "manual";
2156
+ /** @description Response for `GET .../kyb/expansion-preview` (§4.1). No provider call, no charge, no audit —
2157
+ * pricing comes from the 24h-cached `DiscoveryProviderPricing` row. */
2158
+ ExpansionPreviewResponse: {
2159
+ candidates: components["schemas"]["ExpansionCandidate"][];
2160
+ /** Format: int32 */
2161
+ concurrencySlotsFree: number;
2162
+ inFlight: components["schemas"]["InFlightExpansion"][];
2163
+ /**
2164
+ * Format: date-time
2165
+ * @description The oldest `fetchedAt` among the pricing rows consulted for this preview, or `None` when no
2166
+ * candidate country had a cached row. A staleness hint, not a guarantee — an individual
2167
+ * country's own row may be fresher or staler than this floor.
2168
+ */
2169
+ pricingFetchedAt?: string | null;
2170
+ };
2171
+ /** @description One `GRAPH_EXPANSION` row's outcome, surfaced by `GET .../kyb/discovery` (§4.3) so a per-node
2172
+ * actual cost is readable after the fact, alongside the graph it produced. */
2173
+ ExpansionRecord: {
2174
+ /** Format: int32 */
2175
+ chargedCredits: number;
2176
+ /** Format: date-time */
2177
+ completedAt?: string | null;
2178
+ /** Format: date-time */
2179
+ createdAt: string;
2180
+ /** Format: uuid */
2181
+ discoveryId: string;
2182
+ rootNodeId: string;
2183
+ /** @description `PENDING` | `COMPLETED` | `FAILED`. */
2184
+ status: string;
2185
+ stoppedReason?: string | null;
2186
+ };
2187
+ /**
2188
+ * @description Why a node cannot be expanded — a closed enum so the preview and the dispatch report can never
2189
+ * disagree on the wording of a rejection (D4).
2190
+ *
2191
+ * **`providerError` and `budgetExceeded` are dispatch-time only — [`ExpansionPreviewResponse`]
2192
+ * never emits them**, because the preview makes no provider call. A `budgetExceeded` rejection at
2193
+ * dispatch is a distinct case from a generic `providerError`: per §9 A0 the provider's
2194
+ * `budget_exceeded` failure is **free** and returns the real cost, so it is a usable re-quote, not
2195
+ * a dead end — the dashboard can offer the operator a one-click re-confirmation at the actual
2196
+ * price (surfaced via the decision's `estimatedCredits`/`estimateBasis` when the provider's error
2197
+ * detail was parseable) instead of just reporting a failure.
2198
+ * @enum {string}
2199
+ */
2200
+ ExpansionRejectReason: "notACompanyNode" | "countryUnsupported" | "graphDatapointUnavailable" | "expansionInFlight" | "baseRunInFlight" | "autoTraversalInFlight" | "concurrencyCap" | "unknownNodeId" | "providerError" | "budgetExceeded" | "insufficientCredits";
2201
+ /** @description Payload for `POST .../kyb/extend-discovery`: continue a completed, truncated ownership
2202
+ * discovery deeper from the selected company nodes of the stored graph. Each id gets its own
2203
+ * per-node provider request, its own `GRAPH_EXPANSION` row, and its own accept/reject verdict —
2204
+ * see [`ExtendKybDiscoveryResponse`]. */
2205
+ ExtendKybDiscoveryPayload: {
2206
+ /**
2207
+ * Format: int32
2208
+ * @description Per-node credit ceiling override: the most this expansion may cost the organization, in
2209
+ * the same credits the charge is denominated in (Zyphe's margin included).
2210
+ *
2211
+ * It binds **downward** in every pricing mode. For a `%`-markup (variable-priced) country it
2212
+ * replaces the platform's flat `topograph_profile_max_budget_cents` ceiling. For a
2213
+ * `fixedPrice` country it cannot *raise* the price — a real price is not a cap — but a cap
2214
+ * below that price still binds: the node comes back rejected with the actual cost, rather
2215
+ * than being charged past what the operator said they would spend. `None` falls back to
2216
+ * `topograph_profile_max_budget_cents`.
2217
+ */
2218
+ maxCreditsPerNode?: number | null;
2219
+ /** @description `nodeId`s of company nodes in the current `ownershipStructure` to expand (max 25). */
2220
+ nodeIds: string[];
2221
+ };
2222
+ /** @description Response for the org-side `POST /organizations/{org_id}/kyb/{kyb_result_id}/extend-discovery`
2223
+ * (§4.2, breaking as of the per-node fan-out — the old top-level `discoveryId`/`status` never
2224
+ * meant anything once one request could produce N rows). Partial acceptance: only a request where
2225
+ * *every* node is rejected is a `400`; otherwise this is a `202` dispatch report. */
2226
+ ExtendKybDiscoveryResponse: {
2227
+ /**
2228
+ * Format: int32
2229
+ * @description Sum of `estimatedCredits` over accepted nodes only.
2230
+ */
2231
+ estimatedCreditsTotal: number;
2232
+ expansions: components["schemas"]["ExpansionDecision"][];
2233
+ /**
2234
+ * Format: uuid
2235
+ * @description The KYB's anchor verification request — the websocket room for `discovery-update`.
2236
+ */
2237
+ verificationRequestId: string;
2238
+ };
2239
+ /** @enum {string} */
2240
+ ExtractionPromptScope: "PLATFORM" | "ORGANIZATION";
2241
+ ExtractionUsage: {
2242
+ /** Format: int32 */
2243
+ completionTokens: number;
2244
+ /** Format: int32 */
2245
+ promptTokens: number;
2246
+ /** Format: int32 */
2247
+ totalTokens: number;
2248
+ };
2249
+ /** @description A FORM factor key: a fixed string, or the submitted answer value itself (so each distinct
2250
+ * answer maps to its own FORM factor — e.g. a country select).
2251
+ *
2252
+ * `AnswerValue` on a `Select` field authors one `ScoreFactor` row per enumerated
2253
+ * `SelectOptions.values` entry at form-sync time (`form_risk_sync::DesiredRisk::from_sections`),
2254
+ * sharing the factor's multiplier, so any of those answers resolves to a real multiplier at
2255
+ * score time.
2256
+ *
2257
+ * **Remaining gap (D-13):** a field has no enumerable option set to author against when it is
2258
+ * not a `Select` (e.g. free-text `Text`), or when it is a `Select` with `isOtherAllowed: true`
2259
+ * and the submitted answer is the free-text "Other" value. In those cases the emitted
2260
+ * `AnswerValue` key in `FormResult.riskFactorKeys` has no matching `ScoreFactor` row, the score-time
2261
+ * lookup returns `None`, and the factor's multiplier is silently skipped (undercounting the
2262
+ * contextual multiplier). Form-sync logs a warning when this applies to a saved field. */
2263
+ FactorKey: {
2264
+ /** @enum {string} */
2265
+ type: "fixed";
2266
+ value: string;
2267
+ } | {
2268
+ /** @enum {string} */
2269
+ type: "answerValue";
2270
+ };
2271
+ FieldControlOperation: {
2272
+ /** Format: uuid */
2273
+ identityId: string;
2274
+ operation: components["schemas"]["FieldControlOperationType"];
2275
+ /** Format: date-time */
2276
+ timestamp: string;
2277
+ zid: string;
2278
+ };
2279
+ FieldControlOperationType: {
1573
2280
  markAsFalsePositive: {
1574
2281
  comment: string;
1575
2282
  };
@@ -1598,7 +2305,7 @@ export interface components {
1598
2305
  key: components["schemas"]["FactorKey"];
1599
2306
  /** Format: double */
1600
2307
  multiplier: number;
1601
- when?: Omit<components["schemas"]["Condition"], "op"> | null;
2308
+ when?: null | components["schemas"]["Condition"];
1602
2309
  };
1603
2310
  FieldRiskTag: {
1604
2311
  /** @description Target ScoreDefinition key. None = "forms" (100% backward compatible). */
@@ -1606,7 +2313,7 @@ export interface components {
1606
2313
  tag: string;
1607
2314
  /** Format: double */
1608
2315
  weight: number;
1609
- when?: Omit<components["schemas"]["Condition"], "op"> | null;
2316
+ when?: null | components["schemas"]["Condition"];
1610
2317
  };
1611
2318
  FieldWithControl: {
1612
2319
  controls: components["schemas"]["FieldControlOperation"][];
@@ -1638,7 +2345,6 @@ export interface components {
1638
2345
  themeId?: string | null;
1639
2346
  /** Format: date-time */
1640
2347
  updatedAt?: string | null;
1641
- webhookUrl: string;
1642
2348
  };
1643
2349
  FlowResult: {
1644
2350
  amlResults: components["schemas"]["AmlResult"][];
@@ -1650,23 +2356,23 @@ export interface components {
1650
2356
  [key: string]: unknown;
1651
2357
  } | null;
1652
2358
  dvResults: components["schemas"]["DvResult"][];
1653
- flow?: components["schemas"]["Flow"] | null;
2359
+ flow?: null | components["schemas"]["Flow"];
1654
2360
  flowSlug: string;
1655
2361
  formResults: components["schemas"]["FormResult"][];
1656
2362
  geolocationResults?: components["schemas"]["GeolocationResult"][];
1657
2363
  /** Format: uuid */
1658
2364
  id: string;
1659
- identity?: components["schemas"]["Identity"] | null;
2365
+ identity?: null | components["schemas"]["Identity"];
1660
2366
  jdmData: {
1661
2367
  [key: string]: components["schemas"]["FlowStepOutput"];
1662
2368
  };
1663
2369
  kybResults: components["schemas"]["KybResult"][];
1664
- organization?: components["schemas"]["Organization"] | null;
2370
+ organization?: null | components["schemas"]["Organization"];
1665
2371
  /** Format: uuid */
1666
2372
  organizationId: string;
1667
2373
  phoneResults: components["schemas"]["PhoneResult"][];
1668
2374
  poaResults: components["schemas"]["PoaResult"][];
1669
- reviewSuggestion?: components["schemas"]["ReviewSuggestion"] | null;
2375
+ reviewSuggestion?: null | components["schemas"]["ReviewSuggestion"];
1670
2376
  /**
1671
2377
  * Format: int32
1672
2378
  * @description Composed global risk score for the flow (0–100). `None` if not yet scored.
@@ -1898,6 +2604,66 @@ export interface components {
1898
2604
  type: "GEOLOCATION";
1899
2605
  /** Format: date-time */
1900
2606
  updatedAt?: string | null;
2607
+ } | {
2608
+ config: components["schemas"]["KybDocumentsConfig"];
2609
+ /** Format: date-time */
2610
+ createdAt?: string | null;
2611
+ failureUrl?: string | null;
2612
+ /** Format: uuid */
2613
+ flowId: string;
2614
+ /** Format: uuid */
2615
+ gotoStepId?: string | null;
2616
+ /** Format: uuid */
2617
+ id: string;
2618
+ name: string;
2619
+ /** Format: int32 */
2620
+ order: number;
2621
+ slug: string;
2622
+ successUrl?: string | null;
2623
+ /** @enum {string} */
2624
+ type: "KYB_DOCUMENTS";
2625
+ /** Format: date-time */
2626
+ updatedAt?: string | null;
2627
+ } | {
2628
+ config: components["schemas"]["KybUbosConfig"];
2629
+ /** Format: date-time */
2630
+ createdAt?: string | null;
2631
+ failureUrl?: string | null;
2632
+ /** Format: uuid */
2633
+ flowId: string;
2634
+ /** Format: uuid */
2635
+ gotoStepId?: string | null;
2636
+ /** Format: uuid */
2637
+ id: string;
2638
+ name: string;
2639
+ /** Format: int32 */
2640
+ order: number;
2641
+ slug: string;
2642
+ successUrl?: string | null;
2643
+ /** @enum {string} */
2644
+ type: "KYB_UBOS";
2645
+ /** Format: date-time */
2646
+ updatedAt?: string | null;
2647
+ } | {
2648
+ config: components["schemas"]["KybDirectorsConfig"];
2649
+ /** Format: date-time */
2650
+ createdAt?: string | null;
2651
+ failureUrl?: string | null;
2652
+ /** Format: uuid */
2653
+ flowId: string;
2654
+ /** Format: uuid */
2655
+ gotoStepId?: string | null;
2656
+ /** Format: uuid */
2657
+ id: string;
2658
+ name: string;
2659
+ /** Format: int32 */
2660
+ order: number;
2661
+ slug: string;
2662
+ successUrl?: string | null;
2663
+ /** @enum {string} */
2664
+ type: "KYB_DIRECTORS";
2665
+ /** Format: date-time */
2666
+ updatedAt?: string | null;
1901
2667
  };
1902
2668
  FlowStepConfig: ({
1903
2669
  stepType: "FlowStepConfig";
@@ -1954,6 +2720,21 @@ export interface components {
1954
2720
  } & (components["schemas"]["PhoneConfig"] & {
1955
2721
  /** @enum {string} */
1956
2722
  stepType: "PHONE";
2723
+ })) | ({
2724
+ stepType: "FlowStepConfig";
2725
+ } & (components["schemas"]["KybDocumentsConfig"] & {
2726
+ /** @enum {string} */
2727
+ stepType: "KYB_DOCUMENTS";
2728
+ })) | ({
2729
+ stepType: "FlowStepConfig";
2730
+ } & (components["schemas"]["KybUbosConfig"] & {
2731
+ /** @enum {string} */
2732
+ stepType: "KYB_UBOS";
2733
+ })) | ({
2734
+ stepType: "FlowStepConfig";
2735
+ } & (components["schemas"]["KybDirectorsConfig"] & {
2736
+ /** @enum {string} */
2737
+ stepType: "KYB_DIRECTORS";
1957
2738
  }));
1958
2739
  FlowStepInfo: {
1959
2740
  CONFIG: components["schemas"]["FlowStepConfig"];
@@ -2023,9 +2804,21 @@ export interface components {
2023
2804
  data: components["schemas"]["GeolocationStepOutput"];
2024
2805
  /** @enum {string} */
2025
2806
  type: "GEOLOCATION";
2807
+ } | {
2808
+ data: components["schemas"]["KybDocumentsStepOutput"];
2809
+ /** @enum {string} */
2810
+ type: "KYB_DOCUMENTS";
2811
+ } | {
2812
+ data: components["schemas"]["KybUbosStepOutput"];
2813
+ /** @enum {string} */
2814
+ type: "KYB_UBOS";
2815
+ } | {
2816
+ data: components["schemas"]["KybDirectorsStepOutput"];
2817
+ /** @enum {string} */
2818
+ type: "KYB_DIRECTORS";
2026
2819
  };
2027
2820
  /** @enum {string} */
2028
- FlowStepType: "DV" | "FORM" | "POA" | "KYB" | "SPID" | "PHONE" | "WALLET" | "LIVENESS" | "AUTO_ONE_CLICK_KYC" | "DOCUMENT_SELECTION" | "GEOLOCATION";
2821
+ FlowStepType: "DV" | "FORM" | "POA" | "KYB" | "SPID" | "PHONE" | "WALLET" | "LIVENESS" | "AUTO_ONE_CLICK_KYC" | "DOCUMENT_SELECTION" | "GEOLOCATION" | "KYB_DOCUMENTS" | "KYB_UBOS" | "KYB_DIRECTORS";
2029
2822
  Form: {
2030
2823
  /** Format: date-time */
2031
2824
  createdAt?: string | null;
@@ -2046,7 +2839,7 @@ export interface components {
2046
2839
  name: string;
2047
2840
  };
2048
2841
  FormConfig: {
2049
- form?: components["schemas"]["Form"] | null;
2842
+ form?: null | components["schemas"]["Form"];
2050
2843
  /** Format: uuid */
2051
2844
  formId: string;
2052
2845
  /** @example { "default": "Next step" } */
@@ -2077,15 +2870,15 @@ export interface components {
2077
2870
  createdAt?: string | null;
2078
2871
  /** Format: uuid */
2079
2872
  flowResultId: string;
2080
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
2873
+ flowStep?: null | components["schemas"]["FlowStep"];
2081
2874
  /** Format: uuid */
2082
2875
  flowStepId?: string | null;
2083
- form?: components["schemas"]["Form"] | null;
2876
+ form?: null | components["schemas"]["Form"];
2084
2877
  /** Format: uuid */
2085
2878
  formId?: string | null;
2086
2879
  /** Format: uuid */
2087
2880
  id: string;
2088
- reason?: components["schemas"]["FormReason"] | null;
2881
+ reason?: null | components["schemas"]["FormReason"];
2089
2882
  /** @description Risk factor keys matched during form scoring. `None` if not scored. */
2090
2883
  riskFactorKeys?: string[] | null;
2091
2884
  sections: components["schemas"]["FormSection"][];
@@ -2110,6 +2903,7 @@ export interface components {
2110
2903
  * with the reserved field names "status" and "riskScorePercent", as this would create duplicate
2111
2904
  * keys in the serialized JSON output, resulting in invalid JSON. */
2112
2905
  FormStepOutput: {
2906
+ /** @description Form submission status. */
2113
2907
  status: components["schemas"]["ResultStatus"];
2114
2908
  } & {
2115
2909
  [key: string]: unknown;
@@ -2142,7 +2936,7 @@ export interface components {
2142
2936
  deviceFingerprint?: string | null;
2143
2937
  /** Format: uuid */
2144
2938
  flowResultId: string;
2145
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
2939
+ flowStep?: null | components["schemas"]["FlowStep"];
2146
2940
  /** Format: uuid */
2147
2941
  flowStepId?: string | null;
2148
2942
  /** Format: uuid */
@@ -2180,15 +2974,59 @@ export interface components {
2180
2974
  organizationId: string;
2181
2975
  organizationName: string;
2182
2976
  settings: components["schemas"]["Settings"];
2183
- theme?: components["schemas"]["Theme"] | null;
2977
+ theme?: null | components["schemas"]["Theme"];
2978
+ };
2979
+ /** @description Response for `GET .../kyb/director-candidates`.
2980
+ *
2981
+ * Re-serves what `company-prefill` returned once, read back from the persisted provider snapshot,
2982
+ * so the directors step can populate itself without the client having to carry the candidates
2983
+ * across a step transition.
2984
+ *
2985
+ * Empty in the common case: officers live in a paid company block that prefill no longer buys, so
2986
+ * only historical snapshots carry them. Clients must treat an empty list as normal and collect
2987
+ * directors from the applicant. */
2988
+ GetKybDirectorCandidatesResponse: {
2989
+ directorCandidates: components["schemas"]["DirectorCandidate"][];
2990
+ };
2991
+ /** @description Response for `GET .../kyb/discovery`. Read-only view of the latest ownership-discovery
2992
+ * GRAPH run and the ownership structure it produced. */
2993
+ GetKybDiscoveryResponse: {
2994
+ /** @description `true` when the kill switch is on and the provider is enabled. */
2995
+ available: boolean;
2996
+ /** @description Terminal-row error detail (e.g. "graph failed validation: …") — present when the run
2997
+ * completed but its result could not be applied. */
2998
+ errorMessage?: string | null;
2999
+ /** @description Per-node expansion history (§4.3) — empty when the graph has never been extended.
3000
+ *
3001
+ * Operator-facing only. Per-node expansion is a reviewer action billed to the organization,
3002
+ * and every record carries `chargedCredits`; the applicant walking the widget must never see
3003
+ * what their onboarding cost the org. The applicant-facing route strips this via
3004
+ * [`Self::for_applicant`]. Never contains an automatic traversal wave — those are a
3005
+ * different row kind and live in `waves`. */
3006
+ expansions?: components["schemas"]["ExpansionRecord"][];
3007
+ ownershipStructure?: null | components["schemas"]["OwnershipStructure"];
3008
+ /** @description `NONE` (no run) | `PENDING` | `COMPLETED` | `FAILED` — the **base** GRAPH run's status.
3009
+ * Per-node expansion state is reported in `expansions` (and the `discovery-update` websocket
3010
+ * push), never here: a reviewer expanding one node must not flip a finished discovery back to
3011
+ * `PENDING`. */
3012
+ status: string;
3013
+ /** @description Why graph traversal stopped early, when it did (e.g. `max_depth_reached`). */
3014
+ stoppedReason?: string | null;
3015
+ traversal?: null | components["schemas"]["TraversalSummary"];
3016
+ /** @description UBO suggestions derived from the ownership graph's `isUbo` individual nodes. */
3017
+ uboSuggestions: components["schemas"]["UboSuggestion"][];
3018
+ /** @description The applicant-facing automatic traversal's continuation waves (ENG-1009), oldest first —
3019
+ * empty when the traversal never needed one. Operator-facing only, stripped by
3020
+ * [`Self::for_applicant`]. */
3021
+ waves?: components["schemas"]["TraversalWave"][];
2184
3022
  };
2185
3023
  /** @description Response to the `liveness-challenge` endpoint.
2186
3024
  *
2187
3025
  * The `mode` discriminant tells the client which capture flow to perform:
2188
3026
  * - `"ACTIVE"` — head-movement challenge; the client captures movements and
2189
- * uploads movement images + video + calibration image.
3027
+ * uploads movement images + video + calibration image.
2190
3028
  * - `"PASSIVE"` — selfie-only; the client uploads only a calibration image.
2191
- * No movements are required. */
3029
+ * No movements are required. */
2192
3030
  GetLivenessChallengeResponse: {
2193
3031
  calibrationImage: components["schemas"]["LivenessUploadUrl"];
2194
3032
  /** Format: float */
@@ -2214,8 +3052,8 @@ export interface components {
2214
3052
  GetNextStepPayload: {
2215
3053
  /** @description Wallet address. Required when `credentialType` is `WALLET`. */
2216
3054
  address?: string | null;
2217
- chain?: components["schemas"]["SiwxChain"] | null;
2218
- credentialType?: components["schemas"]["CredentialType"] | null;
3055
+ chain?: null | components["schemas"]["SiwxChain"];
3056
+ credentialType?: null | components["schemas"]["CredentialType"];
2219
3057
  /** @description Email address of the user whose verification progress should be queried. */
2220
3058
  email?: string | null;
2221
3059
  /** @description External identifier. Required when `credentialType` is `EXTERNAL_ID`. */
@@ -2235,15 +3073,15 @@ export interface components {
2235
3073
  flowResultId?: string | null;
2236
3074
  /** @description Whether the user has completed all required steps in the flow. */
2237
3075
  isCompleted: boolean;
2238
- nextStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
3076
+ nextStep?: null | components["schemas"]["FlowStep"];
2239
3077
  };
2240
3078
  GetVerificationRequestResponse: {
2241
3079
  /** @description External ID credential configured for this identity, if any. */
2242
3080
  externalId?: string | null;
2243
3081
  identity: components["schemas"]["Identity"];
2244
- passkey?: components["schemas"]["VaultUnlockPasskeyData"] | null;
3082
+ passkey?: null | components["schemas"]["VaultUnlockPasskeyData"];
2245
3083
  verificationRequest: components["schemas"]["VerificationRequest"];
2246
- wallet?: components["schemas"]["WalletIdentifierPayload"] | null;
3084
+ wallet?: null | components["schemas"]["WalletIdentifierPayload"];
2247
3085
  };
2248
3086
  /**
2249
3087
  * @description Represents the different head movements that can be requested in a liveness challenge
@@ -2269,6 +3107,10 @@ export interface components {
2269
3107
  IdentitySettings: {
2270
3108
  lastEnvironmentIsSandbox?: boolean;
2271
3109
  locale: components["schemas"]["Locale"];
3110
+ /** @description Marks an identity as demo/synthetic data (e.g. the TM sandbox seeder, ENG-972) —
3111
+ * distinguishable from real end-user identities for hygiene/cleanup purposes. Never set for
3112
+ * a real verified identity. */
3113
+ synthetic?: boolean;
2272
3114
  };
2273
3115
  /** @description Result of an image quality check.
2274
3116
  *
@@ -2286,7 +3128,14 @@ export interface components {
2286
3128
  * { "type": 1, "result": 0, "probability": 97, "featureType": 0, "mean": 0.0, "stdDev": 0.0 }
2287
3129
  * ``` */
2288
3130
  ImageQualityCheckResult: {
3131
+ /** @description Reported to the holder, excluded from the document score. Set when the check means
3132
+ * "this capture could not be read" rather than "this document is poor". */
3133
+ advisory?: boolean;
2289
3134
  checkType: components["schemas"]["ImageQualityCheckType"];
3135
+ /** @description Why the check landed where it did — the gate that tripped, the value measured and the
3136
+ * bar it missed. A failed image-quality check is what turns a holder away and asks them
3137
+ * to shoot again, so it is the one result that always has to be explainable. */
3138
+ details?: unknown;
2290
3139
  /** Format: int32 */
2291
3140
  probability?: number | null;
2292
3141
  result: components["schemas"]["CheckStatus"];
@@ -2308,26 +3157,35 @@ export interface components {
2308
3157
  * @enum {string}
2309
3158
  */
2310
3159
  ImageQualityCheckType: "glare" | "focus" | "resolution" | "colorness" | "perspective" | "bounds" | "screen_capture" | "portrait" | "image_quality" | "unknown";
3160
+ /** @description One live expansion already running against this KYB result, surfaced by the preview so the
3161
+ * operator can see what is in flight before choosing more nodes. */
3162
+ InFlightExpansion: {
3163
+ /** Format: uuid */
3164
+ discoveryId: string;
3165
+ nodeId: string;
3166
+ /** Format: date-time */
3167
+ startedAt: string;
3168
+ };
2311
3169
  InputField: {
2312
3170
  label: {
2313
3171
  [key: string]: string;
2314
3172
  };
2315
3173
  name: string;
2316
3174
  options: unknown;
2317
- requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2318
- risk?: components["schemas"]["FieldRiskConfig"] | null;
3175
+ requiredWhen?: null | components["schemas"]["Condition"];
3176
+ risk?: null | components["schemas"]["FieldRiskConfig"];
2319
3177
  /** @enum {string} */
2320
3178
  type: "date";
2321
3179
  value?: unknown;
2322
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
3180
+ visibleWhen?: null | components["schemas"]["Condition"];
2323
3181
  } | {
2324
3182
  label: {
2325
3183
  [key: string]: string;
2326
3184
  };
2327
3185
  name: string;
2328
3186
  options: unknown;
2329
- requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2330
- risk?: components["schemas"]["FieldRiskConfig"] | null;
3187
+ requiredWhen?: null | components["schemas"]["Condition"];
3188
+ risk?: null | components["schemas"]["FieldRiskConfig"];
2331
3189
  /** @enum {string} */
2332
3190
  type: "text";
2333
3191
  /** @description Optional regex pattern validated against the submitted value.
@@ -2335,59 +3193,59 @@ export interface components {
2335
3193
  * backend validate against it on submission. */
2336
3194
  validationRegex?: string | null;
2337
3195
  value?: unknown;
2338
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
3196
+ visibleWhen?: null | components["schemas"]["Condition"];
2339
3197
  } | {
2340
3198
  label: {
2341
3199
  [key: string]: string;
2342
3200
  };
2343
3201
  name: string;
2344
3202
  options: unknown;
2345
- requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2346
- risk?: components["schemas"]["FieldRiskConfig"] | null;
3203
+ requiredWhen?: null | components["schemas"]["Condition"];
3204
+ risk?: null | components["schemas"]["FieldRiskConfig"];
2347
3205
  /** @enum {string} */
2348
3206
  type: "number";
2349
3207
  /** @description Optional regex pattern validated against the stringified submitted number. */
2350
3208
  validationRegex?: string | null;
2351
3209
  value?: unknown;
2352
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
3210
+ visibleWhen?: null | components["schemas"]["Condition"];
2353
3211
  } | {
2354
3212
  label: {
2355
3213
  [key: string]: string;
2356
3214
  };
2357
3215
  name: string;
2358
3216
  options: unknown;
2359
- requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2360
- risk?: components["schemas"]["FieldRiskConfig"] | null;
3217
+ requiredWhen?: null | components["schemas"]["Condition"];
3218
+ risk?: null | components["schemas"]["FieldRiskConfig"];
2361
3219
  /** @enum {string} */
2362
3220
  type: "textarea";
2363
3221
  /** @description Optional regex pattern validated against the submitted value. */
2364
3222
  validationRegex?: string | null;
2365
3223
  value?: unknown;
2366
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
3224
+ visibleWhen?: null | components["schemas"]["Condition"];
2367
3225
  } | {
2368
3226
  label: {
2369
3227
  [key: string]: string;
2370
3228
  };
2371
3229
  name: string;
2372
3230
  options: unknown;
2373
- requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2374
- risk?: components["schemas"]["FieldRiskConfig"] | null;
3231
+ requiredWhen?: null | components["schemas"]["Condition"];
3232
+ risk?: null | components["schemas"]["FieldRiskConfig"];
2375
3233
  /** @enum {string} */
2376
3234
  type: "checkbox";
2377
3235
  value?: unknown;
2378
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
3236
+ visibleWhen?: null | components["schemas"]["Condition"];
2379
3237
  } | {
2380
3238
  label: {
2381
3239
  [key: string]: string;
2382
3240
  };
2383
3241
  name: string;
2384
3242
  options: components["schemas"]["FileOptions"];
2385
- requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2386
- risk?: components["schemas"]["FieldRiskConfig"] | null;
3243
+ requiredWhen?: null | components["schemas"]["Condition"];
3244
+ risk?: null | components["schemas"]["FieldRiskConfig"];
2387
3245
  /** @enum {string} */
2388
3246
  type: "file";
2389
3247
  value?: unknown;
2390
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
3248
+ visibleWhen?: null | components["schemas"]["Condition"];
2391
3249
  } | {
2392
3250
  label: {
2393
3251
  [key: string]: string;
@@ -2400,30 +3258,31 @@ export interface components {
2400
3258
  };
2401
3259
  };
2402
3260
  options: components["schemas"]["SelectOptions"];
2403
- requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2404
- risk?: components["schemas"]["FieldRiskConfig"] | null;
3261
+ requiredWhen?: null | components["schemas"]["Condition"];
3262
+ risk?: null | components["schemas"]["FieldRiskConfig"];
2405
3263
  /** @enum {string} */
2406
3264
  type: "select";
2407
3265
  value?: unknown;
2408
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
3266
+ visibleWhen?: null | components["schemas"]["Condition"];
2409
3267
  } | {
2410
3268
  label: {
2411
3269
  [key: string]: string;
2412
3270
  };
2413
3271
  name: string;
2414
3272
  options: unknown;
2415
- requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2416
- risk?: components["schemas"]["FieldRiskConfig"] | null;
3273
+ requiredWhen?: null | components["schemas"]["Condition"];
3274
+ risk?: null | components["schemas"]["FieldRiskConfig"];
2417
3275
  /** @enum {string} */
2418
3276
  type: "place";
2419
3277
  value?: unknown;
2420
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
3278
+ visibleWhen?: null | components["schemas"]["Condition"];
2421
3279
  };
2422
3280
  InputFieldOptions: components["schemas"]["FileOptions"] | components["schemas"]["SelectOptions"] | unknown;
2423
3281
  /** @enum {string} */
2424
3282
  InputFieldType: "date" | "text" | "number" | "textarea" | "checkbox" | "file" | "select" | "place";
2425
3283
  /** @description Input image for document scanning. */
2426
3284
  InputImage: {
3285
+ /** @description Page index */
2427
3286
  pageIndex: components["schemas"]["InputImagePageIndex"];
2428
3287
  /** @description Image source identifier */
2429
3288
  source: string;
@@ -2462,12 +3321,29 @@ export interface components {
2462
3321
  sentAt?: string | null;
2463
3322
  subject: string;
2464
3323
  };
3324
+ /** @description The KYB anchor step's configuration.
3325
+ *
3326
+ * **Deprecated document inputs.** `certificateOfIncorporation`, `articlesOfAssociation`,
3327
+ * `organizationalStructureChart`, `proofOfAttorney` and `customDocuments` are still accepted on
3328
+ * input and folded into `customCountryDocuments["**"]` (see
3329
+ * `KybDocumentCatalog::fold_legacy_documents`); they are never serialized. */
2465
3330
  KybConfig: {
2466
3331
  /** @default DISABLED */
2467
3332
  agenticMode: components["schemas"]["KybAgenticMode"];
3333
+ /**
3334
+ * @description Offer the applicant an individual-vs-business choice at the start of the step.
3335
+ *
3336
+ * **Frontend marker only** — the backend persists and serves it but takes no behaviour from it,
3337
+ * so nothing downstream branches on this flag. When `false` (the default) the widget skips the
3338
+ * choice and treats the subject as a **business**, which is the pre-existing behaviour for every
3339
+ * flow assembled before this field existed. Default-off is what makes adding it a no-op for
3340
+ * live flows.
3341
+ * @default false
3342
+ * @example true
3343
+ */
3344
+ allowIndividualSubject: boolean;
2468
3345
  /** @default DISABLED */
2469
3346
  amlAgenticMode: components["schemas"]["KybAgenticMode"];
2470
- articlesOfAssociation?: components["schemas"]["DocumentConfig"] | null;
2471
3347
  /**
2472
3348
  * @description When `false`, the KYC invitation email is NOT automatically sent to UBOs on KYB
2473
3349
  * submission; a reviewer instead triggers it on demand via the UBO reminder endpoint
@@ -2477,33 +3353,71 @@ export interface components {
2477
3353
  * @example true
2478
3354
  */
2479
3355
  autoSendUboKycEmail: boolean;
2480
- certificateOfIncorporation?: components["schemas"]["DocumentConfig"] | null;
2481
3356
  /**
2482
3357
  * @default false
2483
3358
  * @example false
2484
3359
  */
2485
3360
  collectDirectors: boolean;
2486
- /** @description Per-org, per-country document overrides set by the org admin in the flow builder.
2487
- * Takes priority over platform-level document definitions for matching countries.
2488
- * Stored in the flow step config JSON. NOT used in extraction/cross-check.
2489
- *
2490
- * Keys are ISO 3166-1 alpha-2 codes (normalised from any ISO format on input). */
3361
+ /** @description The organisation's document configuration: per-key overrides of the platform catalog and
3362
+ * organisation-only documents, keyed by ISO 3166-1 alpha-2 code (normalised from any ISO
3363
+ * format on input) or by the universal [`GLOBAL_DOCUMENTS_KEY`] for every country without a
3364
+ * list of its own. A country list replaces the universal list for that country; neither
3365
+ * replaces the platform catalog. See `KybDocumentCatalog::resolve_for_country`. */
2491
3366
  customCountryDocuments?: {
2492
3367
  [key: string]: components["schemas"]["KybCountryDocument"][];
2493
3368
  };
2494
- customDocuments?: components["schemas"]["CustomDocumentConfig"][] | null;
2495
- /** @description Merged per-country document map populated at rehydration time.
3369
+ /**
3370
+ * Format: int32
3371
+ * @description Per-verification cap (in credits) on ownership-discovery spend. `None` = platform default.
3372
+ * Only consulted when `discovery_enabled` is set. See `discovery_enabled` above for why this
3373
+ * moved here from `KybUbosConfig::discovery_budget_credits`.
3374
+ * @example 3000
3375
+ */
3376
+ discoveryBudgetCredits?: number | null;
3377
+ /**
3378
+ * @description Whether this anchor's business-information submission dispatches ownership discovery
3379
+ * (the base ownership-graph traversal) server-side.
3380
+ *
3381
+ * Moved here (2026-07-31, integration plan §10.4) from `KybUbosConfig`, where it originally
3382
+ * lived back when discovery was a `KYB_UBOS`-step-initiated action. Discovery now dispatches
3383
+ * from the ANCHOR on business-info submission (`KybDiscoveryService::start_graph_discovery`,
3384
+ * called from `submit_kyb_business_info`), so the opt-in has to live where the behavior
3385
+ * actually triggers. `KybUbosConfig` does **not** keep a copy — both discovery fields were
3386
+ * deleted from it outright (see its doc comment below). Nothing needs one: `KybUbosConfig`
3387
+ * has no `deny_unknown_fields`, so already-persisted flow-step JSON — and the historical
3388
+ * `m20260717_split_kyb_step` migration, which is never edited once applied — keep
3389
+ * deserializing whether the old keys are still present or `m20260731_kyb_discovery_replaces_declarations`
3390
+ * has stripped them. Defaults to `false`: a traversal spends the organization's credits, so a
3391
+ * flow that never opted in must never dispatch one.
3392
+ * @default false
3393
+ * @example true
3394
+ */
3395
+ discoveryEnabled: boolean;
3396
+ /** @description The effective upfront documents per country, materialised at rehydration time **for
3397
+ * clients** (read-only).
2496
3398
  *
2497
- * Built by `rehydrate_flow_step` by merging platform-level DB definitions
2498
- * with org-admin `custom_country_documents` (custom wins per-country).
2499
- * This is the single source of truth for document requirements at runtime.
2500
- * Frontend uses this to render upload UI — no priority logic needed client-side.
2501
- * Also round-trips through cache so frontend always sees correct data. */
3399
+ * One entry per country the platform catalog or `customCountryDocuments` names, plus the
3400
+ * universal [`GLOBAL_DOCUMENTS_KEY`] entry, which is always present: resolve
3401
+ * `documentsPerCountry[country] ?? documentsPerCountry["**"]`. On-demand and disabled
3402
+ * documents are left out and `validationSchema` is emptied.
3403
+ *
3404
+ * **Not a server-side source of truth.** A stored step config never carries it; server-side
3405
+ * callers resolve from the live catalog through `DocumentDefinitionService::load_gating_documents`
3406
+ * / `load_upfront_documents`. It round-trips through the flow cache to save the client a
3407
+ * round trip. */
2502
3408
  documentsPerCountry?: {
2503
3409
  [key: string]: components["schemas"]["KybCountryDocument"][];
2504
3410
  } | null;
2505
- /** Format: uuid */
2506
- kycFlowId: string;
3411
+ /**
3412
+ * Format: uuid
3413
+ * @description Moved to `KybUbosConfig`/`KybDirectorsConfig` (each satellite now carries its own copy,
3414
+ * enabling a *different* KYC flow for directors than UBOs — a new capability). During the
3415
+ * dual-shape window (WP2->WP4) this anchor-level copy stays with `#[serde(default)]` so a
3416
+ * flow assembled natively in split shape (no UBOs/directors satellite, hence nothing to
3417
+ * mirror this from) can omit `kycFlowId` entirely on the anchor, matching every other moved
3418
+ * field on this struct — dropped from the Rust struct in WP5.
3419
+ */
3420
+ kycFlowId?: string;
2507
3421
  /** @example { "default": "Next step" } */
2508
3422
  labels?: {
2509
3423
  [key: string]: string;
@@ -2526,21 +3440,33 @@ export interface components {
2526
3440
  * @example 3
2527
3441
  */
2528
3442
  maxUbos: number;
2529
- organizationalStructureChart?: components["schemas"]["DocumentConfig"] | null;
2530
- proofOfAttorney?: components["schemas"]["DocumentConfig"] | null;
2531
3443
  };
2532
- /** @description A document required for KYB in a specific country.
3444
+ /** @description One KYB document, either as a platform catalog row, as an organisation override in
3445
+ * `customCountryDocuments`, or as an entry of a resolved (effective) list.
2533
3446
  *
2534
- * Populated at runtime via rehydration from the platform-level
2535
- * `document_definitions` table. Contains the extraction/validation
2536
- * schema for future LLM-driven field extraction. */
3447
+ * In an organisation's `customCountryDocuments` an entry whose `key` matches a platform row is a
3448
+ * per-key **override** of that row: the organisation owns `required`, `onDemand`, `enabled` and a
3449
+ * non-blank `label`, while `validationSchema`, `groupKey` and `source` always come from the
3450
+ * platform row. An entry with any other key is an organisation-only document. */
2537
3451
  KybCountryDocument: {
3452
+ /** @description `false` removes the document: it is not offered, not required and not requestable. This is
3453
+ * how an organisation drops a platform document, for one country or for every country at
3454
+ * once. Resolved lists never contain a disabled entry. Defaults to `true`. */
3455
+ enabled?: boolean;
3456
+ /** @description Groups this document with the others carrying the same value into a set of
3457
+ * mutually-satisfying **alternatives**: the group counts as one requirement, and a single
3458
+ * upload of any member satisfies it. Models the KYB spec's "submit one of: Certificate of
3459
+ * Incumbency | Company Register Extract | Certified Registers". `None` (the common case)
3460
+ * means the document stands alone and must be uploaded on its own. Platform-owned. */
3461
+ groupKey?: string | null;
2538
3462
  /** @description Machine-readable key used as the document type identifier (e.g.
2539
3463
  * `"visura_camerale"`, `"certificate_of_incorporation"`).
2540
3464
  * Unique within (scope, country). */
2541
3465
  key: string;
2542
- /** @description Human-readable label shown to the user during the KYB flow. */
2543
- label: string;
3466
+ /** @description Human-readable label shown to the user during the KYB flow. On an organisation override a
3467
+ * blank label keeps the platform's own label, which is why a bare `{ key, enabled: false }`
3468
+ * entry is a valid override. */
3469
+ label?: string;
2544
3470
  /** @description When `true`, the document is NOT demanded upfront (excluded from the required-document
2545
3471
  * gate) and is instead requested on demand by a reviewer during review. Defaults to
2546
3472
  * `false`. */
@@ -2548,14 +3474,104 @@ export interface components {
2548
3474
  /** @description Whether upload of this document is mandatory for KYB approval.
2549
3475
  * Defaults to `true`. */
2550
3476
  required?: boolean;
2551
- /** @description JSON schema for extraction/validation. Opaque for now — will be used by
2552
- * `KybDocumentIntelligenceService` for schema-driven field extraction. */
3477
+ source?: null | components["schemas"]["KybDocumentSource"];
3478
+ /** @description JSON Schema of extracted facts. `properties` defines fields, `x-schemaVersion` versions
3479
+ * the contract, and `x-validationRules` carries acceptance criteria outside the output data.
3480
+ * Platform-owned, and emptied (`{}`) in every map served to a client. */
2553
3481
  validationSchema?: unknown;
2554
3482
  };
3483
+ /** @description Configuration for the `KYB_DIRECTORS` satellite step.
3484
+ *
3485
+ * Carries the director declaration settings previously bundled into the monolithic
3486
+ * `KybConfig` (gated there by `collect_directors: bool`). The existence of this step
3487
+ * replaces that boolean. `kyb_step_id` points at the anchor `KYB` step.
3488
+ *
3489
+ * `kyc_flow_id` is a copy independent from `KybUbosConfig.kyc_flow_id` — this enables
3490
+ * a *different* KYC flow for directors than for UBOs, a new capability. */
3491
+ KybDirectorsConfig: {
3492
+ /**
3493
+ * Format: uuid
3494
+ * @description The anchor KYB step this directors satellite belongs to.
3495
+ */
3496
+ kybStepId: string;
3497
+ /**
3498
+ * Format: uuid
3499
+ * @description See [`KybUbosConfig::kyc_flow_id`]. Only meaningful when `require_kyc` is set.
3500
+ */
3501
+ kycFlowId?: string;
3502
+ /** @example { "default": "Next step" } */
3503
+ labels?: {
3504
+ [key: string]: string;
3505
+ };
3506
+ /**
3507
+ * Format: int32
3508
+ * @default 10
3509
+ * @example 3
3510
+ */
3511
+ maxDirectors: number;
3512
+ /**
3513
+ * @description Directors analogue of [`KybUbosConfig::require_kyc`], with the same default (`true`) and
3514
+ * the same two consequences: whether the widget demands an email per director, and whether
3515
+ * the backend resolves `kyc_flow_id` to invite them. Independent of the UBO copy — a flow may
3516
+ * KYC its UBOs while screening its directors by name only, or the reverse.
3517
+ * @default true
3518
+ * @example false
3519
+ */
3520
+ requireKyc: boolean;
3521
+ };
3522
+ /** @description KYB directors satellite step output for workflow decisions. */
3523
+ KybDirectorsStepOutput: {
3524
+ allDirectorsVerified: boolean;
3525
+ /** Format: int32 */
3526
+ directorCount: number;
3527
+ };
3528
+ /** @description A reviewer's correction of one document check verdict. */
3529
+ KybDocumentCheckOverride: {
3530
+ modelStatus?: null | components["schemas"]["KybDocumentCheckStatus"];
3531
+ /** Format: date-time */
3532
+ overriddenAt: string;
3533
+ /** Format: uuid */
3534
+ overriddenBy: string;
3535
+ };
3536
+ /**
3537
+ * @description Verdict of one supplementary document check (a non-business extracted field, or the
3538
+ * document's `acceptanceRules`). Reasons are never exposed; they stay in the S3 history payload.
3539
+ * @enum {string}
3540
+ */
3541
+ KybDocumentCheckStatus: "match" | "mismatch" | "notFound" | "notCheckable";
3542
+ /** @description Reviewer-facing summary of one uploaded document in the latest cross-check: what it was
3543
+ * classified as, whether extraction succeeded, and the status of every document check. */
3544
+ KybDocumentCheckSummary: {
3545
+ /** @description Check name (`acceptanceRules`, `directors`, …) → verdict. Empty for a failed extraction. */
3546
+ checks: {
3547
+ [key: string]: components["schemas"]["KybDocumentCheckStatus"];
3548
+ };
3549
+ /** @description The catalog key the upload was classified as; `None` for an unclassified upload. */
3550
+ definitionKey?: string | null;
3551
+ definitionLabel?: string | null;
3552
+ documentType?: null | components["schemas"]["KybDocumentCheckStatus"];
3553
+ /** @description Stable failure code (`UNSUPPORTED_MEDIA`, `INVALID_EXTRACTION`, …) when `status` is `FAILED`. */
3554
+ errorCode?: string | null;
3555
+ /** Format: uuid */
3556
+ extractionId: string;
3557
+ /** @description The checks a reviewer corrected, by name (`@documentType` for the document-type verdict).
3558
+ * `documentType` and `checks` already carry the corrected status; this says what the model
3559
+ * said and who changed it. */
3560
+ overrides?: {
3561
+ [key: string]: components["schemas"]["KybDocumentCheckOverride"];
3562
+ };
3563
+ sourceS3Key: string;
3564
+ status: components["schemas"]["KybDocumentExtractionStatus"];
3565
+ };
3566
+ /**
3567
+ * @description Outcome of one per-document extraction (`KybDocumentExtraction.status`).
3568
+ * @enum {string}
3569
+ */
3570
+ KybDocumentExtractionStatus: "COMPLETED" | "FAILED";
2555
3571
  KybDocumentRequest: {
2556
3572
  /** @description Clarification field keys requested for review (for clarification requests only). */
2557
3573
  clarificationFields?: string[] | null;
2558
- clarificationResponse?: components["schemas"]["BusinessInformationClarificationResponse"] | null;
3574
+ clarificationResponse?: null | components["schemas"]["BusinessInformationClarificationResponse"];
2559
3575
  /** Format: date-time */
2560
3576
  createdAt?: string | null;
2561
3577
  description?: string | null;
@@ -2577,10 +3593,11 @@ export interface components {
2577
3593
  previousValues?: {
2578
3594
  [key: string]: string;
2579
3595
  } | null;
3596
+ /** @description The type of this document request. */
2580
3597
  requestType: components["schemas"]["KybDocumentRequestType"];
2581
3598
  /** Format: uuid */
2582
3599
  requestedByIdentityId: string;
2583
- reviewReason?: components["schemas"]["KybDocumentReviewReason"] | null;
3600
+ reviewReason?: null | components["schemas"]["KybDocumentReviewReason"];
2584
3601
  status: components["schemas"]["KybDocumentRequestStatus"];
2585
3602
  /** Format: date-time */
2586
3603
  updatedAt?: string | null;
@@ -2594,14 +3611,75 @@ export interface components {
2594
3611
  *
2595
3612
  * - `Standard` — operator requests a named document (e.g. certificate of incorporation). The client uploads a file.
2596
3613
  * - `Clarification` — operator requests the client to re-confirm or update specific business information fields.
2597
- * Supports per-field review via `field_statuses`.
3614
+ * Supports per-field review via `field_statuses`.
3615
+ * - `UboDeclaration` — reopens the `KYB_UBOS` satellite for a fresh applicant declaration (X6a,
3616
+ * 2026-07-31 integration plan §10.2 E5). Used to regress a discovery-backed flow's UBOs part
3617
+ * back to awaiting-client when the graph produced nothing usable.
3618
+ * - `DirectorDeclaration` — same as `UboDeclaration`, for the `KYB_DIRECTORS` satellite.
2598
3619
  * @enum {string}
2599
3620
  */
2600
- KybDocumentRequestType: "STANDARD" | "CLARIFICATION";
3621
+ KybDocumentRequestType: "STANDARD" | "CLARIFICATION" | "UBO_DECLARATION" | "DIRECTOR_DECLARATION";
2601
3622
  KybDocumentReviewReason: string | components["schemas"]["BusinessInformationClarificationResponse"];
3623
+ /**
3624
+ * @description Where an effective KYB document entry comes from.
3625
+ *
3626
+ * Set by resolution (`KybDocumentCatalog::resolve_for_country`), never trusted from a stored
3627
+ * config: an entry whose `key` matches a platform `DocumentDefinitions` row is `platform`, however
3628
+ * the organisation overrode it, and every other entry is `organization`.
3629
+ * @enum {string}
3630
+ */
3631
+ KybDocumentSource: "platform" | "organization";
3632
+ /** @description Configuration for the `KYB_DOCUMENTS` satellite step.
3633
+ *
3634
+ * Carries the document requirements previously bundled into the monolithic `KybConfig`.
3635
+ * `kyb_step_id` points at the anchor `KYB` step (same pattern as `LivenessConfig.document_step_id`).
3636
+ *
3637
+ * **Deprecated document inputs.** `certificateOfIncorporation`, `articlesOfAssociation`,
3638
+ * `organizationalStructureChart`, `proofOfAttorney` and `customDocuments` are still accepted on
3639
+ * input and folded into `customCountryDocuments["**"]` (see
3640
+ * `KybDocumentCatalog::fold_legacy_documents`); they are never serialized. */
3641
+ KybDocumentsConfig: {
3642
+ /** @description The organisation's document configuration. See `KybConfig::custom_country_documents`, whose
3643
+ * semantics this mirrors. */
3644
+ customCountryDocuments?: {
3645
+ [key: string]: components["schemas"]["KybCountryDocument"][];
3646
+ };
3647
+ /** @description The effective upfront documents per country, populated at rehydration time (see
3648
+ * `KybConfig::documents_per_country`, whose semantics this mirrors). */
3649
+ documentsPerCountry?: {
3650
+ [key: string]: components["schemas"]["KybCountryDocument"][];
3651
+ } | null;
3652
+ /**
3653
+ * Format: uuid
3654
+ * @description The anchor KYB step this documents satellite belongs to.
3655
+ */
3656
+ kybStepId: string;
3657
+ /** @example { "default": "Next step" } */
3658
+ labels?: {
3659
+ [key: string]: string;
3660
+ };
3661
+ /**
3662
+ * Format: int32
3663
+ * @default 10
3664
+ * @example 5
3665
+ */
3666
+ maxFileUploads: number;
3667
+ };
3668
+ /** @description KYB documents satellite step output for workflow decisions.
3669
+ *
3670
+ * Thin output for the `KYB_DOCUMENTS` step (see `FlowStepOutput::Kyb` for the KYB
3671
+ * aggregate carried on the anchor step). */
3672
+ KybDocumentsStepOutput: {
3673
+ requiredSatisfied: boolean;
3674
+ /** Format: int32 */
3675
+ uploadedCount: number;
3676
+ };
2602
3677
  /** @description The KYB result metadata bag. Empty by default. */
2603
3678
  KybMetadata: {
2604
- ownershipStructure?: components["schemas"]["OwnershipStructure"] | null;
3679
+ dueDiligenceLevel?: null | components["schemas"]["DueDiligenceLevel"];
3680
+ ownershipStructure?: null | components["schemas"]["OwnershipStructure"];
3681
+ registryStatus?: null | components["schemas"]["CompanyStatus"];
3682
+ screeningStrategy?: null | components["schemas"]["ScreeningStrategy"];
2605
3683
  } & {
2606
3684
  [key: string]: unknown;
2607
3685
  };
@@ -2610,22 +3688,26 @@ export interface components {
2610
3688
  assignedAt?: string | null;
2611
3689
  /** Format: uuid */
2612
3690
  assignedToIdentityId?: string | null;
2613
- businessInformation?: components["schemas"]["BusinessInformation"] | null;
3691
+ businessInformation?: null | components["schemas"]["BusinessInformation"];
2614
3692
  businessInformationVerification?: {
2615
3693
  [key: string]: components["schemas"]["BusinessInfoFieldVerification"];
2616
3694
  } | null;
2617
3695
  /** Format: date-time */
2618
3696
  createdAt?: string | null;
2619
3697
  directorDefinitions?: components["schemas"]["DirectorDefinition"][] | null;
3698
+ /** @description One entry per uploaded document of the latest cross-check, with the status of every
3699
+ * document check (acceptance rules first among them). Populated on the same reviewer-facing
3700
+ * reads as `effective_required_documents`; `None` elsewhere and before any cross-check ran. */
3701
+ documentChecks?: components["schemas"]["KybDocumentCheckSummary"][] | null;
2620
3702
  documentUploads?: components["schemas"]["DocumentUpload"][] | null;
2621
3703
  /** @description The effective list of required KYB documents for this result's country.
2622
3704
  *
2623
- * Resolved by `DocumentDefinitionService::resolve_for_country` using the full
3705
+ * Resolved by `KybDocumentCatalog::resolve_for_country` using the full
2624
3706
  * priority chain: platform DB definitions → org-admin `custom_country_documents`
2625
3707
  * → global legacy fields. `None` until explicitly set by a caller with DB access
2626
3708
  * (e.g. the MCP `get_kyb_result` tool). Not computed in the `From` conversion. */
2627
3709
  effectiveRequiredDocuments?: components["schemas"]["KybCountryDocument"][] | null;
2628
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
3710
+ flowStep?: null | components["schemas"]["FlowStep"];
2629
3711
  /** Format: uuid */
2630
3712
  flowStepId?: string | null;
2631
3713
  /** Format: date-time */
@@ -2635,7 +3717,7 @@ export interface components {
2635
3717
  /** @description Admin-curated metadata. Organizations read it; only admins write it.
2636
3718
  * Empty (`{}`) when nothing has been recorded. */
2637
3719
  metadata?: Record<string, never>;
2638
- nextAction?: components["schemas"]["NextAction"] | null;
3720
+ nextAction?: null | components["schemas"]["NextAction"];
2639
3721
  pepAndSanctionsStatus: components["schemas"]["PepAndSanctionsStatus"];
2640
3722
  reason?: string | null;
2641
3723
  report?: string | null;
@@ -2654,86 +3736,82 @@ export interface components {
2654
3736
  amlSanctions?: boolean | null;
2655
3737
  businessName?: string | null;
2656
3738
  country?: string | null;
2657
- moderationStatus?: components["schemas"]["ModerationResultStatus"] | null;
2658
- pepAndSanctionsStatus?: components["schemas"]["PepAndSanctionsStatus"] | null;
3739
+ moderationStatus?: null | components["schemas"]["ModerationResultStatus"];
3740
+ pepAndSanctionsStatus?: null | components["schemas"]["PepAndSanctionsStatus"];
2659
3741
  registrationNumber?: string | null;
2660
3742
  status: components["schemas"]["ResultStatus"];
2661
3743
  };
2662
- ListAllFlowResultsResponse: {
2663
- page: components["schemas"]["FlowResult"][];
2664
- /** Format: int64 */
2665
- totalCount: number;
2666
- };
2667
- ListAllUsersResponse: {
2668
- page: components["schemas"]["Identity"][];
2669
- /** Format: int64 */
2670
- totalCount: number;
2671
- };
2672
- ListAuditLogResponse: {
2673
- page: components["schemas"]["AuditLogEntry"][];
2674
- /** Format: int64 */
2675
- totalCount: number;
2676
- };
2677
- ListOrganizationApiKeysResponse: {
2678
- page: components["schemas"]["ZypheApiKey"][];
2679
- /** Format: int64 */
2680
- totalCount: number;
2681
- };
2682
- ListOrganizationFlowResultHistoryResponse: {
2683
- page: components["schemas"]["VerificationRequest"][];
2684
- /** Format: int64 */
2685
- totalCount: number;
2686
- };
2687
- ListOrganizationFlowResultsResponse: {
2688
- page: components["schemas"]["FlowResult"][];
2689
- /** Format: int64 */
2690
- totalCount: number;
2691
- };
2692
- ListOrganizationFlowsResponse: {
2693
- page: components["schemas"]["Flow"][];
2694
- /** Format: int64 */
2695
- totalCount: number;
2696
- };
2697
- ListOrganizationFormsResponse: {
2698
- page: components["schemas"]["Form"][];
2699
- /** Format: int64 */
2700
- totalCount: number;
2701
- };
2702
- ListOrganizationInvitesResponse: {
2703
- page: components["schemas"]["OrganizationInvite"][];
2704
- /** Format: int64 */
2705
- totalCount: number;
2706
- };
2707
- ListOrganizationUsersResponse: {
2708
- page: components["schemas"]["Identity"][];
2709
- /** Format: int64 */
2710
- totalCount: number;
2711
- };
2712
- ListOrganizationVerificationRequestsResponse: {
2713
- page: components["schemas"]["VerificationRequest"][];
2714
- /** Format: int64 */
2715
- totalCount: number;
3744
+ /** @description Configuration for the `KYB_UBOS` satellite step.
3745
+ *
3746
+ * Carries the UBO declaration + child-KYC invitation settings previously bundled
3747
+ * into the monolithic `KybConfig`. `kyb_step_id` points at the anchor `KYB` step. */
3748
+ KybUbosConfig: {
3749
+ /**
3750
+ * @description When `false`, the KYC invitation email is NOT automatically sent to UBOs on
3751
+ * submission; a reviewer instead triggers it on demand via the UBO reminder
3752
+ * endpoint (which sends the initial invitation for un-onboarded UBOs). Defaults to
3753
+ * `true` (auto-send), preserving existing behavior.
3754
+ * @default true
3755
+ * @example true
3756
+ */
3757
+ autoSendUboKycEmail: boolean;
3758
+ /**
3759
+ * Format: uuid
3760
+ * @description The anchor KYB step this UBOs satellite belongs to.
3761
+ */
3762
+ kybStepId: string;
3763
+ /**
3764
+ * Format: uuid
3765
+ * @description The flow UBOs are invited into for child KYC. Only meaningful when `require_kyc` is set;
3766
+ * `#[serde(default)]` (nil) so a name-screening-only step can omit it entirely.
3767
+ */
3768
+ kycFlowId?: string;
3769
+ /** @example { "default": "Next step" } */
3770
+ labels?: {
3771
+ [key: string]: string;
3772
+ };
3773
+ /**
3774
+ * Format: int32
3775
+ * @default 10
3776
+ * @example 3
3777
+ */
3778
+ maxUbos: number;
3779
+ /**
3780
+ * @description Whether a declared UBO must go through child KYC, or is collected for AML name screening
3781
+ * only.
3782
+ *
3783
+ * `true` (the default, and the behaviour of every flow built before this field existed): the
3784
+ * widget demands an email address for each UBO — an email is what a KYC invitation is
3785
+ * addressed to — and the backend resolves `kyc_flow_id` to send and schedule those
3786
+ * invitations.
3787
+ *
3788
+ * `false`: the widget collects a UBO by name alone and asks for no email; `kyc_flow_id` is
3789
+ * then meaningless and may be omitted. The backend must NOT resolve a KYC entry point in that
3790
+ * case — `resolve_kyc_flow_entry_point` is a hard error when the flow does not exist, so an
3791
+ * unguarded resolution would fail the entire UBO submission of a flow that legitimately has
3792
+ * no KYC flow at all.
3793
+ *
3794
+ * Nothing downstream of submission needs to branch on this: the readiness gate
3795
+ * (`KybService::are_all_ubos_verified`, `check_kyb_result_approval_readiness`) already keys
3796
+ * off each UBO's *own* email presence — email-bearing UBOs need a completed child KYC,
3797
+ * name-only UBOs need a clean name-AML screening — so an entirely email-less declaration set
3798
+ * resolves through the name-only branch without consulting any config.
3799
+ * @default true
3800
+ * @example false
3801
+ */
3802
+ requireKyc: boolean;
2716
3803
  };
2717
- ListOrganizationsResponse: {
2718
- page: components["schemas"]["Organization"][];
2719
- /** Format: int64 */
2720
- totalCount: number;
3804
+ /** @description KYB UBOs satellite step output for workflow decisions. */
3805
+ KybUbosStepOutput: {
3806
+ allUbosVerified: boolean;
3807
+ /** Format: int32 */
3808
+ uboCount: number;
2721
3809
  };
2722
- ListSharedKycResultsResponse: {
3810
+ ListOrganizationFlowResultsResponse: {
2723
3811
  page: components["schemas"]["FlowResult"][];
2724
3812
  /** Format: int64 */
2725
3813
  totalCount: number;
2726
3814
  };
2727
- ListThemesResponse: {
2728
- page: components["schemas"]["Theme"][];
2729
- /** Format: int64 */
2730
- totalCount: number;
2731
- };
2732
- ListUserInvitesResponse: {
2733
- page: components["schemas"]["OrganizationInvite"][];
2734
- /** Format: int64 */
2735
- totalCount: number;
2736
- };
2737
3815
  LivenessConfig: {
2738
3816
  /** @description When `true` the liveness step also performs a biometric match against the stored portrait.
2739
3817
  * Set to `false` to keep the liveness UX but skip biometric verification. */
@@ -2775,6 +3853,8 @@ export interface components {
2775
3853
  presignedUrl: string;
2776
3854
  s3Key: string;
2777
3855
  };
3856
+ /** @enum {string} */
3857
+ LlmDocumentType: "PASSPORT" | "PASSPORT_DIPLOMATIC" | "PASSPORT_OFFICIAL" | "PASSPORT_ORDINARY" | "NATIONAL_ID" | "RESIDENCE_PERMIT" | "ALIEN_ID" | "VISA" | "DRIVERS_LICENSE" | "OTHER" | "UNKNOWN";
2778
3858
  /**
2779
3859
  * @description Locale identifier
2780
3860
  * @enum {string}
@@ -2788,16 +3868,16 @@ export interface components {
2788
3868
  /** @enum {string} */
2789
3869
  ManualReviewResultStatus: "approved" | "rejected" | "failed";
2790
3870
  ModerateKybResultPayload: {
2791
- pepAndSanctionsStatus?: components["schemas"]["PepAndSanctionsStatusField"] | null;
3871
+ pepAndSanctionsStatus?: null | components["schemas"]["PepAndSanctionsStatusField"];
2792
3872
  /** Format: binary */
2793
- reportFile?: Blob | null;
2794
- status?: components["schemas"]["ModerationResultStatusField"] | null;
3873
+ reportFile?: Blob;
3874
+ status?: null | components["schemas"]["ModerationResultStatusField"];
2795
3875
  };
2796
3876
  ModerateKybResultResponse: {
2797
3877
  success: boolean;
2798
3878
  };
2799
3879
  /** @enum {string} */
2800
- ModerationResultStatus: "ACQUIRING" | "PENDING_MODERATION" | "REVIEW_REQUIRED" | "SUCCESS" | "FAILED";
3880
+ ModerationResultStatus: "ACQUIRING" | "ENRICHING" | "PENDING_MODERATION" | "REVIEW_REQUIRED" | "SUCCESS" | "FAILED";
2801
3881
  ModerationResultStatusField: components["schemas"]["ModerationResultStatus"];
2802
3882
  /** @enum {string} */
2803
3883
  NextAction: "CLIENT" | "RM" | "COMPLIANCE" | "SUPPORT" | "FUNDED" | "DENIED";
@@ -2818,6 +3898,10 @@ export interface components {
2818
3898
  /** @example user@example.com */
2819
3899
  value: string;
2820
3900
  };
3901
+ OcrSides: {
3902
+ back: boolean;
3903
+ front: boolean;
3904
+ };
2821
3905
  Organization: {
2822
3906
  address: string;
2823
3907
  country: string;
@@ -2832,7 +3916,7 @@ export interface components {
2832
3916
  phone: string;
2833
3917
  postcode?: string | null;
2834
3918
  registrationNumber: string;
2835
- settings?: components["schemas"]["Settings"] | null;
3919
+ settings?: null | components["schemas"]["Settings"];
2836
3920
  slug: string;
2837
3921
  /** Format: date-time */
2838
3922
  updatedAt?: string | null;
@@ -2844,7 +3928,7 @@ export interface components {
2844
3928
  email: string;
2845
3929
  /** Format: uuid */
2846
3930
  id: string;
2847
- inviter?: components["schemas"]["OrganizationInviterInfo"] | null;
3931
+ inviter?: null | components["schemas"]["OrganizationInviterInfo"];
2848
3932
  /** Format: uuid */
2849
3933
  organizationId: string;
2850
3934
  revoked?: boolean | null;
@@ -2872,6 +3956,40 @@ export interface components {
2872
3956
  id: string;
2873
3957
  legalName: string;
2874
3958
  };
3959
+ /** @description Why a node was left unexplored, and what continuing from it would take — the provider's
3960
+ * `GraphNodeContinuationDTO`, mirrored tolerantly like every other provider shape here.
3961
+ *
3962
+ * `reason` is free-form for the same reason [`OwnershipFlags::status`] is: the provider
3963
+ * documents `budget` today and a new value must not fail a write. */
3964
+ OwnershipContinuation: {
3965
+ /**
3966
+ * Format: double
3967
+ * @description This node's stake in the **root**, as a fraction in `0.0..=1.0` (so `0.144` is 14.4%).
3968
+ * Undefined — and therefore absent — whenever any upstream hop lacked a percentage, which is
3969
+ * exactly the case an automatic traversal must fail *open* on rather than prune.
3970
+ */
3971
+ accumulatedOwnership?: number | null;
3972
+ /**
3973
+ * Format: int32
3974
+ * @description How many hops from the root this node sits at.
3975
+ */
3976
+ depth?: number | null;
3977
+ /**
3978
+ * Format: int64
3979
+ * @description What one continuation from this node is expected to cost, in provider credit cents. The
3980
+ * wire key is `estimatedCost`; renamed on our side so the field says its unit, matching
3981
+ * every other cents-denominated field in the platform.
3982
+ */
3983
+ estimatedCost?: number | null;
3984
+ /** @description Why the traversal stopped here — `"budget"` in every case observed so far.
3985
+ *
3986
+ * Defaulted because it is the only required field on this struct, and the cost of it being
3987
+ * absent is wildly out of proportion to its value: `get_discovery_status` parses the stored
3988
+ * `KybMetadata` with `.ok()`, so one continuation hint missing a `reason` would discard the
3989
+ * **entire** ownership structure — a graph the organization paid for, hidden by the absence of
3990
+ * a label we only ever use for display. */
3991
+ reason?: string;
3992
+ };
2875
3993
  OwnershipEdge: {
2876
3994
  fromId: string;
2877
3995
  id: string;
@@ -2905,7 +4023,7 @@ export interface components {
2905
4023
  status: string;
2906
4024
  };
2907
4025
  OwnershipIndividual: {
2908
- birthDate?: components["schemas"]["OwnershipBirthDate"] | null;
4026
+ birthDate?: null | components["schemas"]["OwnershipBirthDate"];
2909
4027
  name: components["schemas"]["OwnershipIndividualName"];
2910
4028
  nationality?: string | null;
2911
4029
  };
@@ -2917,8 +4035,17 @@ export interface components {
2917
4035
  OwnershipNode: {
2918
4036
  type: "OwnershipNode";
2919
4037
  } & (Omit<components["schemas"]["OwnershipEntity"], "type"> & {
4038
+ continuation?: null | components["schemas"]["OwnershipContinuation"];
2920
4039
  flags: components["schemas"]["OwnershipFlags"];
2921
4040
  nodeId: string;
4041
+ /** @description Provider provenance for this node, verbatim from the result's
4042
+ * `dataSources.graph.nodes[nodeId]` block: which register — or `ai_analysis` over which named
4043
+ * filings, a materially weaker assurance level — produced the node's data. The graph nodes
4044
+ * themselves never carry it on the wire; it is joined in at graph-mapping time. `None` for
4045
+ * graphs stored before provenance was captured and for nodes the provider did not attribute.
4046
+ * On [`OwnershipStructure::merge`] it travels with the node snapshot that wins, so the
4047
+ * provenance shown always describes the data actually kept. */
4048
+ source?: unknown;
2922
4049
  /** Format: double */
2923
4050
  totalOwnershipPercentage?: number | null;
2924
4051
  });
@@ -2931,16 +4058,6 @@ export interface components {
2931
4058
  * an unrecognised value at write time. */
2932
4059
  stoppedReason?: string | null;
2933
4060
  };
2934
- PagedCommunicationsResponse: {
2935
- page: components["schemas"]["KybCommunication"][];
2936
- /** Format: int64 */
2937
- totalCount: number;
2938
- };
2939
- PagedDocumentRequestsResponse: {
2940
- page: components["schemas"]["KybDocumentRequest"][];
2941
- /** Format: int64 */
2942
- totalCount: number;
2943
- };
2944
4061
  Pagination: {
2945
4062
  /** @example createdAt:in:2025-01-01,2025-01-02;updatedAt:gt:2025-01-02 */
2946
4063
  filter?: string;
@@ -2982,7 +4099,7 @@ export interface components {
2982
4099
  documentId?: string | null;
2983
4100
  /** Format: uuid */
2984
4101
  flowResultId: string;
2985
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
4102
+ flowStep?: null | components["schemas"]["FlowStep"];
2986
4103
  /** Format: uuid */
2987
4104
  flowStepId?: string | null;
2988
4105
  /** Format: uuid */
@@ -3002,7 +4119,7 @@ export interface components {
3002
4119
  text: {
3003
4120
  [key: string]: string;
3004
4121
  };
3005
- visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
4122
+ visibleWhen?: null | components["schemas"]["Condition"];
3006
4123
  };
3007
4124
  PoaConfig: {
3008
4125
  documentFilter: components["schemas"]["PoaDocumentType"][];
@@ -3027,13 +4144,13 @@ export interface components {
3027
4144
  createdAt: string;
3028
4145
  /** Format: uuid */
3029
4146
  documentId?: string | null;
3030
- documentType?: components["schemas"]["PoaDocumentType"] | null;
3031
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
4147
+ documentType?: null | components["schemas"]["PoaDocumentType"];
4148
+ flowStep?: null | components["schemas"]["FlowStep"];
3032
4149
  /** Format: uuid */
3033
4150
  flowStepId?: string | null;
3034
4151
  /** Format: uuid */
3035
4152
  id: string;
3036
- reason?: components["schemas"]["PoaReason"] | null;
4153
+ reason?: null | components["schemas"]["PoaReason"];
3037
4154
  status: components["schemas"]["ResultStatus"];
3038
4155
  /** Format: date-time */
3039
4156
  updatedAt: string;
@@ -3046,6 +4163,69 @@ export interface components {
3046
4163
  documentType?: string | null;
3047
4164
  status: components["schemas"]["ResultStatus"];
3048
4165
  };
4166
+ /** @description An estimated age bracket, in whole years. */
4167
+ PortraitAgeRange: {
4168
+ /** Format: int32 */
4169
+ high: number;
4170
+ /** Format: int32 */
4171
+ low: number;
4172
+ };
4173
+ /** @description What the face-analysis service (Rekognition `DetectFaces`) read off the document portrait.
4174
+ *
4175
+ * Recorded on every scan that produced a portrait, whether or not the docauth
4176
+ * portrait-attributes checks are switched on: these estimates are the evidence those checks
4177
+ * decide on, and — like [`ReplayAssessment`] — they have to be readable without the response
4178
+ * log, both to question a verdict and to calibrate the tolerances against real captures. The
4179
+ * checks' own `security_checks` entries record only a status. */
4180
+ PortraitEstimate: {
4181
+ ageRange?: null | components["schemas"]["PortraitAgeRange"];
4182
+ /**
4183
+ * Format: float
4184
+ * @description The service's confidence (0-100) that the selected crop is a face at all.
4185
+ */
4186
+ faceConfidence: number;
4187
+ gender?: null | components["schemas"]["PortraitGenderEstimate"];
4188
+ };
4189
+ /** @description A perceived-gender prediction with the service's confidence in it. */
4190
+ PortraitGenderEstimate: {
4191
+ /**
4192
+ * Format: float
4193
+ * @description 0-100.
4194
+ */
4195
+ confidence: number;
4196
+ /** @description `M` or `F` — the two values the service can predict, in the same notation as the
4197
+ * document's printed sex so the two read side by side. */
4198
+ value: string;
4199
+ };
4200
+ /** @description Payload for `POST .../kyb/company-prefill`. */
4201
+ PrefillKybCompanyPayload: {
4202
+ /** @description The `id` of a `CompanySearchCandidate` chosen by the applicant. */
4203
+ candidateId: string;
4204
+ /** @description ISO country (any alpha-2/alpha-3/numeric/name form). */
4205
+ country: string;
4206
+ /** @description ISO 3166-2 subdivision, required when `country` is the US. See `CompanySearchQuery`. */
4207
+ subdivision?: string | null;
4208
+ };
4209
+ /** @description Response for `POST .../kyb/company-prefill`. Prefill values the applicant
4210
+ * confirms/edits before submitting through `submit-business-info`.
4211
+ *
4212
+ * Filled from FREE provider data only. Outside the national-registry countries that serve a full
4213
+ * record at no charge, that means a company search hit: legal name, registration number and legal
4214
+ * address. `companyType` and `incorporationDate` come back empty for the applicant to supply, and
4215
+ * are reconciled against the register after submission by the business-info cross-check. */
4216
+ PrefillKybCompanyResponse: {
4217
+ /** @description `false` when the values came from a non-authoritative source (a company search hit) — an
4218
+ * authoritative verification-mode fetch is scheduled on submit, and the cross-check compares
4219
+ * the applicant's submission against it. */
4220
+ authoritative: boolean;
4221
+ businessInformation: components["schemas"]["BusinessInformation"];
4222
+ /** @description Empty unless the country is served by a national registry that lists officers — see
4223
+ * [`GetKybDirectorCandidatesResponse`]. */
4224
+ directorCandidates: components["schemas"]["DirectorCandidate"][];
4225
+ /** @description `true` when a datapoint is still resolving at the provider and the row was left
4226
+ * pending for the poll worker to finalize. Never set on the free paths, which resolve inline. */
4227
+ pending: boolean;
4228
+ };
3049
4229
  /** @description Typed representation of process_additional_data stored in DV results.
3050
4230
  *
3051
4231
  * This struct captures all the additional data associated with document
@@ -3060,28 +4240,34 @@ export interface components {
3060
4240
  * **New format:**
3061
4241
  * ```json
3062
4242
  * {
3063
- * "imageQuality": [
3064
- * { "checkType": "focus", "result": "passed", "probability": 97 }
3065
- * ]
4243
+ * "imageQuality": [
4244
+ * { "checkType": "focus", "result": "passed", "probability": 97 }
4245
+ * ]
3066
4246
  * }
3067
4247
  * ```
3068
4248
  *
3069
4249
  * **Legacy Regula format:**
3070
4250
  * ```json
3071
4251
  * {
3072
- * "imageQuality": [
3073
- * {
3074
- * "count": 6,
3075
- * "list": [
3076
- * { "type": 1, "result": 0, "probability": 97, ... }
3077
- * ],
3078
- * "result": 0
3079
- * }
3080
- * ]
4252
+ * "imageQuality": [
4253
+ * {
4254
+ * "count": 6,
4255
+ * "list": [
4256
+ * { "type": 1, "result": 0, "probability": 97, ... }
4257
+ * ],
4258
+ * "result": 0
4259
+ * }
4260
+ * ]
3081
4261
  * }
3082
4262
  * ``` */
3083
4263
  ProcessAdditionalData: {
3084
- autoOneClickKycData?: components["schemas"]["AutoOneClickKycData"] | null;
4264
+ /** @description Whether a document-authenticity assessment actually ran for this result.
4265
+ *
4266
+ * `Some(false)` means no tampering/forgery/replay check was performed — it is not a
4267
+ * statement that the document is genuine. Read this before treating an empty
4268
+ * `security_checks` map as a pass. `None` on results written before the flag existed. */
4269
+ authenticityVerified?: boolean | null;
4270
+ autoOneClickKycData?: null | components["schemas"]["AutoOneClickKycData"];
3085
4271
  /** @description Biometric check data (for face matching results) */
3086
4272
  biometricCheckData?: unknown;
3087
4273
  /**
@@ -3091,15 +4277,18 @@ export interface components {
3091
4277
  * refresh ticks — once set, the webhook is not re-enqueued.
3092
4278
  */
3093
4279
  documentExpiredWebhookSentAt?: string | null;
4280
+ extraction?: null | components["schemas"]["DocscanExtractionProvenance"];
3094
4281
  /** @description Image quality check results */
3095
4282
  imageQuality?: components["schemas"]["ImageQualityCheckResult"][] | null;
4283
+ portrait?: null | components["schemas"]["PortraitEstimate"];
3096
4284
  /** @description Raw liveness data from face verification */
3097
4285
  rawLivenessData?: unknown;
4286
+ replay?: null | components["schemas"]["ReplayAssessment"];
3098
4287
  /** @description Security check results (mapped by check type) */
3099
4288
  securityChecks?: {
3100
4289
  [key: string]: string;
3101
4290
  } | null;
3102
- status?: components["schemas"]["DocumentScanStatus"] | null;
4291
+ status?: null | components["schemas"]["DocumentScanStatus"];
3103
4292
  };
3104
4293
  ProcessAddressDocumentRequest: {
3105
4294
  /** Format: binary */
@@ -3138,17 +4327,25 @@ export interface components {
3138
4327
  countryCode: string;
3139
4328
  /** Format: int64 */
3140
4329
  forceDocumentType?: number | null;
3141
- /** @description Images to process (base64-encoded, provider-agnostic format).
3142
- * Either images OR (session_token + interview_id) must be provided, not both. */
4330
+ /** @description One front image and an optional back image, base64-encoded. */
3143
4331
  images?: components["schemas"]["InputImage"][];
3144
- /** @description Interview/session ID for session-based providers (e.g. Incode).
4332
+ /** @description Interview/session ID for session-based providers: Incode's interview id, or the Didit
4333
+ * `session_id` returned by the same session-creation endpoint.
3145
4334
  * If provided along with session_token, the backend will fetch results from the provider. */
3146
4335
  interviewId?: string | null;
3147
4336
  platform?: string | null;
3148
4337
  provinceCode?: string | null;
3149
- /** @description Session token for session-based providers (e.g. Incode JWT).
3150
- * If provided along with interview_id, the backend will fetch results from the provider. */
4338
+ /** @description Session token for session-based providers: Incode's SDK JWT, or the Didit
4339
+ * `session_token` returned by `POST /flow/{flow_id}/vr/{verification_request_id}/dv/session`.
4340
+ * If provided along with interview_id, the backend will fetch results from the provider
4341
+ * instead of scanning uploaded images. */
3151
4342
  sessionToken?: string | null;
4343
+ /** @description Uncropped originals accompanying `images`, base64-encoded. Optional: omit for clients
4344
+ * that only submit cropped images. Stored in S3 next to the doc-scan logs under their own
4345
+ * retention window and never written to the vault or fed to the extraction provider — see
4346
+ * `ProcessIdentityDocumentPayload::validate_images`. Each entry's `pageIndex` must have a
4347
+ * matching entry in `images` (an uncropped back with no cropped back is a client bug). */
4348
+ uncroppedImages?: components["schemas"]["InputImage"][];
3152
4349
  };
3153
4350
  ProcessIdentityDocumentResponse: {
3154
4351
  /** Format: int32 */
@@ -3176,7 +4373,115 @@ export interface components {
3176
4373
  verificationRequestId: string;
3177
4374
  };
3178
4375
  /** @enum {string} */
3179
- ProductType: "UNKNOWN" | "DOCSCAN" | "LIVENESS" | "POA" | "KYB" | "KYC_PASSPORT" | "SPID" | "PHONE" | "WALLET" | "EXPORT_API" | "EXPORT_UI" | "BUSINESS_VERIFICATION" | "FLOW_BUILDER" | "GEOLOCATION" | "FORM" | "AML";
4376
+ ProductType: "UNKNOWN" | "DOCSCAN" | "LIVENESS" | "POA" | "KYB" | "KYC_PASSPORT" | "SPID" | "PHONE" | "WALLET" | "EXPORT_API" | "EXPORT_UI" | "BUSINESS_VERIFICATION" | "FLOW_BUILDER" | "GEOLOCATION" | "FORM" | "AML" | "TRANSACTION_MONITORING" | "TIN_CHECK";
4377
+ /** @description Payload for `POST .../kyb/{kyb_result_id}/documents/purchase`. */
4378
+ PurchaseDocumentsPayload: {
4379
+ /** @description Document ids from a freshly-refreshed catalogue. Between 1 and 25. */
4380
+ documentIds: string[];
4381
+ };
4382
+ /** @description Response for `POST .../kyb/{kyb_result_id}/documents/purchase`. Partial acceptance: only a
4383
+ * request where *every* document is refused is a `400`. */
4384
+ PurchaseDocumentsResponse: {
4385
+ purchases: components["schemas"]["DocumentPurchaseDecision"][];
4386
+ /**
4387
+ * Format: int32
4388
+ * @description Sum of `quotedCredits` over accepted documents only.
4389
+ */
4390
+ quotedCreditsTotal: number;
4391
+ /**
4392
+ * Format: uuid
4393
+ * @description The KYB's anchor verification request — the websocket room for `discovery-update`.
4394
+ */
4395
+ verificationRequestId: string;
4396
+ };
4397
+ /** @description One purchased document, as reported by `GET .../kyb/{kyb_result_id}/documents`. */
4398
+ PurchasedDocument: {
4399
+ category: string;
4400
+ /** Format: int32 */
4401
+ chargedCredits: number;
4402
+ documentDate?: string | null;
4403
+ documentId: string;
4404
+ /** @description `true` once there is a stored file. A completed purchase can lack one — storage is
4405
+ * best-effort — in which case the download route re-signs from the provider instead. */
4406
+ downloadable: boolean;
4407
+ format?: string | null;
4408
+ name?: string | null;
4409
+ /** Format: uuid */
4410
+ purchaseId: string;
4411
+ /** Format: date-time */
4412
+ purchasedAt: string;
4413
+ /** @description `PENDING` | `COMPLETED` | `FAILED`. */
4414
+ status: string;
4415
+ subType?: string | null;
4416
+ };
4417
+ /** @description What the deterministic replay assessment measured for one document.
4418
+ *
4419
+ * Unlike [`DocscanExtractionProvenance`], this deliberately does carry the per-side feature
4420
+ * values, at a cost of roughly two kilobytes on a `JSONB` column every result query reads.
4421
+ * The reason is specific and temporary: the detector's thresholds come from synthetic
4422
+ * captures, and production results are the only source of the real ones. A rejected capture
4423
+ * is precisely the case worth studying, and it never reaches the S3 response log — the scan
4424
+ * is refused before extraction, so no provider response exists to log. Without the numbers
4425
+ * here the evidence for a rejection is unreachable.
4426
+ *
4427
+ * Once the thresholds are calibrated, `features` is the field to drop. */
4428
+ ReplayAssessment: {
4429
+ /**
4430
+ * Format: double
4431
+ * @description Stage one: how strongly the capture reads as a reproduction of any medium, in [0, 1].
4432
+ * This is the score compared against the rejection threshold.
4433
+ */
4434
+ attackScore: number;
4435
+ /**
4436
+ * Format: double
4437
+ * @description How far past the decision threshold the verdict landed, in [0, 1]. Zero for
4438
+ * `INCONCLUSIVE`, where no decision was reached.
4439
+ */
4440
+ confidence: number;
4441
+ flags?: string[];
4442
+ /** Format: double */
4443
+ printScore: number;
4444
+ /** @description Why the verdict landed where it did, most significant first. */
4445
+ reasons?: string[];
4446
+ /**
4447
+ * Format: double
4448
+ * @description Stage two: how strongly it reads as a display and as a print respectively. A medium is
4449
+ * only named when one leads the other by a margin *and* clears an absolute bar.
4450
+ */
4451
+ screenScore: number;
4452
+ /**
4453
+ * Format: double
4454
+ * @description Generation-loss evidence. Scored and reported but never part of the verdict: its
4455
+ * absolute distributions overlap too much to reject on, so it exists to raise
4456
+ * `SECOND_GENERATION` in `flags` for step-up handling.
4457
+ */
4458
+ secondgenScore: number;
4459
+ /** @description Per side, keyed by `front`/`back`. */
4460
+ sides?: components["schemas"]["ReplaySideAssessment"][];
4461
+ /** @description `LIVE`, `SCREEN`, `PRINT`, `ATTACK` or `INCONCLUSIVE`, taken across both sides at their
4462
+ * worst case. `INCONCLUSIVE` means the capture was too degraded to read — it asks for
4463
+ * another capture and is not an accusation. */
4464
+ verdict: string;
4465
+ };
4466
+ /** @description One side's contribution to a [`ReplayAssessment`]. */
4467
+ ReplaySideAssessment: {
4468
+ /** Format: double */
4469
+ attackScore: number;
4470
+ /** @description Every raw feature the detector measured for this side. The calibration input. */
4471
+ features?: {
4472
+ [key: string]: number;
4473
+ };
4474
+ /** Format: double */
4475
+ printScore: number;
4476
+ /** @description Quality-gate failures, when this side could not be read. Empty on a side that was
4477
+ * judged. */
4478
+ qualityFailures?: string[];
4479
+ /** Format: double */
4480
+ screenScore: number;
4481
+ /** @description `front` or `back`. */
4482
+ side: string;
4483
+ verdict: string;
4484
+ };
3180
4485
  /** @description Request body for `POST .../kyb/{kyb_result_id}/document-requests/on-demand`.
3181
4486
  *
3182
4487
  * Asks the client for a specific on-demand per-country document (identified by its catalog
@@ -3267,6 +4572,42 @@ export interface components {
3267
4572
  /** Format: float */
3268
4573
  up: number;
3269
4574
  };
4575
+ /** @description A US mailing address to validate against the USPS database. */
4576
+ RunTinCheckAddress: {
4577
+ city?: string | null;
4578
+ /** @description The two-letter state code, for example `CT`. */
4579
+ state?: string | null;
4580
+ /** @description The street address, for example `123 Main Street`. */
4581
+ street: string;
4582
+ /** @description A suite, apartment or unit, for example `Suite 310`. */
4583
+ unit?: string | null;
4584
+ /** @description Five digits, or nine with the +4 extension. */
4585
+ zip?: string | null;
4586
+ };
4587
+ /** @description A TIN and the name to match it against, with the optional extras the same check can verify.
4588
+ *
4589
+ * `Debug` is written by hand so the TIN never reaches a log line in full. */
4590
+ RunTinCheckRequest: {
4591
+ address?: null | components["schemas"]["RunTinCheckAddress"];
4592
+ /** @description A FATCA Global Intermediary Identification Number, to look up on the IRS list of registered
4593
+ * foreign financial institutions. */
4594
+ giin?: string | null;
4595
+ mock?: null | components["schemas"]["TinCheckMockOptions"];
4596
+ /** @description A person's full name or a company's legal name, as it appears on IRS records. */
4597
+ name: string;
4598
+ /** @description A US Taxpayer Identification Number: the nine digits of an SSN or EIN. Spaces and hyphens
4599
+ * are accepted and ignored. */
4600
+ tin: string;
4601
+ };
4602
+ /**
4603
+ * @description Which natural persons a KYB file must identify and screen before it can be approved.
4604
+ *
4605
+ * This selects *which* population is required, never *whether* one is: every variant demands at
4606
+ * least one screened person. A business whose required population is empty is an incomplete
4607
+ * file, however cleanly its registry data cross-checks.
4608
+ * @enum {string}
4609
+ */
4610
+ ScreeningStrategy: "ubo" | "directors" | "uboAndDirectors";
3270
4611
  /** @description Every meaningful OpenSanctions/Yente search field as an optional string. Result-only
3271
4612
  * fields (sanctions, topics, position occupancies) are not exposed as inputs. */
3272
4613
  SdkAmlScreenQuery: {
@@ -3311,6 +4652,7 @@ export interface components {
3311
4652
  customData?: {
3312
4653
  [key: string]: unknown;
3313
4654
  } | null;
4655
+ webhook?: null | components["schemas"]["SdkSessionWebhookPayload"];
3314
4656
  };
3315
4657
  SdkCreateVerificationRequestResponse: {
3316
4658
  /** @description The email address associated with the verified user's identity, if available. */
@@ -3321,6 +4663,13 @@ export interface components {
3321
4663
  flowStepSlug: string;
3322
4664
  /** @description Whether this verification request was created in sandbox mode. */
3323
4665
  isSandbox: boolean;
4666
+ /**
4667
+ * Format: uuid
4668
+ * @description Identifier of the logical verification run. Stable across the calls that resume it.
4669
+ */
4670
+ sessionId?: string | null;
4671
+ sessionWebhook?: null | components["schemas"]["SdkSessionWebhookResponse"];
4672
+ /** @description The created or resumed verification request. */
3324
4673
  verificationRequest: components["schemas"]["VerificationRequest"];
3325
4674
  /** @description Zyphe user identifier (ZID) for the verified user. */
3326
4675
  zid: string;
@@ -3329,11 +4678,45 @@ export interface components {
3329
4678
  /** @description JWT for the verified user's session. Pass this as a bearer token for user-scoped SDK calls. */
3330
4679
  zypheToken: string;
3331
4680
  };
4681
+ /** @description A callback attached to one logical verification run, supplied when an authenticated server
4682
+ * initiates or resumes it through the SDK.
4683
+ *
4684
+ * **Additive, never a replacement.** Every configured organization endpoint that matches still
4685
+ * fires; this is delivered alongside them. If a configured endpoint happens to share this URL the
4686
+ * customer receives two signed calls, which is the intended reading of "along with the already
4687
+ * configured notifications" — deduplicating by URL would silently discard a subscription that was
4688
+ * explicitly requested. */
4689
+ SdkSessionWebhookPayload: {
4690
+ /** @description Canonical event filters. Omitted means every verification and flow event this session
4691
+ * produces. Transaction Monitoring and other sessions' KYC Passport events can never be
4692
+ * subscribed to here, whether listed or not. */
4693
+ eventTypes?: components["schemas"]["WebhookEventType"][] | null;
4694
+ payloadVersion?: components["schemas"]["WebhookPayloadVersion"];
4695
+ /** @description Caller-generated HMAC signing secret.
4696
+ *
4697
+ * Required, and required to be the *caller's*, on purpose: this endpoint may be resuming an
4698
+ * existing run rather than creating one, and a server-minted secret would then have to be
4699
+ * either re-returned (leaking it on every resume) or silently kept (leaving the caller unable
4700
+ * to verify). A caller-supplied secret makes an idempotent retry predictable instead. */
4701
+ secret: string;
4702
+ /** @description HTTPS callback URL. Validated on write and re-resolved against the public-address rules
4703
+ * again immediately before every delivery. */
4704
+ url: string;
4705
+ };
4706
+ /** @description What the caller is told about the callback it just installed. Never the secret it supplied. */
4707
+ SdkSessionWebhookResponse: {
4708
+ /** Format: date-time */
4709
+ expiresAt: string;
4710
+ /** Format: uuid */
4711
+ id: string;
4712
+ /** @description Last characters of the supplied secret, so the caller can confirm which one is in force. */
4713
+ secretHint: string;
4714
+ };
3332
4715
  /**
3333
4716
  * @description Canonical security/authenticity check types.
3334
4717
  * @enum {string}
3335
4718
  */
3336
- SecurityCheckType: "uv_luminescence" | "ir_b900" | "image_pattern" | "axial_protection" | "uv_fibers" | "ir_visibility" | "ocr_security_text" | "ipi" | "photo_embedding" | "photo_area" | "portrait_comparison" | "holograms" | "kinegram" | "letter_screen" | "barcode" | "mrz" | "extended_mrz" | "extended_ocr" | "liveness" | "electronic_device" | "black_and_white_copy" | "document_alteration" | "document_tampering" | "fake_document" | "paper_copy" | "unknown";
4719
+ SecurityCheckType: "uv_luminescence" | "ir_b900" | "image_pattern" | "axial_protection" | "uv_fibers" | "ir_visibility" | "ocr_security_text" | "ipi" | "photo_embedding" | "photo_area" | "portrait_comparison" | "holograms" | "kinegram" | "letter_screen" | "barcode" | "mrz" | "extended_mrz" | "extended_ocr" | "liveness" | "electronic_device" | "screen_replay" | "black_and_white_copy" | "document_alteration" | "document_tampering" | "fake_document" | "paper_copy" | "cross_check" | "portrait_gender" | "portrait_age" | "unknown";
3337
4720
  SelectOptions: {
3338
4721
  isOtherAllowed: boolean;
3339
4722
  values: string[];
@@ -3381,7 +4764,7 @@ export interface components {
3381
4764
  SpidResult: {
3382
4765
  /** Format: date-time */
3383
4766
  createdAt?: string | null;
3384
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
4767
+ flowStep?: null | components["schemas"]["FlowStep"];
3385
4768
  /** Format: uuid */
3386
4769
  flowStepId?: string | null;
3387
4770
  /** Format: uuid */
@@ -3439,21 +4822,29 @@ export interface components {
3439
4822
  /** Format: uuid */
3440
4823
  verificationRequestId: string;
3441
4824
  };
4825
+ /** @description One selectable subdivision: the ISO 3166-2 code the API expects back, and its English name. */
4826
+ SubdivisionOption: {
4827
+ /** @description The bare code (`DE`), which is what `subdivision` accepts. The qualified form (`US-DE`) and
4828
+ * the English name are accepted too, but this is the canonical one to send back. */
4829
+ code: string;
4830
+ /** @description English name, for display (`Delaware`). */
4831
+ name: string;
4832
+ };
3442
4833
  /** @description Flat theme API response. Logo/font fields hold raw S3 keys when built from `ThemeData`; the
3443
4834
  * handler swaps them for presigned URLs before returning. */
3444
4835
  Theme: {
3445
4836
  borderRadius?: string | null;
3446
4837
  /** Format: date-time */
3447
4838
  createdAt?: string | null;
3448
- dark?: components["schemas"]["ThemeColorSetResponse"] | null;
4839
+ dark?: null | components["schemas"]["ThemeColorSetResponse"];
3449
4840
  fontFamily?: string | null;
3450
- fontLicense?: components["schemas"]["ThemeFontLicense"] | null;
4841
+ fontLicense?: null | components["schemas"]["ThemeFontLicense"];
3451
4842
  /** @description Presigned read URL for the uploaded font (or the raw S3 key before presigning). */
3452
4843
  fontUrl?: string | null;
3453
4844
  /** Format: uuid */
3454
4845
  id: string;
3455
4846
  isDefault: boolean;
3456
- light?: components["schemas"]["ThemeColorSetResponse"] | null;
4847
+ light?: null | components["schemas"]["ThemeColorSetResponse"];
3457
4848
  name: string;
3458
4849
  /** Format: date-time */
3459
4850
  updatedAt?: string | null;
@@ -3474,73 +4865,523 @@ export interface components {
3474
4865
  /** Format: uuid */
3475
4866
  attestedByIdentityId?: string | null;
3476
4867
  };
3477
- /** @description A top-up pack: a one-time Stripe Price tagged with `zyphe_type=credit_topup` metadata.
3478
- *
3479
- * Produced by [`list_topup_prices`] from Stripe one-time prices whose product is active
3480
- * and whose metadata carries `zyphe_type=credit_topup`. `credits` and `validity_months`
3481
- * are parsed from price metadata (`credits`, `validity_months`).
3482
- *
3483
- * [`list_topup_prices`]: https://docs.stripe.com/api/prices/list */
3484
- TopupPack: {
4868
+ TinCheckListResponse: {
4869
+ /** @description Newest first. */
4870
+ items: components["schemas"]["TinCheckResponse"][];
4871
+ /** Format: int64 */
4872
+ total: number;
4873
+ };
4874
+ /**
4875
+ * @description The answer of one of the lookups that run alongside the IRS match.
4876
+ * @enum {string}
4877
+ */
4878
+ TinCheckLookupStatus: "NOT_PROCESSED" | "NO_MATCH" | "POSSIBLE_MATCH";
4879
+ /** @description The answer a sandbox mock check should give, stated instead of looked up. Sandbox only. */
4880
+ TinCheckMockOptions: {
4881
+ /** @description Whether a submitted address is found in the USPS database. Defaults to found. */
4882
+ addressFound?: boolean | null;
4883
+ /** @description Report a possible Death Master File match. */
4884
+ deathMasterFileMatch?: boolean;
4885
+ /** @description Report the EIN as on record under another name. */
4886
+ einNameMatch?: boolean;
4887
+ /** @description Whether a submitted GIIN is found on the FATCA list. Defaults to found. */
4888
+ giinFound?: boolean | null;
4889
+ outcome: components["schemas"]["TinCheckMockOutcome"];
4890
+ tinType?: null | components["schemas"]["TinCheckTinType"];
3485
4891
  /**
3486
- * Format: int64
3487
- * @description Price amount in the smallest currency unit (e.g. cents)
4892
+ * Format: int32
4893
+ * @description How many entries resemble the name on each flagged list. Defaults to 2.
3488
4894
  */
3489
- amountCents: number;
4895
+ watchlistMatches?: number | null;
4896
+ /** @description The watchlists to flag, by short code (`OFAC`, `PEP`, ...). Every other list answers clear. */
4897
+ watchlists?: string[];
4898
+ };
4899
+ /**
4900
+ * @description What a sandbox mock check answers on the IRS match itself.
4901
+ * @enum {string}
4902
+ */
4903
+ TinCheckMockOutcome: "MATCH" | "MISMATCH" | "NOT_ISSUED" | "INVALID_TIN" | "UNAVAILABLE";
4904
+ /**
4905
+ * @description The verdict of a TIN check: whether the TIN and name combination matches IRS records.
4906
+ * @enum {string}
4907
+ */
4908
+ TinCheckOutcome: "MATCH" | "MISMATCH" | "NOT_ISSUED";
4909
+ /** @description What the next TIN check costs this organization. */
4910
+ TinCheckQuoteResponse: {
3490
4911
  /**
3491
- * Format: int64
3492
- * @description Number of credits granted by this pack, from metadata `credits`
4912
+ * Format: int32
4913
+ * @description The price of one check, in credits. Zero in the sandbox, where checks are free.
3493
4914
  */
3494
4915
  credits: number;
3495
- currency: components["schemas"]["Currency"];
3496
- /** @description Display name: nickname > product name > price ID */
4916
+ };
4917
+ /** @description One TIN check and its results. */
4918
+ TinCheckResponse: {
4919
+ address?: null | components["schemas"]["TinCheckSubmittedLookup"];
4920
+ /**
4921
+ * Format: int32
4922
+ * @description What this check cost, in credits. Zero in the sandbox.
4923
+ */
4924
+ chargedCredits: number;
4925
+ /** Format: date-time */
4926
+ createdAt: string;
4927
+ /** @description The email of the member who ran the check. Absent when it was not run by a person, or the
4928
+ * person is no longer known. */
4929
+ createdByEmail?: string | null;
4930
+ /** @description Whether the subject resembles an entry on the Social Security Death Master File. */
4931
+ deathMasterFile: components["schemas"]["TinCheckLookupStatus"];
4932
+ /** @description Whether the lookup service has the EIN on record under a name other than the one checked.
4933
+ * For reference only: its records come from earlier matches and may be out of date. */
4934
+ einNameMatch: components["schemas"]["TinCheckLookupStatus"];
4935
+ /** @description The name on record, as the lookup service reports it: an XML document. Absent without a
4936
+ * match. */
4937
+ einNameMatchData?: string | null;
4938
+ giin?: null | components["schemas"]["TinCheckSubmittedLookup"];
4939
+ /** Format: uuid */
4940
+ id: string;
4941
+ /** @description The name that was checked, as submitted. */
3497
4942
  name: string;
3498
- /** @description The Stripe price ID (e.g., "price_xxx") */
3499
- priceId: string;
4943
+ /** @description Whether the TIN and name combination matches IRS records. */
4944
+ outcome: components["schemas"]["TinCheckOutcome"];
4945
+ /** @description The TIN with everything but its last four digits hidden, for example `XXXXX6789`. The full
4946
+ * TIN is not stored. */
4947
+ tinMasked: string;
4948
+ tinType?: null | components["schemas"]["TinCheckTinType"];
4949
+ /** @description Whether the name resembles an entry on any of the screened watchlists. */
4950
+ watchlistStatus: components["schemas"]["TinCheckLookupStatus"];
4951
+ /** @description Every watchlist the name was screened against, with how many entries resemble it. A
4952
+ * resemblance is a similarity on the name, to be reviewed: not a confirmed hit. */
4953
+ watchlists: components["schemas"]["TinCheckWatchlist"][];
4954
+ };
4955
+ /** @description An optional lookup that ran because a value was submitted for it: what was submitted, and the
4956
+ * lookup service's answer. */
4957
+ TinCheckSubmittedLookup: {
4958
+ /** @description The lookup service's answer, in its own words (English). Absent when it gave none. */
4959
+ result?: string | null;
4960
+ /** @description The value that was submitted. */
4961
+ submitted: string;
4962
+ };
4963
+ /**
4964
+ * @description Which kind of IRS record a matching TIN belongs to, when the IRS says.
4965
+ * @enum {string}
4966
+ */
4967
+ TinCheckTinType: "SSN" | "EIN" | "SSN_AND_EIN";
4968
+ /** @description One watchlist the name was screened against, and how many of its entries resemble the name. */
4969
+ TinCheckWatchlist: {
4970
+ /** @description Whether the list has entries that resemble the name. */
4971
+ flagged: boolean;
4972
+ /** @description The list's short name, for example `OFAC` or `PEP`. */
4973
+ list: string;
4974
+ /** @description The resembling entries, as the lookup service reports them: an XML document whose layout
4975
+ * varies by list. Absent when the list is clear. */
4976
+ matchData?: string | null;
3500
4977
  /**
3501
4978
  * Format: int32
3502
- * @description Optional validity window (in months) for the granted credits, from metadata `validity_months`
4979
+ * @description How many entries on the list resemble the name. Zero on a clear list, and on a flagged
4980
+ * one whose entries the lookup service did not count.
3503
4981
  */
3504
- validityMonths?: number | null;
4982
+ possibleMatches: number;
4983
+ };
4984
+ /** @description Deterministic limits for TM auto-resolution. Amounts are currency-specific minor units;
4985
+ * an absent currency or rule hash cannot be auto-closed. Empty defaults only suggest/escalate. */
4986
+ TmAgentGuardPolicy: {
4987
+ /** @description Explicitly reviewed condition hashes eligible for low-risk false-positive closure. */
4988
+ autoCloseRuleHashes?: string[];
4989
+ maxAmountMinor?: {
4990
+ [key: string]: number;
4991
+ };
4992
+ /** Format: double */
4993
+ maxRiskProbability?: number;
4994
+ };
4995
+ /** @description The analytic record behind a [`TmAgentReviewSummary`]. Dashboard-only: it carries the case
4996
+ * file the model reasoned over and its findings about the end user. */
4997
+ TmAgentReviewEvidence: {
4998
+ /** @description The re-read case at actuation time, present only when it differed from the analytic one. */
4999
+ actuationCaseFile?: Record<string, never> | null;
5000
+ caseFile: Record<string, never>;
5001
+ findings: Record<string, never>;
5002
+ mitigations: Record<string, never>;
5003
+ verdict: Record<string, never>;
5004
+ };
5005
+ /** @description The API-facing projection of a stored `agentReview` (WP7).
5006
+ *
5007
+ * The stored review keeps the whole case file, the prosecutor's findings about the end user,
5008
+ * the identity risk score and the controls of the subject's other alerts. None of that belongs
5009
+ * on an API-key-authenticated route, so the SDK gets this summary and only the JWT dashboard
5010
+ * route asks for `evidence`.
5011
+ *
5012
+ * Also the `resolution` field of the `transaction.alert.resolved` webhook, always without
5013
+ * evidence. */
5014
+ TmAgentReviewSummary: {
5015
+ decision: components["schemas"]["TmDecision"];
5016
+ evidence?: null | components["schemas"]["TmAgentReviewEvidence"];
5017
+ /** @description The deterministic guard outcome that produced the enacted decision; `null` when the guard
5018
+ * never ran (the model did not recommend approval). */
5019
+ guard?: Record<string, never> | null;
5020
+ /** Format: uuid */
5021
+ id: string;
5022
+ mode: components["schemas"]["KybAgenticMode"];
5023
+ model: string;
5024
+ promptVersions: Record<string, never>;
5025
+ rationale: string;
5026
+ recommendedStatus: components["schemas"]["TmAlertStatus"];
5027
+ /** Format: date-time */
5028
+ reviewedAt: string;
3505
5029
  };
3506
- /** @description Response for the top-up pack catalog endpoint (`GET .../billing/topup-packs`). */
3507
- TopupPacksResponse: {
3508
- packs: components["schemas"]["TopupPack"][];
5030
+ /** @description Alert detail as returned within GET transaction detail, in both SDK and dashboard docs.
5031
+ *
5032
+ * `agentReview` is a [`TmAgentReviewSummary`], not the stored review: the stored document holds
5033
+ * the whole case file, the prosecutor's findings about the end user, the identity risk score and
5034
+ * the controls of the subject's other alerts. Only the JWT dashboard route asks for `evidence`. */
5035
+ TmAlertDetail: {
5036
+ agentReview?: null | components["schemas"]["TmAgentReviewSummary"];
5037
+ controls: unknown;
5038
+ /** Format: uuid */
5039
+ id: string;
5040
+ ruleKey?: string | null;
5041
+ /** Format: int32 */
5042
+ ruleVersion?: number | null;
5043
+ status: components["schemas"]["TmAlertStatus"];
3509
5044
  };
3510
- TriggerReminderResponse: {
3511
- enqueued: boolean;
5045
+ /** @description Reference to one raised alert in an ingest response. */
5046
+ TmAlertRef: {
5047
+ /** Format: uuid */
5048
+ alertId: string;
5049
+ ruleKey?: string | null;
3512
5050
  };
3513
- UboDefinition: {
3514
- country: string;
3515
- dateOfBirth: string;
3516
- /** @description Email of the UBO. `None` for a name-only UBO added without an email: such a UBO is
3517
- * AML-screened by name and is never sent a KYC invitation. */
3518
- emailAddress?: string | null;
3519
- firstName: string;
3520
- gender: string;
3521
- /**
3522
- * Format: uuid
3523
- * @description Stable identifier for this UBO within the KYB result. Assigned on creation
3524
- * (submission or post-submission add) and used to address the UBO for removal /
3525
- * name-screening instead of a positional index. `None` only for legacy entries
3526
- * created before this field existed.
3527
- */
3528
- id?: string | null;
3529
- lastName: string;
5051
+ /**
5052
+ * @description Alert lifecycle (module plan §8.1).
5053
+ * @enum {string}
5054
+ */
5055
+ TmAlertStatus: "NEW" | "IN_REVIEW" | "ESCALATED" | "CLOSED_TRUE_POSITIVE" | "CLOSED_FALSE_POSITIVE" | "SAR_FILED";
5056
+ /**
5057
+ * @description Which cutoff band a numeric (metric) rule landed in. `None` on a [`TmFiredRule`] means the
5058
+ * rule was a pure boolean signal (fires at `p_high`).
5059
+ * @enum {string}
5060
+ */
5061
+ TmBand: "low" | "med" | "high";
5062
+ /**
5063
+ * @description Counterparty node type (module plan §4.3).
5064
+ * @enum {string}
5065
+ */
5066
+ TmCounterpartyKind: "PERSON" | "ORGANIZATION" | "ACCOUNT" | "WALLET";
5067
+ /** @description Counterparty leg of an ingest request. */
5068
+ TmCounterpartyRequest: {
5069
+ /** @description Account/IBAN/wallet identifier — the canonical join key for "same counterparty across
5070
+ * identities" derives from it. This becomes a unique-index key, so it is capped well below
5071
+ * any DB index limit. */
5072
+ address?: string | null;
5073
+ /** @description ISO 3166-1 alpha-2; derived from the IBAN prefix of `address` when omitted. */
5074
+ country?: string | null;
5075
+ kind?: components["schemas"]["TmCounterpartyKind"];
5076
+ name?: string | null;
3530
5077
  };
3531
5078
  /**
3532
- * Format: uuid
3533
- * @description A UUID string
5079
+ * @description The synchronous verdict on a transaction: the combined `P(risk)` (noisy-OR over fired rule
5080
+ * probabilities, module plan §6) compared to the org's `tm_settings` thresholds.
5081
+ * @enum {string}
3534
5082
  */
3535
- Uuid: string;
3536
- /** @enum {string} */
3537
- ValidationMessages: "validation_unexpected" | "validation_invalid_file_format" | "validation_organization_slug_exists" | "validation_flow_slug_exists" | "validation_flow_id_mismatch" | "validation_flow_step_name_exists" | "validation_consents_not_granted" | "validation_kyb_config_match" | "validation_kyb_config_already_uses_this_kyc_flow_id" | "validation_kyb_moderation_status_wrong" | "validation_kyb_missing_required_documents" | "validation_form_name_exists" | "validation_database_error" | "validation_flow_name_invalid" | "validation_flow_slug_name_invalid" | "validation_flow_step_name_invalid" | "validation_flow_step_order_duplicate" | "validation_flow_step_order_invalid" | "validation_flow_step_id_mismatch" | "validation_password_too_short" | "validation_password_no_uppercase" | "validation_password_no_lowercase" | "validation_password_no_number" | "validation_password_no_special_character" | "validation_password_contains_whitespace_or_control" | "validation_emails_empty" | "validation_email_invalid" | "validation_emails_too_many" | "validation_emails_duplicate" | "validation_invite_to_self" | "validation_e164_format" | "validation_flow_step_already_has_reference" | "validation_flow_step_config_invalid" | "validation_flow_not_found" | "validation_empty_parameter" | "validation_form_not_found" | "validation_organization_not_found" | "validation_workflow_graph_invalid" | "validation_invalid_role_for_invitation" | "validation_form_condition_forward_ref";
3538
- VaultUnlockPasskeyData: {
3539
- /** @description Passkey challenge for vault unlock (base64url) */
3540
- challenge: string;
3541
- /** @description Credential ID for vault unlock (base64url-encoded) */
3542
- credentialId: string;
3543
- /** @description Full WebAuthn `PublicKeyCredentialRequestOptions` for vault unlock.
5083
+ TmDecision: "ALLOW" | "REVIEW" | "BLOCK";
5084
+ /** @description Provenance of one fired rule — stamped (as JSON) on the transaction's `firedRules` column
5085
+ * and carried per-alert, so "which exact rule version scored this transaction" is always
5086
+ * reconstructable (module plan §12). */
5087
+ TmFiredRule: {
5088
+ band?: null | components["schemas"]["TmBand"];
5089
+ /**
5090
+ * Format: double
5091
+ * @description The rule's contributed `p` for that band (module plan §6).
5092
+ */
5093
+ probability: number;
5094
+ /** @description Whether this fire should raise a `tm_alert`. */
5095
+ raiseAlert: boolean;
5096
+ ruleHash: string;
5097
+ /** Format: uuid */
5098
+ ruleId: string;
5099
+ ruleKey: string;
5100
+ /** Format: int32 */
5101
+ ruleVersion: number;
5102
+ };
5103
+ /** @description Ingest one transaction event (`POST /sdk/organizations/{org}/transactions`).
5104
+ *
5105
+ * `deny_unknown_fields` (WP3): TM is a brand-new API with no legacy clients, so a typo'd field
5106
+ * name is rejected loudly instead of silently ignored — safer default for a compliance product. */
5107
+ TmIngestTransactionRequest: {
5108
+ /**
5109
+ * Format: int64
5110
+ * @description Integer minor units (e.g. cents) — no float money.
5111
+ */
5112
+ amountMinor: number;
5113
+ /** @description e.g. `card`, `sepa`, `onchain`. */
5114
+ channel?: string | null;
5115
+ counterparty?: null | components["schemas"]["TmCounterpartyRequest"];
5116
+ /**
5117
+ * @description ISO 4217 alpha-3 (letters only, e.g. `EUR`). Uppercase on the wire; any case accepted.
5118
+ * @example EUR
5119
+ */
5120
+ currency: string;
5121
+ /** @description Payment reference / free-text description (SEPA *causale*) — the keyword-screening surface. */
5122
+ description?: string | null;
5123
+ direction: components["schemas"]["TmTransactionDirection"];
5124
+ /** @description Client-side transaction id — the idempotency key per organization: replaying the same
5125
+ * `externalId` returns the original result without re-evaluating or double-billing. */
5126
+ externalId: string;
5127
+ /** @description Optional client-side user reference (passthrough). */
5128
+ externalUserId?: string | null;
5129
+ /**
5130
+ * Format: uuid
5131
+ * @description The monitored (verified) identity this event belongs to.
5132
+ */
5133
+ identityId: string;
5134
+ /** @description Arbitrary client metadata, persisted verbatim for audit/replay. */
5135
+ metadata?: unknown;
5136
+ /**
5137
+ * Format: date-time
5138
+ * @description Client event time. Rejected if more than 24h in the future — a small clock-skew
5139
+ * allowance, not an invitation to backdate/forward-date events.
5140
+ */
5141
+ occurredAt: string;
5142
+ /** @description ISO 3166-1 alpha-2 — the monitored identity's side (defaults to the org's operating
5143
+ * country semantics; overridable per event for multi-country books). */
5144
+ originCountry?: string | null;
5145
+ /** @description Provider/rail (`open_banking`, `sepa`, `card`, …). */
5146
+ rail?: string | null;
5147
+ /**
5148
+ * Format: uuid
5149
+ * @description Attached invoice/document reference.
5150
+ */
5151
+ referenceDocumentId?: string | null;
5152
+ };
5153
+ /** @description Synchronous ingest verdict. */
5154
+ TmIngestTransactionResponse: {
5155
+ /** @description Alerts raised by this transaction (rules with `raiseAlert`). */
5156
+ alerts: components["schemas"]["TmAlertRef"][];
5157
+ decision: components["schemas"]["TmDecision"];
5158
+ /** @description Rules that fired on this evaluation, with full version provenance. */
5159
+ firedRules: components["schemas"]["TmFiredRule"][];
5160
+ /** @description `true` when this call was an idempotent replay of a previously ingested transaction. */
5161
+ replay: boolean;
5162
+ /**
5163
+ * Format: double
5164
+ * @description Combined `P(risk)` behind the decision.
5165
+ */
5166
+ riskProbability: number;
5167
+ /** Format: uuid */
5168
+ transactionId: string;
5169
+ };
5170
+ /**
5171
+ * @description Direction of a monitored transaction relative to the monitored identity.
5172
+ * @enum {string}
5173
+ */
5174
+ TmTransactionDirection: "DEPOSIT" | "WITHDRAWAL" | "TRANSFER";
5175
+ /** @description One monitored transaction (read view). */
5176
+ TmTransactionResponse: {
5177
+ /** @description Included by the detail endpoints; contains the persisted agent rationale, evidence and audit. */
5178
+ alerts?: components["schemas"]["TmAlertDetail"][] | null;
5179
+ /** Format: int64 */
5180
+ amountMinor: number;
5181
+ channel?: string | null;
5182
+ counterpartyAddress?: string | null;
5183
+ counterpartyCountry?: string | null;
5184
+ /** Format: uuid */
5185
+ counterpartyId?: string | null;
5186
+ counterpartyName?: string | null;
5187
+ currency: string;
5188
+ /** Format: date-time */
5189
+ decidedAt?: string | null;
5190
+ decision?: null | components["schemas"]["TmDecision"];
5191
+ description?: string | null;
5192
+ direction: components["schemas"]["TmTransactionDirection"];
5193
+ externalId: string;
5194
+ externalUserId?: string | null;
5195
+ firedRules: components["schemas"]["TmFiredRule"][];
5196
+ /** Format: uuid */
5197
+ id: string;
5198
+ /** Format: uuid */
5199
+ identityId: string;
5200
+ /** Format: date-time */
5201
+ ingestedAt: string;
5202
+ /** Format: date-time */
5203
+ occurredAt: string;
5204
+ originCountry?: string | null;
5205
+ rail?: string | null;
5206
+ /** Format: uuid */
5207
+ referenceDocumentId?: string | null;
5208
+ /** Format: double */
5209
+ riskProbability?: number | null;
5210
+ status: components["schemas"]["TmTransactionStatus"];
5211
+ };
5212
+ /**
5213
+ * @description Payment lifecycle status (client-updatable via `PATCH`). Velocity counts transactions while
5214
+ * `Pending`/`Settled` and backs them out on a one-time transition into a terminal-negative
5215
+ * state (module plan §10).
5216
+ * @enum {string}
5217
+ */
5218
+ TmTransactionStatus: "PENDING" | "SETTLED" | "FAILED" | "CANCELED" | "REVERSED";
5219
+ /** @description Update the payment lifecycle status (`PATCH /sdk/organizations/{org}/transactions/{id}`). */
5220
+ TmUpdateTransactionStatusRequest: {
5221
+ status: components["schemas"]["TmTransactionStatus"];
5222
+ };
5223
+ /** @description A top-up pack: a one-time Stripe Price tagged with `zyphe_type=credit_topup` metadata.
5224
+ *
5225
+ * Produced by [`list_topup_prices`] from Stripe one-time prices whose product is active
5226
+ * and whose metadata carries `zyphe_type=credit_topup`. `credits` and `validity_months`
5227
+ * are parsed from price metadata (`credits`, `validity_months`).
5228
+ *
5229
+ * [`list_topup_prices`]: https://docs.stripe.com/api/prices/list */
5230
+ TopupPack: {
5231
+ /**
5232
+ * Format: int64
5233
+ * @description Price amount in the smallest currency unit (e.g. cents)
5234
+ */
5235
+ amountCents: number;
5236
+ /**
5237
+ * Format: int64
5238
+ * @description Number of credits granted by this pack, from metadata `credits`
5239
+ */
5240
+ credits: number;
5241
+ currency: components["schemas"]["Currency"];
5242
+ /** @description Products this pack turns on in PRODUCTION when it is purchased, from price metadata
5243
+ * `enabled_products`. Empty = the pack grants credits only, which is every pack created
5244
+ * before this field existed (hence `serde(default)`, which also keeps cached catalog
5245
+ * entries deserializable). */
5246
+ enabledProducts?: components["schemas"]["ProductType"][];
5247
+ /** @description `true` when the price carries `zyphe_visibility=private` metadata: a bespoke pack that
5248
+ * must never appear in the public catalog and is usable only by the organization named in
5249
+ * `organization_id`. Defaults to `false` so an untagged price stays public, and so cached
5250
+ * catalog entries serialized before this field existed still deserialize. */
5251
+ isPrivate?: boolean;
5252
+ /** @description Display name: nickname > product name > price ID */
5253
+ name: string;
5254
+ /** @description The organization a private pack belongs to, from price metadata `organization_id`.
5255
+ * Meaningless (and normally absent) on a public pack. A private pack WITHOUT this is
5256
+ * usable by nobody — failing closed beats leaking a bespoke price to every customer. */
5257
+ organizationId?: string | null;
5258
+ /** @description The Stripe price ID (e.g., "price_xxx") */
5259
+ priceId: string;
5260
+ /** @description The sandbox twin of [`Self::enabled_products`], from price metadata
5261
+ * `sandbox_enabled_products`. Kept separate for the same reason plans keep the two
5262
+ * apart: an organization may be entitled to try a product in sandbox without being
5263
+ * entitled to bill for it in production. */
5264
+ sandboxEnabledProducts?: components["schemas"]["ProductType"][];
5265
+ /**
5266
+ * Format: int32
5267
+ * @description Optional validity window (in months) for the granted credits, from metadata `validity_months`
5268
+ */
5269
+ validityMonths?: number | null;
5270
+ };
5271
+ /** @description Response for the top-up pack catalog endpoint (`GET .../billing/topup-packs`). */
5272
+ TopupPacksResponse: {
5273
+ packs: components["schemas"]["TopupPack"][];
5274
+ };
5275
+ /** @description The automatic traversal as a whole (§4.1): the policy it ran under, the budget it was gated
5276
+ * against, and what it has actually spent. Operator-facing only, for the same reason
5277
+ * [`TraversalWave`] is. */
5278
+ TraversalSummary: {
5279
+ /**
5280
+ * Format: int32
5281
+ * @description The step budget gated up front, in Zyphe credits. Σ of every wave's spend can never exceed
5282
+ * this: each wave's `maxBudget` is capped at what remains.
5283
+ */
5284
+ budgetCredits: number;
5285
+ /**
5286
+ * Format: double
5287
+ * @description The relevance floor **currently configured** — the value every wave since the last edit
5288
+ * used, not a value frozen on the run. The floor is an operational tolerance, not part of the
5289
+ * case file.
5290
+ */
5291
+ minBranchPercentage: number;
5292
+ /** @description **Absent** while the traversal is still open — `skip_serializing_if` omits the key rather
5293
+ * than emitting `null`, so a client testing for an explicit null never matches. Otherwise how
5294
+ * it ended — `completed`,
5295
+ * `threshold_pruned`, `budget_exhausted`, `max_depth_reached`, `unexpandable`, `wave_failed`
5296
+ * or `failed`. */
5297
+ outcome?: string | null;
5298
+ /**
5299
+ * Format: int32
5300
+ * @description What the base run and its waves have been charged so far, in Zyphe credits. Excludes
5301
+ * reviewer-initiated per-node expansions, which are billed separately and at a margin.
5302
+ */
5303
+ spentCredits: number;
5304
+ };
5305
+ /** @description One continuation wave of the applicant-facing automatic traversal (ENG-1009), surfaced by the
5306
+ * org-side `GET .../kyb/discovery` (§4.1) so a reviewer can see what the traversal did and what
5307
+ * each step of it cost.
5308
+ *
5309
+ * Operator-facing only — like [`ExpansionRecord`], it carries `chargedCredits`, and the applicant
5310
+ * walking the widget must never see what their onboarding cost the organization. */
5311
+ TraversalWave: {
5312
+ /**
5313
+ * Format: int64
5314
+ * @description The provider `maxBudget` this wave carried, in provider credit cents — the reservation the
5315
+ * credit gate sees while it is live.
5316
+ */
5317
+ budgetCapCents: number;
5318
+ /** Format: int32 */
5319
+ chargedCredits: number;
5320
+ /** Format: date-time */
5321
+ completedAt?: string | null;
5322
+ /** Format: date-time */
5323
+ createdAt: string;
5324
+ /** Format: uuid */
5325
+ discoveryId: string;
5326
+ /** @description The `budget_truncated` chips this wave opened, in the relevance order it chose them. */
5327
+ nodeIds: string[];
5328
+ /** @description `PENDING` | `COMPLETED` | `FAILED`. */
5329
+ status: string;
5330
+ stoppedReason?: string | null;
5331
+ /**
5332
+ * Format: int32
5333
+ * @description Its position in the traversal, 1-based: wave 1 is the first continuation off the
5334
+ * interactive base run.
5335
+ */
5336
+ wave: number;
5337
+ };
5338
+ TriggerReminderResponse: {
5339
+ enqueued: boolean;
5340
+ };
5341
+ UboDefinition: {
5342
+ /** @description `None` when the register reported no nationality. See [`UboDefinition::date_of_birth`]. */
5343
+ country?: string | null;
5344
+ /** @description `None` for a UBO taken from a company register as reported. Registers publish ownership,
5345
+ * not identity dossiers: a birth date is frequently absent, and demanding one would force the
5346
+ * applicant to invent or look up data the register itself does not hold. Such a UBO is
5347
+ * AML-screened on name alone, which the review panel is expected to treat as a thin identity. */
5348
+ dateOfBirth?: string | null;
5349
+ /** @description Email of the UBO. `None` for a name-only UBO added without an email: such a UBO is
5350
+ * AML-screened by name and is never sent a KYC invitation. */
5351
+ emailAddress?: string | null;
5352
+ firstName: string;
5353
+ /** @description `None` for any register-sourced UBO — no company register publishes gender. Collected only
5354
+ * when a person enters the UBO by hand. */
5355
+ gender?: string | null;
5356
+ /**
5357
+ * Format: uuid
5358
+ * @description Stable identifier for this UBO within the KYB result. Assigned on creation
5359
+ * (submission or post-submission add) and used to address the UBO for removal /
5360
+ * name-screening instead of a positional index. `None` only for legacy entries
5361
+ * created before this field existed.
5362
+ */
5363
+ id?: string | null;
5364
+ lastName: string;
5365
+ };
5366
+ /** @description One ultimate-beneficial-owner suggestion derived from the discovered ownership graph.
5367
+ * Suggestions only — the applicant confirms them into real `UboDefinition`s; discovery
5368
+ * never writes `ubo_definitions` itself. */
5369
+ UboSuggestion: {
5370
+ /** @description `"YYYY-MM-DD"`, when the provider reported a birth date. */
5371
+ birthDate?: string | null;
5372
+ fullName: string;
5373
+ nationality?: string | null;
5374
+ /** Format: double */
5375
+ totalOwnershipPercentage?: number | null;
5376
+ };
5377
+ /** @enum {string} */
5378
+ ValidationMessages: "validation_unexpected" | "validation_invalid_file_format" | "validation_organization_slug_exists" | "validation_flow_slug_exists" | "validation_flow_id_mismatch" | "validation_flow_step_name_exists" | "validation_consents_not_granted" | "validation_kyb_config_match" | "validation_kyb_config_already_uses_this_kyc_flow_id" | "validation_kyb_require_kyc_needs_kyc_flow" | "validation_kyb_moderation_status_wrong" | "validation_kyb_missing_required_documents" | "validation_form_name_exists" | "validation_database_error" | "validation_flow_name_invalid" | "validation_flow_slug_name_invalid" | "validation_flow_step_name_invalid" | "validation_flow_step_order_duplicate" | "validation_flow_step_order_invalid" | "validation_flow_step_id_mismatch" | "validation_password_too_short" | "validation_password_no_uppercase" | "validation_password_no_lowercase" | "validation_password_no_number" | "validation_password_no_special_character" | "validation_password_contains_whitespace_or_control" | "validation_emails_empty" | "validation_email_invalid" | "validation_emails_too_many" | "validation_emails_duplicate" | "validation_invite_to_self" | "validation_e164_format" | "validation_flow_step_already_has_reference" | "validation_flow_step_config_invalid" | "validation_flow_not_found" | "validation_empty_parameter" | "validation_form_not_found" | "validation_organization_not_found" | "validation_workflow_graph_invalid" | "validation_invalid_role_for_invitation" | "validation_form_condition_forward_ref";
5379
+ VaultUnlockPasskeyData: {
5380
+ /** @description Passkey challenge for vault unlock (base64url) */
5381
+ challenge: string;
5382
+ /** @description Credential ID for vault unlock (base64url-encoded) */
5383
+ credentialId: string;
5384
+ /** @description Full WebAuthn `PublicKeyCredentialRequestOptions` for vault unlock.
3544
5385
  * Frontends should pass `options.publicKey` directly to
3545
5386
  * `navigator.credentials.get({ publicKey })`. */
3546
5387
  options: Record<string, never>;
@@ -3588,7 +5429,7 @@ export interface components {
3588
5429
  type: "EXTERNAL_ID";
3589
5430
  };
3590
5431
  VerificationRequest: {
3591
- amlResult?: components["schemas"]["AmlResult"] | null;
5432
+ amlResult?: null | components["schemas"]["AmlResult"];
3592
5433
  /** Format: int32 */
3593
5434
  attemptsCount: number;
3594
5435
  /** Format: date-time */
@@ -3596,36 +5437,36 @@ export interface components {
3596
5437
  customData: {
3597
5438
  [key: string]: unknown;
3598
5439
  };
3599
- dvResult?: components["schemas"]["DvResult"] | null;
5440
+ dvResult?: null | components["schemas"]["DvResult"];
3600
5441
  /** Format: uuid */
3601
5442
  flowId: string;
3602
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
5443
+ flowStep?: null | components["schemas"]["FlowStep"];
3603
5444
  /** Format: uuid */
3604
5445
  flowStepId: string;
3605
- formResult?: components["schemas"]["FormResult"] | null;
3606
- geolocationResult?: components["schemas"]["GeolocationResult"] | null;
5446
+ formResult?: null | components["schemas"]["FormResult"];
5447
+ geolocationResult?: null | components["schemas"]["GeolocationResult"];
3607
5448
  /** Format: uuid */
3608
5449
  id: string;
3609
- identity?: components["schemas"]["Identity"] | null;
5450
+ identity?: null | components["schemas"]["Identity"];
3610
5451
  /** Format: uuid */
3611
5452
  identityId: string;
3612
- kybResult?: components["schemas"]["KybResult"] | null;
5453
+ kybResult?: null | components["schemas"]["KybResult"];
3613
5454
  /** Format: uuid */
3614
5455
  organizationId: string;
3615
- phoneResult?: components["schemas"]["PhoneResult"] | null;
3616
- poaResult?: components["schemas"]["PoaResult"] | null;
5456
+ phoneResult?: null | components["schemas"]["PhoneResult"];
5457
+ poaResult?: null | components["schemas"]["PoaResult"];
3617
5458
  reason?: string | null;
3618
5459
  replayerZid?: string | null;
3619
- spidResult?: components["schemas"]["SpidResult"] | null;
5460
+ spidResult?: null | components["schemas"]["SpidResult"];
3620
5461
  status: components["schemas"]["VerificationRequestStatus"];
3621
5462
  /** Format: date-time */
3622
5463
  updatedAt?: string | null;
3623
- walletResult?: components["schemas"]["WalletResult"] | null;
5464
+ walletResult?: null | components["schemas"]["WalletResult"];
3624
5465
  };
3625
5466
  /** @enum {string} */
3626
5467
  VerificationRequestStatus: "PENDING" | "COMPLETED" | "FAILED" | "CANCELLED" | "QUEUED" | "PROCESSING" | "REQUIRES_MANUAL_REVIEW" | "REQUIRES_ADMIN_REVIEW" | "REJECTED";
3627
5468
  VerifyGeolocationProofRequest: {
3628
- cloudflareTrace?: components["schemas"]["CloudflareTracePayload"] | null;
5469
+ cloudflareTrace?: null | components["schemas"]["CloudflareTracePayload"];
3629
5470
  coords: components["schemas"]["GeolocationCoordinates"];
3630
5471
  deviceFingerprint: string;
3631
5472
  isSecureContext: boolean;
@@ -3673,7 +5514,7 @@ export interface components {
3673
5514
  createdAt?: string | null;
3674
5515
  /** Format: uuid */
3675
5516
  flowResultId: string;
3676
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
5517
+ flowStep?: null | components["schemas"]["FlowStep"];
3677
5518
  /** Format: uuid */
3678
5519
  flowStepId?: string | null;
3679
5520
  /** Format: uuid */
@@ -3692,11 +5533,25 @@ export interface components {
3692
5533
  WalletStepOutput: {
3693
5534
  status: components["schemas"]["ResultStatus"];
3694
5535
  };
5536
+ /**
5537
+ * @description The canonical, resource-specific event vocabulary used for subscription filters and routing.
5538
+ *
5539
+ * Values are stable wire identifiers: renaming one is a breaking change for every subscribed
5540
+ * customer. Adding one is safe — the column is TEXT and the API validates against this catalog.
5541
+ * @enum {string}
5542
+ */
5543
+ WebhookEventType: "verification.dv.completed" | "verification.dv.failed" | "verification.dv.review" | "verification.poa.completed" | "verification.poa.failed" | "verification.poa.review" | "verification.form.completed" | "verification.form.failed" | "verification.form.review" | "verification.spid.completed" | "verification.spid.failed" | "verification.spid.review" | "verification.phone.completed" | "verification.phone.failed" | "verification.phone.review" | "verification.wallet.completed" | "verification.wallet.failed" | "verification.wallet.review" | "verification.kyb.completed" | "verification.kyb.failed" | "verification.kyb.review" | "verification.kyb.submitted" | "verification.geolocation.completed" | "verification.geolocation.failed" | "verification.geolocation.review" | "verification.aml.produced" | "verification.aml.refreshed" | "verification.aml.moderated" | "verification.document.expired" | "verification.kyc.expired" | "flow.risk.reevaluated" | "flow.completed" | "transaction.alert.created" | "transaction.alert.resolved" | "kyc_passport.verification.updated";
5544
+ /**
5545
+ * @description Which payload shape an endpoint receives.
5546
+ * @enum {string}
5547
+ */
5548
+ WebhookPayloadVersion: "LEGACY_V1" | "V2";
3695
5549
  /** @description The scenario/context that triggered a worker.
3696
5550
  *
3697
5551
  * This helps distinguish between different flows that can trigger the same
3698
5552
  * worker type (e.g. AML worker triggered by DV vs scheduled refresh). */
3699
5553
  WorkerScenario: "USER_INITIATED" | {
5554
+ /** @description Worker spawned by another worker (e.g. AML triggered by DV completion). */
3700
5555
  TRIGGERED_BY_WORKER: components["schemas"]["WorkerType"];
3701
5556
  } | "ADMIN_ACTION" | "ONE_CLICK_REUSE";
3702
5557
  /**
@@ -3709,7 +5564,7 @@ export interface components {
3709
5564
  * (e.g. `DV`, `ONE_CLICK_FORM`) — the same value shown in `source.workerType`.
3710
5565
  * @enum {string}
3711
5566
  */
3712
- WorkerType: "DV" | "LIVENESS" | "AML" | "POA" | "SPID" | "FORM" | "ONE_CLICK_DV" | "ONE_CLICK_FORM" | "MANUAL_REVIEW";
5567
+ WorkerType: "DV" | "LIVENESS" | "AML" | "POA" | "SPID" | "FORM" | "ONE_CLICK_DV" | "ONE_CLICK_FORM" | "MANUAL_REVIEW" | "TM";
3713
5568
  /** @description Context data available to JDM rules during flow evaluation.
3714
5569
  *
3715
5570
  * This structure is serialized to JSON and passed to the Zen Engine for evaluation.
@@ -3736,7 +5591,7 @@ export interface components {
3736
5591
  dvResults: components["schemas"]["DvResult"][];
3737
5592
  /** @description Form submission results */
3738
5593
  formResults: components["schemas"]["FormResult"][];
3739
- identity?: components["schemas"]["Identity"] | null;
5594
+ identity?: null | components["schemas"]["Identity"];
3740
5595
  /** @description Structured data from previous step executions for JDM consumption */
3741
5596
  jdmData?: {
3742
5597
  [key: string]: components["schemas"]["FlowStepOutput"];
@@ -3816,7 +5671,7 @@ export interface components {
3816
5671
  * @description Unique identifier for this node.
3817
5672
  */
3818
5673
  id: string;
3819
- metadata?: components["schemas"]["WorkflowNodeMetadata"] | null;
5674
+ metadata?: null | components["schemas"]["WorkflowNodeMetadata"];
3820
5675
  /** @enum {string} */
3821
5676
  type: "START";
3822
5677
  } | {
@@ -3825,7 +5680,7 @@ export interface components {
3825
5680
  * @description Unique identifier for this node.
3826
5681
  */
3827
5682
  id: string;
3828
- metadata?: components["schemas"]["WorkflowNodeMetadata"] | null;
5683
+ metadata?: null | components["schemas"]["WorkflowNodeMetadata"];
3829
5684
  /** @enum {string} */
3830
5685
  type: "END";
3831
5686
  } | {
@@ -3834,7 +5689,7 @@ export interface components {
3834
5689
  * @description Unique identifier for this node.
3835
5690
  */
3836
5691
  id: string;
3837
- metadata?: components["schemas"]["WorkflowNodeMetadata"] | null;
5692
+ metadata?: null | components["schemas"]["WorkflowNodeMetadata"];
3838
5693
  /** @description The slug of the flow step this node represents. */
3839
5694
  stepSlug: string;
3840
5695
  /** @enum {string} */
@@ -3842,24 +5697,26 @@ export interface components {
3842
5697
  } | {
3843
5698
  /** @description The branches to evaluate (required for Switch operator). */
3844
5699
  branches?: components["schemas"]["BranchCondition"][] | null;
3845
- condition?: Omit<components["schemas"]["Condition"], "op"> | null;
5700
+ condition?: null | components["schemas"]["Condition"];
3846
5701
  /**
3847
5702
  * Format: uuid
3848
5703
  * @description Unique identifier for this node.
3849
5704
  */
3850
5705
  id: string;
3851
- metadata?: components["schemas"]["WorkflowNodeMetadata"] | null;
5706
+ metadata?: null | components["schemas"]["WorkflowNodeMetadata"];
5707
+ /** @description The type of logical operator. */
3852
5708
  operator: components["schemas"]["LogicalOperator"];
3853
5709
  /** @enum {string} */
3854
5710
  type: "OPERATOR";
3855
5711
  } | {
5712
+ /** @description The configuration for this action. */
3856
5713
  config: components["schemas"]["ActionConfig"];
3857
5714
  /**
3858
5715
  * Format: uuid
3859
5716
  * @description Unique identifier for this node.
3860
5717
  */
3861
5718
  id: string;
3862
- metadata?: components["schemas"]["WorkflowNodeMetadata"] | null;
5719
+ metadata?: null | components["schemas"]["WorkflowNodeMetadata"];
3863
5720
  /** @enum {string} */
3864
5721
  type: "ACTION";
3865
5722
  };
@@ -3867,7 +5724,7 @@ export interface components {
3867
5724
  *
3868
5725
  * Contains UI-specific information like position that doesn't affect execution logic. */
3869
5726
  WorkflowNodeMetadata: {
3870
- position?: components["schemas"]["NodePosition"] | null;
5727
+ position?: null | components["schemas"]["NodePosition"];
3871
5728
  } & {
3872
5729
  [key: string]: unknown;
3873
5730
  };
@@ -3886,7 +5743,7 @@ export interface components {
3886
5743
  * - strings → `String`
3887
5744
  * - arrays → `Array`
3888
5745
  * - objects → `Object` */
3889
- WorkflowValue: (Record<string, never> | null) | boolean | number | string | components["schemas"]["WorkflowValue"][] | {
5746
+ WorkflowValue: null | boolean | number | string | components["schemas"]["WorkflowValue"][] | {
3890
5747
  [key: string]: components["schemas"]["WorkflowValue"];
3891
5748
  };
3892
5749
  ZypheApiKey: {
@@ -3902,7 +5759,7 @@ export interface components {
3902
5759
  options: {
3903
5760
  [key: string]: unknown;
3904
5761
  };
3905
- organization?: components["schemas"]["Organization"] | null;
5762
+ organization?: null | components["schemas"]["Organization"];
3906
5763
  /** Format: uuid */
3907
5764
  organizationId: string;
3908
5765
  /** Format: date-time */
@@ -3928,7 +5785,7 @@ export interface operations {
3928
5785
  sandbox: boolean;
3929
5786
  locale?: components["schemas"]["Locale"];
3930
5787
  /** @description Signed access token (JWS). Required only when flow signed access is enabled. */
3931
- zypheAccessSig?: string | null;
5788
+ zypheAccessSig?: string;
3932
5789
  };
3933
5790
  header?: never;
3934
5791
  path: {
@@ -3969,7 +5826,7 @@ export interface operations {
3969
5826
  parameters: {
3970
5827
  query?: {
3971
5828
  /** @description Whether to use sandbox mode */
3972
- sandbox?: boolean | null;
5829
+ sandbox?: boolean;
3973
5830
  };
3974
5831
  header?: never;
3975
5832
  path: {
@@ -4078,9 +5935,9 @@ export interface operations {
4078
5935
  /** @description Email address of the user whose verification progress should be queried. */
4079
5936
  email?: string | null;
4080
5937
  /** @description Credential type for wallet or external-ID based resolution (`WALLET` or `EXTERNAL_ID`). */
4081
- credentialType?: components["schemas"]["CredentialType"] | null;
5938
+ credentialType?: null | components["schemas"]["CredentialType"];
4082
5939
  /** @description Wallet chain. Required when `credentialType` is `WALLET`. */
4083
- chain?: components["schemas"]["SiwxChain"] | null;
5940
+ chain?: null | components["schemas"]["SiwxChain"];
4084
5941
  /** @description Wallet address. Required when `credentialType` is `WALLET`. */
4085
5942
  address?: string | null;
4086
5943
  /** @description External identifier. Required when `credentialType` is `EXTERNAL_ID`. */
@@ -4136,7 +5993,7 @@ export interface operations {
4136
5993
  parameters: {
4137
5994
  query?: {
4138
5995
  /** @description Use sandbox environment */
4139
- sandbox?: boolean | null;
5996
+ sandbox?: boolean;
4140
5997
  };
4141
5998
  header?: never;
4142
5999
  path: {
@@ -4183,7 +6040,7 @@ export interface operations {
4183
6040
  parameters: {
4184
6041
  query?: {
4185
6042
  /** @description Use sandbox environment */
4186
- sandbox?: boolean | null;
6043
+ sandbox?: boolean;
4187
6044
  };
4188
6045
  header?: never;
4189
6046
  path: {
@@ -4218,7 +6075,7 @@ export interface operations {
4218
6075
  parameters: {
4219
6076
  query?: {
4220
6077
  /** @description Use sandbox environment */
4221
- sandbox?: boolean | null;
6078
+ sandbox?: boolean;
4222
6079
  };
4223
6080
  header?: never;
4224
6081
  path: {
@@ -4265,7 +6122,7 @@ export interface operations {
4265
6122
  parameters: {
4266
6123
  query?: {
4267
6124
  /** @description Use sandbox environment */
4268
- sandbox?: boolean | null;
6125
+ sandbox?: boolean;
4269
6126
  };
4270
6127
  header?: never;
4271
6128
  path: {
@@ -5591,4 +7448,464 @@ export interface operations {
5591
7448
  };
5592
7449
  };
5593
7450
  };
7451
+ sdkIngestTransaction: {
7452
+ parameters: {
7453
+ query: {
7454
+ sandbox: boolean;
7455
+ locale?: components["schemas"]["Locale"];
7456
+ };
7457
+ header?: never;
7458
+ path: {
7459
+ /** @description Organization ID */
7460
+ organization_id: string;
7461
+ };
7462
+ cookie?: never;
7463
+ };
7464
+ requestBody: {
7465
+ content: {
7466
+ "application/json": components["schemas"]["TmIngestTransactionRequest"];
7467
+ };
7468
+ };
7469
+ responses: {
7470
+ 200: {
7471
+ headers: {
7472
+ [name: string]: unknown;
7473
+ };
7474
+ content: {
7475
+ "application/json": components["schemas"]["TmIngestTransactionResponse"];
7476
+ };
7477
+ };
7478
+ 400: {
7479
+ headers: {
7480
+ [name: string]: unknown;
7481
+ };
7482
+ content: {
7483
+ "application/json": components["schemas"]["BaxeError"];
7484
+ };
7485
+ };
7486
+ 401: {
7487
+ headers: {
7488
+ [name: string]: unknown;
7489
+ };
7490
+ content: {
7491
+ "application/json": components["schemas"]["BaxeError"];
7492
+ };
7493
+ };
7494
+ 402: {
7495
+ headers: {
7496
+ [name: string]: unknown;
7497
+ };
7498
+ content: {
7499
+ "application/json": components["schemas"]["BaxeError"];
7500
+ };
7501
+ };
7502
+ 403: {
7503
+ headers: {
7504
+ [name: string]: unknown;
7505
+ };
7506
+ content: {
7507
+ "application/json": components["schemas"]["BaxeError"];
7508
+ };
7509
+ };
7510
+ 429: {
7511
+ headers: {
7512
+ [name: string]: unknown;
7513
+ };
7514
+ content: {
7515
+ "application/json": components["schemas"]["BaxeError"];
7516
+ };
7517
+ };
7518
+ 500: {
7519
+ headers: {
7520
+ [name: string]: unknown;
7521
+ };
7522
+ content: {
7523
+ "application/json": components["schemas"]["BaxeError"];
7524
+ };
7525
+ };
7526
+ };
7527
+ };
7528
+ sdkGetTransaction: {
7529
+ parameters: {
7530
+ query: {
7531
+ sandbox: boolean;
7532
+ locale?: components["schemas"]["Locale"];
7533
+ };
7534
+ header?: never;
7535
+ path: {
7536
+ /** @description Organization ID */
7537
+ organization_id: string;
7538
+ /** @description Transaction ID */
7539
+ transaction_id: string;
7540
+ };
7541
+ cookie?: never;
7542
+ };
7543
+ requestBody?: never;
7544
+ responses: {
7545
+ 200: {
7546
+ headers: {
7547
+ [name: string]: unknown;
7548
+ };
7549
+ content: {
7550
+ "application/json": components["schemas"]["TmTransactionResponse"];
7551
+ };
7552
+ };
7553
+ 401: {
7554
+ headers: {
7555
+ [name: string]: unknown;
7556
+ };
7557
+ content: {
7558
+ "application/json": components["schemas"]["BaxeError"];
7559
+ };
7560
+ };
7561
+ 403: {
7562
+ headers: {
7563
+ [name: string]: unknown;
7564
+ };
7565
+ content: {
7566
+ "application/json": components["schemas"]["BaxeError"];
7567
+ };
7568
+ };
7569
+ 404: {
7570
+ headers: {
7571
+ [name: string]: unknown;
7572
+ };
7573
+ content: {
7574
+ "application/json": components["schemas"]["BaxeError"];
7575
+ };
7576
+ };
7577
+ 500: {
7578
+ headers: {
7579
+ [name: string]: unknown;
7580
+ };
7581
+ content: {
7582
+ "application/json": components["schemas"]["BaxeError"];
7583
+ };
7584
+ };
7585
+ };
7586
+ };
7587
+ sdkUpdateTransactionStatus: {
7588
+ parameters: {
7589
+ query: {
7590
+ sandbox: boolean;
7591
+ locale?: components["schemas"]["Locale"];
7592
+ };
7593
+ header?: never;
7594
+ path: {
7595
+ /** @description Organization ID */
7596
+ organization_id: string;
7597
+ /** @description Transaction ID */
7598
+ transaction_id: string;
7599
+ };
7600
+ cookie?: never;
7601
+ };
7602
+ requestBody: {
7603
+ content: {
7604
+ "application/json": components["schemas"]["TmUpdateTransactionStatusRequest"];
7605
+ };
7606
+ };
7607
+ responses: {
7608
+ 200: {
7609
+ headers: {
7610
+ [name: string]: unknown;
7611
+ };
7612
+ content: {
7613
+ "application/json": components["schemas"]["TmTransactionResponse"];
7614
+ };
7615
+ };
7616
+ 401: {
7617
+ headers: {
7618
+ [name: string]: unknown;
7619
+ };
7620
+ content: {
7621
+ "application/json": components["schemas"]["BaxeError"];
7622
+ };
7623
+ };
7624
+ 403: {
7625
+ headers: {
7626
+ [name: string]: unknown;
7627
+ };
7628
+ content: {
7629
+ "application/json": components["schemas"]["BaxeError"];
7630
+ };
7631
+ };
7632
+ 404: {
7633
+ headers: {
7634
+ [name: string]: unknown;
7635
+ };
7636
+ content: {
7637
+ "application/json": components["schemas"]["BaxeError"];
7638
+ };
7639
+ };
7640
+ 500: {
7641
+ headers: {
7642
+ [name: string]: unknown;
7643
+ };
7644
+ content: {
7645
+ "application/json": components["schemas"]["BaxeError"];
7646
+ };
7647
+ };
7648
+ };
7649
+ };
7650
+ sdkListTinChecks: {
7651
+ parameters: {
7652
+ query: {
7653
+ /** @description Page size (default 50, max 200). */
7654
+ take?: number;
7655
+ skip?: number;
7656
+ sandbox: boolean;
7657
+ locale?: components["schemas"]["Locale"];
7658
+ };
7659
+ header?: never;
7660
+ path: {
7661
+ /** @description Organization ID */
7662
+ organization_id: string;
7663
+ };
7664
+ cookie?: never;
7665
+ };
7666
+ requestBody?: never;
7667
+ responses: {
7668
+ 200: {
7669
+ headers: {
7670
+ [name: string]: unknown;
7671
+ };
7672
+ content: {
7673
+ "application/json": components["schemas"]["TinCheckListResponse"];
7674
+ };
7675
+ };
7676
+ 401: {
7677
+ headers: {
7678
+ [name: string]: unknown;
7679
+ };
7680
+ content: {
7681
+ "application/json": components["schemas"]["BaxeError"];
7682
+ };
7683
+ };
7684
+ 403: {
7685
+ headers: {
7686
+ [name: string]: unknown;
7687
+ };
7688
+ content: {
7689
+ "application/json": components["schemas"]["BaxeError"];
7690
+ };
7691
+ };
7692
+ 500: {
7693
+ headers: {
7694
+ [name: string]: unknown;
7695
+ };
7696
+ content: {
7697
+ "application/json": components["schemas"]["BaxeError"];
7698
+ };
7699
+ };
7700
+ };
7701
+ };
7702
+ sdkRunTinCheck: {
7703
+ parameters: {
7704
+ query: {
7705
+ sandbox: boolean;
7706
+ locale?: components["schemas"]["Locale"];
7707
+ };
7708
+ header?: never;
7709
+ path: {
7710
+ /** @description Organization ID */
7711
+ organization_id: string;
7712
+ };
7713
+ cookie?: never;
7714
+ };
7715
+ requestBody: {
7716
+ content: {
7717
+ "application/json": components["schemas"]["RunTinCheckRequest"];
7718
+ };
7719
+ };
7720
+ responses: {
7721
+ 201: {
7722
+ headers: {
7723
+ [name: string]: unknown;
7724
+ };
7725
+ content: {
7726
+ "application/json": components["schemas"]["TinCheckResponse"];
7727
+ };
7728
+ };
7729
+ 400: {
7730
+ headers: {
7731
+ [name: string]: unknown;
7732
+ };
7733
+ content: {
7734
+ "application/json": components["schemas"]["BaxeError"];
7735
+ };
7736
+ };
7737
+ 401: {
7738
+ headers: {
7739
+ [name: string]: unknown;
7740
+ };
7741
+ content: {
7742
+ "application/json": components["schemas"]["BaxeError"];
7743
+ };
7744
+ };
7745
+ 402: {
7746
+ headers: {
7747
+ [name: string]: unknown;
7748
+ };
7749
+ content: {
7750
+ "application/json": components["schemas"]["BaxeError"];
7751
+ };
7752
+ };
7753
+ 403: {
7754
+ headers: {
7755
+ [name: string]: unknown;
7756
+ };
7757
+ content: {
7758
+ "application/json": components["schemas"]["BaxeError"];
7759
+ };
7760
+ };
7761
+ 422: {
7762
+ headers: {
7763
+ [name: string]: unknown;
7764
+ };
7765
+ content: {
7766
+ "application/json": components["schemas"]["BaxeError"];
7767
+ };
7768
+ };
7769
+ 429: {
7770
+ headers: {
7771
+ [name: string]: unknown;
7772
+ };
7773
+ content: {
7774
+ "application/json": components["schemas"]["BaxeError"];
7775
+ };
7776
+ };
7777
+ 500: {
7778
+ headers: {
7779
+ [name: string]: unknown;
7780
+ };
7781
+ content: {
7782
+ "application/json": components["schemas"]["BaxeError"];
7783
+ };
7784
+ };
7785
+ 503: {
7786
+ headers: {
7787
+ [name: string]: unknown;
7788
+ };
7789
+ content: {
7790
+ "application/json": components["schemas"]["BaxeError"];
7791
+ };
7792
+ };
7793
+ };
7794
+ };
7795
+ sdkGetTinCheckQuote: {
7796
+ parameters: {
7797
+ query: {
7798
+ sandbox: boolean;
7799
+ locale?: components["schemas"]["Locale"];
7800
+ };
7801
+ header?: never;
7802
+ path: {
7803
+ /** @description Organization ID */
7804
+ organization_id: string;
7805
+ };
7806
+ cookie?: never;
7807
+ };
7808
+ requestBody?: never;
7809
+ responses: {
7810
+ 200: {
7811
+ headers: {
7812
+ [name: string]: unknown;
7813
+ };
7814
+ content: {
7815
+ "application/json": components["schemas"]["TinCheckQuoteResponse"];
7816
+ };
7817
+ };
7818
+ 401: {
7819
+ headers: {
7820
+ [name: string]: unknown;
7821
+ };
7822
+ content: {
7823
+ "application/json": components["schemas"]["BaxeError"];
7824
+ };
7825
+ };
7826
+ 402: {
7827
+ headers: {
7828
+ [name: string]: unknown;
7829
+ };
7830
+ content: {
7831
+ "application/json": components["schemas"]["BaxeError"];
7832
+ };
7833
+ };
7834
+ 403: {
7835
+ headers: {
7836
+ [name: string]: unknown;
7837
+ };
7838
+ content: {
7839
+ "application/json": components["schemas"]["BaxeError"];
7840
+ };
7841
+ };
7842
+ 500: {
7843
+ headers: {
7844
+ [name: string]: unknown;
7845
+ };
7846
+ content: {
7847
+ "application/json": components["schemas"]["BaxeError"];
7848
+ };
7849
+ };
7850
+ };
7851
+ };
7852
+ sdkGetTinCheck: {
7853
+ parameters: {
7854
+ query: {
7855
+ sandbox: boolean;
7856
+ locale?: components["schemas"]["Locale"];
7857
+ };
7858
+ header?: never;
7859
+ path: {
7860
+ /** @description Organization ID */
7861
+ organization_id: string;
7862
+ /** @description TIN check ID */
7863
+ check_id: string;
7864
+ };
7865
+ cookie?: never;
7866
+ };
7867
+ requestBody?: never;
7868
+ responses: {
7869
+ 200: {
7870
+ headers: {
7871
+ [name: string]: unknown;
7872
+ };
7873
+ content: {
7874
+ "application/json": components["schemas"]["TinCheckResponse"];
7875
+ };
7876
+ };
7877
+ 401: {
7878
+ headers: {
7879
+ [name: string]: unknown;
7880
+ };
7881
+ content: {
7882
+ "application/json": components["schemas"]["BaxeError"];
7883
+ };
7884
+ };
7885
+ 403: {
7886
+ headers: {
7887
+ [name: string]: unknown;
7888
+ };
7889
+ content: {
7890
+ "application/json": components["schemas"]["BaxeError"];
7891
+ };
7892
+ };
7893
+ 404: {
7894
+ headers: {
7895
+ [name: string]: unknown;
7896
+ };
7897
+ content: {
7898
+ "application/json": components["schemas"]["BaxeError"];
7899
+ };
7900
+ };
7901
+ 500: {
7902
+ headers: {
7903
+ [name: string]: unknown;
7904
+ };
7905
+ content: {
7906
+ "application/json": components["schemas"]["BaxeError"];
7907
+ };
7908
+ };
7909
+ };
7910
+ };
5594
7911
  }