@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.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";
@@ -6,814 +7,21 @@ declare const Environments: {
6
7
  readonly PRODUCTION: "production";
7
8
  };
8
9
  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
- }
10
+ declare const EnvironmentConfigs: {
11
+ readonly local: {
12
+ readonly appUrl: "http://localhost:5173";
13
+ readonly apiUrl: "http://localhost:3000";
14
+ };
15
+ readonly staging: {
16
+ readonly appUrl: "https://app-dev.zyphe.com";
17
+ readonly apiUrl: "https://api-dev.zyphe.com";
18
+ };
19
+ readonly production: {
20
+ readonly appUrl: "https://verify.zyphe.com";
21
+ readonly apiUrl: "https://api.zyphe.com";
22
+ };
23
+ };
24
+ declare const API_KEY_HEADER = "x-api-key";
817
25
 
818
26
  interface components {
819
27
  schemas: {
@@ -1001,7 +209,7 @@ interface components {
1001
209
  /** @enum {string} */
1002
210
  DvConfigThreshold: "documentScorePercent" | "portraitMatchPercent";
1003
211
  /** @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";
212
+ 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
213
  DvResult: {
1006
214
  browser?: string | null;
1007
215
  class?: string | null;
@@ -1039,6 +247,7 @@ interface components {
1039
247
  /** Format: date-time */
1040
248
  createdAt?: string | null;
1041
249
  extendedWebhook: boolean;
250
+ failureUrl?: string | null;
1042
251
  id: string;
1043
252
  name: string;
1044
253
  slug: string;
@@ -1073,6 +282,7 @@ interface components {
1073
282
  config: components["schemas"]["DvConfig"];
1074
283
  /** Format: date-time */
1075
284
  createdAt?: string | null;
285
+ failureUrl?: string | null;
1076
286
  flowId: string;
1077
287
  gotoStepId?: string | null;
1078
288
  id: string;
@@ -1089,6 +299,7 @@ interface components {
1089
299
  config: components["schemas"]["FormConfig"];
1090
300
  /** Format: date-time */
1091
301
  createdAt?: string | null;
302
+ failureUrl?: string | null;
1092
303
  flowId: string;
1093
304
  gotoStepId?: string | null;
1094
305
  id: string;
@@ -1105,6 +316,7 @@ interface components {
1105
316
  config: components["schemas"]["PoaConfig"];
1106
317
  /** Format: date-time */
1107
318
  createdAt?: string | null;
319
+ failureUrl?: string | null;
1108
320
  flowId: string;
1109
321
  gotoStepId?: string | null;
1110
322
  id: string;
@@ -1121,6 +333,7 @@ interface components {
1121
333
  config: components["schemas"]["KybConfig"];
1122
334
  /** Format: date-time */
1123
335
  createdAt?: string | null;
336
+ failureUrl?: string | null;
1124
337
  flowId: string;
1125
338
  gotoStepId?: string | null;
1126
339
  id: string;
@@ -1137,6 +350,7 @@ interface components {
1137
350
  config: components["schemas"]["SpidConfig"];
1138
351
  /** Format: date-time */
1139
352
  createdAt?: string | null;
353
+ failureUrl?: string | null;
1140
354
  flowId: string;
1141
355
  gotoStepId?: string | null;
1142
356
  id: string;
@@ -1408,7 +622,7 @@ interface components {
1408
622
  websocketNamespace: string;
1409
623
  };
1410
624
  /** @enum {string} */
1411
- ProductType: "UNKNOWN" | "KYC" | "KYB" | "PRODUCTION_MODE" | "SPID";
625
+ ProductType: "UNKNOWN" | "KYC" | "KYB" | "PRODUCTION_MODE" | "SPID" | "EXPORT_API" | "EXPORT_UI";
1412
626
  /** @enum {string} */
1413
627
  ResultStatus: "PASSED" | "FAILED";
1414
628
  /** @enum {string} */
@@ -1540,6 +754,92 @@ interface components {
1540
754
  pathItems: never;
1541
755
  }
1542
756
 
757
+ type SdkCreateVerificationRequestResponse = components["schemas"]["SdkCreateVerificationRequestResponse"];
758
+ type ApiKeyType = components["schemas"]["ApiKeyType"];
759
+ /**
760
+ * Parameters for initializing the Zyphe iframe for a Flow.
761
+ * These will remain constant for each user that visits the Flow URL.
762
+ */
763
+ interface InitializeZypheFlowParams {
764
+ /**
765
+ * The ID of the Flow
766
+ * UUID v4 format
767
+ * @example "4810bc63-bfdd-4487-ae57-c939046f56b6"
768
+ */
769
+ flowId: string;
770
+ /**
771
+ * The ID of the FlowStep
772
+ * UUID v4 format
773
+ * @example "4810bc63-bfdd-4487-ae57-c939046f56b6"
774
+ */
775
+ flowStepId: string;
776
+ /**
777
+ * The email of the user.
778
+ * @example "user@example.com"
779
+ */
780
+ email: string;
781
+ /**
782
+ * The type of Flow URL.
783
+ * The third path segment of your Flow URL.
784
+ * @example "http://localhost:5173/flow/flowSlug/kyc/stepSlug"
785
+ */
786
+ product: "kyc";
787
+ /**
788
+ * Whether the Flow is a "sandbox" Flow.
789
+ *
790
+ * This will prepend "sandbox" to the final URL.
791
+ * @example "http://localhost:5173/sandbox/flow/flowSlug/kyc/stepSlug"
792
+ */
793
+ isSandbox: boolean;
794
+ /**
795
+ * Custom data to be passed to the Flow.
796
+ * @example { "custom_data": "custom_value" }
797
+ */
798
+ customData?: Record<string, string>;
799
+ }
800
+ interface SDKOptions {
801
+ apiKey: string;
802
+ /**
803
+ * The environment to use for the SDK.
804
+ * This will determine the base URL for the API and the Flow URL.
805
+ *
806
+ * If not provided, we will default to "production".
807
+ *
808
+ * @default "production"
809
+ */
810
+ environment?: Environment;
811
+ /**
812
+ * If set, the QR code displayed on desktop devices of a Document Verification flow will direct to this URL.
813
+ * If not set, the QR code will direct to the corresponding zyphe.com URL, depending upon your configured environment.
814
+ *
815
+ * The URL will include the query parameters `zypheVr` and `zypheToken`.
816
+ *
817
+ * @default "https://app-dev.zyphe.com" || "https://verify.zyphe.com"
818
+ * @example "http://example.com"
819
+ */
820
+ handoffBaseUrl?: string;
821
+ /**
822
+ * The main background color of the page.
823
+ * This will override the primary color configured in verify.zyphe.com
824
+ *
825
+ * The accepted values are flexible, but we recommend a hex code.
826
+ * @example "#000000"
827
+ */
828
+ primaryColor?: string;
829
+ /**
830
+ * The accent color of the page, used for buttons, icons, etc.
831
+ * This will override the secondary color configured in verify.zyphe.com
832
+ *
833
+ * The accepted values are flexible, but we recommend a hex code.
834
+ * @example "#000000"
835
+ */
836
+ secondaryColor?: string;
837
+ /**
838
+ * If true, the verification session will be displayed in "fullscreen" mode.
839
+ */
840
+ isFullscreen?: boolean;
841
+ }
842
+
1543
843
  interface CreateVerificationSessionParams {
1544
844
  email: string;
1545
845
  flowId: string;
@@ -1621,6 +921,327 @@ declare function constructVerificationSessionUrl({ flowParams, verificationSessi
1621
921
  opts: SDKOptions;
1622
922
  }): string;
1623
923
 
924
+ declare enum ImageProvenance {
925
+ UNSPECIFIED_IMAGE_PROVENANCE = 0,
926
+ FRONT_DOCUMENT_IMAGE = 1,
927
+ BACK_DOCUMENT_IMAGE = 2,
928
+ SIGNATURE_IMAGE = 3,
929
+ PORTRAIT_IMAGE = 5,
930
+ CITIZENSHIP_IMAGE = 6,
931
+ UNRECOGNIZED = -1
932
+ }
933
+ declare enum ResultStatus {
934
+ FAILED = 0,
935
+ PASSED = 1,
936
+ UNRECOGNIZED = -1
937
+ }
938
+ interface PersonalData {
939
+ givenName: string;
940
+ surname: string;
941
+ dateOfBirth: string;
942
+ nationality: string;
943
+ gender: string;
944
+ placeOfBirth: string;
945
+ personalNumber: string;
946
+ }
947
+ declare const PersonalData: MessageFns<PersonalData>;
948
+ interface DocumentData {
949
+ documentNumber: string;
950
+ issuingState: string;
951
+ issuingAuthority: string;
952
+ expiryDate: string;
953
+ documentClassCode: string;
954
+ mrzStrings: string;
955
+ documentCan: string;
956
+ }
957
+ declare const DocumentData: MessageFns<DocumentData>;
958
+ interface AddressData {
959
+ flat: string;
960
+ houseNumber: string;
961
+ building: string;
962
+ street: string;
963
+ city: string;
964
+ postalCode: string;
965
+ country: string;
966
+ addressLine: string;
967
+ }
968
+ declare const AddressData: MessageFns<AddressData>;
969
+ interface Image {
970
+ contentType: string;
971
+ data: Uint8Array;
972
+ provenance: ImageProvenance;
973
+ }
974
+ declare const Image: MessageFns<Image>;
975
+ interface Document {
976
+ personalData: PersonalData | undefined;
977
+ documentData: DocumentData | undefined;
978
+ addressData: AddressData | undefined;
979
+ }
980
+ declare const Document: MessageFns<Document>;
981
+ interface Details {
982
+ status: ResultStatus;
983
+ requestLog: string;
984
+ responseLog: string;
985
+ }
986
+ declare const Details: MessageFns<Details>;
987
+ interface Message {
988
+ document?: Document | undefined;
989
+ frontImage?: Image | undefined;
990
+ backImage?: Image | undefined;
991
+ otherImage?: Image | undefined;
992
+ details?: Details | undefined;
993
+ }
994
+ declare const Message: MessageFns<Message>;
995
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
996
+ 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 {} ? {
997
+ [K in keyof T]?: DeepPartial<T[K]>;
998
+ } : Partial<T>;
999
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
1000
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
1001
+ [K in keyof P]: Exact<P[K], I[K]>;
1002
+ } & {
1003
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
1004
+ };
1005
+ interface MessageFns<T> {
1006
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1007
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1008
+ fromJSON(object: any): T;
1009
+ toJSON(message: T): unknown;
1010
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
1011
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
1012
+ }
1013
+
1014
+ interface ParsedKycMessages extends Pick<Message, "document" | "frontImage" | "backImage" | "details"> {
1015
+ otherImages?: Image[];
1016
+ }
1017
+
1018
+ interface GetFlowResultParams {
1019
+ organizationId: string;
1020
+ flowResultId: string;
1021
+ isSandbox: boolean;
1022
+ }
1023
+ declare function getFlowResult({ organizationId, flowResultId, isSandbox }: GetFlowResultParams, opts: SDKOptions): Promise<{
1024
+ data: {
1025
+ dvResults: {
1026
+ browser?: string | null;
1027
+ class?: string | null;
1028
+ createdAt?: string | null;
1029
+ data: {
1030
+ [key: string]: unknown;
1031
+ };
1032
+ documentId?: string | null;
1033
+ documentScorePercent?: number | null;
1034
+ documentType?: number | null;
1035
+ firstName?: string | null;
1036
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1037
+ id: string;
1038
+ lastName?: string | null;
1039
+ platform?: string | null;
1040
+ portraitMatchPercent?: number | null;
1041
+ processAdditionalData: {
1042
+ [key: string]: unknown;
1043
+ };
1044
+ reasons: components["schemas"]["DvReason"][];
1045
+ status: components["schemas"]["ResultStatus"];
1046
+ updatedAt?: string | null;
1047
+ verificationRequestId?: string | null;
1048
+ }[] | undefined;
1049
+ amlResults: {
1050
+ createdAt: string;
1051
+ data: {
1052
+ [key: string]: unknown;
1053
+ };
1054
+ id: string;
1055
+ pep: boolean;
1056
+ sanctions: boolean;
1057
+ updatedAt: string;
1058
+ verificationRequestId?: string | null;
1059
+ }[] | undefined;
1060
+ poaResults: {
1061
+ checkedAt?: string | null;
1062
+ createdAt: string;
1063
+ documentId?: string | null;
1064
+ documentType?: components["schemas"]["PoaDocumentType"] | null;
1065
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1066
+ id: string;
1067
+ reason?: components["schemas"]["PoaReason"] | null;
1068
+ status: components["schemas"]["ResultStatus"];
1069
+ updatedAt: string;
1070
+ verificationRequestId?: string | null;
1071
+ }[] | undefined;
1072
+ createdAt?: string | null;
1073
+ customData?: {
1074
+ [key: string]: unknown;
1075
+ } | undefined;
1076
+ flow?: components["schemas"]["Flow"] | null;
1077
+ flowSlug?: string | undefined;
1078
+ formResults?: {
1079
+ createdAt?: string | null;
1080
+ flowResultId: string;
1081
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1082
+ flowStepId?: string | null;
1083
+ form?: components["schemas"]["Form"] | null;
1084
+ id: string;
1085
+ reason?: components["schemas"]["FormReason"] | null;
1086
+ sections: components["schemas"]["FormSection"][];
1087
+ status: components["schemas"]["ResultStatus"];
1088
+ updatedAt?: string | null;
1089
+ verificationRequestId?: string | null;
1090
+ }[] | undefined;
1091
+ id?: string | undefined;
1092
+ identity?: components["schemas"]["Identity"] | null;
1093
+ kybResults?: {
1094
+ businessInformation?: components["schemas"]["BusinessInformation"] | null;
1095
+ createdAt?: string | null;
1096
+ documentUploads?: components["schemas"]["DocumentUpload"][] | null;
1097
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1098
+ id: string;
1099
+ pepAndSanctionsStatus: components["schemas"]["PepAndSanctionsStatus"];
1100
+ reason?: string | null;
1101
+ report?: string | null;
1102
+ status: components["schemas"]["ModerationResultStatus"];
1103
+ uboDefinitions?: components["schemas"]["UboDefinition"][] | null;
1104
+ updatedAt?: string | null;
1105
+ verificationRequestId?: string | null;
1106
+ }[] | undefined;
1107
+ organization?: components["schemas"]["Organization"] | null;
1108
+ organizationId?: string | undefined;
1109
+ spidResults?: {
1110
+ createdAt?: string | null;
1111
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1112
+ id: string;
1113
+ path: string;
1114
+ reason?: string | null;
1115
+ status: components["schemas"]["ResultStatus"];
1116
+ updatedAt?: string | null;
1117
+ verificationRequestId?: string | null;
1118
+ }[] | undefined;
1119
+ updatedAt?: string | null;
1120
+ };
1121
+ error?: never;
1122
+ response: Response;
1123
+ } | {
1124
+ data: {
1125
+ dvResults: {
1126
+ browser?: string | null;
1127
+ class?: string | null;
1128
+ createdAt?: string | null;
1129
+ data: {
1130
+ [key: string]: unknown;
1131
+ };
1132
+ documentId?: string | null;
1133
+ documentScorePercent?: number | null;
1134
+ documentType?: number | null;
1135
+ firstName?: string | null;
1136
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1137
+ id: string;
1138
+ lastName?: string | null;
1139
+ platform?: string | null;
1140
+ portraitMatchPercent?: number | null;
1141
+ processAdditionalData: {
1142
+ [key: string]: unknown;
1143
+ };
1144
+ reasons: components["schemas"]["DvReason"][];
1145
+ status: components["schemas"]["ResultStatus"];
1146
+ updatedAt?: string | null;
1147
+ verificationRequestId?: string | null;
1148
+ }[] | undefined;
1149
+ amlResults: {
1150
+ createdAt: string;
1151
+ data: {
1152
+ [key: string]: unknown;
1153
+ };
1154
+ id: string;
1155
+ pep: boolean;
1156
+ sanctions: boolean;
1157
+ updatedAt: string;
1158
+ verificationRequestId?: string | null;
1159
+ }[] | undefined;
1160
+ poaResults: {
1161
+ checkedAt?: string | null;
1162
+ createdAt: string;
1163
+ documentId?: string | null;
1164
+ documentType?: components["schemas"]["PoaDocumentType"] | null;
1165
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1166
+ id: string;
1167
+ reason?: components["schemas"]["PoaReason"] | null;
1168
+ status: components["schemas"]["ResultStatus"];
1169
+ updatedAt: string;
1170
+ verificationRequestId?: string | null;
1171
+ }[] | undefined;
1172
+ createdAt?: string | null;
1173
+ customData?: {
1174
+ [key: string]: unknown;
1175
+ } | undefined;
1176
+ flow?: components["schemas"]["Flow"] | null;
1177
+ flowSlug?: string | undefined;
1178
+ formResults?: {
1179
+ createdAt?: string | null;
1180
+ flowResultId: string;
1181
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1182
+ flowStepId?: string | null;
1183
+ form?: components["schemas"]["Form"] | null;
1184
+ id: string;
1185
+ reason?: components["schemas"]["FormReason"] | null;
1186
+ sections: components["schemas"]["FormSection"][];
1187
+ status: components["schemas"]["ResultStatus"];
1188
+ updatedAt?: string | null;
1189
+ verificationRequestId?: string | null;
1190
+ }[] | undefined;
1191
+ id?: string | undefined;
1192
+ identity?: components["schemas"]["Identity"] | null;
1193
+ kybResults?: {
1194
+ businessInformation?: components["schemas"]["BusinessInformation"] | null;
1195
+ createdAt?: string | null;
1196
+ documentUploads?: components["schemas"]["DocumentUpload"][] | null;
1197
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1198
+ id: string;
1199
+ pepAndSanctionsStatus: components["schemas"]["PepAndSanctionsStatus"];
1200
+ reason?: string | null;
1201
+ report?: string | null;
1202
+ status: components["schemas"]["ModerationResultStatus"];
1203
+ uboDefinitions?: components["schemas"]["UboDefinition"][] | null;
1204
+ updatedAt?: string | null;
1205
+ verificationRequestId?: string | null;
1206
+ }[] | undefined;
1207
+ organization?: components["schemas"]["Organization"] | null;
1208
+ organizationId?: string | undefined;
1209
+ spidResults?: {
1210
+ createdAt?: string | null;
1211
+ flowStep?: Omit<components["schemas"]["FlowStep"], "type"> | null;
1212
+ id: string;
1213
+ path: string;
1214
+ reason?: string | null;
1215
+ status: components["schemas"]["ResultStatus"];
1216
+ updatedAt?: string | null;
1217
+ verificationRequestId?: string | null;
1218
+ }[] | undefined;
1219
+ updatedAt?: string | null;
1220
+ };
1221
+ error: {
1222
+ code: number;
1223
+ errorTag: components["schemas"]["ErrorTags"];
1224
+ message?: string | null;
1225
+ };
1226
+ response: Response;
1227
+ }>;
1228
+ interface GetDvResultParams extends GetFlowResultParams {
1229
+ dvResultId: string;
1230
+ }
1231
+ declare function getDvResult({ organizationId, flowResultId, dvResultId, isSandbox }: GetDvResultParams, opts: SDKOptions): Promise<{
1232
+ data: ParsedKycMessages | undefined;
1233
+ error?: never;
1234
+ response: Response;
1235
+ } | {
1236
+ data: ParsedKycMessages | undefined;
1237
+ error: {
1238
+ code: number;
1239
+ errorTag: components["schemas"]["ErrorTags"];
1240
+ message?: string | null;
1241
+ };
1242
+ response: Response;
1243
+ }>;
1244
+
1624
1245
  interface SignatureComponents {
1625
1246
  timestamp: string;
1626
1247
  signatureHex: string;
@@ -1682,4 +1303,4 @@ interface WebhookVerifierOptions<T extends Function> {
1682
1303
  exposeRawBody?: boolean;
1683
1304
  }
1684
1305
 
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 };
1306
+ 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 };