@zyphe-sdk/core 0.4.0 → 0.5.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
@@ -6,6 +6,7 @@ export interface paths {
6
6
  path?: never;
7
7
  cookie?: never;
8
8
  };
9
+ /** Get full flow details */
9
10
  get: operations["get_full_flow_details"];
10
11
  put?: never;
11
12
  post?: never;
@@ -22,6 +23,7 @@ export interface paths {
22
23
  path?: never;
23
24
  cookie?: never;
24
25
  };
26
+ /** Get a verification request */
25
27
  get: operations["get_verification_request"];
26
28
  put?: never;
27
29
  post?: never;
@@ -40,7 +42,8 @@ export interface paths {
40
42
  };
41
43
  get?: never;
42
44
  put?: never;
43
- post: operations["sdk_create_verification_request"];
45
+ /** Create a verification request */
46
+ post: operations["createVerificationRequest"];
44
47
  delete?: never;
45
48
  options?: never;
46
49
  head?: never;
@@ -54,7 +57,8 @@ export interface paths {
54
57
  path?: never;
55
58
  cookie?: never;
56
59
  };
57
- get: operations["sdk_get_next_step"];
60
+ /** Get the next verification step */
61
+ get: operations["getNextStep"];
58
62
  put?: never;
59
63
  post?: never;
60
64
  delete?: never;
@@ -141,6 +145,7 @@ export interface paths {
141
145
  path?: never;
142
146
  cookie?: never;
143
147
  };
148
+ /** Get completed verification requests */
144
149
  get: operations["get_completed_verification_requests"];
145
150
  put?: never;
146
151
  post?: never;
@@ -157,7 +162,8 @@ export interface paths {
157
162
  path?: never;
158
163
  cookie?: never;
159
164
  };
160
- get: operations["sdk_list_flow_results"];
165
+ /** List flow results */
166
+ get: operations["listFlowResults"];
161
167
  put?: never;
162
168
  post?: never;
163
169
  delete?: never;
@@ -166,6 +172,131 @@ export interface paths {
166
172
  patch?: never;
167
173
  trace?: never;
168
174
  };
