@zyphe-sdk/core 0.1.13 → 0.1.15

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/index.d.cts DELETED
@@ -1,1685 +0,0 @@
1
- import * as openapi_fetch from 'openapi-fetch';
2
-
3
- declare const Environments: {
4
- readonly LOCAL: "local";
5
- readonly STAGING: "staging";
6
- readonly PRODUCTION: "production";
7
- };
8
- type Environment = (typeof Environments)[keyof typeof Environments];
9
- interface EnvironmentConfig {
10
- appUrl: string;
11
- apiUrl: string;
12
- }
13
- declare const EnvironmentConfigs: Record<Environment, EnvironmentConfig>;
14
- declare const API_KEY_HEADER = "x-api-key";
15
-
16
- interface components$1 {
17
- schemas: {
18
- AddressData: {
19
- addressLine?: string | null;
20
- building: string;
21
- city: string;
22
- country: string;
23
- flat: string;
24
- houseNumber: string;
25
- postalCode: string;
26
- street: string;
27
- };
28
- AmlEntityResponse: {
29
- address?: string[];
30
- birthCountry?: string[];
31
- birthDate?: string[];
32
- birthPlace?: string[];
33
- country?: string[];
34
- email?: string[];
35
- firstName?: string[];
36
- gender?: string[];
37
- lastName?: string[];
38
- middleName?: string[];
39
- name?: string[];
40
- nationality?: string[];
41
- occupancies?: components$1["schemas"]["AmlOccupancy"][];
42
- phone?: string[];
43
- position?: string[];
44
- sanctions?: components$1["schemas"]["AmlSanction"][];
45
- title?: string[];
46
- topics?: string[];
47
- };
48
- AmlOccupancy: {
49
- endDate?: string[];
50
- post?: components$1["schemas"]["AmlPosition"][];
51
- startDate?: string[];
52
- status?: string[];
53
- };
54
- AmlOrganization: {
55
- country?: string[];
56
- description?: string[];
57
- name?: string[];
58
- summary?: string[];
59
- };
60
- AmlPosition: {
61
- country?: string[];
62
- description?: string[];
63
- dissolutionDate?: string[];
64
- inceptionDate?: string[];
65
- name?: string[];
66
- numberOfSeats?: number[];
67
- organization?: components$1["schemas"]["AmlOrganization"][];
68
- subnationalArea?: string[];
69
- summary?: string[];
70
- topics?: string[];
71
- };
72
- AmlResult: {
73
- /** Format: date-time */
74
- createdAt: string;
75
- data: {
76
- [key: string]: unknown;
77
- };
78
- id: string;
79
- pep: boolean;
80
- sanctions: boolean;
81
- /** Format: date-time */
82
- updatedAt: string;
83
- verificationRequestId?: string | null;
84
- };
85
- AmlSanction: {
86
- authority?: string[];
87
- authorityId?: string[];
88
- country?: string[];
89
- date?: string[];
90
- duration?: string[];
91
- endDate?: string[];
92
- listingDate?: string[];
93
- program?: string[];
94
- reason?: string[];
95
- startDate?: string[];
96
- status?: string[];
97
- unscId?: string[];
98
- };
99
- AmlSearchResponse: components$1["schemas"]["AmlEntityResponse"][];
100
- /** @enum {string} */
101
- ApiKeyType: "PUBLISHABLE" | "SECRET";
102
- BaxeError: {
103
- /** Format: int32 */
104
- code: number;
105
- errorTag: components$1["schemas"]["ErrorTags"];
106
- message?: string | null;
107
- };
108
- BusinessInformation: {
109
- address: string;
110
- businessActivity: string;
111
- city: string;
112
- companyName: string;
113
- companyType: string;
114
- contactEmail: string;
115
- country: string;
116
- incorporationDate: string;
117
- postZipCode: string;
118
- registrationNumber: string;
119
- };
120
- CountriesFilter: {
121
- accepted: string[];
122
- blocked: string[];
123
- };
124
- CreateVerificationRequestPayload: {
125
- continueUrl?: string | null;
126
- cookiesPolicyAccepted: boolean;
127
- customData?: {
128
- [key: string]: unknown;
129
- } | null;
130
- email: string;
131
- flowStepId: string;
132
- privacyPolicyAccepted: boolean;
133
- termsAndConditionsAccepted: boolean;
134
- };
135
- CreateVerificationRequestResponse: {
136
- verificationRequest: components$1["schemas"]["VerificationRequest"];
137
- websocketNamespace: string;
138
- };
139
- Document: {
140
- /** Format: date-time */
141
- createdAt: string;
142
- /** Format: date-time */
143
- expiresAt?: string | null;
144
- id: string;
145
- metadata: unknown;
146
- path: string;
147
- /** Format: int32 */
148
- type: number;
149
- typeName: string;
150
- /** Format: date-time */
151
- updatedAt: string;
152
- vaultId: string;
153
- };
154
- DocumentData: {
155
- documentCan?: string;
156
- documentClassCode?: string;
157
- documentNumber: string;
158
- /** Format: date */
159
- expiryDate?: string | null;
160
- issuingAuthority: string;
161
- /** Format: date */
162
- issuingDate?: string | null;
163
- issuingState: string;
164
- mrzStrings?: string;
165
- };
166
- DocumentFormatFilter: {
167
- formats: string[];
168
- };
169
- DocumentImage: {
170
- path: string;
171
- type: string;
172
- };
173
- DocumentTypeFilter: {
174
- types: string[];
175
- };
176
- DocumentUpload: {
177
- filename: string;
178
- presignedUrl?: string | null;
179
- };
180
- DvConfig: {
181
- allowedDocumentsPerCountry?: {
182
- [key: string]: string[];
183
- } | null;
184
- countriesFilter?: components$1["schemas"]["CountriesFilter"] | null;
185
- documentFormatsFilter?: components$1["schemas"]["DocumentFormatFilter"] | null;
186
- documentTypesFilter?: components$1["schemas"]["DocumentTypeFilter"] | null;
187
- /** @example { "en_button_label": "Next step" } */
188
- labels?: {
189
- [key: string]: string;
190
- };
191
- /** Format: int32 */
192
- minimumAge: number;
193
- skipLiveness?: boolean;
194
- thresholds?: {
195
- documentScorePercent?: number;
196
- portraitMatchPercent?: number;
197
- } | null;
198
- };
199
- /** @enum {string} */
200
- DvConfigThreshold: "documentScorePercent" | "portraitMatchPercent";
201
- /** @enum {string} */
202
- DvReason: "UNKNOWN" | "WRONG_DOCUMENT_TYPE" | "COUNTRY_FILTER" | "FACE_MATCH_CHECK" | "OVERALL_STATUS" | "DOCUMENT_COUNTRY_MISMATCH" | "DOCUMENT_COUNTRY_MISSING" | "DATE_OF_EXPIRY_NOT_VALID" | "DATE_OF_EXPIRY_NOT_READABLE" | "DATE_OF_EXPIRY_FIELD_MISSING" | "DOCUMENT_ALREADY_USED_BY_ANOTHER_USER" | "DOCUMENT_FINGERPRINT_COMPUTATION" | "SECURITY_CHECK_FAILED" | "DOCUMENT_SCORE_BELOW_THRESHOLD" | "DOCUMENT_TYPE_NOT_DEFINED" | "LIVENESS_CHECK_FAILED" | "DOCUMENT_NOT_FOUND" | "DATE_OF_BIRTH_BELOW_MINIMUM_AGE";
203
- DvResult: {
204
- browser?: string | null;
205
- class?: string | null;
206
- /** Format: date-time */
207
- createdAt?: string | null;
208
- data: {
209
- [key: string]: unknown;
210
- };
211
- documentId?: string | null;
212
- /** Format: int32 */
213
- documentScorePercent?: number | null;
214
- /** Format: int32 */
215
- documentType?: number | null;
216
- firstName?: string | null;
217
- flowStep?: Omit<components$1["schemas"]["FlowStep"], "type"> | null;
218
- id: string;
219
- lastName?: string | null;
220
- platform?: string | null;
221
- /** Format: int32 */
222
- portraitMatchPercent?: number | null;
223
- processAdditionalData: {
224
- [key: string]: unknown;
225
- };
226
- reasons: components$1["schemas"]["DvReason"][];
227
- status: components$1["schemas"]["ResultStatus"];
228
- /** Format: date-time */
229
- updatedAt?: string | null;
230
- verificationRequestId?: string | null;
231
- };
232
- /** @enum {string} */
233
- 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" | "authentication_request_not_found" | "invalid_magic_link" | "user_disabled" | "invalid_verify_link" | "missing_authorization_header" | "invalid_authorization_header" | "token_generation" | "user_not_found" | "authentication_request_expired" | "authentication_request_already_used" | "verification_session_expired" | "email_already_taken" | "invalid_invite" | "wrong_invite_user" | "invite_not_found" | "email_already_verified" | "flow_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_revoked" | "invite_expired" | "form_not_found" | "form_in_use" | "flow_step_configuration_not_found" | "organization_product_not_active" | "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";
234
- /** @enum {string} */
235
- FilterOperator: "unfiltered" | "in" | "equals" | "not-in" | "not-equals" | "contains";
236
- Flow: {
237
- /** Format: date-time */
238
- createdAt?: string | null;
239
- extendedWebhook: boolean;
240
- id: string;
241
- name: string;
242
- slug: string;
243
- steps: components$1["schemas"]["FlowStep"][];
244
- successUrl: string;
245
- /** Format: date-time */
246
- updatedAt?: string | null;
247
- webhookUrl: string;
248
- };
249
- FlowResult: {
250
- amlResults: components$1["schemas"]["AmlResult"][];
251
- /** Format: date-time */
252
- createdAt?: string | null;
253
- customData: {
254
- [key: string]: unknown;
255
- };
256
- dvResults: components$1["schemas"]["DvResult"][];
257
- flow?: components$1["schemas"]["Flow"] | null;
258
- flowSlug: string;
259
- formResults: components$1["schemas"]["FormResult"][];
260
- id: string;
261
- identity?: components$1["schemas"]["Identity"] | null;
262
- kybResults: components$1["schemas"]["KybResult"][];
263
- organization?: components$1["schemas"]["Organization"] | null;
264
- organizationId: string;
265
- poaResults: components$1["schemas"]["PoaResult"][];
266
- spidResults: components$1["schemas"]["SpidResult"][];
267
- /** Format: date-time */
268
- updatedAt?: string | null;
269
- };
270
- FlowStep: {
271
- config: components$1["schemas"]["DvConfig"];
272
- /** Format: date-time */
273
- createdAt?: string | null;
274
- flowId: string;
275
- gotoStepId?: string | null;
276
- id: string;
277
- name: string;
278
- /** Format: int32 */
279
- order: number;
280
- slug: string;
281
- successUrl?: string | null;
282
- /** @enum {string} */
283
- type: "DV";
284
- /** Format: date-time */
285
- updatedAt?: string | null;
286
- } | {
287
- config: components$1["schemas"]["FormConfig"];
288
- /** Format: date-time */
289
- createdAt?: string | null;
290
- flowId: string;
291
- gotoStepId?: string | null;
292
- id: string;
293
- name: string;
294
- /** Format: int32 */
295
- order: number;
296
- slug: string;
297
- successUrl?: string | null;
298
- /** @enum {string} */
299
- type: "FORM";
300
- /** Format: date-time */
301
- updatedAt?: string | null;
302
- } | {
303
- config: components$1["schemas"]["PoaConfig"];
304
- /** Format: date-time */
305
- createdAt?: string | null;
306
- flowId: string;
307
- gotoStepId?: string | null;
308
- id: string;
309
- name: string;
310
- /** Format: int32 */
311
- order: number;
312
- slug: string;
313
- successUrl?: string | null;
314
- /** @enum {string} */
315
- type: "POA";
316
- /** Format: date-time */
317
- updatedAt?: string | null;
318
- } | {
319
- config: components$1["schemas"]["KybConfig"];
320
- /** Format: date-time */
321
- createdAt?: string | null;
322
- flowId: string;
323
- gotoStepId?: string | null;
324
- id: string;
325
- name: string;
326
- /** Format: int32 */
327
- order: number;
328
- slug: string;
329
- successUrl?: string | null;
330
- /** @enum {string} */
331
- type: "KYB";
332
- /** Format: date-time */
333
- updatedAt?: string | null;
334
- } | {
335
- config: components$1["schemas"]["SpidConfig"];
336
- /** Format: date-time */
337
- createdAt?: string | null;
338
- flowId: string;
339
- gotoStepId?: string | null;
340
- id: string;
341
- name: string;
342
- /** Format: int32 */
343
- order: number;
344
- slug: string;
345
- successUrl?: string | null;
346
- /** @enum {string} */
347
- type: "SPID";
348
- /** Format: date-time */
349
- updatedAt?: string | null;
350
- };
351
- FlowStepConfig: components$1["schemas"]["DvConfig"] | components$1["schemas"]["FormConfig"] | components$1["schemas"]["PoaConfig"] | components$1["schemas"]["KybConfig"] | components$1["schemas"]["SpidConfig"];
352
- Form: {
353
- /** Format: date-time */
354
- createdAt?: string | null;
355
- description?: string | null;
356
- id: string;
357
- name: string;
358
- organizationId: string;
359
- sections: components$1["schemas"]["FormSection"][];
360
- /** Format: date-time */
361
- updatedAt?: string | null;
362
- };
363
- FormAnswerSection: {
364
- answers: {
365
- [key: string]: unknown;
366
- };
367
- name: string;
368
- };
369
- FormConfig: {
370
- form?: components$1["schemas"]["Form"] | null;
371
- formId: string;
372
- /** @example { "default": "Next step" } */
373
- labels?: {
374
- [key: string]: string;
375
- };
376
- };
377
- FormItem: {
378
- content: components$1["schemas"]["InputField"];
379
- /** @enum {string} */
380
- type: "InputField";
381
- } | {
382
- content: components$1["schemas"]["Plaintext"];
383
- /** @enum {string} */
384
- type: "Plaintext";
385
- } | {
386
- /** @enum {string} */
387
- type: "Separator";
388
- };
389
- /** @enum {string} */
390
- FormReason: "UNKNOWN";
391
- FormResult: {
392
- /** Format: date-time */
393
- createdAt?: string | null;
394
- flowResultId: string;
395
- flowStep?: Omit<components$1["schemas"]["FlowStep"], "type"> | null;
396
- flowStepId?: string | null;
397
- form?: components$1["schemas"]["Form"] | null;
398
- id: string;
399
- reason?: components$1["schemas"]["FormReason"] | null;
400
- sections: components$1["schemas"]["FormSection"][];
401
- status: components$1["schemas"]["ResultStatus"];
402
- /** Format: date-time */
403
- updatedAt?: string | null;
404
- verificationRequestId?: string | null;
405
- };
406
- FormSection: {
407
- items: components$1["schemas"]["FormItem"][];
408
- label: {
409
- [key: string]: string;
410
- };
411
- name: string;
412
- };
413
- GetApiKeyResponse: {
414
- apiKey: components$1["schemas"]["ZypheApiKey"];
415
- };
416
- GetFlowResponse: {
417
- flow: components$1["schemas"]["Flow"];
418
- };
419
- GetFormResponse: {
420
- form: components$1["schemas"]["Form"];
421
- };
422
- GetFullFlowResponse: {
423
- flow: components$1["schemas"]["Flow"];
424
- organizationName: string;
425
- settings: components$1["schemas"]["Settings"];
426
- };
427
- GetVerificationRequestResponse: {
428
- identity: components$1["schemas"]["Identity"];
429
- verificationRequest: components$1["schemas"]["VerificationRequest"];
430
- };
431
- Identity: {
432
- /** Format: date-time */
433
- createdAt?: string | null;
434
- defaultOrganizationId?: string | null;
435
- email: string;
436
- emailVerified: boolean;
437
- id: string;
438
- isActive: boolean;
439
- role: components$1["schemas"]["Role"];
440
- /** Format: date-time */
441
- updatedAt?: string | null;
442
- zid: string;
443
- };
444
- Image: {
445
- /** Format: int32 */
446
- containerType: number;
447
- /** Format: int64 */
448
- lightIndex: number;
449
- /** Format: int64 */
450
- pageIndex: number;
451
- source: string;
452
- value: string;
453
- };
454
- InputField: {
455
- label: {
456
- [key: string]: string;
457
- };
458
- name: string;
459
- options: {
460
- [key: string]: string;
461
- };
462
- required: boolean;
463
- type: components$1["schemas"]["InputFieldType"];
464
- value?: unknown;
465
- };
466
- /** @enum {string} */
467
- InputFieldType: "date" | "text" | "textarea" | "checkbox";
468
- KybConfig: {
469
- kycFlowId: string;
470
- /** @example { "default": "Next step" } */
471
- labels?: {
472
- [key: string]: string;
473
- };
474
- /**
475
- * Format: int32
476
- * @default 10
477
- * @example 5
478
- */
479
- maxFileUploads: number;
480
- /**
481
- * Format: int32
482
- * @default 10
483
- * @example 3
484
- */
485
- maxUbos: number;
486
- };
487
- KybResult: {
488
- businessInformation?: components$1["schemas"]["BusinessInformation"] | null;
489
- /** Format: date-time */
490
- createdAt?: string | null;
491
- documentUploads?: components$1["schemas"]["DocumentUpload"][] | null;
492
- flowStep?: Omit<components$1["schemas"]["FlowStep"], "type"> | null;
493
- id: string;
494
- pepAndSanctionsStatus: components$1["schemas"]["PepAndSanctionsStatus"];
495
- reason?: string | null;
496
- report?: string | null;
497
- status: components$1["schemas"]["ModerationResultStatus"];
498
- uboDefinitions?: components$1["schemas"]["UboDefinition"][] | null;
499
- /** Format: date-time */
500
- updatedAt?: string | null;
501
- verificationRequestId?: string | null;
502
- };
503
- /** @enum {string} */
504
- Locale: "en";
505
- ModerateKybResultPayload: {
506
- pepAndSanctionsStatus?: components$1["schemas"]["PepAndSanctionsStatusField"] | null;
507
- /** Format: binary */
508
- reportFile?: Blob | null;
509
- status?: components$1["schemas"]["ModerationResultStatusField"] | null;
510
- };
511
- ModerateKybResultResponse: {
512
- success: boolean;
513
- };
514
- /** @enum {string} */
515
- ModerationResultStatus: "ACQUIRING" | "PENDING_MODERATION" | "SUCCESS" | "FAILED";
516
- ModerationResultStatusField: components$1["schemas"]["ModerationResultStatus"];
517
- Organization: {
518
- address: string;
519
- country: string;
520
- /** Format: date-time */
521
- createdAt?: string | null;
522
- email: string;
523
- id: string;
524
- industry?: string | null;
525
- name: string;
526
- phone: string;
527
- postcode?: string | null;
528
- registrationNumber: string;
529
- settings?: components$1["schemas"]["Settings"] | null;
530
- slug: string;
531
- /** Format: date-time */
532
- updatedAt?: string | null;
533
- website: string;
534
- };
535
- Pagination: {
536
- /** @example createdAt:in:2025-01-01,2025-01-02;updatedAt:gt:2025-01-02 */
537
- filter?: string;
538
- /**
539
- * Format: int32
540
- * @example 0
541
- */
542
- skip?: number;
543
- /** @example createdAt:desc */
544
- sort?: string;
545
- /**
546
- * Format: int32
547
- * @example 100
548
- */
549
- take?: number;
550
- };
551
- /** @enum {string} */
552
- PepAndSanctionsStatus: "REVIEW" | "PENDING" | "SUCCESS" | "FAILED" | "IN_PROGRESS";
553
- PepAndSanctionsStatusField: components$1["schemas"]["PepAndSanctionsStatus"];
554
- PersonalData: {
555
- dateOfBirth: string;
556
- gender: string;
557
- givenName: string;
558
- nationality: string;
559
- personalNumber?: string;
560
- placeOfBirth?: string;
561
- surname: string;
562
- };
563
- Plaintext: {
564
- text: {
565
- [key: string]: string;
566
- };
567
- };
568
- PoaConfig: {
569
- documentFilter: components$1["schemas"]["PoaDocumentType"][];
570
- /** @example { "default": "Next step" } */
571
- labels?: {
572
- [key: string]: string;
573
- };
574
- /**
575
- * Format: int32
576
- * @example 90
577
- */
578
- maxAgeDays?: number;
579
- };
580
- /** @enum {string} */
581
- PoaDocumentType: "PAY_SLIP" | "UTILITY_BILL" | "FINANCIAL_DOCUMENT" | "RECEIPT" | "INVOICE" | "BANK_DOCUMENT";
582
- /** @enum {string} */
583
- PoaReason: "UNKNOWN" | "DOCUMENT_TYPE_NOT_ALLOWED" | "NAME_MISMATCH" | "DATE_TOO_OLD" | "INVALID_DOCUMENT";
584
- PoaResult: {
585
- /** Format: date-time */
586
- checkedAt?: string | null;
587
- /** Format: date-time */
588
- createdAt: string;
589
- documentId?: string | null;
590
- documentType?: components$1["schemas"]["PoaDocumentType"] | null;
591
- flowStep?: Omit<components$1["schemas"]["FlowStep"], "type"> | null;
592
- id: string;
593
- reason?: components$1["schemas"]["PoaReason"] | null;
594
- status: components$1["schemas"]["ResultStatus"];
595
- /** Format: date-time */
596
- updatedAt: string;
597
- verificationRequestId?: string | null;
598
- };
599
- ProcessAddressDocumentRequest: {
600
- /** Format: binary */
601
- file: Blob;
602
- };
603
- ProcessAddressDocumentResponse: {
604
- jobId: string;
605
- verificationRequestId: string;
606
- websocketNamespace: string;
607
- };
608
- /** @enum {string} */
609
- ProductType: "UNKNOWN" | "KYC" | "KYB" | "PRODUCTION_MODE" | "SPID";
610
- /** @enum {string} */
611
- ResultStatus: "PASSED" | "FAILED";
612
- /** @enum {string} */
613
- Role: "GUEST" | "USER" | "ADMIN";
614
- SdkCreateVerificationRequestPayload: {
615
- customData?: {
616
- [key: string]: unknown;
617
- } | null;
618
- email: string;
619
- flowStepId: string;
620
- };
621
- SdkCreateVerificationRequestResponse: {
622
- email: string;
623
- flowSlug: string;
624
- flowStepSlug: string;
625
- isSandbox: boolean;
626
- verificationRequest: components$1["schemas"]["VerificationRequest"];
627
- websocketNamespace: string;
628
- zypheToken: string;
629
- };
630
- Settings: {
631
- /** Format: date-time */
632
- createdAt?: string | null;
633
- extendedWebhook?: boolean | null;
634
- primaryColor?: string | null;
635
- profileImage?: string | null;
636
- secondaryColor?: string | null;
637
- /** Format: date-time */
638
- updatedAt?: string | null;
639
- webhookSecret?: string | null;
640
- };
641
- SpidConfig: {
642
- /** @example { "default": "Next step" } */
643
- labels?: {
644
- [key: string]: string;
645
- };
646
- };
647
- SpidResult: {
648
- /** Format: date-time */
649
- createdAt?: string | null;
650
- flowStep?: Omit<components$1["schemas"]["FlowStep"], "type"> | null;
651
- id: string;
652
- path: string;
653
- reason?: string | null;
654
- status: components$1["schemas"]["ResultStatus"];
655
- /** Format: date-time */
656
- updatedAt?: string | null;
657
- verificationRequestId?: string | null;
658
- };
659
- SpidResultDetails: {
660
- address?: string | null;
661
- companyName?: string | null;
662
- companyVatNumber?: string | null;
663
- countryOfBirth?: string | null;
664
- dateOfBirth?: string | null;
665
- digitalAddress?: string | null;
666
- email?: string | null;
667
- firstName?: string | null;
668
- fiscalNumber?: string | null;
669
- fullName?: string | null;
670
- gender?: string | null;
671
- id?: string | null;
672
- lastName?: string | null;
673
- mobilePhone?: string | null;
674
- placeOfBirth?: string | null;
675
- registeredOffice?: string | null;
676
- spidCode?: string | null;
677
- username?: string | null;
678
- };
679
- UboDefinition: {
680
- country: string;
681
- dateOfBirth: string;
682
- emailAddress: string;
683
- firstName: string;
684
- gender: string;
685
- lastName: string;
686
- };
687
- /** @enum {string} */
688
- ValidationMessages: "validation_unexpected" | "validation_invalid_file_format" | "validation_organization_slug_exists" | "validation_flow_slug_exists" | "validation_flow_id_mismatch" | "validation_flow_step_name_exists" | "validation_consents_not_granted" | "validation_kyb_config_match" | "validation_kyb_config_already_uses_this_kyc_flow_id" | "validation_kyb_moderation_status_wrong" | "validation_form_name_exists" | "validation_database_error" | "validation_flow_name_invalid" | "validation_flow_slug_name_invalid" | "validation_flow_step_name_invalid" | "validation_flow_step_order_duplicate" | "validation_flow_step_order_invalid" | "validation_flow_step_id_mismatch" | "validation_password_too_short" | "validation_password_no_uppercase" | "validation_password_no_lowercase" | "validation_password_no_number" | "validation_password_no_special_character" | "validation_password_contains_whitespace_or_control";
689
- VerificationRequest: {
690
- amlResult?: components$1["schemas"]["AmlResult"] | null;
691
- /** Format: int32 */
692
- attemptsCount: number;
693
- /** Format: date-time */
694
- createdAt?: string | null;
695
- customData: {
696
- [key: string]: unknown;
697
- };
698
- dvResult?: components$1["schemas"]["DvResult"] | null;
699
- flowId: string;
700
- flowStepId: string;
701
- formResult?: components$1["schemas"]["FormResult"] | null;
702
- id: string;
703
- identity?: components$1["schemas"]["Identity"] | null;
704
- identityId: string;
705
- kybResult?: components$1["schemas"]["KybResult"] | null;
706
- organizationId: string;
707
- poaResult?: components$1["schemas"]["PoaResult"] | null;
708
- reason?: string | null;
709
- spidResult?: components$1["schemas"]["SpidResult"] | null;
710
- status: components$1["schemas"]["VerificationRequestStatus"];
711
- /** Format: date-time */
712
- updatedAt?: string | null;
713
- };
714
- /** @enum {string} */
715
- VerificationRequestStatus: "PENDING" | "COMPLETED" | "FAILED" | "CANCELLED" | "QUEUED" | "PROCESSING";
716
- ZypheApiKey: {
717
- allowedOrigins: string[];
718
- /** Format: date-time */
719
- createdAt?: string | null;
720
- description?: string | null;
721
- id: string;
722
- key: string;
723
- keyType: string;
724
- name?: string | null;
725
- options: {
726
- [key: string]: unknown;
727
- };
728
- organization?: components$1["schemas"]["Organization"] | null;
729
- organizationId: string;
730
- /** Format: date-time */
731
- updatedAt?: string | null;
732
- };
733
- };
734
- responses: never;
735
- parameters: never;
736
- requestBodies: never;
737
- headers: never;
738
- pathItems: never;
739
- }
740
-
741
- type SdkCreateVerificationRequestResponse = components$1["schemas"]["SdkCreateVerificationRequestResponse"];
742
- /**
743
- * Parameters for initializing the Zyphe iframe for a Flow.
744
- * These will remain constant for each user that visits the Flow URL.
745
- */
746
- interface InitializeZypheFlowParams {
747
- /**
748
- * The ID of the Flow
749
- * UUID v4 format
750
- * @example "4810bc63-bfdd-4487-ae57-c939046f56b6"
751
- */
752
- flowId: string;
753
- /**
754
- * The ID of the FlowStep
755
- * UUID v4 format
756
- * @example "4810bc63-bfdd-4487-ae57-c939046f56b6"
757
- */
758
- flowStepId: string;
759
- /**
760
- * The email of the user.
761
- * @example "user@example.com"
762
- */
763
- email: string;
764
- /**
765
- * The type of Flow URL.
766
- * The third path segment of your Flow URL.
767
- * @example "http://localhost:5173/flow/flowSlug/kyc/stepSlug"
768
- */
769
- product: "kyc";
770
- /**
771
- * Whether the Flow is a "sandbox" Flow.
772
- *
773
- * This will prepend "sandbox" to the final URL.
774
- * @example "http://localhost:5173/sandbox/flow/flowSlug/kyc/stepSlug"
775
- */
776
- isSandbox: boolean;
777
- /**
778
- * Custom data to be passed to the Flow.
779
- * @example { "custom_data": "custom_value" }
780
- */
781
- customData?: Record<string, string>;
782
- }
783
- interface SDKOptions {
784
- apiKey: string;
785
- environment: Environment;
786
- /**
787
- * If set, the QR code displayed on desktop devices of a Document Verification flow will direct to this URL.
788
- * If not set, the QR code will direct to the corresponding zyphe.com URL, depending upon your configured environment.
789
- *
790
- * The URL will include the query parameters `zypheVr` and `zypheToken`.
791
- *
792
- * @default "https://app-dev.zyphe.com" || "https://verify.zyphe.com"
793
- * @example "http://example.com"
794
- */
795
- handoffBaseUrl?: string;
796
- /**
797
- * The main background color of the page.
798
- * This will override the primary color configured in verify.zyphe.com
799
- *
800
- * The accepted values are flexible, but we recommend a hex code.
801
- * @example "#000000"
802
- */
803
- primaryColor?: string;
804
- /**
805
- * The accent color of the page, used for buttons, icons, etc.
806
- * This will override the secondary color configured in verify.zyphe.com
807
- *
808
- * The accepted values are flexible, but we recommend a hex code.
809
- * @example "#000000"
810
- */
811
- secondaryColor?: string;
812
- /**
813
- * If true, the verification session will be displayed in "fullscreen" mode.
814
- */
815
- isFullscreen?: boolean;
816
- }
817
-
818
- interface components {
819
- schemas: {
820
- AddressData: {
821
- addressLine?: string | null;
822
- building: string;
823
- city: string;
824
- country: string;
825
- flat: string;
826
- houseNumber: string;
827
- postalCode: string;
828
- street: string;
829
- };
830
- AmlEntityResponse: {
831
- address?: string[];
832
- birthCountry?: string[];
833
- birthDate?: string[];
834
- birthPlace?: string[];
835
- country?: string[];
836
- email?: string[];
837
- firstName?: string[];
838
- gender?: string[];
839
- lastName?: string[];
840
- middleName?: string[];
841
- name?: string[];
842
- nationality?: string[];
843
- occupancies?: components["schemas"]["AmlOccupancy"][];
844
- phone?: string[];
845
- position?: string[];
846
- sanctions?: components["schemas"]["AmlSanction"][];
847
- title?: string[];
848
- topics?: string[];
849
- };
850
- AmlOccupancy: {
851
- endDate?: string[];
852
- post?: components["schemas"]["AmlPosition"][];
853
- startDate?: string[];
854
- status?: string[];
855
- };
856
- AmlOrganization: {
857
- country?: string[];
858
- description?: string[];
859
- name?: string[];
860
- summary?: string[];
861
- };
862
- AmlPosition: {
863
- country?: string[];
864
- description?: string[];
865
- dissolutionDate?: string[];
866
- inceptionDate?: string[];
867
- name?: string[];
868
- numberOfSeats?: number[];
869
- organization?: components["schemas"]["AmlOrganization"][];
870
- subnationalArea?: string[];
871
- summary?: string[];
872
- topics?: string[];
873
- };
874
- AmlResult: {
875
- /** Format: date-time */
876
- createdAt: string;
877
- data: {
878
- [key: string]: unknown;
879
- };
880
- id: string;
881
- pep: boolean;
882
- sanctions: boolean;
883
- /** Format: date-time */
884
- updatedAt: string;
885
- verificationRequestId?: string | null;
886
- };
887
- AmlSanction: {
888
- authority?: string[];
889
- authorityId?: string[];
890
- country?: string[];
891
- date?: string[];
892
- duration?: string[];
893
- endDate?: string[];
894
- listingDate?: string[];
895
- program?: string[];
896
- reason?: string[];
897
- startDate?: string[];
898
- status?: string[];
899
- unscId?: string[];
900
- };
901
- AmlSearchResponse: components["schemas"]["AmlEntityResponse"][];
902
- /** @enum {string} */
903
- ApiKeyType: "PUBLISHABLE" | "SECRET";
904
- BaxeError: {
905
- /** Format: int32 */
906
- code: number;
907
- errorTag: components["schemas"]["ErrorTags"];
908
- message?: string | null;
909
- };
910
- BusinessInformation: {
911
- address: string;
912
- businessActivity: string;
913
- city: string;
914
- companyName: string;
915
- companyType: string;
916
- contactEmail: string;
917
- country: string;
918
- incorporationDate: string;
919
- postZipCode: string;
920
- registrationNumber: string;
921
- };
922
- CountriesFilter: {
923
- accepted: string[];
924
- blocked: string[];
925
- };
926
- CreateVerificationRequestPayload: {
927
- continueUrl?: string | null;
928
- cookiesPolicyAccepted: boolean;
929
- customData?: {
930
- [key: string]: unknown;
931
- } | null;
932
- email: string;
933
- flowStepId: string;
934
- privacyPolicyAccepted: boolean;
935
- termsAndConditionsAccepted: boolean;
936
- };
937
- CreateVerificationRequestResponse: {
938
- verificationRequest: components["schemas"]["VerificationRequest"];
939
- websocketNamespace: string;
940
- };
941
- Document: {
942
- /** Format: date-time */
943
- createdAt: string;
944
- /** Format: date-time */
945
- expiresAt?: string | null;
946
- id: string;
947
- metadata: unknown;
948
- path: string;
949
- /** Format: int32 */
950
- type: number;
951
- typeName: string;
952
- /** Format: date-time */
953
- updatedAt: string;
954
- vaultId: string;
955
- };
956
- DocumentData: {
957
- documentCan?: string;
958
- documentClassCode?: string;
959
- documentNumber: string;
960
- /** Format: date */
961
- expiryDate?: string | null;
962
- issuingAuthority: string;
963
- /** Format: date */
964
- issuingDate?: string | null;
965
- issuingState: string;
966
- mrzStrings?: string;
967
- };
968
- DocumentFormatFilter: {
969
- formats: string[];
970
- };
971
- DocumentImage: {
972
- path: string;
973
- type: string;
974
- };
975
- DocumentTypeFilter: {
976
- types: string[];
977
- };
978
- DocumentUpload: {
979
- filename: string;
980
- presignedUrl?: string | null;
981
- };
982
- DvConfig: {
983
- allowedDocumentsPerCountry?: {
984
- [key: string]: string[];
985
- } | null;
986
- countriesFilter?: components["schemas"]["CountriesFilter"] | null;
987
- documentFormatsFilter?: components["schemas"]["DocumentFormatFilter"] | null;
988
- documentTypesFilter?: components["schemas"]["DocumentTypeFilter"] | null;
989
- /** @example { "en_button_label": "Next step" } */
990
- labels?: {
991
- [key: string]: string;
992
- };
993
- /** Format: int32 */
994
- minimumAge: number;
995
- skipLiveness?: boolean;
996
- thresholds?: {
997
- documentScorePercent?: number;
998
- portraitMatchPercent?: number;
999
- } | null;
1000
- };
1001
- /** @enum {string} */
1002
- DvConfigThreshold: "documentScorePercent" | "portraitMatchPercent";
1003
- /** @enum {string} */
1004
- DvReason: "UNKNOWN" | "WRONG_DOCUMENT_TYPE" | "COUNTRY_FILTER" | "FACE_MATCH_CHECK" | "OVERALL_STATUS" | "DOCUMENT_COUNTRY_MISMATCH" | "DOCUMENT_COUNTRY_MISSING" | "DATE_OF_EXPIRY_NOT_VALID" | "DATE_OF_EXPIRY_NOT_READABLE" | "DATE_OF_EXPIRY_FIELD_MISSING" | "DOCUMENT_ALREADY_USED_BY_ANOTHER_USER" | "DOCUMENT_FINGERPRINT_COMPUTATION" | "SECURITY_CHECK_FAILED" | "DOCUMENT_SCORE_BELOW_THRESHOLD" | "DOCUMENT_TYPE_NOT_DEFINED" | "LIVENESS_CHECK_FAILED" | "DOCUMENT_NOT_FOUND" | "DATE_OF_BIRTH_BELOW_MINIMUM_AGE";
1005
- DvResult: {
1006
- browser?: string | null;
1007
- class?: string | null;
1008
- /** Format: date-time */
1009
- createdAt?: string | null;
1010
- data: {
1011
- [key: string]: unknown;
1012
- };
1013
- documentId?: string | null;
1014
- /** Format: int32 */
1015
- documentScorePercent?: number | null;
1016
- /** Format: int32 */
1017
- documentType?: number | null;
1018
- firstName?: string | null;
1019
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1020
- id: string;
1021
- lastName?: string | null;
1022
- platform?: string | null;
1023
- /** Format: int32 */
1024
- portraitMatchPercent?: number | null;
1025
- processAdditionalData: {
1026
- [key: string]: unknown;
1027
- };
1028
- reasons: components["schemas"]["DvReason"][];
1029
- status: components["schemas"]["ResultStatus"];
1030
- /** Format: date-time */
1031
- updatedAt?: string | null;
1032
- verificationRequestId?: string | null;
1033
- };
1034
- /** @enum {string} */
1035
- 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" | "authentication_request_not_found" | "invalid_magic_link" | "user_disabled" | "invalid_verify_link" | "missing_authorization_header" | "invalid_authorization_header" | "token_generation" | "user_not_found" | "authentication_request_expired" | "authentication_request_already_used" | "verification_session_expired" | "email_already_taken" | "invalid_invite" | "wrong_invite_user" | "invite_not_found" | "email_already_verified" | "flow_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_revoked" | "invite_expired" | "form_not_found" | "form_in_use" | "flow_step_configuration_not_found" | "organization_product_not_active" | "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";
1036
- /** @enum {string} */
1037
- FilterOperator: "unfiltered" | "in" | "equals" | "not-in" | "not-equals" | "contains";
1038
- Flow: {
1039
- /** Format: date-time */
1040
- createdAt?: string | null;
1041
- extendedWebhook: boolean;
1042
- id: string;
1043
- name: string;
1044
- slug: string;
1045
- steps: components["schemas"]["FlowStep"][];
1046
- successUrl: string;
1047
- /** Format: date-time */
1048
- updatedAt?: string | null;
1049
- webhookUrl: string;
1050
- };
1051
- FlowResult: {
1052
- amlResults: components["schemas"]["AmlResult"][];
1053
- /** Format: date-time */
1054
- createdAt?: string | null;
1055
- customData: {
1056
- [key: string]: unknown;
1057
- };
1058
- dvResults: components["schemas"]["DvResult"][];
1059
- flow?: components["schemas"]["Flow"] | null;
1060
- flowSlug: string;
1061
- formResults: components["schemas"]["FormResult"][];
1062
- id: string;
1063
- identity?: components["schemas"]["Identity"] | null;
1064
- kybResults: components["schemas"]["KybResult"][];
1065
- organization?: components["schemas"]["Organization"] | null;
1066
- organizationId: string;
1067
- poaResults: components["schemas"]["PoaResult"][];
1068
- spidResults: components["schemas"]["SpidResult"][];
1069
- /** Format: date-time */
1070
- updatedAt?: string | null;
1071
- };
1072
- FlowStep: {
1073
- config: components["schemas"]["DvConfig"];
1074
- /** Format: date-time */
1075
- createdAt?: string | null;
1076
- flowId: string;
1077
- gotoStepId?: string | null;
1078
- id: string;
1079
- name: string;
1080
- /** Format: int32 */
1081
- order: number;
1082
- slug: string;
1083
- successUrl?: string | null;
1084
- /** @enum {string} */
1085
- type: "DV";
1086
- /** Format: date-time */
1087
- updatedAt?: string | null;
1088
- } | {
1089
- config: components["schemas"]["FormConfig"];
1090
- /** Format: date-time */
1091
- createdAt?: string | null;
1092
- flowId: string;
1093
- gotoStepId?: string | null;
1094
- id: string;
1095
- name: string;
1096
- /** Format: int32 */
1097
- order: number;
1098
- slug: string;
1099
- successUrl?: string | null;
1100
- /** @enum {string} */
1101
- type: "FORM";
1102
- /** Format: date-time */
1103
- updatedAt?: string | null;
1104
- } | {
1105
- config: components["schemas"]["PoaConfig"];
1106
- /** Format: date-time */
1107
- createdAt?: string | null;
1108
- flowId: string;
1109
- gotoStepId?: string | null;
1110
- id: string;
1111
- name: string;
1112
- /** Format: int32 */
1113
- order: number;
1114
- slug: string;
1115
- successUrl?: string | null;
1116
- /** @enum {string} */
1117
- type: "POA";
1118
- /** Format: date-time */
1119
- updatedAt?: string | null;
1120
- } | {
1121
- config: components["schemas"]["KybConfig"];
1122
- /** Format: date-time */
1123
- createdAt?: string | null;
1124
- flowId: string;
1125
- gotoStepId?: string | null;
1126
- id: string;
1127
- name: string;
1128
- /** Format: int32 */
1129
- order: number;
1130
- slug: string;
1131
- successUrl?: string | null;
1132
- /** @enum {string} */
1133
- type: "KYB";
1134
- /** Format: date-time */
1135
- updatedAt?: string | null;
1136
- } | {
1137
- config: components["schemas"]["SpidConfig"];
1138
- /** Format: date-time */
1139
- createdAt?: string | null;
1140
- flowId: string;
1141
- gotoStepId?: string | null;
1142
- id: string;
1143
- name: string;
1144
- /** Format: int32 */
1145
- order: number;
1146
- slug: string;
1147
- successUrl?: string | null;
1148
- /** @enum {string} */
1149
- type: "SPID";
1150
- /** Format: date-time */
1151
- updatedAt?: string | null;
1152
- };
1153
- FlowStepConfig: components["schemas"]["DvConfig"] | components["schemas"]["FormConfig"] | components["schemas"]["PoaConfig"] | components["schemas"]["KybConfig"] | components["schemas"]["SpidConfig"];
1154
- Form: {
1155
- /** Format: date-time */
1156
- createdAt?: string | null;
1157
- description?: string | null;
1158
- id: string;
1159
- name: string;
1160
- organizationId: string;
1161
- sections: components["schemas"]["FormSection"][];
1162
- /** Format: date-time */
1163
- updatedAt?: string | null;
1164
- };
1165
- FormAnswerSection: {
1166
- answers: {
1167
- [key: string]: unknown;
1168
- };
1169
- name: string;
1170
- };
1171
- FormConfig: {
1172
- form?: components["schemas"]["Form"] | null;
1173
- formId: string;
1174
- /** @example { "default": "Next step" } */
1175
- labels?: {
1176
- [key: string]: string;
1177
- };
1178
- };
1179
- FormItem: {
1180
- content: components["schemas"]["InputField"];
1181
- /** @enum {string} */
1182
- type: "InputField";
1183
- } | {
1184
- content: components["schemas"]["Plaintext"];
1185
- /** @enum {string} */
1186
- type: "Plaintext";
1187
- } | {
1188
- /** @enum {string} */
1189
- type: "Separator";
1190
- };
1191
- /** @enum {string} */
1192
- FormReason: "UNKNOWN";
1193
- FormResult: {
1194
- /** Format: date-time */
1195
- createdAt?: string | null;
1196
- flowResultId: string;
1197
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1198
- flowStepId?: string | null;
1199
- form?: components["schemas"]["Form"] | null;
1200
- id: string;
1201
- reason?: components["schemas"]["FormReason"] | null;
1202
- sections: components["schemas"]["FormSection"][];
1203
- status: components["schemas"]["ResultStatus"];
1204
- /** Format: date-time */
1205
- updatedAt?: string | null;
1206
- verificationRequestId?: string | null;
1207
- };
1208
- FormSection: {
1209
- items: components["schemas"]["FormItem"][];
1210
- label: {
1211
- [key: string]: string;
1212
- };
1213
- name: string;
1214
- };
1215
- GetApiKeyResponse: {
1216
- apiKey: components["schemas"]["ZypheApiKey"];
1217
- };
1218
- GetFlowResponse: {
1219
- flow: components["schemas"]["Flow"];
1220
- };
1221
- GetFormResponse: {
1222
- form: components["schemas"]["Form"];
1223
- };
1224
- GetFullFlowResponse: {
1225
- flow: components["schemas"]["Flow"];
1226
- organizationName: string;
1227
- settings: components["schemas"]["Settings"];
1228
- };
1229
- GetVerificationRequestResponse: {
1230
- identity: components["schemas"]["Identity"];
1231
- verificationRequest: components["schemas"]["VerificationRequest"];
1232
- };
1233
- Identity: {
1234
- /** Format: date-time */
1235
- createdAt?: string | null;
1236
- defaultOrganizationId?: string | null;
1237
- email: string;
1238
- emailVerified: boolean;
1239
- id: string;
1240
- isActive: boolean;
1241
- role: components["schemas"]["Role"];
1242
- /** Format: date-time */
1243
- updatedAt?: string | null;
1244
- zid: string;
1245
- };
1246
- Image: {
1247
- /** Format: int32 */
1248
- containerType: number;
1249
- /** Format: int64 */
1250
- lightIndex: number;
1251
- /** Format: int64 */
1252
- pageIndex: number;
1253
- source: string;
1254
- value: string;
1255
- };
1256
- InputField: {
1257
- label: {
1258
- [key: string]: string;
1259
- };
1260
- name: string;
1261
- options: {
1262
- [key: string]: string;
1263
- };
1264
- required: boolean;
1265
- type: components["schemas"]["InputFieldType"];
1266
- value?: unknown;
1267
- };
1268
- /** @enum {string} */
1269
- InputFieldType: "date" | "text" | "textarea" | "checkbox";
1270
- KybConfig: {
1271
- kycFlowId: string;
1272
- /** @example { "default": "Next step" } */
1273
- labels?: {
1274
- [key: string]: string;
1275
- };
1276
- /**
1277
- * Format: int32
1278
- * @default 10
1279
- * @example 5
1280
- */
1281
- maxFileUploads: number;
1282
- /**
1283
- * Format: int32
1284
- * @default 10
1285
- * @example 3
1286
- */
1287
- maxUbos: number;
1288
- };
1289
- KybResult: {
1290
- businessInformation?: components["schemas"]["BusinessInformation"] | null;
1291
- /** Format: date-time */
1292
- createdAt?: string | null;
1293
- documentUploads?: components["schemas"]["DocumentUpload"][] | null;
1294
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1295
- id: string;
1296
- pepAndSanctionsStatus: components["schemas"]["PepAndSanctionsStatus"];
1297
- reason?: string | null;
1298
- report?: string | null;
1299
- status: components["schemas"]["ModerationResultStatus"];
1300
- uboDefinitions?: components["schemas"]["UboDefinition"][] | null;
1301
- /** Format: date-time */
1302
- updatedAt?: string | null;
1303
- verificationRequestId?: string | null;
1304
- };
1305
- /** @enum {string} */
1306
- Locale: "en";
1307
- ModerateKybResultPayload: {
1308
- pepAndSanctionsStatus?: components["schemas"]["PepAndSanctionsStatusField"] | null;
1309
- /** Format: binary */
1310
- reportFile?: Blob | null;
1311
- status?: components["schemas"]["ModerationResultStatusField"] | null;
1312
- };
1313
- ModerateKybResultResponse: {
1314
- success: boolean;
1315
- };
1316
- /** @enum {string} */
1317
- ModerationResultStatus: "ACQUIRING" | "PENDING_MODERATION" | "SUCCESS" | "FAILED";
1318
- ModerationResultStatusField: components["schemas"]["ModerationResultStatus"];
1319
- Organization: {
1320
- address: string;
1321
- country: string;
1322
- /** Format: date-time */
1323
- createdAt?: string | null;
1324
- email: string;
1325
- id: string;
1326
- industry?: string | null;
1327
- name: string;
1328
- phone: string;
1329
- postcode?: string | null;
1330
- registrationNumber: string;
1331
- settings?: components["schemas"]["Settings"] | null;
1332
- slug: string;
1333
- /** Format: date-time */
1334
- updatedAt?: string | null;
1335
- website: string;
1336
- };
1337
- Pagination: {
1338
- /** @example createdAt:in:2025-01-01,2025-01-02;updatedAt:gt:2025-01-02 */
1339
- filter?: string;
1340
- /**
1341
- * Format: int32
1342
- * @example 0
1343
- */
1344
- skip?: number;
1345
- /** @example createdAt:desc */
1346
- sort?: string;
1347
- /**
1348
- * Format: int32
1349
- * @example 100
1350
- */
1351
- take?: number;
1352
- };
1353
- /** @enum {string} */
1354
- PepAndSanctionsStatus: "REVIEW" | "PENDING" | "SUCCESS" | "FAILED" | "IN_PROGRESS";
1355
- PepAndSanctionsStatusField: components["schemas"]["PepAndSanctionsStatus"];
1356
- PersonalData: {
1357
- dateOfBirth: string;
1358
- gender: string;
1359
- givenName: string;
1360
- nationality: string;
1361
- personalNumber?: string;
1362
- placeOfBirth?: string;
1363
- surname: string;
1364
- };
1365
- Plaintext: {
1366
- text: {
1367
- [key: string]: string;
1368
- };
1369
- };
1370
- PoaConfig: {
1371
- documentFilter: components["schemas"]["PoaDocumentType"][];
1372
- /** @example { "default": "Next step" } */
1373
- labels?: {
1374
- [key: string]: string;
1375
- };
1376
- /**
1377
- * Format: int32
1378
- * @example 90
1379
- */
1380
- maxAgeDays?: number;
1381
- };
1382
- /** @enum {string} */
1383
- PoaDocumentType: "PAY_SLIP" | "UTILITY_BILL" | "FINANCIAL_DOCUMENT" | "RECEIPT" | "INVOICE" | "BANK_DOCUMENT";
1384
- /** @enum {string} */
1385
- PoaReason: "UNKNOWN" | "DOCUMENT_TYPE_NOT_ALLOWED" | "NAME_MISMATCH" | "DATE_TOO_OLD" | "INVALID_DOCUMENT";
1386
- PoaResult: {
1387
- /** Format: date-time */
1388
- checkedAt?: string | null;
1389
- /** Format: date-time */
1390
- createdAt: string;
1391
- documentId?: string | null;
1392
- documentType?: components["schemas"]["PoaDocumentType"] | null;
1393
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1394
- id: string;
1395
- reason?: components["schemas"]["PoaReason"] | null;
1396
- status: components["schemas"]["ResultStatus"];
1397
- /** Format: date-time */
1398
- updatedAt: string;
1399
- verificationRequestId?: string | null;
1400
- };
1401
- ProcessAddressDocumentRequest: {
1402
- /** Format: binary */
1403
- file: Blob;
1404
- };
1405
- ProcessAddressDocumentResponse: {
1406
- jobId: string;
1407
- verificationRequestId: string;
1408
- websocketNamespace: string;
1409
- };
1410
- /** @enum {string} */
1411
- ProductType: "UNKNOWN" | "KYC" | "KYB" | "PRODUCTION_MODE" | "SPID";
1412
- /** @enum {string} */
1413
- ResultStatus: "PASSED" | "FAILED";
1414
- /** @enum {string} */
1415
- Role: "GUEST" | "USER" | "ADMIN";
1416
- SdkCreateVerificationRequestPayload: {
1417
- customData?: {
1418
- [key: string]: unknown;
1419
- } | null;
1420
- email: string;
1421
- flowStepId: string;
1422
- };
1423
- SdkCreateVerificationRequestResponse: {
1424
- email: string;
1425
- flowSlug: string;
1426
- flowStepSlug: string;
1427
- isSandbox: boolean;
1428
- verificationRequest: components["schemas"]["VerificationRequest"];
1429
- websocketNamespace: string;
1430
- zypheToken: string;
1431
- };
1432
- Settings: {
1433
- /** Format: date-time */
1434
- createdAt?: string | null;
1435
- extendedWebhook?: boolean | null;
1436
- primaryColor?: string | null;
1437
- profileImage?: string | null;
1438
- secondaryColor?: string | null;
1439
- /** Format: date-time */
1440
- updatedAt?: string | null;
1441
- webhookSecret?: string | null;
1442
- };
1443
- SpidConfig: {
1444
- /** @example { "default": "Next step" } */
1445
- labels?: {
1446
- [key: string]: string;
1447
- };
1448
- };
1449
- SpidResult: {
1450
- /** Format: date-time */
1451
- createdAt?: string | null;
1452
- flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1453
- id: string;
1454
- path: string;
1455
- reason?: string | null;
1456
- status: components["schemas"]["ResultStatus"];
1457
- /** Format: date-time */
1458
- updatedAt?: string | null;
1459
- verificationRequestId?: string | null;
1460
- };
1461
- SpidResultDetails: {
1462
- address?: string | null;
1463
- companyName?: string | null;
1464
- companyVatNumber?: string | null;
1465
- countryOfBirth?: string | null;
1466
- dateOfBirth?: string | null;
1467
- digitalAddress?: string | null;
1468
- email?: string | null;
1469
- firstName?: string | null;
1470
- fiscalNumber?: string | null;
1471
- fullName?: string | null;
1472
- gender?: string | null;
1473
- id?: string | null;
1474
- lastName?: string | null;
1475
- mobilePhone?: string | null;
1476
- placeOfBirth?: string | null;
1477
- registeredOffice?: string | null;
1478
- spidCode?: string | null;
1479
- username?: string | null;
1480
- };
1481
- UboDefinition: {
1482
- country: string;
1483
- dateOfBirth: string;
1484
- emailAddress: string;
1485
- firstName: string;
1486
- gender: string;
1487
- lastName: string;
1488
- };
1489
- /** @enum {string} */
1490
- ValidationMessages: "validation_unexpected" | "validation_invalid_file_format" | "validation_organization_slug_exists" | "validation_flow_slug_exists" | "validation_flow_id_mismatch" | "validation_flow_step_name_exists" | "validation_consents_not_granted" | "validation_kyb_config_match" | "validation_kyb_config_already_uses_this_kyc_flow_id" | "validation_kyb_moderation_status_wrong" | "validation_form_name_exists" | "validation_database_error" | "validation_flow_name_invalid" | "validation_flow_slug_name_invalid" | "validation_flow_step_name_invalid" | "validation_flow_step_order_duplicate" | "validation_flow_step_order_invalid" | "validation_flow_step_id_mismatch" | "validation_password_too_short" | "validation_password_no_uppercase" | "validation_password_no_lowercase" | "validation_password_no_number" | "validation_password_no_special_character" | "validation_password_contains_whitespace_or_control";
1491
- VerificationRequest: {
1492
- amlResult?: components["schemas"]["AmlResult"] | null;
1493
- /** Format: int32 */
1494
- attemptsCount: number;
1495
- /** Format: date-time */
1496
- createdAt?: string | null;
1497
- customData: {
1498
- [key: string]: unknown;
1499
- };
1500
- dvResult?: components["schemas"]["DvResult"] | null;
1501
- flowId: string;
1502
- flowStepId: string;
1503
- formResult?: components["schemas"]["FormResult"] | null;
1504
- id: string;
1505
- identity?: components["schemas"]["Identity"] | null;
1506
- identityId: string;
1507
- kybResult?: components["schemas"]["KybResult"] | null;
1508
- organizationId: string;
1509
- poaResult?: components["schemas"]["PoaResult"] | null;
1510
- reason?: string | null;
1511
- spidResult?: components["schemas"]["SpidResult"] | null;
1512
- status: components["schemas"]["VerificationRequestStatus"];
1513
- /** Format: date-time */
1514
- updatedAt?: string | null;
1515
- };
1516
- /** @enum {string} */
1517
- VerificationRequestStatus: "PENDING" | "COMPLETED" | "FAILED" | "CANCELLED" | "QUEUED" | "PROCESSING";
1518
- ZypheApiKey: {
1519
- allowedOrigins: string[];
1520
- /** Format: date-time */
1521
- createdAt?: string | null;
1522
- description?: string | null;
1523
- id: string;
1524
- key: string;
1525
- keyType: string;
1526
- name?: string | null;
1527
- options: {
1528
- [key: string]: unknown;
1529
- };
1530
- organization?: components["schemas"]["Organization"] | null;
1531
- organizationId: string;
1532
- /** Format: date-time */
1533
- updatedAt?: string | null;
1534
- };
1535
- };
1536
- responses: never;
1537
- parameters: never;
1538
- requestBodies: never;
1539
- headers: never;
1540
- pathItems: never;
1541
- }
1542
-
1543
- interface CreateVerificationSessionParams {
1544
- email: string;
1545
- flowId: string;
1546
- flowStepId: string;
1547
- isSandbox: boolean;
1548
- customData?: Record<string, string>;
1549
- }
1550
- declare function createVerificationSession({ email, flowId, flowStepId, isSandbox, customData, }: CreateVerificationSessionParams, opts: SDKOptions): Promise<openapi_fetch.FetchResponse<{
1551
- parameters: {
1552
- query?: {
1553
- sandbox?: boolean | null;
1554
- };
1555
- header?: never;
1556
- path: {
1557
- flow_id: string;
1558
- };
1559
- cookie?: never;
1560
- };
1561
- requestBody: {
1562
- content: {
1563
- "application/json": components["schemas"]["SdkCreateVerificationRequestPayload"];
1564
- };
1565
- };
1566
- responses: {
1567
- 200: {
1568
- headers: {
1569
- [name: string]: unknown;
1570
- };
1571
- content: {
1572
- "application/json": components["schemas"]["SdkCreateVerificationRequestResponse"];
1573
- };
1574
- };
1575
- 400: {
1576
- headers: {
1577
- [name: string]: unknown;
1578
- };
1579
- content: {
1580
- "application/json": components["schemas"]["BaxeError"];
1581
- };
1582
- };
1583
- 409: {
1584
- headers: {
1585
- [name: string]: unknown;
1586
- };
1587
- content: {
1588
- "application/json": components["schemas"]["BaxeError"];
1589
- };
1590
- };
1591
- 500: {
1592
- headers: {
1593
- [name: string]: unknown;
1594
- };
1595
- content: {
1596
- "application/json": components["schemas"]["BaxeError"];
1597
- };
1598
- };
1599
- };
1600
- }, {
1601
- body: {
1602
- email: string;
1603
- flowStepId: string;
1604
- customData: Record<string, string> | undefined;
1605
- };
1606
- headers: {
1607
- "x-api-key": string;
1608
- };
1609
- params: {
1610
- path: {
1611
- flow_id: string;
1612
- };
1613
- query: {
1614
- sandbox: boolean;
1615
- };
1616
- };
1617
- }, `${string}/${string}`>>;
1618
- declare function constructVerificationSessionUrl({ flowParams, verificationSession, opts, }: {
1619
- flowParams: InitializeZypheFlowParams;
1620
- verificationSession: SdkCreateVerificationRequestResponse;
1621
- opts: SDKOptions;
1622
- }): string;
1623
-
1624
- interface SignatureComponents {
1625
- timestamp: string;
1626
- signatureHex: string;
1627
- }
1628
- /**
1629
- * Parses a webhook signature header of the form "t=<timestamp>,v0=<signature>"
1630
- * @param signatureHeader - The header string, e.g. "t=1234567890,v0=abcdef..."
1631
- * @returns The parsed timestamp and signature hex
1632
- */
1633
- declare function parseSignatureHeader(signatureHeader: string): SignatureComponents;
1634
- /**
1635
- * Converts a hex string to a Uint8Array
1636
- * @param hex - The hex string to convert
1637
- * @returns The resulting Uint8Array
1638
- */
1639
- declare function hexToBytes(hex: string): Uint8Array;
1640
- /**
1641
- * Converts an ArrayBuffer to a hex string
1642
- * @param buffer - The buffer to convert
1643
- * @returns The hex string representation
1644
- */
1645
- declare function bufferToHex(buffer: ArrayBuffer): string;
1646
- /**
1647
- * Compares two strings in constant time to prevent timing attacks
1648
- * @param a - First string
1649
- * @param b - Second string
1650
- * @returns True if strings are equal, false otherwise
1651
- */
1652
- declare function timingSafeEqual(a: string, b: string): boolean;
1653
- declare const WebhookSignatureErrorCodes: {
1654
- readonly MISSING_SIGNATURE_HEADER: 1;
1655
- readonly INVALID_SIGNATURE_HEADER: 2;
1656
- readonly SIGNATURE_MISMATCH: 3;
1657
- };
1658
- declare const WebhookSignatureErrorMessages: {
1659
- readonly 1: "Missing signature header";
1660
- readonly 2: "Invalid signature header";
1661
- readonly 3: "Signature mismatch";
1662
- };
1663
- interface WebhookVerifierOptions<T extends Function> {
1664
- /**
1665
- * The hex-encoded secret key used to verify the signature
1666
- */
1667
- secretHex: string;
1668
- /**
1669
- * The name of the header containing the signature
1670
- * @default "x-signature"
1671
- */
1672
- signatureHeader?: string;
1673
- /**
1674
- * Optional function to handle unauthorized requests
1675
- * @default Returns 401 Unauthorized with JSON error
1676
- */
1677
- onUnauthorized?: T;
1678
- /**
1679
- * Whether to make the raw body available on req.rawBody
1680
- * @default true
1681
- */
1682
- exposeRawBody?: boolean;
1683
- }
1684
-
1685
- export { API_KEY_HEADER, type Environment, EnvironmentConfigs, Environments, type InitializeZypheFlowParams, type SDKOptions, type SdkCreateVerificationRequestResponse, type SignatureComponents, WebhookSignatureErrorCodes, WebhookSignatureErrorMessages, type WebhookVerifierOptions, bufferToHex, constructVerificationSessionUrl, createVerificationSession, hexToBytes, parseSignatureHeader, timingSafeEqual };