@zyphe-sdk/core 0.1.13 → 0.1.14

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.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as openapi_fetch from 'openapi-fetch';
2
+ import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
3
 
3
4
  declare const Environments: {
4
5
  readonly LOCAL: "local";
@@ -13,808 +14,6 @@ interface EnvironmentConfig {
13
14
  declare const EnvironmentConfigs: Record<Environment, EnvironmentConfig>;
14
15
  declare const API_KEY_HEADER = "x-api-key";
15
16
 
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
17
  interface components {
819
18
  schemas: {
820
19
  AddressData: {
@@ -1001,7 +200,7 @@ interface components {
1001
200
  /** @enum {string} */
1002
201
  DvConfigThreshold: "documentScorePercent" | "portraitMatchPercent";
1003
202
  /** @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";
203
+ DvReason: "UNKNOWN" | "WRONG_DOCUMENT_TYPE" | "COUNTRY_FILTER" | "FACE_MATCH_CHECK" | "FACE_MATCH_CHECK_ONE_CLICK" | "OVERALL_STATUS" | "DOCUMENT_COUNTRY_MISMATCH" | "DOCUMENT_COUNTRY_MISSING" | "DATE_OF_EXPIRY_NOT_VALID" | "DATE_OF_EXPIRY_NOT_READABLE" | "DATE_OF_EXPIRY_FIELD_MISSING" | "DOCUMENT_ALREADY_USED_BY_ANOTHER_USER" | "DOCUMENT_FINGERPRINT_COMPUTATION" | "SECURITY_CHECK_FAILED" | "DOCUMENT_SCORE_BELOW_THRESHOLD" | "DOCUMENT_TYPE_NOT_DEFINED" | "LIVENESS_CHECK_FAILED" | "DOCUMENT_NOT_FOUND" | "DATE_OF_BIRTH_BELOW_MINIMUM_AGE" | "DOCUMENT_TYPE_CHECK";
1005
204
  DvResult: {
1006
205
  browser?: string | null;
1007
206
  class?: string | null;
@@ -1039,6 +238,7 @@ interface components {
1039
238
  /** Format: date-time */
1040
239
  createdAt?: string | null;
1041
240
  extendedWebhook: boolean;
241
+ failureUrl?: string | null;
1042
242
  id: string;
1043
243
  name: string;
1044
244
  slug: string;
@@ -1073,6 +273,7 @@ interface components {
1073
273
  config: components["schemas"]["DvConfig"];
1074
274
  /** Format: date-time */
1075
275
  createdAt?: string | null;
276
+ failureUrl?: string | null;
1076
277
  flowId: string;
1077
278
  gotoStepId?: string | null;
1078
279
  id: string;
@@ -1089,6 +290,7 @@ interface components {
1089
290
  config: components["schemas"]["FormConfig"];
1090
291
  /** Format: date-time */
1091
292
  createdAt?: string | null;
293
+ failureUrl?: string | null;
1092
294
  flowId: string;
1093
295
  gotoStepId?: string | null;
1094
296
  id: string;
@@ -1105,6 +307,7 @@ interface components {
1105
307
  config: components["schemas"]["PoaConfig"];
1106
308
  /** Format: date-time */
1107
309
  createdAt?: string | null;
310
+ failureUrl?: string | null;
1108
311
  flowId: string;
1109
312
  gotoStepId?: string | null;
1110
313
  id: string;
@@ -1121,6 +324,7 @@ interface components {
1121
324
  config: components["schemas"]["KybConfig"];
1122
325
  /** Format: date-time */
1123
326
  createdAt?: string | null;
327
+ failureUrl?: string | null;
1124
328
  flowId: string;
1125
329
  gotoStepId?: string | null;
1126
330
  id: string;
@@ -1137,6 +341,7 @@ interface components {
1137
341
  config: components["schemas"]["SpidConfig"];
1138
342
  /** Format: date-time */
1139
343
  createdAt?: string | null;
344
+ failureUrl?: string | null;
1140
345
  flowId: string;
1141
346
  gotoStepId?: string | null;
1142
347
  id: string;
@@ -1408,7 +613,7 @@ interface components {
1408
613
  websocketNamespace: string;
1409
614
  };
1410
615
  /** @enum {string} */
1411
- ProductType: "UNKNOWN" | "KYC" | "KYB" | "PRODUCTION_MODE" | "SPID";
616
+ ProductType: "UNKNOWN" | "KYC" | "KYB" | "PRODUCTION_MODE" | "SPID" | "EXPORT_API" | "EXPORT_UI";
1412
617
  /** @enum {string} */
1413
618
  ResultStatus: "PASSED" | "FAILED";
1414
619
  /** @enum {string} */
@@ -1540,6 +745,84 @@ interface components {
1540
745
  pathItems: never;
1541
746
  }
1542
747
 
748
+ type SdkCreateVerificationRequestResponse = components["schemas"]["SdkCreateVerificationRequestResponse"];
749
+ type ApiKeyType = components["schemas"]["ApiKeyType"];
750
+ /**
751
+ * Parameters for initializing the Zyphe iframe for a Flow.
752
+ * These will remain constant for each user that visits the Flow URL.
753
+ */
754
+ interface InitializeZypheFlowParams {
755
+ /**
756
+ * The ID of the Flow
757
+ * UUID v4 format
758
+ * @example "4810bc63-bfdd-4487-ae57-c939046f56b6"
759
+ */
760
+ flowId: string;
761
+ /**
762
+ * The ID of the FlowStep
763
+ * UUID v4 format
764
+ * @example "4810bc63-bfdd-4487-ae57-c939046f56b6"
765
+ */
766
+ flowStepId: string;
767
+ /**
768
+ * The email of the user.
769
+ * @example "user@example.com"
770
+ */
771
+ email: string;
772
+ /**
773
+ * The type of Flow URL.
774
+ * The third path segment of your Flow URL.
775
+ * @example "http://localhost:5173/flow/flowSlug/kyc/stepSlug"
776
+ */
777
+ product: "kyc";
778
+ /**
779
+ * Whether the Flow is a "sandbox" Flow.
780
+ *
781
+ * This will prepend "sandbox" to the final URL.
782
+ * @example "http://localhost:5173/sandbox/flow/flowSlug/kyc/stepSlug"
783
+ */
784
+ isSandbox: boolean;
785
+ /**
786
+ * Custom data to be passed to the Flow.
787
+ * @example { "custom_data": "custom_value" }
788
+ */
789
+ customData?: Record<string, string>;
790
+ }
791
+ interface SDKOptions {
792
+ apiKey: string;
793
+ environment: Environment;
794
+ /**
795
+ * If set, the QR code displayed on desktop devices of a Document Verification flow will direct to this URL.
796
+ * If not set, the QR code will direct to the corresponding zyphe.com URL, depending upon your configured environment.
797
+ *
798
+ * The URL will include the query parameters `zypheVr` and `zypheToken`.
799
+ *
800
+ * @default "https://app-dev.zyphe.com" || "https://verify.zyphe.com"
801
+ * @example "http://example.com"
802
+ */
803
+ handoffBaseUrl?: string;
804
+ /**
805
+ * The main background color of the page.
806
+ * This will override the primary color configured in verify.zyphe.com
807
+ *
808
+ * The accepted values are flexible, but we recommend a hex code.
809
+ * @example "#000000"
810
+ */
811
+ primaryColor?: string;
812
+ /**
813
+ * The accent color of the page, used for buttons, icons, etc.
814
+ * This will override the secondary color configured in verify.zyphe.com
815
+ *
816
+ * The accepted values are flexible, but we recommend a hex code.
817
+ * @example "#000000"
818
+ */
819
+ secondaryColor?: string;
820
+ /**
821
+ * If true, the verification session will be displayed in "fullscreen" mode.
822
+ */
823
+ isFullscreen?: boolean;
824
+ }
825
+
1543
826
  interface CreateVerificationSessionParams {
1544
827
  email: string;
1545
828
  flowId: string;
@@ -1621,6 +904,327 @@ declare function constructVerificationSessionUrl({ flowParams, verificationSessi
1621
904
  opts: SDKOptions;
1622
905
  }): string;
1623
906
 
907
+ declare enum ImageProvenance {
908
+ UNSPECIFIED_IMAGE_PROVENANCE = 0,
909
+ FRONT_DOCUMENT_IMAGE = 1,
910
+ BACK_DOCUMENT_IMAGE = 2,
911
+ SIGNATURE_IMAGE = 3,
912
+ PORTRAIT_IMAGE = 5,
913
+ CITIZENSHIP_IMAGE = 6,
914
+ UNRECOGNIZED = -1
915
+ }
916
+ declare enum ResultStatus {
917
+ FAILED = 0,
918
+ PASSED = 1,
919
+ UNRECOGNIZED = -1
920
+ }
921
+ interface PersonalData {
922
+ givenName: string;
923
+ surname: string;
924
+ dateOfBirth: string;
925
+ nationality: string;
926
+ gender: string;
927
+ placeOfBirth: string;
928
+ personalNumber: string;
929
+ }
930
+ declare const PersonalData: MessageFns<PersonalData>;
931
+ interface DocumentData {
932
+ documentNumber: string;
933
+ issuingState: string;
934
+ issuingAuthority: string;
935
+ expiryDate: string;
936
+ documentClassCode: string;
937
+ mrzStrings: string;
938
+ documentCan: string;
939
+ }
940
+ declare const DocumentData: MessageFns<DocumentData>;
941
+ interface AddressData {
942
+ flat: string;
943
+ houseNumber: string;
944
+ building: string;
945
+ street: string;
946
+ city: string;
947
+ postalCode: string;
948
+ country: string;
949
+ addressLine: string;
950
+ }
951
+ declare const AddressData: MessageFns<AddressData>;
952
+ interface Image {
953
+ contentType: string;
954
+ data: Uint8Array;
955
+ provenance: ImageProvenance;
956
+ }
957
+ declare const Image: MessageFns<Image>;
958
+ interface Document {
959
+ personalData: PersonalData | undefined;
960
+ documentData: DocumentData | undefined;
961
+ addressData: AddressData | undefined;
962
+ }
963
+ declare const Document: MessageFns<Document>;
964
+ interface Details {
965
+ status: ResultStatus;
966
+ requestLog: string;
967
+ responseLog: string;
968
+ }
969
+ declare const Details: MessageFns<Details>;
970
+ interface Message {
971
+ document?: Document | undefined;
972
+ frontImage?: Image | undefined;
973
+ backImage?: Image | undefined;
974
+ otherImage?: Image | undefined;
975
+ details?: Details | undefined;
976
+ }
977
+ declare const Message: MessageFns<Message>;
978
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
979
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
980
+ [K in keyof T]?: DeepPartial<T[K]>;
981
+ } : Partial<T>;
982
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
983
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
984
+ [K in keyof P]: Exact<P[K], I[K]>;
985
+ } & {
986
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
987
+ };
988
+ interface MessageFns<T> {
989
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
990
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
991
+ fromJSON(object: any): T;
992
+ toJSON(message: T): unknown;
993
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
994
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
995
+ }
996
+
997
+ interface ParsedKycMessages extends Pick<Message, "document" | "frontImage" | "backImage" | "details"> {
998
+ otherImages?: Image[];
999
+ }
1000
+
1001
+ interface GetFlowResultParams {
1002
+ organizationId: string;
1003
+ flowResultId: string;
1004
+ isSandbox: boolean;
1005
+ }
1006
+ declare function getFlowResult({ organizationId, flowResultId, isSandbox }: GetFlowResultParams, opts: SDKOptions): Promise<{
1007
+ data: {
1008
+ dvResults: {
1009
+ browser?: string | null;
1010
+ class?: string | null;
1011
+ createdAt?: string | null;
1012
+ data: {
1013
+ [key: string]: unknown;
1014
+ };
1015
+ documentId?: string | null;
1016
+ documentScorePercent?: number | null;
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
+ portraitMatchPercent?: number | null;
1024
+ processAdditionalData: {
1025
+ [key: string]: unknown;
1026
+ };
1027
+ reasons: components["schemas"]["DvReason"][];
1028
+ status: components["schemas"]["ResultStatus"];
1029
+ updatedAt?: string | null;
1030
+ verificationRequestId?: string | null;
1031
+ }[] | undefined;
1032
+ amlResults: {
1033
+ createdAt: string;
1034
+ data: {
1035
+ [key: string]: unknown;
1036
+ };
1037
+ id: string;
1038
+ pep: boolean;
1039
+ sanctions: boolean;
1040
+ updatedAt: string;
1041
+ verificationRequestId?: string | null;
1042
+ }[] | undefined;
1043
+ poaResults: {
1044
+ checkedAt?: string | null;
1045
+ createdAt: string;
1046
+ documentId?: string | null;
1047
+ documentType?: components["schemas"]["PoaDocumentType"] | null;
1048
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1049
+ id: string;
1050
+ reason?: components["schemas"]["PoaReason"] | null;
1051
+ status: components["schemas"]["ResultStatus"];
1052
+ updatedAt: string;
1053
+ verificationRequestId?: string | null;
1054
+ }[] | undefined;
1055
+ createdAt?: string | null;
1056
+ customData?: {
1057
+ [key: string]: unknown;
1058
+ } | undefined;
1059
+ flow?: components["schemas"]["Flow"] | null;
1060
+ flowSlug?: string | undefined;
1061
+ formResults?: {
1062
+ createdAt?: string | null;
1063
+ flowResultId: string;
1064
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1065
+ flowStepId?: string | null;
1066
+ form?: components["schemas"]["Form"] | null;
1067
+ id: string;
1068
+ reason?: components["schemas"]["FormReason"] | null;
1069
+ sections: components["schemas"]["FormSection"][];
1070
+ status: components["schemas"]["ResultStatus"];
1071
+ updatedAt?: string | null;
1072
+ verificationRequestId?: string | null;
1073
+ }[] | undefined;
1074
+ id?: string | undefined;
1075
+ identity?: components["schemas"]["Identity"] | null;
1076
+ kybResults?: {
1077
+ businessInformation?: components["schemas"]["BusinessInformation"] | null;
1078
+ createdAt?: string | null;
1079
+ documentUploads?: components["schemas"]["DocumentUpload"][] | null;
1080
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1081
+ id: string;
1082
+ pepAndSanctionsStatus: components["schemas"]["PepAndSanctionsStatus"];
1083
+ reason?: string | null;
1084
+ report?: string | null;
1085
+ status: components["schemas"]["ModerationResultStatus"];
1086
+ uboDefinitions?: components["schemas"]["UboDefinition"][] | null;
1087
+ updatedAt?: string | null;
1088
+ verificationRequestId?: string | null;
1089
+ }[] | undefined;
1090
+ organization?: components["schemas"]["Organization"] | null;
1091
+ organizationId?: string | undefined;
1092
+ spidResults?: {
1093
+ createdAt?: string | null;
1094
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1095
+ id: string;
1096
+ path: string;
1097
+ reason?: string | null;
1098
+ status: components["schemas"]["ResultStatus"];
1099
+ updatedAt?: string | null;
1100
+ verificationRequestId?: string | null;
1101
+ }[] | undefined;
1102
+ updatedAt?: string | null;
1103
+ };
1104
+ error?: never;
1105
+ response: Response;
1106
+ } | {
1107
+ data: {
1108
+ dvResults: {
1109
+ browser?: string | null;
1110
+ class?: string | null;
1111
+ createdAt?: string | null;
1112
+ data: {
1113
+ [key: string]: unknown;
1114
+ };
1115
+ documentId?: string | null;
1116
+ documentScorePercent?: number | null;
1117
+ documentType?: number | null;
1118
+ firstName?: string | null;
1119
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1120
+ id: string;
1121
+ lastName?: string | null;
1122
+ platform?: string | null;
1123
+ portraitMatchPercent?: number | null;
1124
+ processAdditionalData: {
1125
+ [key: string]: unknown;
1126
+ };
1127
+ reasons: components["schemas"]["DvReason"][];
1128
+ status: components["schemas"]["ResultStatus"];
1129
+ updatedAt?: string | null;
1130
+ verificationRequestId?: string | null;
1131
+ }[] | undefined;
1132
+ amlResults: {
1133
+ createdAt: string;
1134
+ data: {
1135
+ [key: string]: unknown;
1136
+ };
1137
+ id: string;
1138
+ pep: boolean;
1139
+ sanctions: boolean;
1140
+ updatedAt: string;
1141
+ verificationRequestId?: string | null;
1142
+ }[] | undefined;
1143
+ poaResults: {
1144
+ checkedAt?: string | null;
1145
+ createdAt: string;
1146
+ documentId?: string | null;
1147
+ documentType?: components["schemas"]["PoaDocumentType"] | null;
1148
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1149
+ id: string;
1150
+ reason?: components["schemas"]["PoaReason"] | null;
1151
+ status: components["schemas"]["ResultStatus"];
1152
+ updatedAt: string;
1153
+ verificationRequestId?: string | null;
1154
+ }[] | undefined;
1155
+ createdAt?: string | null;
1156
+ customData?: {
1157
+ [key: string]: unknown;
1158
+ } | undefined;
1159
+ flow?: components["schemas"]["Flow"] | null;
1160
+ flowSlug?: string | undefined;
1161
+ formResults?: {
1162
+ createdAt?: string | null;
1163
+ flowResultId: string;
1164
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1165
+ flowStepId?: string | null;
1166
+ form?: components["schemas"]["Form"] | null;
1167
+ id: string;
1168
+ reason?: components["schemas"]["FormReason"] | null;
1169
+ sections: components["schemas"]["FormSection"][];
1170
+ status: components["schemas"]["ResultStatus"];
1171
+ updatedAt?: string | null;
1172
+ verificationRequestId?: string | null;
1173
+ }[] | undefined;
1174
+ id?: string | undefined;
1175
+ identity?: components["schemas"]["Identity"] | null;
1176
+ kybResults?: {
1177
+ businessInformation?: components["schemas"]["BusinessInformation"] | null;
1178
+ createdAt?: string | null;
1179
+ documentUploads?: components["schemas"]["DocumentUpload"][] | null;
1180
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1181
+ id: string;
1182
+ pepAndSanctionsStatus: components["schemas"]["PepAndSanctionsStatus"];
1183
+ reason?: string | null;
1184
+ report?: string | null;
1185
+ status: components["schemas"]["ModerationResultStatus"];
1186
+ uboDefinitions?: components["schemas"]["UboDefinition"][] | null;
1187
+ updatedAt?: string | null;
1188
+ verificationRequestId?: string | null;
1189
+ }[] | undefined;
1190
+ organization?: components["schemas"]["Organization"] | null;
1191
+ organizationId?: string | undefined;
1192
+ spidResults?: {
1193
+ createdAt?: string | null;
1194
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1195
+ id: string;
1196
+ path: string;
1197
+ reason?: string | null;
1198
+ status: components["schemas"]["ResultStatus"];
1199
+ updatedAt?: string | null;
1200
+ verificationRequestId?: string | null;
1201
+ }[] | undefined;
1202
+ updatedAt?: string | null;
1203
+ };
1204
+ error: {
1205
+ code: number;
1206
+ errorTag: components["schemas"]["ErrorTags"];
1207
+ message?: string | null;
1208
+ };
1209
+ response: Response;
1210
+ }>;
1211
+ interface GetDvResultParams extends GetFlowResultParams {
1212
+ dvResultId: string;
1213
+ }
1214
+ declare function getDvResult({ organizationId, flowResultId, dvResultId, isSandbox }: GetDvResultParams, opts: SDKOptions): Promise<{
1215
+ data: ParsedKycMessages | undefined;
1216
+ error?: never;
1217
+ response: Response;
1218
+ } | {
1219
+ data: ParsedKycMessages | undefined;
1220
+ error: {
1221
+ code: number;
1222
+ errorTag: components["schemas"]["ErrorTags"];
1223
+ message?: string | null;
1224
+ };
1225
+ response: Response;
1226
+ }>;
1227
+
1624
1228
  interface SignatureComponents {
1625
1229
  timestamp: string;
1626
1230
  signatureHex: string;
@@ -1682,4 +1286,4 @@ interface WebhookVerifierOptions<T extends Function> {
1682
1286
  exposeRawBody?: boolean;
1683
1287
  }
1684
1288
 
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 };
1289
+ export { API_KEY_HEADER, type ApiKeyType, type Environment, EnvironmentConfigs, Environments, type InitializeZypheFlowParams, type SDKOptions, type SdkCreateVerificationRequestResponse, type SignatureComponents, WebhookSignatureErrorCodes, WebhookSignatureErrorMessages, type WebhookVerifierOptions, bufferToHex, constructVerificationSessionUrl, createVerificationSession, getDvResult, getFlowResult, hexToBytes, parseSignatureHeader, timingSafeEqual };