175
+ "/sdk/organizations/{organization_id}/kyb/{kyb_result_id}/reminders/ubo/{recipient_index}": {
176
+ parameters: {
177
+ query?: never;
178
+ header?: never;
179
+ path?: never;
180
+ cookie?: never;
181
+ };
182
+ get?: never;
183
+ put?: never;
184
+ /**
185
+ * Send a UBO KYC reminder
186
+ * @description Sends (or re-sends) the KYC invitation email to a specific UBO on a KYB case,
187
+ * identified by their position in `uboDefinitions`. Use this to drive UBO outreach on
188
+ * demand — for example when automatic UBO KYC emails are disabled for the flow.
189
+ */
190
+ post: operations["sendUboKycReminder"];
191
+ delete?: never;
192
+ options?: never;
193
+ head?: never;
194
+ patch?: never;
195
+ trace?: never;
196
+ };
197
+ "/sdk/organizations/{organization_id}/kyb/{kyb_result_id}/ubos": {
198
+ parameters: {
199
+ query?: never;
200
+ header?: never;
201
+ path?: never;
202
+ cookie?: never;
203
+ };
204
+ get?: never;
205
+ put?: never;
206
+ /**
207
+ * Add UBOs to a KYB case
208
+ * @description Adds one or more ultimate beneficial owners to an existing KYB case and returns the
209
+ * updated KYB result.
210
+ */
211
+ post: operations["addKybUbos"];
212
+ delete?: never;
213
+ options?: never;
214
+ head?: never;
215
+ patch?: never;
216
+ trace?: never;
217
+ };
218
+ "/sdk/organizations/{organization_id}/kyb/{kyb_result_id}/ubos/{person_id}": {
219
+ parameters: {
220
+ query?: never;
221
+ header?: never;
222
+ path?: never;
223
+ cookie?: never;
224
+ };
225
+ get?: never;
226
+ put?: never;
227
+ post?: never;
228
+ /**
229
+ * Remove a UBO from a KYB case
230
+ * @description Removes an ultimate beneficial owner from a KYB case by their stable id and returns the
231
+ * updated KYB result.
232
+ */
233
+ delete: operations["removeKybUbo"];
234
+ options?: never;
235
+ head?: never;
236
+ patch?: never;
237
+ trace?: never;
238
+ };
239
+ "/sdk/organizations/{organization_id}/kyb/{kyb_result_id}/directors": {
240
+ parameters: {
241
+ query?: never;
242
+ header?: never;
243
+ path?: never;
244
+ cookie?: never;
245
+ };
246
+ get?: never;
247
+ put?: never;
248
+ /**
249
+ * Add directors to a KYB case
250
+ * @description Adds one or more directors to an existing KYB case and returns the updated KYB result.
251
+ */
252
+ post: operations["addKybDirectors"];
253
+ delete?: never;
254
+ options?: never;
255
+ head?: never;
256
+ patch?: never;
257
+ trace?: never;
258
+ };
259
+ "/sdk/organizations/{organization_id}/kyb/{kyb_result_id}/directors/{person_id}": {
260
+ parameters: {
261
+ query?: never;
262
+ header?: never;
263
+ path?: never;
264
+ cookie?: never;
265
+ };
266
+ get?: never;
267
+ put?: never;
268
+ post?: never;
269
+ /**
270
+ * Remove a director from a KYB case
271
+ * @description Removes a director from a KYB case by their stable id and returns the updated KYB result.
272
+ */
273
+ delete: operations["removeKybDirector"];
274
+ options?: never;
275
+ head?: never;
276
+ patch?: never;
277
+ trace?: never;
278
+ };
279
+ "/sdk/organizations/{organization_id}/kyb/{kyb_result_id}/document-requests/on-demand": {
280
+ parameters: {
281
+ query?: never;
282
+ header?: never;
283
+ path?: never;
284
+ cookie?: never;
285
+ };
286
+ get?: never;
287
+ put?: never;
288
+ /**
289
+ * Request a KYB document
290
+ * @description Requests an additional document from the business on a KYB case and returns the created
291
+ * document request.
292
+ */
293
+ post: operations["requestKybDocument"];
294
+ delete?: never;
295
+ options?: never;
296
+ head?: never;
297
+ patch?: never;
298
+ trace?: never;
299
+ };
169
300
  "/sdk/organizations/{organization_id}/flow-results/{flow_result_id}/flow/{flow_slug}/details": {
170
301
  parameters: {
171
302
  query?: never;
@@ -173,7 +304,8 @@ export interface paths {
173
304
  path?: never;
174
305
  cookie?: never;
175
306
  };
176
- get: operations["get_sdk_flow_result_details"];
307
+ /** Get flow result details */
308
+ get: operations["getFlowResultDetails"];
177
309
  put?: never;
178
310
  post?: never;
179
311
  delete?: never;
@@ -189,7 +321,8 @@ export interface paths {
189
321
  path?: never;
190
322
  cookie?: never;
191
323
  };
192
- get: operations["get_sdk_dv_result_details"];
324
+ /** Get document verification result details */
325
+ get: operations["getDocumentVerificationResultDetails"];
193
326
  put?: never;
194
327
  post?: never;
195
328
  delete?: never;
@@ -205,7 +338,8 @@ export interface paths {
205
338
  path?: never;
206
339
  cookie?: never;
207
340
  };
208
- get: operations["get_sdk_poa_result_details"];
341
+ /** Get proof of address result details */
342
+ get: operations["getProofOfAddressResultDetails"];
209
343
  put?: never;
210
344
  post?: never;
211
345
  delete?: never;
@@ -221,7 +355,8 @@ export interface paths {
221
355
  path?: never;
222
356
  cookie?: never;
223
357
  };
224
- get: operations["get_sdk_wallet_result_details"];
358
+ /** Get wallet result details */
359
+ get: operations["getWalletResultDetails"];
225
360
  put?: never;
226
361
  post?: never;
227
362
  delete?: never;
@@ -237,7 +372,8 @@ export interface paths {
237
372
  path?: never;
238
373
  cookie?: never;
239
374
  };
240
- get: operations["get_sdk_phone_result_details"];
375
+ /** Get phone result details */
376
+ get: operations["getPhoneResultDetails"];
241
377
  put?: never;
242
378
  post?: never;
243
379
  delete?: never;
@@ -253,7 +389,8 @@ export interface paths {
253
389
  path?: never;
254
390
  cookie?: never;
255
391
  };
256
- get: operations["get_sdk_form_result_details"];
392
+ /** Get form result details */
393
+ get: operations["getFormResultDetails"];
257
394
  put?: never;
258
395
  post?: never;
259
396
  delete?: never;
@@ -269,7 +406,8 @@ export interface paths {
269
406
  path?: never;
270
407
  cookie?: never;
271
408
  };
272
- get: operations["get_sdk_flow_result_details_deprecated"];
409
+ /** Get flow result details (deprecated) */
410
+ get: operations["getFlowResultDetailsDeprecated"];
273
411
  put?: never;
274
412
  post?: never;
275
413
  delete?: never;
@@ -285,7 +423,8 @@ export interface paths {
285
423
  path?: never;
286
424
  cookie?: never;
287
425
  };
288
- get: operations["get_sdk_dv_result_details_deprecated"];
426
+ /** Get document verification result details (deprecated) */
427
+ get: operations["getDocumentVerificationResultDetailsDeprecated"];
289
428
  put?: never;
290
429
  post?: never;
291
430
  delete?: never;
@@ -301,7 +440,52 @@ export interface paths {
301
440
  path?: never;
302
441
  cookie?: never;
303
442
  };
304
- get: operations["get_sdk_poa_result_details_deprecated"];
443
+ /** Get proof of address result details (deprecated) */
444
+ get: operations["getProofOfAddressResultDetailsDeprecated"];
445
+ put?: never;
446
+ post?: never;
447
+ delete?: never;
448
+ options?: never;
449
+ head?: never;
450
+ patch?: never;
451
+ trace?: never;
452
+ };
453
+ "/sdk/organizations/{organization_id}/aml/screen": {
454
+ parameters: {
455
+ query?: never;
456
+ header?: never;
457
+ path?: never;
458
+ cookie?: never;
459
+ };
460
+ get?: never;
461
+ put?: never;
462
+ /**
463
+ * Run a live AML screening and return the raw provider matches
464
+ * @description Queries the configured screening provider (OpenSanctions/Yente or WorldCheck) and returns
465
+ * its raw FollowTheMoney-shaped entity matches — no risk scoring, no persistence. This is the
466
+ * "Stage A only" slice of the on-demand AML flow. Billed per call via pay-as-you-go.
467
+ */
468
+ post: operations["sdkScreenAml"];
469
+ delete?: never;
470
+ options?: never;
471
+ head?: never;
472
+ patch?: never;
473
+ trace?: never;
474
+ };
475
+ "/organizations/{organization_id}/billing/topup-packs": {
476
+ parameters: {
477
+ query?: never;
478
+ header?: never;
479
+ path?: never;
480
+ cookie?: never;
481
+ };
482
+ /**
483
+ * Get the catalog of top-up credit packs (one-time Stripe prices tagged `credit_topup`).
484
+ * @description Unlike sibling endpoints, caching (30 min TTL, with a stale-on-Stripe-error fallback) is
485
+ * owned by `BillingService::get_topup_packs` itself rather than done here in the handler —
486
+ * see that method's doc comment for why.
487
+ */
488
+ get: operations["get_topup_packs"];
305
489
  put?: never;
306
490
  post?: never;
307
491
  delete?: never;
@@ -310,6 +494,30 @@ export interface paths {
310
494
  patch?: never;
311
495
  trace?: never;
312
496
  };
497
+ "/organizations/{organization_id}/billing/topup/checkout": {
498
+ parameters: {
499
+ query?: never;
500
+ header?: never;
501
+ path?: never;
502
+ cookie?: never;
503
+ };
504
+ get?: never;
505
+ put?: never;
506
+ /**
507
+ * Create a payment-mode Stripe Checkout session for a one-time credit top-up purchase.
508
+ * @description The `price_id` must be one of the packs returned by `GET .../billing/topup-packs` —
509
+ * the catalog is resolved live (bypassing that endpoint's cache) since this is the
510
+ * purchase path. Fulfillment (crediting the organization once payment completes) is
511
+ * handled by the `checkout.session.completed` Stripe webhook, keyed off the session
512
+ * metadata stamped here.
513
+ */
514
+ post: operations["create_topup_checkout"];
515
+ delete?: never;
516
+ options?: never;
517
+ head?: never;
518
+ patch?: never;
519
+ trace?: never;
520
+ };
313
521
  }
314
522
  export type webhooks = Record<string, never>;
315
523
  export interface components {
@@ -358,6 +566,22 @@ export interface components {
358
566
  /** @description Optional token for the target flow */
359
567
  token?: string | null;
360
568
  };
569
+ /** @description A single UBO/director to add to an existing KYB result. */
570
+ AddKybPersonInput: {
571
+ country: string;
572
+ dateOfBirth: string;
573
+ /** @description When present, the person is sent a KYC invitation and must complete full KYC for the
574
+ * KYB to be approvable. When absent, the person is screened by name only (AML) and is not
575
+ * notified — a clean name-AML result is sufficient (and required) for that person. */
576
+ email?: string | null;
577
+ firstName: string;
578
+ gender: string;
579
+ lastName: string;
580
+ };
581
+ /** @description Request body for `POST .../kyb/{kyb_result_id}/ubos` and `.../directors`. */
582
+ AddKybPersonsPayload: {
583
+ persons: components["schemas"]["AddKybPersonInput"][];
584
+ };
361
585
  AddressData: {
362
586
  addressLine?: string | null;
363
587
  building: string;
@@ -368,7 +592,74 @@ export interface components {
368
592
  postalCode: string;
369
593
  street: string;
370
594
  };
595
+ /**
596
+ * @description Selected adverse-media provider, parsed from the `adverse_media_provider` config
597
+ * value so it can be matched exhaustively instead of compared as a string.
598
+ * @enum {string}
599
+ */
600
+ AdverseMediaProviderKind: "VERIFY" | "ONE_MEDIA_CHECK" | "GROK";
601
+ /** @description A single adverse-media article persisted on an AML result.
602
+ *
603
+ * This mirrors the provider's article shape but lives in `zyphe-shared` (which
604
+ * cannot depend on `zyphe-clients-interface`); the worker maps the provider
605
+ * response into this type before persisting. */
606
+ AmlAdverseMediaArticle: {
607
+ eventGroup?: string | null;
608
+ language: string;
609
+ locations?: string[];
610
+ /** Format: date-time */
611
+ publishedDate?: string | null;
612
+ /** Format: double */
613
+ relevanceScore?: number | null;
614
+ snippet: string;
615
+ source: string;
616
+ title: string;
617
+ topics?: string[];
618
+ url: string;
619
+ };
620
+ /** @description Adverse-media screening outcome attached to an AML result. */
621
+ AmlAdverseMediaResult: {
622
+ articles?: components["schemas"]["AmlAdverseMediaArticle"][];
623
+ /** Format: date-time */
624
+ checkedAt: string;
625
+ /** @description Whether the screening returned any adverse-media articles (the gating signal). */
626
+ hasHit: boolean;
627
+ provider: components["schemas"]["AdverseMediaProviderKind"];
628
+ totalArticleCount: number;
629
+ totalEventCount: number;
630
+ };
631
+ /** @description Outcome of the latest agentic (Prosecutor → Defender → Judge) review of this screening,
632
+ * persisted on the result so the dispatcher does not re-review an unchanged screening and so
633
+ * a Suggest-mode verdict is visible as a suggestion. Scoped to one screening revision: like
634
+ * moderation forcing, it lapses when a re-screen bumps `checked_at` past `reviewed_at`
635
+ * (see [`AmlRiskResult::agent_review_in_force`]). */
636
+ AmlAgentReview: {
637
+ enactedAction: components["schemas"]["AmlAgentReviewAction"];
638
+ /** @description Decision-policy version that produced the verdict (audit traceability). */
639
+ policyVersion: string;
640
+ rationale: string;
641
+ /** Format: float */
642
+ residualRiskScore: number;
643
+ /** Format: date-time */
644
+ reviewedAt: string;
645
+ /** @description True when the agentic mode gated the action out (Suggest): the verdict is a suggestion
646
+ * for a human reviewer, nothing was enacted. */
647
+ suggested: boolean;
648
+ verdictAction: components["schemas"]["AmlAgentReviewAction"];
649
+ };
650
+ /**
651
+ * @description The action a review decision resolves to, independent of its action-specific payload — the
652
+ * serde tag of the review engine's `Decision`. The camelCase encodings (`approve` /
653
+ * `requestClarification` / `escalate`) match the strings previously stored on
654
+ * `metadata.agentReview`, so existing records deserialize unchanged.
655
+ * @enum {string}
656
+ */
657
+ AmlAgentReviewAction: "approve" | "requestClarification" | "escalate";
371
658
  AmlCheckSummary: {
659
+ /** @description Whether the adverse-media screening for this subject returned any articles.
660
+ * `#[serde(default)]` keeps existing person/company result rows (written before
661
+ * adverse-media screening) deserializable as `false`. */
662
+ hasAdverseMedia?: boolean;
372
663
  hasPep: boolean;
373
664
  hasSanctions: boolean;
374
665
  highRiskEntitiesCount: number;
@@ -377,6 +668,11 @@ export interface components {
377
668
  highestRiskScore: number;
378
669
  totalEntities: number;
379
670
  };
671
+ AmlCompanyQueryMetadata: {
672
+ companyName: string;
673
+ country?: string;
674
+ registrationNumber?: string;
675
+ };
380
676
  AmlEntityResponse: {
381
677
  address?: components["schemas"]["FieldWithControl"];
382
678
  birthCountry?: components["schemas"]["FieldWithControl"];
@@ -414,6 +710,8 @@ export interface components {
414
710
  riskScore: components["schemas"]["RiskScore"];
415
711
  riskTopics: string[];
416
712
  };
713
+ /** @enum {string} */
714
+ AmlModerationStatus: "approved" | "rejected" | "escalated";
417
715
  AmlOccupancy: {
418
716
  endDate?: components["schemas"]["FieldWithControl"];
419
717
  post?: components["schemas"]["AmlPosition"][];
@@ -445,22 +743,37 @@ export interface components {
445
743
  lastName: string;
446
744
  };
447
745
  AmlResult: {
746
+ /** @description Whether adverse-media screening for this subject returned a hit. `#[serde(default)]`
747
+ * (→ `false`) covers legacy cached payloads that predate adverse-media screening. */
748
+ adverseMedia?: boolean;
448
749
  /** Format: date-time */
449
750
  createdAt: string;
450
751
  data?: components["schemas"]["AmlRiskResult"] | null;
451
752
  /** Format: uuid */
452
753
  id: string;
754
+ /**
755
+ * Format: uuid
756
+ * @description For a name-only (email-less) UBO/director screening, the screened person's stable id
757
+ * (the `UboDefinition`/`DirectorDefinition` `id`); lets consumers correlate this AML row to
758
+ * its named person. `None` for verification-request-backed rows (person/company screenings).
759
+ */
760
+ namedPersonRef?: string | null;
453
761
  pep: boolean;
454
762
  sanctions: boolean;
763
+ subjectType?: components["schemas"]["AmlSubjectType"];
455
764
  /** Format: date-time */
456
765
  updatedAt: string;
457
766
  /** Format: uuid */
458
767
  verificationRequestId?: string | null;
459
768
  };
460
769
  AmlRiskMetadata: {
770
+ adverseMedia?: components["schemas"]["AmlAdverseMediaResult"] | null;
771
+ agentReview?: components["schemas"]["AmlAgentReview"] | null;
461
772
  /** Format: date-time */
462
773
  checkedAt: string;
774
+ companyQuery?: components["schemas"]["AmlCompanyQueryMetadata"] | null;
463
775
  controls: components["schemas"]["ResultControlOperation"][];
776
+ moderation?: components["schemas"]["AmlModerationStatus"] | null;
464
777
  query?: components["schemas"]["AmlQueryMetadata"] | null;
465
778
  summary: components["schemas"]["AmlCheckSummary"];
466
779
  };
@@ -488,16 +801,155 @@ export interface components {
488
801
  title?: string;
489
802
  url?: string | null;
490
803
  };
804
+ /**
805
+ * @description The screened subject of an AML result. DTO mirror of the DB `AmlSubjectType` entity enum
806
+ * (converted via `From<entities::AmlSubjectType>`); lets consumers tell a company AML result
807
+ * from a person one. Defaults to `Person` (every result predating this field was a person).
808
+ * @enum {string}
809
+ */
810
+ AmlSubjectType: "PERSON" | "COMPANY";
491
811
  /** @enum {string} */
492
812
  ApiKeyType: "PUBLISHABLE" | "SECRET";
493
813
  /** @description A single custom risk tag that was assigned to a flow result by the flow builder. */
494
814
  AssignedRiskTag: {
815
+ /**
816
+ * Format: date-time
817
+ * @description When this derivation last became active. Informational; `None` for legacy rows.
818
+ */
819
+ addedAt?: string | null;
495
820
  /** Format: uuid */
496
821
  id: string;
822
+ /**
823
+ * Format: date-time
824
+ * @description Tombstone. `None` == active. This is the active predicate.
825
+ */
826
+ removedAt?: string | null;
827
+ source?: components["schemas"]["RiskTagSource"];
497
828
  tag: string;
498
829
  /** Format: double */
499
830
  weight: number;
500
831
  };
832
+ /** @description Newtype wrapper for the list of assigned risk tags stored as JSONB in the database.
833
+ * Required because SeaORM's `FromJsonQueryResult` cannot be derived for bare `Vec<T>`. */
834
+ AssignedRiskTags: components["schemas"]["AssignedRiskTag"][];
835
+ /**
836
+ * @description All auditable actions.
837
+ *
838
+ * `JsonDisplay` / `JsonFromStr` keep `Display` and `FromStr` in sync with serde,
839
+ * so `.to_string()` always produces the DB-compatible string
840
+ * (e.g., `AuditAction::FlowCreated` → `"FLOW_CREATED"`).
841
+ * @enum {string}
842
+ */
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";
844
+ /** @description A single entry in the audit log, returned by the query API. */
845
+ AuditLogEntry: {
846
+ action: components["schemas"]["AuditAction"];
847
+ /** Format: uuid */
848
+ actorId?: string | null;
849
+ actorIp?: string | null;
850
+ actorRole?: string | null;
851
+ actorZid?: string | null;
852
+ /** Format: date-time */
853
+ createdAt: string;
854
+ details: unknown;
855
+ /** Format: uuid */
856
+ id: string;
857
+ /** @description Whether this entry originated from a sandbox operation.
858
+ * `null` = cross-cutting event (auth, org management) that spans both environments. */
859
+ isSandbox?: boolean | null;
860
+ /** Format: uuid */
861
+ organizationId?: string | null;
862
+ outcomeStatus?: Omit<components["schemas"]["AuditOutcome"], "type"> | null;
863
+ /** Format: uuid */
864
+ resourceId?: string | null;
865
+ resourceType: components["schemas"]["AuditResourceType"];
866
+ /** @description Login-session identifier (`fid`). Stable across token refreshes within one browser session. */
867
+ sessionId?: string | null;
868
+ source?: Omit<components["schemas"]["AuditSource"], "type"> | null;
869
+ };
870
+ /** @description The outcome of the operation that produced an audit entry.
871
+ *
872
+ * Serialised to JSONB in the `outcomeStatus` column so the type structure is
873
+ * preserved and queryable (e.g. `WHERE "outcomeStatus"->>'type' = 'httpError'`).
874
+ *
875
+ * ## Variants
876
+ * - `httpSuccess { status }` — HTTP response with 2xx status code.
877
+ * - `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.
881
+ * - `workerOk` — background worker completed successfully.
882
+ * - `workerError { variant }` — background worker failed; `variant` is the
883
+ * Rust error-enum variant name (e.g. `"VaultLocked"`, `"UpsertDvResult"`). */
884
+ AuditOutcome: {
885
+ /**
886
+ * Format: int32
887
+ * @description Numeric HTTP status code (e.g. 200, 201, 204).
888
+ */
889
+ status: number;
890
+ /** @enum {string} */
891
+ type: "httpSuccess";
892
+ } | {
893
+ /**
894
+ * Format: int32
895
+ * @description Application-level error code from [`BaxeError`] (e.g. 200 for validation, 201 for deserialization).
896
+ * `None` when the error was not produced by the application's error framework.
897
+ */
898
+ code?: number | null;
899
+ /**
900
+ * Format: int32
901
+ * @description Numeric HTTP status code (e.g. 400, 404, 500).
902
+ */
903
+ status: number;
904
+ /** @description Semantic error tag string (e.g. `"BAD_REQUEST"`, `"NOT_FOUND"`, `"UNAUTHORIZED"`). */
905
+ tag?: string | null;
906
+ /** @enum {string} */
907
+ type: "httpError";
908
+ } | {
909
+ /** @enum {string} */
910
+ type: "workerOk";
911
+ } | {
912
+ /** @enum {string} */
913
+ type: "workerError";
914
+ /** @description Rust error-enum variant name (e.g. `"VaultLocked"`, `"UpsertDvResult"`). */
915
+ variant: string;
916
+ };
917
+ /**
918
+ * @description All auditable resource types. Stored as PascalCase in the `resource_type` column.
919
+ *
920
+ * `Unknown` is used for auto-generated events where the middleware cannot
921
+ * determine the resource type (e.g. streaming responses, system operations),
922
+ * and as a catch-all for unrecognised values from the database.
923
+ * @enum {string}
924
+ */
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";
926
+ /** @description The origin/trigger of an audit event.
927
+ *
928
+ * All audit events MUST have a source - this allows filtering/excluding events
929
+ * by their origin and provides context for investigations.
930
+ *
931
+ * ## Variants
932
+ * - `Http` — Event originated from an HTTP request (method + path).
933
+ * - `Worker` — Event emitted by a background worker (type + scenario).
934
+ * - `Scheduled` — Event from a scheduled/cron task (task name). */
935
+ AuditSource: {
936
+ /** @description HTTP method (e.g. "GET", "POST", "PUT", "DELETE"). */
937
+ method: string;
938
+ /** @description Request path (e.g. "/organizations/{id}/flows"). */
939
+ path: string;
940
+ /** @enum {string} */
941
+ type: "HTTP";
942
+ } | {
943
+ scenario: components["schemas"]["WorkerScenario"];
944
+ /** @enum {string} */
945
+ type: "WORKER";
946
+ workerType: components["schemas"]["WorkerType"];
947
+ } | {
948
+ /** @description Name of the scheduled task (e.g. "AML_REFRESH", "CLEANUP"). */
949
+ taskName: string;
950
+ /** @enum {string} */
951
+ type: "SCHEDULED";
952
+ };
501
953
  AutoOneClickKycConfig: {
502
954
  /** @example { "en_title": "Verify with Partners" } */
503
955
  labels?: {
@@ -536,6 +988,21 @@ export interface components {
536
988
  errorTag: components["schemas"]["ErrorTags"];
537
989
  message?: string | null;
538
990
  };
991
+ /**
992
+ * @description Describes the visibility scope of a bot token.
993
+ *
994
+ * - `Organization` — the bot is connected to one specific organisation and is
995
+ * only visible in that organisation's bot list.
996
+ * - `Platform` — the bot is a platform-root identity (no
997
+ * `default_organization_id`) and is visible in every organisation's bot
998
+ * list.
999
+ *
1000
+ * Stored inside the `credentialData` JSONB of the `BOT_TOKEN` credential row.
1001
+ * `Organization` is the default to ensure backward-compatible deserialization
1002
+ * of rows written before this field existed.
1003
+ * @enum {string}
1004
+ */
1005
+ BotTokenScope: "ORGANIZATION" | "PLATFORM";
539
1006
  /** @description A condition branch for switch operators. */
540
1007
  BranchCondition: {
541
1008
  condition: components["schemas"]["Condition"];
@@ -562,17 +1029,16 @@ export interface components {
562
1029
  /** @description The user-submitted value for this field. */
563
1030
  submittedValue?: string | null;
564
1031
  /** @description The canonical corrected value recommended by the AI agent.
565
- * For `Match` fields, `run_business_info_cross_check` automatically applies this value
566
- * to the stored business information record (canonical normalization of an agreed value).
567
- * For `Fuzzy`, `Mismatch`, and `NotFound` fields it is surfaced to compliance officers
568
- * for manual review without mutating the stored record. */
1032
+ * When a suggested value is safely applied, `run_business_info_cross_check` stores the field
1033
+ * as `AutoCorrect`. `Mismatch` and `NotFound` suggestions are surfaced for manual review
1034
+ * without mutating the stored record. */
569
1035
  suggestedValue?: string | null;
570
1036
  };
571
1037
  /**
572
1038
  * @description Match type for a single business information field against document-extracted values.
573
1039
  * @enum {string}
574
1040
  */
575
- BusinessInfoMatchType: "match" | "fuzzy" | "mismatch" | "notFound";
1041
+ BusinessInfoMatchType: "match" | "autoCorrect" | "fuzzy" | "mismatch" | "notFound";
576
1042
  BusinessInformation: {
577
1043
  address: string;
578
1044
  businessActivity: string;
@@ -619,6 +1085,10 @@ export interface components {
619
1085
  * @enum {string}
620
1086
  */
621
1087
  CheckStatus: "passed" | "failed" | "not_performed" | "unknown";
1088
+ /** @description Response from creating a checkout session */
1089
+ CheckoutSessionResponse: {
1090
+ checkoutUrl: string;
1091
+ };
622
1092
  CloudflareTracePayload: {
623
1093
  colo?: string | null;
624
1094
  ip?: string | null;
@@ -749,6 +1219,15 @@ export interface components {
749
1219
  accepted: string[];
750
1220
  blocked: string[];
751
1221
  };
1222
+ /** @description Request to create a payment-mode Stripe Checkout session for a one-time credit top-up
1223
+ * purchase (`POST .../billing/topup/checkout`). */
1224
+ CreateTopupCheckoutRequest: {
1225
+ /** @description The Stripe price ID of the top-up pack to purchase, as returned by
1226
+ * `GET .../billing/topup-packs`. */
1227
+ priceId: string;
1228
+ /** @description Optional redirect URI after checkout. If not provided, redirects to the webapp root. */
1229
+ redirectUri?: string | null;
1230
+ };
752
1231
  CreateVerificationRequestPayload: components["schemas"]["VerificationIdentifier"] & {
753
1232
  continueUrl?: string | null;
754
1233
  cookiesPolicyAccepted: boolean;
@@ -763,8 +1242,42 @@ export interface components {
763
1242
  CreateVerificationRequestResponse: {
764
1243
  verificationRequest: components["schemas"]["VerificationRequest"];
765
1244
  };
1245
+ /**
1246
+ * @description How an organization was created. Lets the frontend tell self-serve signups
1247
+ * apart from admin- or partner-provisioned orgs (e.g. to force self-serve orgs
1248
+ * to pick a real plan instead of the custom plan).
1249
+ *
1250
+ * - `SelfServe` — public signup with no invite.
1251
+ * - `Admin` — created by platform staff; also the default for pre-existing orgs.
1252
+ * - `Partner` — created through a validated partner invite.
1253
+ * @enum {string}
1254
+ */
1255
+ CreationSource: "SELF_SERVE" | "ADMIN" | "PARTNER";
766
1256
  /** @enum {string} */
767
1257
  CredentialType: "PASSWORD" | "MAGIC_LINK" | "PASSKEY" | "BOT_TOKEN" | "WALLET" | "EXTERNAL_ID";
1258
+ /** @description Plan credit expiry policy — replaces the former `carry_over` bool.
1259
+ *
1260
+ * Determines the `expires_at` of Stripe Credit Grants created at renewal.
1261
+ * Stored as JSONB on `SubscriptionPlan.creditExpiryPolicy`. */
1262
+ CreditExpiryPolicy: {
1263
+ /** @enum {string} */
1264
+ type: "periodEnd";
1265
+ } | {
1266
+ /** @enum {string} */
1267
+ type: "never";
1268
+ } | {
1269
+ /** Format: int32 */
1270
+ months: number;
1271
+ /** @enum {string} */
1272
+ type: "monthsFromGrant";
1273
+ } | {
1274
+ /** Format: int32 */
1275
+ months: number;
1276
+ /** @enum {string} */
1277
+ type: "monthsFromSubscription";
1278
+ };
1279
+ /** @example usd */
1280
+ Currency: string;
768
1281
  CustomDocumentConfig: {
769
1282
  enabled?: boolean;
770
1283
  /** Format: uuid */
@@ -775,9 +1288,15 @@ export interface components {
775
1288
  DirectorDefinition: {
776
1289
  country: string;
777
1290
  dateOfBirth: string;
778
- emailAddress: string;
1291
+ /** @description Email of the director. `None` for a name-only director added without an email. */
1292
+ emailAddress?: string | null;
779
1293
  firstName: string;
780
1294
  gender: string;
1295
+ /**
1296
+ * Format: uuid
1297
+ * @description Stable identifier for this director within the KYB result. See [`UboDefinition::id`].
1298
+ */
1299
+ id?: string | null;
781
1300
  lastName: string;
782
1301
  };
783
1302
  Document: {
@@ -798,6 +1317,13 @@ export interface components {
798
1317
  vaultId: string;
799
1318
  };
800
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.
1322
+ *
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;
801
1327
  required?: boolean;
802
1328
  };
803
1329
  DocumentData: {
@@ -886,11 +1412,26 @@ export interface components {
886
1412
  s3Key?: string | null;
887
1413
  };
888
1414
  DvConfig: {
1415
+ /** @default DISABLED */
1416
+ amlAgenticMode: components["schemas"]["KybAgenticMode"];
889
1417
  /** Format: uuid */
890
1418
  documentSelectionStepId?: string;
891
- /** @example { "en_button_label": "Next step" } */
892
- labels?: {
893
- [key: string]: string;
1419
+ /** @description Incode configuration ID the frontend must use when creating the capture session.
1420
+ *
1421
+ * Computed server-side during rehydration from `poa_from_govcheck` and the
1422
+ * sandbox/live environment (see [`crate::types::dto::DvConfig`] rehydration in
1423
+ * 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. */
1425
+ incodeConfigurationId?: string | null;
1426
+ /**
1427
+ * Format: int64
1428
+ * @description How long (in seconds) a successful DV result remains valid before
1429
+ * re-KYC is required. `None` = never expires (existing behaviour).
1430
+ */
1431
+ kycValiditySeconds?: number | null;
1432
+ /** @example { "en_button_label": "Next step" } */
1433
+ labels?: {
1434
+ [key: string]: string;
894
1435
  };
895
1436
  /**
896
1437
  * Format: int32
@@ -899,8 +1440,21 @@ export interface components {
899
1440
  maxAttempts?: number | null;
900
1441
  /** Format: int32 */
901
1442
  minimumAge: number;
1443
+ /** @description When true, route Incode through the government-validation flow and, after the
1444
+ * document scan, produce a PoA result (source DLDV) from the driver's-license
1445
+ * address validation. Backward compatible: missing key deserializes to false. */
1446
+ poaFromGovcheck?: boolean;
902
1447
  processImagesOverrides?: components["schemas"]["ProcessImagesOverrides"] | null;
903
1448
  requiredDocumentFields?: components["schemas"]["RequiredDocumentField"][];
1449
+ /**
1450
+ * Format: int64
1451
+ * @description How long (in seconds) *before* a result's expiry to begin re-verification:
1452
+ * the flow is reopened and a re-verify reminder email is sent, so the holder can
1453
+ * renew while their current result is still valid (continuous validity). `None`
1454
+ * defaults to one week ([`DvConfig::DEFAULT_REVERIFICATION_LEAD_SECONDS`]).
1455
+ * Ignored when `kyc_validity_seconds` is `None`; clamped to the validity window.
1456
+ */
1457
+ reverificationLeadSeconds?: number | null;
904
1458
  thresholds?: {
905
1459
  documentScorePercent?: number;
906
1460
  } | null;
@@ -948,6 +1502,12 @@ export interface components {
948
1502
  status: components["schemas"]["ResultStatus"];
949
1503
  /** Format: date-time */
950
1504
  updatedAt?: string | null;
1505
+ /**
1506
+ * Format: date-time
1507
+ * @description When this KYC result expires and re-verification is required (re-KYC validity).
1508
+ * `null` means it never expires (no `kyc_validity_seconds` configured, or a legacy result).
1509
+ */
1510
+ validUntil?: string | null;
951
1511
  /** Format: uuid */
952
1512
  verificationRequestId?: string | null;
953
1513
  };
@@ -965,9 +1525,11 @@ export interface components {
965
1525
  /** Format: int32 */
966
1526
  numberOfAttempts: number;
967
1527
  status: components["schemas"]["ResultStatus"];
1528
+ } & {
1529
+ [key: string]: boolean;
968
1530
  };
969
1531
  /** @enum {string} */
970
- 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" | "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";
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";
971
1533
  /** @description Represents an executed action with its ID and type. */
972
1534
  ExecutedAction: {
973
1535
  actionConfig: components["schemas"]["ActionConfig"];
@@ -977,6 +1539,28 @@ export interface components {
977
1539
  */
978
1540
  actionId: string;
979
1541
  };
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.
1549
+ *
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
+ };
980
1564
  FieldControlOperation: {
981
1565
  /** Format: uuid */
982
1566
  identityId: string;
@@ -1003,6 +1587,27 @@ export interface components {
1003
1587
  * @enum {string}
1004
1588
  */
1005
1589
  FieldReviewStatus: "PENDING" | "APPROVED" | "REJECTED";
1590
+ /** @description Risk authoring attached to a single form field (compiled to Forms-source score rows on save). */
1591
+ FieldRiskConfig: {
1592
+ factors?: components["schemas"]["FieldRiskFactor"][];
1593
+ tags?: components["schemas"]["FieldRiskTag"][];
1594
+ };
1595
+ FieldRiskFactor: {
1596
+ /** @description Target ScoreDefinition key. None = "forms" (100% backward compatible). */
1597
+ definitionKey?: string | null;
1598
+ key: components["schemas"]["FactorKey"];
1599
+ /** Format: double */
1600
+ multiplier: number;
1601
+ when?: Omit<components["schemas"]["Condition"], "op"> | null;
1602
+ };
1603
+ FieldRiskTag: {
1604
+ /** @description Target ScoreDefinition key. None = "forms" (100% backward compatible). */
1605
+ definitionKey?: string | null;
1606
+ tag: string;
1607
+ /** Format: double */
1608
+ weight: number;
1609
+ when?: Omit<components["schemas"]["Condition"], "op"> | null;
1610
+ };
1006
1611
  FieldWithControl: {
1007
1612
  controls: components["schemas"]["FieldControlOperation"][];
1008
1613
  value: string[];
@@ -1014,7 +1619,7 @@ export interface components {
1014
1619
  maxCountUploads?: number;
1015
1620
  };
1016
1621
  /** @enum {string} */
1017
- FilterOperator: "unfiltered" | "in" | "equals" | "not-in" | "not-equals" | "contains";
1622
+ FilterOperator: "unfiltered" | "in" | "equals" | "not-in" | "not-equals" | "contains" | "gte" | "lte";
1018
1623
  Flow: {
1019
1624
  /** Format: date-time */
1020
1625
  createdAt?: string | null;
@@ -1026,6 +1631,11 @@ export interface components {
1026
1631
  slug: string;
1027
1632
  steps: components["schemas"]["FlowStep"][];
1028
1633
  successUrl: string;
1634
+ /**
1635
+ * Format: uuid
1636
+ * @description The theme this flow renders with; `None` means use the org default theme.
1637
+ */
1638
+ themeId?: string | null;
1029
1639
  /** Format: date-time */
1030
1640
  updatedAt?: string | null;
1031
1641
  webhookUrl: string;
@@ -1057,6 +1667,11 @@ export interface components {
1057
1667
  phoneResults: components["schemas"]["PhoneResult"][];
1058
1668
  poaResults: components["schemas"]["PoaResult"][];
1059
1669
  reviewSuggestion?: components["schemas"]["ReviewSuggestion"] | null;
1670
+ /**
1671
+ * Format: int32
1672
+ * @description Composed global risk score for the flow (0–100). `None` if not yet scored.
1673
+ */
1674
+ riskScorePercent?: number | null;
1060
1675
  spidResults: components["schemas"]["SpidResult"][];
1061
1676
  status: components["schemas"]["VerificationRequestStatus"];
1062
1677
  /** Format: date-time */
@@ -1456,6 +2071,8 @@ export interface components {
1456
2071
  /** @enum {string} */
1457
2072
  FormReason: "UNKNOWN";
1458
2073
  FormResult: {
2074
+ /** @description Risk tags assigned during form scoring. `None` if not scored. */
2075
+ assignedRiskTags?: components["schemas"]["AssignedRiskTag"][] | null;
1459
2076
  /** Format: date-time */
1460
2077
  createdAt?: string | null;
1461
2078
  /** Format: uuid */
@@ -1469,6 +2086,8 @@ export interface components {
1469
2086
  /** Format: uuid */
1470
2087
  id: string;
1471
2088
  reason?: components["schemas"]["FormReason"] | null;
2089
+ /** @description Risk factor keys matched during form scoring. `None` if not scored. */
2090
+ riskFactorKeys?: string[] | null;
1472
2091
  sections: components["schemas"]["FormSection"][];
1473
2092
  status: components["schemas"]["ResultStatus"];
1474
2093
  /** Format: date-time */
@@ -1488,7 +2107,7 @@ export interface components {
1488
2107
  * # Field Name Restrictions
1489
2108
  *
1490
2109
  * The `fields` HashMap is flattened during serialization. Form field names must not conflict
1491
- * with the reserved field name "status" (or "status" in camelCase), as this would create duplicate
2110
+ * with the reserved field names "status" and "riskScorePercent", as this would create duplicate
1492
2111
  * keys in the serialized JSON output, resulting in invalid JSON. */
1493
2112
  FormStepOutput: {
1494
2113
  status: components["schemas"]["ResultStatus"];
@@ -1561,6 +2180,7 @@ export interface components {
1561
2180
  organizationId: string;
1562
2181
  organizationName: string;
1563
2182
  settings: components["schemas"]["Settings"];
2183
+ theme?: components["schemas"]["Theme"] | null;
1564
2184
  };
1565
2185
  /** @description Response to the `liveness-challenge` endpoint.
1566
2186
  *
@@ -1571,6 +2191,8 @@ export interface components {
1571
2191
  * No movements are required. */
1572
2192
  GetLivenessChallengeResponse: {
1573
2193
  calibrationImage: components["schemas"]["LivenessUploadUrl"];
2194
+ /** Format: float */
2195
+ cardinalDominanceRatio: number;
1574
2196
  /** Format: uuid */
1575
2197
  id: string;
1576
2198
  /** @enum {string} */
@@ -1693,6 +2315,7 @@ export interface components {
1693
2315
  name: string;
1694
2316
  options: unknown;
1695
2317
  requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2318
+ risk?: components["schemas"]["FieldRiskConfig"] | null;
1696
2319
  /** @enum {string} */
1697
2320
  type: "date";
1698
2321
  value?: unknown;
@@ -1704,8 +2327,27 @@ export interface components {
1704
2327
  name: string;
1705
2328
  options: unknown;
1706
2329
  requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2330
+ risk?: components["schemas"]["FieldRiskConfig"] | null;
1707
2331
  /** @enum {string} */
1708
2332
  type: "text";
2333
+ /** @description Optional regex pattern validated against the submitted value.
2334
+ * Written by the platform admin at form-build time; both frontend and
2335
+ * backend validate against it on submission. */
2336
+ validationRegex?: string | null;
2337
+ value?: unknown;
2338
+ visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2339
+ } | {
2340
+ label: {
2341
+ [key: string]: string;
2342
+ };
2343
+ name: string;
2344
+ options: unknown;
2345
+ requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2346
+ risk?: components["schemas"]["FieldRiskConfig"] | null;
2347
+ /** @enum {string} */
2348
+ type: "number";
2349
+ /** @description Optional regex pattern validated against the stringified submitted number. */
2350
+ validationRegex?: string | null;
1709
2351
  value?: unknown;
1710
2352
  visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
1711
2353
  } | {
@@ -1715,8 +2357,11 @@ export interface components {
1715
2357
  name: string;
1716
2358
  options: unknown;
1717
2359
  requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2360
+ risk?: components["schemas"]["FieldRiskConfig"] | null;
1718
2361
  /** @enum {string} */
1719
2362
  type: "textarea";
2363
+ /** @description Optional regex pattern validated against the submitted value. */
2364
+ validationRegex?: string | null;
1720
2365
  value?: unknown;
1721
2366
  visibleWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
1722
2367
  } | {
@@ -1726,6 +2371,7 @@ export interface components {
1726
2371
  name: string;
1727
2372
  options: unknown;
1728
2373
  requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2374
+ risk?: components["schemas"]["FieldRiskConfig"] | null;
1729
2375
  /** @enum {string} */
1730
2376
  type: "checkbox";
1731
2377
  value?: unknown;
@@ -1737,6 +2383,7 @@ export interface components {
1737
2383
  name: string;
1738
2384
  options: components["schemas"]["FileOptions"];
1739
2385
  requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2386
+ risk?: components["schemas"]["FieldRiskConfig"] | null;
1740
2387
  /** @enum {string} */
1741
2388
  type: "file";
1742
2389
  value?: unknown;
@@ -1754,6 +2401,7 @@ export interface components {
1754
2401
  };
1755
2402
  options: components["schemas"]["SelectOptions"];
1756
2403
  requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2404
+ risk?: components["schemas"]["FieldRiskConfig"] | null;
1757
2405
  /** @enum {string} */
1758
2406
  type: "select";
1759
2407
  value?: unknown;
@@ -1765,6 +2413,7 @@ export interface components {
1765
2413
  name: string;
1766
2414
  options: unknown;
1767
2415
  requiredWhen?: Omit<components["schemas"]["Condition"], "op"> | null;
2416
+ risk?: components["schemas"]["FieldRiskConfig"] | null;
1768
2417
  /** @enum {string} */
1769
2418
  type: "place";
1770
2419
  value?: unknown;
@@ -1772,7 +2421,7 @@ export interface components {
1772
2421
  };
1773
2422
  InputFieldOptions: components["schemas"]["FileOptions"] | components["schemas"]["SelectOptions"] | unknown;
1774
2423
  /** @enum {string} */
1775
- InputFieldType: "date" | "text" | "textarea" | "checkbox" | "file" | "select" | "place";
2424
+ InputFieldType: "date" | "text" | "number" | "textarea" | "checkbox" | "file" | "select" | "place";
1776
2425
  /** @description Input image for document scanning. */
1777
2426
  InputImage: {
1778
2427
  pageIndex: components["schemas"]["InputImagePageIndex"];
@@ -1789,19 +2438,15 @@ export interface components {
1789
2438
  * @enum {string}
1790
2439
  */
1791
2440
  InputImagePageIndex: "front" | "back";
1792
- KybActivityLogEntry: {
1793
- /** Format: uuid */
1794
- actorIdentityId?: string | null;
1795
- actorIdentityZid?: string | null;
1796
- /** Format: date-time */
1797
- createdAt?: string | null;
1798
- details: unknown;
1799
- eventType: string;
1800
- /** Format: uuid */
1801
- id: string;
1802
- /** Format: uuid */
1803
- kybResultId: string;
1804
- };
2441
+ /**
2442
+ * @description Per-domain agentic review mode shared by the compliance review agents (KYB, AML, …):
2443
+ * `Disabled` → never dispatched; `Suggest` → the terminal approve/clear action is suppressed and
2444
+ * recorded as a suggestion; `AutoPilot` → the actuator may enact it behind the deterministic
2445
+ * guards. `JsonFromStr`/`JsonDisplay` let deployment config carry a mode as its serde string
2446
+ * (e.g. `SUGGEST`). Kept as the `KybAgenticMode` OpenAPI component for API compatibility.
2447
+ * @enum {string}
2448
+ */
2449
+ KybAgenticMode: "DISABLED" | "SUGGEST" | "AUTO_PILOT";
1805
2450
  KybCommunication: {
1806
2451
  body: string;
1807
2452
  /** Format: uuid */
@@ -1818,14 +2463,45 @@ export interface components {
1818
2463
  subject: string;
1819
2464
  };
1820
2465
  KybConfig: {
2466
+ /** @default DISABLED */
2467
+ agenticMode: components["schemas"]["KybAgenticMode"];
2468
+ /** @default DISABLED */
2469
+ amlAgenticMode: components["schemas"]["KybAgenticMode"];
1821
2470
  articlesOfAssociation?: components["schemas"]["DocumentConfig"] | null;
2471
+ /**
2472
+ * @description When `false`, the KYC invitation email is NOT automatically sent to UBOs on KYB
2473
+ * submission; a reviewer instead triggers it on demand via the UBO reminder endpoint
2474
+ * (which sends the initial invitation for un-onboarded UBOs). Defaults to `true`
2475
+ * (auto-send), preserving existing behavior.
2476
+ * @default true
2477
+ * @example true
2478
+ */
2479
+ autoSendUboKycEmail: boolean;
1822
2480
  certificateOfIncorporation?: components["schemas"]["DocumentConfig"] | null;
1823
2481
  /**
1824
2482
  * @default false
1825
2483
  * @example false
1826
2484
  */
1827
2485
  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). */
2491
+ customCountryDocuments?: {
2492
+ [key: string]: components["schemas"]["KybCountryDocument"][];
2493
+ };
1828
2494
  customDocuments?: components["schemas"]["CustomDocumentConfig"][] | null;
2495
+ /** @description Merged per-country document map populated at rehydration time.
2496
+ *
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. */
2502
+ documentsPerCountry?: {
2503
+ [key: string]: components["schemas"]["KybCountryDocument"][];
2504
+ } | null;
1829
2505
  /** Format: uuid */
1830
2506
  kycFlowId: string;
1831
2507
  /** @example { "default": "Next step" } */
@@ -1851,6 +2527,30 @@ export interface components {
1851
2527
  */
1852
2528
  maxUbos: number;
1853
2529
  organizationalStructureChart?: components["schemas"]["DocumentConfig"] | null;
2530
+ proofOfAttorney?: components["schemas"]["DocumentConfig"] | null;
2531
+ };
2532
+ /** @description A document required for KYB in a specific country.
2533
+ *
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. */
2537
+ KybCountryDocument: {
2538
+ /** @description Machine-readable key used as the document type identifier (e.g.
2539
+ * `"visura_camerale"`, `"certificate_of_incorporation"`).
2540
+ * Unique within (scope, country). */
2541
+ key: string;
2542
+ /** @description Human-readable label shown to the user during the KYB flow. */
2543
+ label: string;
2544
+ /** @description When `true`, the document is NOT demanded upfront (excluded from the required-document
2545
+ * gate) and is instead requested on demand by a reviewer during review. Defaults to
2546
+ * `false`. */
2547
+ onDemand?: boolean;
2548
+ /** @description Whether upload of this document is mandatory for KYB approval.
2549
+ * Defaults to `true`. */
2550
+ required?: boolean;
2551
+ /** @description JSON schema for extraction/validation. Opaque for now — will be used by
2552
+ * `KybDocumentIntelligenceService` for schema-driven field extraction. */
2553
+ validationSchema?: unknown;
1854
2554
  };
1855
2555
  KybDocumentRequest: {
1856
2556
  /** @description Clarification field keys requested for review (for clarification requests only). */
@@ -1899,6 +2599,12 @@ export interface components {
1899
2599
  */
1900
2600
  KybDocumentRequestType: "STANDARD" | "CLARIFICATION";
1901
2601
  KybDocumentReviewReason: string | components["schemas"]["BusinessInformationClarificationResponse"];
2602
+ /** @description The KYB result metadata bag. Empty by default. */
2603
+ KybMetadata: {
2604
+ ownershipStructure?: components["schemas"]["OwnershipStructure"] | null;
2605
+ } & {
2606
+ [key: string]: unknown;
2607
+ };
1902
2608
  KybResult: {
1903
2609
  /** Format: date-time */
1904
2610
  assignedAt?: string | null;
@@ -1912,6 +2618,13 @@ export interface components {
1912
2618
  createdAt?: string | null;
1913
2619
  directorDefinitions?: components["schemas"]["DirectorDefinition"][] | null;
1914
2620
  documentUploads?: components["schemas"]["DocumentUpload"][] | null;
2621
+ /** @description The effective list of required KYB documents for this result's country.
2622
+ *
2623
+ * Resolved by `DocumentDefinitionService::resolve_for_country` using the full
2624
+ * priority chain: platform DB definitions → org-admin `custom_country_documents`
2625
+ * → global legacy fields. `None` until explicitly set by a caller with DB access
2626
+ * (e.g. the MCP `get_kyb_result` tool). Not computed in the `From` conversion. */
2627
+ effectiveRequiredDocuments?: components["schemas"]["KybCountryDocument"][] | null;
1915
2628
  flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1916
2629
  /** Format: uuid */
1917
2630
  flowStepId?: string | null;
@@ -1919,6 +2632,9 @@ export interface components {
1919
2632
  fundedAt?: string | null;
1920
2633
  /** Format: uuid */
1921
2634
  id: string;
2635
+ /** @description Admin-curated metadata. Organizations read it; only admins write it.
2636
+ * Empty (`{}`) when nothing has been recorded. */
2637
+ metadata?: Record<string, never>;
1922
2638
  nextAction?: components["schemas"]["NextAction"] | null;
1923
2639
  pepAndSanctionsStatus: components["schemas"]["PepAndSanctionsStatus"];
1924
2640
  reason?: string | null;
@@ -1932,6 +2648,10 @@ export interface components {
1932
2648
  };
1933
2649
  /** @description KYB (Know Your Business) step output for workflow decisions. */
1934
2650
  KybStepOutput: {
2651
+ amlPep?: boolean | null;
2652
+ /** Format: int32 */
2653
+ amlRiskScorePercent?: number | null;
2654
+ amlSanctions?: boolean | null;
1935
2655
  businessName?: string | null;
1936
2656
  country?: string | null;
1937
2657
  moderationStatus?: components["schemas"]["ModerationResultStatus"] | null;
@@ -1939,8 +2659,6 @@ export interface components {
1939
2659
  registrationNumber?: string | null;
1940
2660
  status: components["schemas"]["ResultStatus"];
1941
2661
  };
1942
- /** @enum {string} */
1943
- Likelihood: "No Match" | "Very Low" | "low" | "medium" | "high" | "Very High" | "Exact Match";
1944
2662
  ListAllFlowResultsResponse: {
1945
2663
  page: components["schemas"]["FlowResult"][];
1946
2664
  /** Format: int64 */
@@ -1951,6 +2669,11 @@ export interface components {
1951
2669
  /** Format: int64 */
1952
2670
  totalCount: number;
1953
2671
  };
2672
+ ListAuditLogResponse: {
2673
+ page: components["schemas"]["AuditLogEntry"][];
2674
+ /** Format: int64 */
2675
+ totalCount: number;
2676
+ };
1954
2677
  ListOrganizationApiKeysResponse: {
1955
2678
  page: components["schemas"]["ZypheApiKey"][];
1956
2679
  /** Format: int64 */
@@ -1996,13 +2719,13 @@ export interface components {
1996
2719
  /** Format: int64 */
1997
2720
  totalCount: number;
1998
2721
  };
1999
- ListScreeningDetailsResponse: {
2000
- page: components["schemas"]["MatchReportData"][];
2722
+ ListSharedKycResultsResponse: {
2723
+ page: components["schemas"]["FlowResult"][];
2001
2724
  /** Format: int64 */
2002
2725
  totalCount: number;
2003
2726
  };
2004
- ListSharedKycResultsResponse: {
2005
- page: components["schemas"]["FlowResult"][];
2727
+ ListThemesResponse: {
2728
+ page: components["schemas"]["Theme"][];
2006
2729
  /** Format: int64 */
2007
2730
  totalCount: number;
2008
2731
  };
@@ -2030,6 +2753,14 @@ export interface components {
2030
2753
  * of active challenge-based liveness. Configured by admin only. Defaults to `false`. */
2031
2754
  passiveLiveness?: boolean;
2032
2755
  performAntispoof?: boolean | null;
2756
+ /** @description When enabled (the default when unset), the liveness step is skipped during a
2757
+ * one-click KYC reuse if the reused document verification result already carries a
2758
+ * successful liveness outcome (`processAdditionalData.rawLivenessData`).
2759
+ *
2760
+ * The reused liveness must originate from a flow of the same organization, unless
2761
+ * the one-click was authenticated via passkey — in which case cross-organization
2762
+ * reuse is allowed. Set to `false` to always require a fresh liveness. */
2763
+ skipIfPreviousLivenessPassed?: boolean | null;
2033
2764
  thresholds?: {
2034
2765
  [key: string]: number;
2035
2766
  } | null;
@@ -2056,30 +2787,6 @@ export interface components {
2056
2787
  LogicalOperator: "BRANCH" | "SWITCH" | "MERGE" | "PARALLEL_SPLIT" | "PARALLEL_JOIN";
2057
2788
  /** @enum {string} */
2058
2789
  ManualReviewResultStatus: "approved" | "rejected" | "failed";
2059
- MatchDetail: {
2060
- internalInfo?: string | null;
2061
- matchCriteria?: string | null;
2062
- /** Format: int32 */
2063
- matchCriteriaNumeric?: number | null;
2064
- matchedEntity?: string | null;
2065
- };
2066
- MatchReportData: {
2067
- category?: string | null;
2068
- database?: string | null;
2069
- description?: string | null;
2070
- entity_id?: string | null;
2071
- entity_name?: string | null;
2072
- likelihood?: components["schemas"]["Likelihood"] | null;
2073
- mapped_entity_details?: components["schemas"]["ScreeningDetailsMappedEntityDetails"] | null;
2074
- match_id?: string | null;
2075
- match_level?: string | null;
2076
- references?: string[] | null;
2077
- /** Format: double */
2078
- score?: number | null;
2079
- sources?: string[] | null;
2080
- sub_category?: string | null;
2081
- updated_date?: string | null;
2082
- };
2083
2790
  ModerateKybResultPayload: {
2084
2791
  pepAndSanctionsStatus?: components["schemas"]["PepAndSanctionsStatusField"] | null;
2085
2792
  /** Format: binary */
@@ -2116,6 +2823,7 @@ export interface components {
2116
2823
  country: string;
2117
2824
  /** Format: date-time */
2118
2825
  createdAt?: string | null;
2826
+ creationSource: components["schemas"]["CreationSource"];
2119
2827
  email: string;
2120
2828
  /** Format: uuid */
2121
2829
  id: string;
@@ -2151,10 +2859,77 @@ export interface components {
2151
2859
  email?: string | null;
2152
2860
  role: components["schemas"]["Role"];
2153
2861
  };
2154
- PagedActivityLogResponse: {
2155
- page: components["schemas"]["KybActivityLogEntry"][];
2156
- /** Format: int64 */
2157
- totalCount: number;
2862
+ OwnershipBirthDate: {
2863
+ /** Format: int32 */
2864
+ day: number;
2865
+ /** Format: int32 */
2866
+ month: number;
2867
+ /** Format: int32 */
2868
+ year: number;
2869
+ };
2870
+ OwnershipCompany: {
2871
+ countryCode: string;
2872
+ id: string;
2873
+ legalName: string;
2874
+ };
2875
+ OwnershipEdge: {
2876
+ fromId: string;
2877
+ id: string;
2878
+ /** Format: double */
2879
+ percentage: number;
2880
+ source?: string | null;
2881
+ toId: string;
2882
+ };
2883
+ /** @description The provider's wire shape `{ "type": "company", "company": { ... } }`, expressed as an
2884
+ * internally tagged enum: the `type` tag selects the variant, so a tag that disagrees with
2885
+ * its payload — or an unknown tag — is unrepresentable and rejected at deserialization. */
2886
+ OwnershipEntity: {
2887
+ company: components["schemas"]["OwnershipCompany"];
2888
+ /** @enum {string} */
2889
+ type: "company";
2890
+ } | {
2891
+ individual: components["schemas"]["OwnershipIndividual"];
2892
+ /** @enum {string} */
2893
+ type: "individual";
2894
+ };
2895
+ /** @description Per-node flags. `status` is free-form for the same reason as `stopped_reason`; the
2896
+ * reference provider already emits `found`, `budget_truncated`, `placeholder`, and
2897
+ * `coverage_unavailable`, and a fifth value must not fail a write.
2898
+ *
2899
+ * `status` is the load-bearing truncation signal: an unexplored node must render
2900
+ * differently from a resolved one, so "no UBO found" is never read as "no UBO exists". */
2901
+ OwnershipFlags: {
2902
+ isRoot?: boolean;
2903
+ isUbo?: boolean;
2904
+ isUboProxy?: boolean;
2905
+ status: string;
2906
+ };
2907
+ OwnershipIndividual: {
2908
+ birthDate?: components["schemas"]["OwnershipBirthDate"] | null;
2909
+ name: components["schemas"]["OwnershipIndividualName"];
2910
+ nationality?: string | null;
2911
+ };
2912
+ OwnershipIndividualName: {
2913
+ fullName: string;
2914
+ };
2915
+ /** @description A graph node. `entity` is flattened and tagged on `type`, so a `company`-typed node
2916
+ * cannot exist without company data. */
2917
+ OwnershipNode: {
2918
+ type: "OwnershipNode";
2919
+ } & (Omit<components["schemas"]["OwnershipEntity"], "type"> & {
2920
+ flags: components["schemas"]["OwnershipFlags"];
2921
+ nodeId: string;
2922
+ /** Format: double */
2923
+ totalOwnershipPercentage?: number | null;
2924
+ });
2925
+ /** @description An ownership graph: who owns the subject company, transitively. */
2926
+ OwnershipStructure: {
2927
+ edges: components["schemas"]["OwnershipEdge"][];
2928
+ nodes: components["schemas"]["OwnershipNode"][];
2929
+ /** @description Why graph traversal stopped, when it stopped early (e.g. `max_depth_reached`).
2930
+ * Free-form: provider-defined and admin-entered, so a closed enum would reject
2931
+ * an unrecognised value at write time. */
2932
+ stoppedReason?: string | null;
2158
2933
  };
2159
2934
  PagedCommunicationsResponse: {
2160
2935
  page: components["schemas"]["KybCommunication"][];
@@ -2242,7 +3017,7 @@ export interface components {
2242
3017
  maxAgeDays?: number;
2243
3018
  };
2244
3019
  /** @enum {string} */
2245
- PoaDocumentType: "PAY_SLIP" | "UTILITY_BILL" | "FINANCIAL_DOCUMENT" | "RECEIPT" | "INVOICE" | "BANK_DOCUMENT" | "TAX_CLEARANCE_CERTIFICATE" | "HOUSEHOLD_REGISTER" | "CERTIFICATE_OF_RESIDENCE" | "OTHER";
3020
+ PoaDocumentType: "PAY_SLIP" | "UTILITY_BILL" | "FINANCIAL_DOCUMENT" | "RECEIPT" | "INVOICE" | "BANK_DOCUMENT" | "TAX_CLEARANCE_CERTIFICATE" | "HOUSEHOLD_REGISTER" | "CERTIFICATE_OF_RESIDENCE" | "DLDV" | "OTHER";
2246
3021
  /** @enum {string} */
2247
3022
  PoaReason: "UNKNOWN" | "DOCUMENT_TYPE_NOT_ALLOWED" | "NAME_MISMATCH" | "DATE_TOO_OLD" | "INVALID_DOCUMENT" | "UNRECOGNIZED_ADDRESS";
2248
3023
  PoaResult: {
@@ -2331,6 +3106,12 @@ export interface components {
2331
3106
  file: Blob;
2332
3107
  };
2333
3108
  ProcessAddressDocumentResponse: {
3109
+ /**
3110
+ * Format: int32
3111
+ * @description Number of prior attempts on this verification request.
3112
+ * `0` = first submission (`Created`); `> 0` = retry (`Updated`).
3113
+ */
3114
+ attemptsCount: number;
2334
3115
  jobId: string;
2335
3116
  /** Format: uuid */
2336
3117
  verificationRequestId: string;
@@ -2365,14 +3146,13 @@ export interface components {
2365
3146
  interviewId?: string | null;
2366
3147
  platform?: string | null;
2367
3148
  provinceCode?: string | null;
2368
- requiredDocumentFields?: {
2369
- [key: string]: string;
2370
- };
2371
3149
  /** @description Session token for session-based providers (e.g. Incode JWT).
2372
3150
  * If provided along with interview_id, the backend will fetch results from the provider. */
2373
3151
  sessionToken?: string | null;
2374
3152
  };
2375
3153
  ProcessIdentityDocumentResponse: {
3154
+ /** Format: int32 */
3155
+ attemptsCount: number;
2376
3156
  jobId: string;
2377
3157
  /** Format: uuid */
2378
3158
  verificationRequestId: string;
@@ -2396,9 +3176,26 @@ export interface components {
2396
3176
  verificationRequestId: string;
2397
3177
  };
2398
3178
  /** @enum {string} */
2399
- ProductType: "UNKNOWN" | "DOCSCAN" | "LIVENESS" | "POA" | "KYB" | "KYC_PASSPORT" | "SPID" | "PHONE" | "WALLET" | "EXPORT_API" | "EXPORT_UI" | "BUSINESS_VERIFICATION" | "FLOW_BUILDER" | "GEOLOCATION" | "FORM";
3179
+ ProductType: "UNKNOWN" | "DOCSCAN" | "LIVENESS" | "POA" | "KYB" | "KYC_PASSPORT" | "SPID" | "PHONE" | "WALLET" | "EXPORT_API" | "EXPORT_UI" | "BUSINESS_VERIFICATION" | "FLOW_BUILDER" | "GEOLOCATION" | "FORM" | "AML";
3180
+ /** @description Request body for `POST .../kyb/{kyb_result_id}/document-requests/on-demand`.
3181
+ *
3182
+ * Asks the client for a specific on-demand per-country document (identified by its catalog
3183
+ * `key`). The server validates the key resolves to an on-demand document for the KYB's
3184
+ * country, creates a `Standard` document request from it, and notifies the client. */
3185
+ RequestOnDemandDocumentPayload: {
3186
+ /** @description Optional email body; defaults to a generated body referencing the document. */
3187
+ body?: string | null;
3188
+ /** @description Optional description shown to the client; defaults to a generated message. */
3189
+ description?: string | null;
3190
+ /** @description Catalog `key` of the on-demand document to request (must be on-demand for this country). */
3191
+ documentKey: string;
3192
+ /** @description Optional recipient override; defaults to the business contact email. */
3193
+ recipientEmail?: string | null;
3194
+ /** @description Optional email subject; defaults to a generated subject referencing the document. */
3195
+ subject?: string | null;
3196
+ };
2400
3197
  /** @enum {string} */
2401
- RequiredDocumentField: "firstName" | "middleName" | "lastName" | "dateOfBirth" | "phone" | "email" | "street" | "city" | "state" | "postcode" | "country" | "socialSecurityNumber";
3198
+ RequiredDocumentField: "firstName" | "middleName" | "lastName" | "dateOfBirth" | "phone" | "email" | "street" | "city" | "state" | "postcode" | "country" | "socialSecurityNumber" | "expirationDate";
2402
3199
  ResultControlOperation: {
2403
3200
  /** Format: uuid */
2404
3201
  identityId: string;
@@ -2427,6 +3224,8 @@ export interface components {
2427
3224
  confidence: number;
2428
3225
  suggestion: components["schemas"]["ManualReviewResultStatus"];
2429
3226
  };
3227
+ /** @description Snapshot of the FORM factor keys matched for a form step (JSONB column). */
3228
+ RiskFactorKeys: string[];
2430
3229
  /** @enum {string} */
2431
3230
  RiskLevel: "low" | "medium" | "high" | "critical";
2432
3231
  RiskScore: {
@@ -2435,8 +3234,28 @@ export interface components {
2435
3234
  riskScorePercent: number;
2436
3235
  sourcesCount: number;
2437
3236
  };
3237
+ /** @description Provenance for an `AssignedRiskTag` derivation. Determines whether a machine-driven
3238
+ * recompute is allowed to retract it (`Manual`/`Legacy` are sticky; only a human clears them). */
3239
+ RiskTagSource: {
3240
+ /** Format: uuid */
3241
+ by?: string | null;
3242
+ /** @enum {string} */
3243
+ kind: "manual";
3244
+ } | {
3245
+ field: string;
3246
+ /** @enum {string} */
3247
+ kind: "formAnswer";
3248
+ } | {
3249
+ /** @enum {string} */
3250
+ kind: "action";
3251
+ /** Format: uuid */
3252
+ node_id: string;
3253
+ } | {
3254
+ /** @enum {string} */
3255
+ kind: "legacy";
3256
+ };
2438
3257
  /** @enum {string} */
2439
- Role: "ANONYMOUS" | "GUEST" | "ORG_ADMIN" | "ORG_OPERATOR" | "ORG_DEVELOPER" | "AML_OFFICER" | "PARTNER_USER" | "PLATFORM_OPERATOR" | "PLATFORM_SALES" | "PLATFORM_ADMIN" | "SDK";
3258
+ Role: "ANONYMOUS" | "GUEST" | "ORG_ADMIN" | "ORG_OPERATOR" | "ORG_DEVELOPER" | "AML_OFFICER" | "PARTNER_USER" | "PLATFORM_OPERATOR" | "PLATFORM_SALES" | "PLATFORM_ADMIN" | "SDK" | "SYSTEM";
2440
3259
  /** @description Rotation thresholds (in degrees) for head movement verification */
2441
3260
  RotationThresholds: {
2442
3261
  /** Format: float */
@@ -2448,17 +3267,39 @@ export interface components {
2448
3267
  /** Format: float */
2449
3268
  up: number;
2450
3269
  };
2451
- ScreeningDetailsMappedEntityDetails: {
2452
- addressLine1?: components["schemas"]["MatchDetail"] | null;
2453
- city?: components["schemas"]["MatchDetail"] | null;
2454
- country?: components["schemas"]["MatchDetail"] | null;
2455
- dateOfBirth?: components["schemas"]["MatchDetail"] | null;
2456
- firstName?: components["schemas"]["MatchDetail"] | null;
2457
- id?: components["schemas"]["MatchDetail"] | null;
2458
- lastName?: components["schemas"]["MatchDetail"] | null;
2459
- middleName?: components["schemas"]["MatchDetail"] | null;
2460
- passportNumber?: components["schemas"]["MatchDetail"] | null;
2461
- postalCode?: components["schemas"]["MatchDetail"] | null;
3270
+ /** @description Every meaningful OpenSanctions/Yente search field as an optional string. Result-only
3271
+ * fields (sanctions, topics, position occupancies) are not exposed as inputs. */
3272
+ SdkAmlScreenQuery: {
3273
+ address?: string | null;
3274
+ alias?: string | null;
3275
+ birthCountry?: string | null;
3276
+ birthDate?: string | null;
3277
+ birthPlace?: string | null;
3278
+ country?: string | null;
3279
+ email?: string | null;
3280
+ firstName?: string | null;
3281
+ gender?: string | null;
3282
+ lastName?: string | null;
3283
+ middleName?: string | null;
3284
+ name?: string | null;
3285
+ nationality?: string | null;
3286
+ passportNumber?: string | null;
3287
+ phone?: string | null;
3288
+ position?: string | null;
3289
+ registrationNumber?: string | null;
3290
+ title?: string | null;
3291
+ };
3292
+ SdkAmlScreenRequest: {
3293
+ query: components["schemas"]["SdkAmlScreenQuery"];
3294
+ subjectType?: components["schemas"]["AmlSubjectType"];
3295
+ };
3296
+ SdkAmlScreenResponse: {
3297
+ entities: components["schemas"]["AmlEntityResponse"][];
3298
+ /** @description Entity format marker, currently always `"ftm/1"` (FollowTheMoney). */
3299
+ format: string;
3300
+ /** @description The screening provider that produced these results (e.g. `"yente"`, `"worldcheck"`).
3301
+ * Field richness is provider-dependent — see the SDK docs for coverage differences. */
3302
+ provider: string;
2462
3303
  };
2463
3304
  /** @description SDK payload for creating or resuming a verification request on behalf of a user.
2464
3305
  *
@@ -2511,10 +3352,7 @@ export interface components {
2511
3352
  * When false, skip vault unlock if an active KYC grant already exists for the organization.
2512
3353
  * Optional so that patch requests only write this field when explicitly provided. */
2513
3354
  oneClickAlwaysRequestUnlockVault?: boolean | null;
2514
- primaryColor?: string | null;
2515
- profileImage?: string | null;
2516
3355
  published?: boolean;
2517
- secondaryColor?: string | null;
2518
3356
  skipSignedAccess?: boolean;
2519
3357
  slackNotifications?: string[] | null;
2520
3358
  telegramNotifications?: string[] | null;
@@ -2601,12 +3439,93 @@ export interface components {
2601
3439
  /** Format: uuid */
2602
3440
  verificationRequestId: string;
2603
3441
  };
3442
+ /** @description Flat theme API response. Logo/font fields hold raw S3 keys when built from `ThemeData`; the
3443
+ * handler swaps them for presigned URLs before returning. */
3444
+ Theme: {
3445
+ borderRadius?: string | null;
3446
+ /** Format: date-time */
3447
+ createdAt?: string | null;
3448
+ dark?: components["schemas"]["ThemeColorSetResponse"] | null;
3449
+ fontFamily?: string | null;
3450
+ fontLicense?: components["schemas"]["ThemeFontLicense"] | null;
3451
+ /** @description Presigned read URL for the uploaded font (or the raw S3 key before presigning). */
3452
+ fontUrl?: string | null;
3453
+ /** Format: uuid */
3454
+ id: string;
3455
+ isDefault: boolean;
3456
+ light?: components["schemas"]["ThemeColorSetResponse"] | null;
3457
+ name: string;
3458
+ /** Format: date-time */
3459
+ updatedAt?: string | null;
3460
+ };
3461
+ /** @description Per-mode color set as returned by the API (logo resolved to a presigned URL). */
3462
+ ThemeColorSetResponse: {
3463
+ accent?: string | null;
3464
+ background?: string | null;
3465
+ card?: string | null;
3466
+ /** @description Presigned read URL for this mode's logo (or the raw S3 key before the handler presigns it). */
3467
+ logoUrl?: string | null;
3468
+ };
3469
+ /** @description Attestation that the org has the right to use the uploaded font. */
3470
+ ThemeFontLicense: {
3471
+ attested: boolean;
3472
+ /** Format: date-time */
3473
+ attestedAt?: string | null;
3474
+ /** Format: uuid */
3475
+ attestedByIdentityId?: string | null;
3476
+ };
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: {
3485
+ /**
3486
+ * Format: int64
3487
+ * @description Price amount in the smallest currency unit (e.g. cents)
3488
+ */
3489
+ amountCents: number;
3490
+ /**
3491
+ * Format: int64
3492
+ * @description Number of credits granted by this pack, from metadata `credits`
3493
+ */
3494
+ credits: number;
3495
+ currency: components["schemas"]["Currency"];
3496
+ /** @description Display name: nickname > product name > price ID */
3497
+ name: string;
3498
+ /** @description The Stripe price ID (e.g., "price_xxx") */
3499
+ priceId: string;
3500
+ /**
3501
+ * Format: int32
3502
+ * @description Optional validity window (in months) for the granted credits, from metadata `validity_months`
3503
+ */
3504
+ validityMonths?: number | null;
3505
+ };
3506
+ /** @description Response for the top-up pack catalog endpoint (`GET .../billing/topup-packs`). */
3507
+ TopupPacksResponse: {
3508
+ packs: components["schemas"]["TopupPack"][];
3509
+ };
3510
+ TriggerReminderResponse: {
3511
+ enqueued: boolean;
3512
+ };
2604
3513
  UboDefinition: {
2605
3514
  country: string;
2606
3515
  dateOfBirth: string;
2607
- emailAddress: 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;
2608
3519
  firstName: string;
2609
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;
2610
3529
  lastName: string;
2611
3530
  };
2612
3531
  /**
@@ -2621,7 +3540,9 @@ export interface components {
2621
3540
  challenge: string;
2622
3541
  /** @description Credential ID for vault unlock (base64url-encoded) */
2623
3542
  credentialId: string;
2624
- /** @description Passkey authentication options for vault unlock */
3543
+ /** @description Full WebAuthn `PublicKeyCredentialRequestOptions` for vault unlock.
3544
+ * Frontends should pass `options.publicKey` directly to
3545
+ * `navigator.credentials.get({ publicKey })`. */
2625
3546
  options: Record<string, never>;
2626
3547
  /** @description PRF salt for vault unlock (base64url) */
2627
3548
  prfSalt: string;
@@ -2771,6 +3692,24 @@ export interface components {
2771
3692
  WalletStepOutput: {
2772
3693
  status: components["schemas"]["ResultStatus"];
2773
3694
  };
3695
+ /** @description The scenario/context that triggered a worker.
3696
+ *
3697
+ * This helps distinguish between different flows that can trigger the same
3698
+ * worker type (e.g. AML worker triggered by DV vs scheduled refresh). */
3699
+ WorkerScenario: "USER_INITIATED" | {
3700
+ TRIGGERED_BY_WORKER: components["schemas"]["WorkerType"];
3701
+ } | "ADMIN_ACTION" | "ONE_CLICK_REUSE";
3702
+ /**
3703
+ * @description Types of background workers that can emit audit events.
3704
+ *
3705
+ * This enum is used in audit event sources and in job records to track
3706
+ * which worker triggered an action (e.g., AML triggered by DV).
3707
+ *
3708
+ * `Display` (via `JsonDisplay`) renders the SCREAMING_SNAKE_CASE serde name
3709
+ * (e.g. `DV`, `ONE_CLICK_FORM`) — the same value shown in `source.workerType`.
3710
+ * @enum {string}
3711
+ */
3712
+ WorkerType: "DV" | "LIVENESS" | "AML" | "POA" | "SPID" | "FORM" | "ONE_CLICK_DV" | "ONE_CLICK_FORM" | "MANUAL_REVIEW";
2774
3713
  /** @description Context data available to JDM rules during flow evaluation.
2775
3714
  *
2776
3715
  * This structure is serialized to JSON and passed to the Zen Engine for evaluation.
@@ -3075,7 +4014,7 @@ export interface operations {
3075
4014
  };
3076
4015
  };
3077
4016
  };
3078
- sdk_create_verification_request: {
4017
+ createVerificationRequest: {
3079
4018
  parameters: {
3080
4019
  query: {
3081
4020
  sandbox: boolean;
@@ -3131,7 +4070,7 @@ export interface operations {
3131
4070
  };
3132
4071
  };
3133
4072
  };
3134
- sdk_get_next_step: {
4073
+ getNextStep: {
3135
4074
  parameters: {
3136
4075
  query: {
3137
4076
  sandbox: boolean;
@@ -3405,7 +4344,7 @@ export interface operations {
3405
4344
  };
3406
4345
  };
3407
4346
  };
3408
- sdk_list_flow_results: {
4347
+ listFlowResults: {
3409
4348
  parameters: {
3410
4349
  query: {
3411
4350
  pagination?: components["schemas"]["Pagination"];
@@ -3457,7 +4396,7 @@ export interface operations {
3457
4396
  };
3458
4397
  };
3459
4398
  };
3460
- get_sdk_flow_result_details: {
4399
+ sendUboKycReminder: {
3461
4400
  parameters: {
3462
4401
  query: {
3463
4402
  sandbox: boolean;
@@ -3465,32 +4404,23 @@ export interface operations {
3465
4404
  };
3466
4405
  header?: never;
3467
4406
  path: {
3468
- /**
3469
- * @description The ID of the organization
3470
- * @example 123e4567-e89b-12d3-a456-426614174000
3471
- */
4407
+ /** @description Organization ID */
3472
4408
  organization_id: string;
3473
- /**
3474
- * @description The ID of the flow result
3475
- * @example 123e4567-e89b-12d3-a456-426614174000
3476
- */
3477
- flow_result_id: string;
3478
- /**
3479
- * @description The slug of the flow
3480
- * @example kyc-flow
3481
- */
3482
- flow_slug: string;
4409
+ /** @description KYB result ID */
4410
+ kyb_result_id: string;
4411
+ /** @description Index of the UBO to send the KYC email to, matching the order in uboDefinitions */
4412
+ recipient_index: number;
3483
4413
  };
3484
4414
  cookie?: never;
3485
4415
  };
3486
4416
  requestBody?: never;
3487
4417
  responses: {
3488
- 200: {
4418
+ 202: {
3489
4419
  headers: {
3490
4420
  [name: string]: unknown;
3491
4421
  };
3492
4422
  content: {
3493
- "application/json": components["schemas"]["FlowResult"];
4423
+ "application/json": components["schemas"]["TriggerReminderResponse"];
3494
4424
  };
3495
4425
  };
3496
4426
  400: {
@@ -3517,6 +4447,14 @@ export interface operations {
3517
4447
  "application/json": components["schemas"]["BaxeError"];
3518
4448
  };
3519
4449
  };
4450
+ 404: {
4451
+ headers: {
4452
+ [name: string]: unknown;
4453
+ };
4454
+ content: {
4455
+ "application/json": components["schemas"]["BaxeError"];
4456
+ };
4457
+ };
3520
4458
  500: {
3521
4459
  headers: {
3522
4460
  [name: string]: unknown;
@@ -3527,7 +4465,7 @@ export interface operations {
3527
4465
  };
3528
4466
  };
3529
4467
  };
3530
- get_sdk_dv_result_details: {
4468
+ addKybUbos: {
3531
4469
  parameters: {
3532
4470
  query: {
3533
4471
  sandbox: boolean;
@@ -3535,37 +4473,49 @@ export interface operations {
3535
4473
  };
3536
4474
  header?: never;
3537
4475
  path: {
3538
- /**
3539
- * @description The ID of the organization
3540
- * @example 123e4567-e89b-12d3-a456-426614174000
3541
- */
4476
+ /** @description Organization ID */
3542
4477
  organization_id: string;
3543
- /**
3544
- * @description The ID of the flow result
3545
- * @example 123e4567-e89b-12d3-a456-426614174000
3546
- */
3547
- flow_result_id: string;
3548
- /**
3549
- * @description The slug of the flow
3550
- * @example flow-slug
3551
- */
3552
- flow_slug: string;
3553
- /**
3554
- * @description The ID of the DV result
3555
- * @example 123e4567-e89b-12d3-a456-426614174000
3556
- */
3557
- dv_result_id: string;
4478
+ /** @description KYB result ID */
4479
+ kyb_result_id: string;
3558
4480
  };
3559
4481
  cookie?: never;
3560
4482
  };
3561
- requestBody?: never;
4483
+ requestBody: {
4484
+ content: {
4485
+ "application/json": components["schemas"]["AddKybPersonsPayload"];
4486
+ };
4487
+ };
3562
4488
  responses: {
3563
4489
  200: {
3564
4490
  headers: {
3565
4491
  [name: string]: unknown;
3566
4492
  };
3567
4493
  content: {
3568
- "application/x-protobuf-stream": string;
4494
+ "application/json": components["schemas"]["KybResult"];
4495
+ };
4496
+ };
4497
+ 400: {
4498
+ headers: {
4499
+ [name: string]: unknown;
4500
+ };
4501
+ content: {
4502
+ "application/json": components["schemas"]["BaxeError"];
4503
+ };
4504
+ };
4505
+ 401: {
4506
+ headers: {
4507
+ [name: string]: unknown;
4508
+ };
4509
+ content: {
4510
+ "application/json": components["schemas"]["BaxeError"];
4511
+ };
4512
+ };
4513
+ 403: {
4514
+ headers: {
4515
+ [name: string]: unknown;
4516
+ };
4517
+ content: {
4518
+ "application/json": components["schemas"]["BaxeError"];
3569
4519
  };
3570
4520
  };
3571
4521
  404: {
@@ -3586,7 +4536,7 @@ export interface operations {
3586
4536
  };
3587
4537
  };
3588
4538
  };
3589
- get_sdk_poa_result_details: {
4539
+ removeKybUbo: {
3590
4540
  parameters: {
3591
4541
  query: {
3592
4542
  sandbox: boolean;
@@ -3594,13 +4544,430 @@ export interface operations {
3594
4544
  };
3595
4545
  header?: never;
3596
4546
  path: {
3597
- /**
3598
- * @description The ID of the organization
3599
- * @example 123e4567-e89b-12d3-a456-426614174000
3600
- */
4547
+ /** @description Organization ID */
3601
4548
  organization_id: string;
3602
- /**
3603
- * @description The ID of the flow result
4549
+ /** @description KYB result ID */
4550
+ kyb_result_id: string;
4551
+ /** @description Stable id of the UBO to remove */
4552
+ person_id: string;
4553
+ };
4554
+ cookie?: never;
4555
+ };
4556
+ requestBody?: never;
4557
+ responses: {
4558
+ 200: {
4559
+ headers: {
4560
+ [name: string]: unknown;
4561
+ };
4562
+ content: {
4563
+ "application/json": components["schemas"]["KybResult"];
4564
+ };
4565
+ };
4566
+ 400: {
4567
+ headers: {
4568
+ [name: string]: unknown;
4569
+ };
4570
+ content: {
4571
+ "application/json": components["schemas"]["BaxeError"];
4572
+ };
4573
+ };
4574
+ 401: {
4575
+ headers: {
4576
+ [name: string]: unknown;
4577
+ };
4578
+ content: {
4579
+ "application/json": components["schemas"]["BaxeError"];
4580
+ };
4581
+ };
4582
+ 403: {
4583
+ headers: {
4584
+ [name: string]: unknown;
4585
+ };
4586
+ content: {
4587
+ "application/json": components["schemas"]["BaxeError"];
4588
+ };
4589
+ };
4590
+ 404: {
4591
+ headers: {
4592
+ [name: string]: unknown;
4593
+ };
4594
+ content: {
4595
+ "application/json": components["schemas"]["BaxeError"];
4596
+ };
4597
+ };
4598
+ 500: {
4599
+ headers: {
4600
+ [name: string]: unknown;
4601
+ };
4602
+ content: {
4603
+ "application/json": components["schemas"]["BaxeError"];
4604
+ };
4605
+ };
4606
+ };
4607
+ };
4608
+ addKybDirectors: {
4609
+ parameters: {
4610
+ query: {
4611
+ sandbox: boolean;
4612
+ locale?: components["schemas"]["Locale"];
4613
+ };
4614
+ header?: never;
4615
+ path: {
4616
+ /** @description Organization ID */
4617
+ organization_id: string;
4618
+ /** @description KYB result ID */
4619
+ kyb_result_id: string;
4620
+ };
4621
+ cookie?: never;
4622
+ };
4623
+ requestBody: {
4624
+ content: {
4625
+ "application/json": components["schemas"]["AddKybPersonsPayload"];
4626
+ };
4627
+ };
4628
+ responses: {
4629
+ 200: {
4630
+ headers: {
4631
+ [name: string]: unknown;
4632
+ };
4633
+ content: {
4634
+ "application/json": components["schemas"]["KybResult"];
4635
+ };
4636
+ };
4637
+ 400: {
4638
+ headers: {
4639
+ [name: string]: unknown;
4640
+ };
4641
+ content: {
4642
+ "application/json": components["schemas"]["BaxeError"];
4643
+ };
4644
+ };
4645
+ 401: {
4646
+ headers: {
4647
+ [name: string]: unknown;
4648
+ };
4649
+ content: {
4650
+ "application/json": components["schemas"]["BaxeError"];
4651
+ };
4652
+ };
4653
+ 403: {
4654
+ headers: {
4655
+ [name: string]: unknown;
4656
+ };
4657
+ content: {
4658
+ "application/json": components["schemas"]["BaxeError"];
4659
+ };
4660
+ };
4661
+ 404: {
4662
+ headers: {
4663
+ [name: string]: unknown;
4664
+ };
4665
+ content: {
4666
+ "application/json": components["schemas"]["BaxeError"];
4667
+ };
4668
+ };
4669
+ 500: {
4670
+ headers: {
4671
+ [name: string]: unknown;
4672
+ };
4673
+ content: {
4674
+ "application/json": components["schemas"]["BaxeError"];
4675
+ };
4676
+ };
4677
+ };
4678
+ };
4679
+ removeKybDirector: {
4680
+ parameters: {
4681
+ query: {
4682
+ sandbox: boolean;
4683
+ locale?: components["schemas"]["Locale"];
4684
+ };
4685
+ header?: never;
4686
+ path: {
4687
+ /** @description Organization ID */
4688
+ organization_id: string;
4689
+ /** @description KYB result ID */
4690
+ kyb_result_id: string;
4691
+ /** @description Stable id of the director to remove */
4692
+ person_id: string;
4693
+ };
4694
+ cookie?: never;
4695
+ };
4696
+ requestBody?: never;
4697
+ responses: {
4698
+ 200: {
4699
+ headers: {
4700
+ [name: string]: unknown;
4701
+ };
4702
+ content: {
4703
+ "application/json": components["schemas"]["KybResult"];
4704
+ };
4705
+ };
4706
+ 400: {
4707
+ headers: {
4708
+ [name: string]: unknown;
4709
+ };
4710
+ content: {
4711
+ "application/json": components["schemas"]["BaxeError"];
4712
+ };
4713
+ };
4714
+ 401: {
4715
+ headers: {
4716
+ [name: string]: unknown;
4717
+ };
4718
+ content: {
4719
+ "application/json": components["schemas"]["BaxeError"];
4720
+ };
4721
+ };
4722
+ 403: {
4723
+ headers: {
4724
+ [name: string]: unknown;
4725
+ };
4726
+ content: {
4727
+ "application/json": components["schemas"]["BaxeError"];
4728
+ };
4729
+ };
4730
+ 404: {
4731
+ headers: {
4732
+ [name: string]: unknown;
4733
+ };
4734
+ content: {
4735
+ "application/json": components["schemas"]["BaxeError"];
4736
+ };
4737
+ };
4738
+ 500: {
4739
+ headers: {
4740
+ [name: string]: unknown;
4741
+ };
4742
+ content: {
4743
+ "application/json": components["schemas"]["BaxeError"];
4744
+ };
4745
+ };
4746
+ };
4747
+ };
4748
+ requestKybDocument: {
4749
+ parameters: {
4750
+ query: {
4751
+ sandbox: boolean;
4752
+ locale?: components["schemas"]["Locale"];
4753
+ };
4754
+ header?: never;
4755
+ path: {
4756
+ /** @description Organization ID */
4757
+ organization_id: string;
4758
+ /** @description KYB result ID */
4759
+ kyb_result_id: string;
4760
+ };
4761
+ cookie?: never;
4762
+ };
4763
+ requestBody: {
4764
+ content: {
4765
+ "application/json": components["schemas"]["RequestOnDemandDocumentPayload"];
4766
+ };
4767
+ };
4768
+ responses: {
4769
+ 200: {
4770
+ headers: {
4771
+ [name: string]: unknown;
4772
+ };
4773
+ content: {
4774
+ "application/json": components["schemas"]["KybDocumentRequest"];
4775
+ };
4776
+ };
4777
+ 400: {
4778
+ headers: {
4779
+ [name: string]: unknown;
4780
+ };
4781
+ content: {
4782
+ "application/json": components["schemas"]["BaxeError"];
4783
+ };
4784
+ };
4785
+ 401: {
4786
+ headers: {
4787
+ [name: string]: unknown;
4788
+ };
4789
+ content: {
4790
+ "application/json": components["schemas"]["BaxeError"];
4791
+ };
4792
+ };
4793
+ 403: {
4794
+ headers: {
4795
+ [name: string]: unknown;
4796
+ };
4797
+ content: {
4798
+ "application/json": components["schemas"]["BaxeError"];
4799
+ };
4800
+ };
4801
+ 404: {
4802
+ headers: {
4803
+ [name: string]: unknown;
4804
+ };
4805
+ content: {
4806
+ "application/json": components["schemas"]["BaxeError"];
4807
+ };
4808
+ };
4809
+ 500: {
4810
+ headers: {
4811
+ [name: string]: unknown;
4812
+ };
4813
+ content: {
4814
+ "application/json": components["schemas"]["BaxeError"];
4815
+ };
4816
+ };
4817
+ };
4818
+ };
4819
+ getFlowResultDetails: {
4820
+ parameters: {
4821
+ query: {
4822
+ sandbox: boolean;
4823
+ locale?: components["schemas"]["Locale"];
4824
+ };
4825
+ header?: never;
4826
+ path: {
4827
+ /**
4828
+ * @description The ID of the organization
4829
+ * @example 123e4567-e89b-12d3-a456-426614174000
4830
+ */
4831
+ organization_id: string;
4832
+ /**
4833
+ * @description The ID of the flow result
4834
+ * @example 123e4567-e89b-12d3-a456-426614174000
4835
+ */
4836
+ flow_result_id: string;
4837
+ /**
4838
+ * @description The slug of the flow
4839
+ * @example kyc-flow
4840
+ */
4841
+ flow_slug: string;
4842
+ };
4843
+ cookie?: never;
4844
+ };
4845
+ requestBody?: never;
4846
+ responses: {
4847
+ 200: {
4848
+ headers: {
4849
+ [name: string]: unknown;
4850
+ };
4851
+ content: {
4852
+ "application/json": components["schemas"]["FlowResult"];
4853
+ };
4854
+ };
4855
+ 400: {
4856
+ headers: {
4857
+ [name: string]: unknown;
4858
+ };
4859
+ content: {
4860
+ "application/json": components["schemas"]["BaxeError"];
4861
+ };
4862
+ };
4863
+ 401: {
4864
+ headers: {
4865
+ [name: string]: unknown;
4866
+ };
4867
+ content: {
4868
+ "application/json": components["schemas"]["BaxeError"];
4869
+ };
4870
+ };
4871
+ 403: {
4872
+ headers: {
4873
+ [name: string]: unknown;
4874
+ };
4875
+ content: {
4876
+ "application/json": components["schemas"]["BaxeError"];
4877
+ };
4878
+ };
4879
+ 500: {
4880
+ headers: {
4881
+ [name: string]: unknown;
4882
+ };
4883
+ content: {
4884
+ "application/json": components["schemas"]["BaxeError"];
4885
+ };
4886
+ };
4887
+ };
4888
+ };
4889
+ getDocumentVerificationResultDetails: {
4890
+ parameters: {
4891
+ query: {
4892
+ sandbox: boolean;
4893
+ locale?: components["schemas"]["Locale"];
4894
+ };
4895
+ header?: never;
4896
+ path: {
4897
+ /**
4898
+ * @description The ID of the organization
4899
+ * @example 123e4567-e89b-12d3-a456-426614174000
4900
+ */
4901
+ organization_id: string;
4902
+ /**
4903
+ * @description The ID of the flow result
4904
+ * @example 123e4567-e89b-12d3-a456-426614174000
4905
+ */
4906
+ flow_result_id: string;
4907
+ /**
4908
+ * @description The slug of the flow
4909
+ * @example flow-slug
4910
+ */
4911
+ flow_slug: string;
4912
+ /**
4913
+ * @description The ID of the DV result
4914
+ * @example 123e4567-e89b-12d3-a456-426614174000
4915
+ */
4916
+ dv_result_id: string;
4917
+ };
4918
+ cookie?: never;
4919
+ };
4920
+ requestBody?: never;
4921
+ responses: {
4922
+ 200: {
4923
+ headers: {
4924
+ [name: string]: unknown;
4925
+ };
4926
+ content: {
4927
+ "application/x-protobuf-stream": string;
4928
+ };
4929
+ };
4930
+ 403: {
4931
+ headers: {
4932
+ [name: string]: unknown;
4933
+ };
4934
+ content: {
4935
+ "application/json": components["schemas"]["BaxeError"];
4936
+ };
4937
+ };
4938
+ 404: {
4939
+ headers: {
4940
+ [name: string]: unknown;
4941
+ };
4942
+ content: {
4943
+ "application/json": components["schemas"]["BaxeError"];
4944
+ };
4945
+ };
4946
+ 500: {
4947
+ headers: {
4948
+ [name: string]: unknown;
4949
+ };
4950
+ content: {
4951
+ "application/json": components["schemas"]["BaxeError"];
4952
+ };
4953
+ };
4954
+ };
4955
+ };
4956
+ getProofOfAddressResultDetails: {
4957
+ parameters: {
4958
+ query: {
4959
+ sandbox: boolean;
4960
+ locale?: components["schemas"]["Locale"];
4961
+ };
4962
+ header?: never;
4963
+ path: {
4964
+ /**
4965
+ * @description The ID of the organization
4966
+ * @example 123e4567-e89b-12d3-a456-426614174000
4967
+ */
4968
+ organization_id: string;
4969
+ /**
4970
+ * @description The ID of the flow result
3604
4971
  * @example 123e4567-e89b-12d3-a456-426614174000
3605
4972
  */
3606
4973
  flow_result_id: string;
@@ -3627,6 +4994,14 @@ export interface operations {
3627
4994
  "application/x-protobuf-stream": string;
3628
4995
  };
3629
4996
  };
4997
+ 403: {
4998
+ headers: {
4999
+ [name: string]: unknown;
5000
+ };
5001
+ content: {
5002
+ "application/json": components["schemas"]["BaxeError"];
5003
+ };
5004
+ };
3630
5005
  404: {
3631
5006
  headers: {
3632
5007
  [name: string]: unknown;
@@ -3645,7 +5020,7 @@ export interface operations {
3645
5020
  };
3646
5021
  };
3647
5022
  };
3648
- get_sdk_wallet_result_details: {
5023
+ getWalletResultDetails: {
3649
5024
  parameters: {
3650
5025
  query: {
3651
5026
  sandbox: boolean;
@@ -3686,6 +5061,14 @@ export interface operations {
3686
5061
  "application/json": components["schemas"]["WalletResult"];
3687
5062
  };
3688
5063
  };
5064
+ 403: {
5065
+ headers: {
5066
+ [name: string]: unknown;
5067
+ };
5068
+ content: {
5069
+ "application/json": components["schemas"]["BaxeError"];
5070
+ };
5071
+ };
3689
5072
  404: {
3690
5073
  headers: {
3691
5074
  [name: string]: unknown;
@@ -3704,7 +5087,7 @@ export interface operations {
3704
5087
  };
3705
5088
  };
3706
5089
  };
3707
- get_sdk_phone_result_details: {
5090
+ getPhoneResultDetails: {
3708
5091
  parameters: {
3709
5092
  query: {
3710
5093
  sandbox: boolean;
@@ -3745,6 +5128,14 @@ export interface operations {
3745
5128
  "application/json": components["schemas"]["PhoneResult"];
3746
5129
  };
3747
5130
  };
5131
+ 403: {
5132
+ headers: {
5133
+ [name: string]: unknown;
5134
+ };
5135
+ content: {
5136
+ "application/json": components["schemas"]["BaxeError"];
5137
+ };
5138
+ };
3748
5139
  404: {
3749
5140
  headers: {
3750
5141
  [name: string]: unknown;
@@ -3763,7 +5154,7 @@ export interface operations {
3763
5154
  };
3764
5155
  };
3765
5156
  };
3766
- get_sdk_form_result_details: {
5157
+ getFormResultDetails: {
3767
5158
  parameters: {
3768
5159
  query: {
3769
5160
  sandbox: boolean;
@@ -3804,6 +5195,14 @@ export interface operations {
3804
5195
  "application/json": components["schemas"]["FormResult"];
3805
5196
  };
3806
5197
  };
5198
+ 403: {
5199
+ headers: {
5200
+ [name: string]: unknown;
5201
+ };
5202
+ content: {
5203
+ "application/json": components["schemas"]["BaxeError"];
5204
+ };
5205
+ };
3807
5206
  404: {
3808
5207
  headers: {
3809
5208
  [name: string]: unknown;
@@ -3822,7 +5221,7 @@ export interface operations {
3822
5221
  };
3823
5222
  };
3824
5223
  };
3825
- get_sdk_flow_result_details_deprecated: {
5224
+ getFlowResultDetailsDeprecated: {
3826
5225
  parameters: {
3827
5226
  query: {
3828
5227
  sandbox: boolean;
@@ -3887,7 +5286,7 @@ export interface operations {
3887
5286
  };
3888
5287
  };
3889
5288
  };
3890
- get_sdk_dv_result_details_deprecated: {
5289
+ getDocumentVerificationResultDetailsDeprecated: {
3891
5290
  parameters: {
3892
5291
  query: {
3893
5292
  sandbox: boolean;
@@ -3923,6 +5322,14 @@ export interface operations {
3923
5322
  "application/x-protobuf-stream": string;
3924
5323
  };
3925
5324
  };
5325
+ 403: {
5326
+ headers: {
5327
+ [name: string]: unknown;
5328
+ };
5329
+ content: {
5330
+ "application/json": components["schemas"]["BaxeError"];
5331
+ };
5332
+ };
3926
5333
  404: {
3927
5334
  headers: {
3928
5335
  [name: string]: unknown;
@@ -3941,7 +5348,7 @@ export interface operations {
3941
5348
  };
3942
5349
  };
3943
5350
  };
3944
- get_sdk_poa_result_details_deprecated: {
5351
+ getProofOfAddressResultDetailsDeprecated: {
3945
5352
  parameters: {
3946
5353
  query: {
3947
5354
  sandbox: boolean;
@@ -3977,6 +5384,195 @@ export interface operations {
3977
5384
  "application/x-protobuf-stream": string;
3978
5385
  };
3979
5386
  };
5387
+ 403: {
5388
+ headers: {
5389
+ [name: string]: unknown;
5390
+ };
5391
+ content: {
5392
+ "application/json": components["schemas"]["BaxeError"];
5393
+ };
5394
+ };
5395
+ 404: {
5396
+ headers: {
5397
+ [name: string]: unknown;
5398
+ };
5399
+ content: {
5400
+ "application/json": components["schemas"]["BaxeError"];
5401
+ };
5402
+ };
5403
+ 500: {
5404
+ headers: {
5405
+ [name: string]: unknown;
5406
+ };
5407
+ content: {
5408
+ "application/json": components["schemas"]["BaxeError"];
5409
+ };
5410
+ };
5411
+ };
5412
+ };
5413
+ sdkScreenAml: {
5414
+ parameters: {
5415
+ query: {
5416
+ sandbox: boolean;
5417
+ locale?: components["schemas"]["Locale"];
5418
+ };
5419
+ header?: never;
5420
+ path: {
5421
+ /** @description Organization ID */
5422
+ organization_id: string;
5423
+ };
5424
+ cookie?: never;
5425
+ };
5426
+ requestBody: {
5427
+ content: {
5428
+ "application/json": components["schemas"]["SdkAmlScreenRequest"];
5429
+ };
5430
+ };
5431
+ responses: {
5432
+ 200: {
5433
+ headers: {
5434
+ [name: string]: unknown;
5435
+ };
5436
+ content: {
5437
+ "application/json": components["schemas"]["SdkAmlScreenResponse"];
5438
+ };
5439
+ };
5440
+ 400: {
5441
+ headers: {
5442
+ [name: string]: unknown;
5443
+ };
5444
+ content: {
5445
+ "application/json": components["schemas"]["BaxeError"];
5446
+ };
5447
+ };
5448
+ 401: {
5449
+ headers: {
5450
+ [name: string]: unknown;
5451
+ };
5452
+ content: {
5453
+ "application/json": components["schemas"]["BaxeError"];
5454
+ };
5455
+ };
5456
+ 402: {
5457
+ headers: {
5458
+ [name: string]: unknown;
5459
+ };
5460
+ content: {
5461
+ "application/json": components["schemas"]["BaxeError"];
5462
+ };
5463
+ };
5464
+ 403: {
5465
+ headers: {
5466
+ [name: string]: unknown;
5467
+ };
5468
+ content: {
5469
+ "application/json": components["schemas"]["BaxeError"];
5470
+ };
5471
+ };
5472
+ 500: {
5473
+ headers: {
5474
+ [name: string]: unknown;
5475
+ };
5476
+ content: {
5477
+ "application/json": components["schemas"]["BaxeError"];
5478
+ };
5479
+ };
5480
+ };
5481
+ };
5482
+ get_topup_packs: {
5483
+ parameters: {
5484
+ query?: never;
5485
+ header?: never;
5486
+ path: {
5487
+ /** @description Organization ID */
5488
+ organization_id: string;
5489
+ };
5490
+ cookie?: never;
5491
+ };
5492
+ requestBody?: never;
5493
+ responses: {
5494
+ 200: {
5495
+ headers: {
5496
+ [name: string]: unknown;
5497
+ };
5498
+ content: {
5499
+ "application/json": components["schemas"]["TopupPacksResponse"];
5500
+ };
5501
+ };
5502
+ 401: {
5503
+ headers: {
5504
+ [name: string]: unknown;
5505
+ };
5506
+ content: {
5507
+ "application/json": components["schemas"]["BaxeError"];
5508
+ };
5509
+ };
5510
+ 403: {
5511
+ headers: {
5512
+ [name: string]: unknown;
5513
+ };
5514
+ content: {
5515
+ "application/json": components["schemas"]["BaxeError"];
5516
+ };
5517
+ };
5518
+ 500: {
5519
+ headers: {
5520
+ [name: string]: unknown;
5521
+ };
5522
+ content: {
5523
+ "application/json": components["schemas"]["BaxeError"];
5524
+ };
5525
+ };
5526
+ };
5527
+ };
5528
+ create_topup_checkout: {
5529
+ parameters: {
5530
+ query?: never;
5531
+ header?: never;
5532
+ path: {
5533
+ /** @description Organization ID */
5534
+ organization_id: string;
5535
+ };
5536
+ cookie?: never;
5537
+ };
5538
+ requestBody: {
5539
+ content: {
5540
+ "application/json": components["schemas"]["CreateTopupCheckoutRequest"];
5541
+ };
5542
+ };
5543
+ responses: {
5544
+ 200: {
5545
+ headers: {
5546
+ [name: string]: unknown;
5547
+ };
5548
+ content: {
5549
+ "application/json": components["schemas"]["CheckoutSessionResponse"];
5550
+ };
5551
+ };
5552
+ 400: {
5553
+ headers: {
5554
+ [name: string]: unknown;
5555
+ };
5556
+ content: {
5557
+ "application/json": components["schemas"]["BaxeError"];
5558
+ };
5559
+ };
5560
+ 401: {
5561
+ headers: {
5562
+ [name: string]: unknown;
5563
+ };
5564
+ content: {
5565
+ "application/json": components["schemas"]["BaxeError"];
5566
+ };
5567
+ };
5568
+ 403: {
5569
+ headers: {
5570
+ [name: string]: unknown;
5571
+ };
5572
+ content: {
5573
+ "application/json": components["schemas"]["BaxeError"];
5574
+ };
5575
+ };
3980
5576
  404: {
3981
5577
  headers: {
3982
5578
  [name: string]: unknown;