@onfido/api 3.6.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.WorkflowRunSharedLinkLanguageEnum = exports.WorkflowRunResponseStatusEnum = exports.WorkflowRunStatusEnum = exports.WebhookEventType = exports.WatchlistMonitorSharedReportNameEnum = exports.WatchlistMonitorBuilderReportNameEnum = exports.WatchlistMonitorReportNameEnum = exports.UsDrivingLicenceSharedGenderEnum = exports.UsDrivingLicenceSharedEyeColorCodeEnum = exports.UsDrivingLicenceSharedDocumentCategoryEnum = exports.UsDrivingLicenceBuilderGenderEnum = exports.UsDrivingLicenceBuilderEyeColorCodeEnum = exports.UsDrivingLicenceBuilderDocumentCategoryEnum = exports.ResultsFeedbackExpectedResultEnum = exports.ReportSubResult = exports.ReportStatus = exports.ReportResult = exports.ReportName = exports.RepeatAttemptsListRepeatAttemptsInnerResultEnum = exports.RepeatAttemptsListRepeatAttemptsInnerNamesEnum = exports.RepeatAttemptsListRepeatAttemptsInnerDateOfBirthEnum = exports.ProofOfAddressPropertiesDocumentTypeEnum = exports.IdNumberTypeEnum = exports.ExtractionExtractedDataGenderEnum = exports.ExtractionDocumentClassificationSubtypeEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesSecurityTierEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesHasIssuanceConfirmationEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesNistIdentityEvidenceStrengthEnum = exports.DocumentTypes = exports.DocumentSharedSideEnum = exports.DocumentSharedFileTypeEnum = exports.DocumentPropertiesSecurityTierEnum = exports.DocumentPropertiesHasIssuanceConfirmationEnum = exports.DocumentPropertiesNistIdentityEvidenceStrengthEnum = exports.DocumentSideEnum = exports.DocumentFileTypeEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceBiometricCaptureEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceDocumentCaptureEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceIpReputationEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceAuthenticationTypeEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceSdkSourceEnum = exports.CountryCodes = exports.ConsentItemNameEnum = exports.CheckResponseResultEnum = exports.CheckResponseStatusEnum = exports.CheckResultEnum = exports.CheckStatusEnum = void 0;
25
+ exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.WorkflowRunStatus = exports.WorkflowRunLinkLanguageEnum = exports.WebhookEventType = exports.WebhookEventResourceType = exports.WebhookEventObjectStatus = exports.WatchlistMonitorSharedReportNameEnum = exports.WatchlistMonitorBuilderReportNameEnum = exports.WatchlistMonitorReportNameEnum = exports.UsDrivingLicenceSharedGenderEnum = exports.UsDrivingLicenceSharedEyeColorCodeEnum = exports.UsDrivingLicenceSharedDocumentCategoryEnum = exports.UsDrivingLicenceBuilderGenderEnum = exports.UsDrivingLicenceBuilderEyeColorCodeEnum = exports.UsDrivingLicenceBuilderDocumentCategoryEnum = exports.ResultsFeedbackExpectedResultEnum = exports.ReportSubResult = exports.ReportStatus = exports.ReportResult = exports.ReportName = exports.RepeatAttemptsListRepeatAttemptsInnerResultEnum = exports.RepeatAttemptsListRepeatAttemptsInnerNamesEnum = exports.RepeatAttemptsListRepeatAttemptsInnerDateOfBirthEnum = exports.ProofOfAddressPropertiesDocumentTypeEnum = exports.IdNumberTypeEnum = exports.ExtractionExtractedDataGenderEnum = exports.ExtractionDocumentClassificationSubtypeEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesSecurityTierEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesHasIssuanceConfirmationEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesNistIdentityEvidenceStrengthEnum = exports.DocumentTypes = exports.DocumentSharedSideEnum = exports.DocumentSharedFileTypeEnum = exports.DocumentPropertiesSecurityTierEnum = exports.DocumentPropertiesHasIssuanceConfirmationEnum = exports.DocumentPropertiesNistIdentityEvidenceStrengthEnum = exports.DocumentSideEnum = exports.DocumentFileTypeEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceBiometricCaptureEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceDocumentCaptureEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceIpReputationEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceAuthenticationTypeEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceSdkSourceEnum = exports.CountryCodes = exports.CheckStatus = exports.CheckResponseResultEnum = exports.CheckResultEnum = exports.ApplicantConsentName = void 0;
26
26
  exports.UploadDocumentSideEnum = exports.UploadDocumentFileTypeEnum = exports.ListWorkflowRunsSortEnum = exports.DefaultApi = void 0;
27
27
  const axios_1 = require("axios");
28
28
  // URLSearchParams not necessarily used
@@ -51,13 +51,15 @@ axios_1.default.interceptors.response.use((response) => __awaiter(void 0, void 0
51
51
  }
52
52
  return response;
53
53
  }));
54
- exports.CheckStatusEnum = {
55
- InProgress: 'in_progress',
56
- AwaitingApplicant: 'awaiting_applicant',
57
- Complete: 'complete',
58
- Withdrawn: 'withdrawn',
59
- Paused: 'paused',
60
- Reopened: 'reopened',
54
+ /**
55
+ *
56
+ * @export
57
+ * @enum {string}
58
+ */
59
+ exports.ApplicantConsentName = {
60
+ PrivacyNoticesRead: 'privacy_notices_read',
61
+ SsnVerification: 'ssn_verification',
62
+ PhoneNumberVerification: 'phone_number_verification',
61
63
  UnknownDefaultOpenApi: '11184809'
62
64
  };
63
65
  exports.CheckResultEnum = {
@@ -65,7 +67,17 @@ exports.CheckResultEnum = {
65
67
  Consider: 'consider',
66
68
  UnknownDefaultOpenApi: '11184809'
67
69
  };
68
- exports.CheckResponseStatusEnum = {
70
+ exports.CheckResponseResultEnum = {
71
+ Clear: 'clear',
72
+ Consider: 'consider',
73
+ UnknownDefaultOpenApi: '11184809'
74
+ };
75
+ /**
76
+ * The current state of the check in the checking process.
77
+ * @export
78
+ * @enum {string}
79
+ */
80
+ exports.CheckStatus = {
69
81
  InProgress: 'in_progress',
70
82
  AwaitingApplicant: 'awaiting_applicant',
71
83
  Complete: 'complete',
@@ -74,17 +86,6 @@ exports.CheckResponseStatusEnum = {
74
86
  Reopened: 'reopened',
75
87
  UnknownDefaultOpenApi: '11184809'
76
88
  };
77
- exports.CheckResponseResultEnum = {
78
- Clear: 'clear',
79
- Consider: 'consider',
80
- UnknownDefaultOpenApi: '11184809'
81
- };
82
- exports.ConsentItemNameEnum = {
83
- PrivacyNoticesRead: 'privacy_notices_read',
84
- SsnVerification: 'ssn_verification',
85
- PhoneNumberVerification: 'phone_number_verification',
86
- UnknownDefaultOpenApi: '11184809'
87
- };
88
89
  /**
89
90
  *
90
91
  * @export
@@ -450,6 +451,11 @@ exports.DocumentTypes = {
450
451
  ProfessionalQualificationCard: 'professional_qualification_card',
451
452
  ConsularId: 'consular_id',
452
453
  InternationalDrivingLicence: 'international_driving_licence',
454
+ HomeOfficeLetter: 'home_office_letter',
455
+ BirthCertificate: 'birth_certificate',
456
+ VehicleRegistrationCertificate: 'vehicle_registration_certificate',
457
+ FormForAffixingTheVisa: 'form_for_affixing_the_visa',
458
+ IdentificationNumberDocument: 'identification_number_document',
453
459
  UnknownDefaultOpenApi: '11184809'
454
460
  };
455
461
  exports.DocumentWithDriverVerificationReportAllOfPropertiesNistIdentityEvidenceStrengthEnum = {
@@ -659,6 +665,47 @@ exports.WatchlistMonitorSharedReportNameEnum = {
659
665
  Aml: 'watchlist_aml',
660
666
  UnknownDefaultOpenApi: '11184809'
661
667
  };
668
+ /**
669
+ * The current state of the object, if available.
670
+ * @export
671
+ * @enum {string}
672
+ */
673
+ exports.WebhookEventObjectStatus = {
674
+ Processing: 'processing',
675
+ AwaitingInput: 'awaiting_input',
676
+ AwaitingClientInput: 'awaiting_client_input',
677
+ Approved: 'approved',
678
+ Declined: 'declined',
679
+ Review: 'review',
680
+ Abandoned: 'abandoned',
681
+ Error: 'error',
682
+ Started: 'started',
683
+ Cancelled: 'cancelled',
684
+ Completed: 'completed',
685
+ AwaitingData: 'awaiting_data',
686
+ AwaitingApproval: 'awaiting_approval',
687
+ Complete: 'complete',
688
+ Withdrawn: 'withdrawn',
689
+ InProgress: 'in_progress',
690
+ AwaitingApplicant: 'awaiting_applicant',
691
+ Paused: 'paused',
692
+ Reopened: 'reopened',
693
+ UnknownDefaultOpenApi: '11184809'
694
+ };
695
+ /**
696
+ *
697
+ * @export
698
+ * @enum {string}
699
+ */
700
+ exports.WebhookEventResourceType = {
701
+ Check: 'check',
702
+ Report: 'report',
703
+ AuditLog: 'audit_log',
704
+ WorkflowRun: 'workflow_run',
705
+ WorkflowTask: 'workflow_task',
706
+ WatchlistMonitor: 'watchlist_monitor',
707
+ UnknownDefaultOpenApi: '11184809'
708
+ };
662
709
  /**
663
710
  *
664
711
  * @export
@@ -684,27 +731,7 @@ exports.WebhookEventType = {
684
731
  WorkflowSignedEvidenceFileCreated: 'workflow_signed_evidence_file.created',
685
732
  UnknownDefaultOpenApi: '11184809'
686
733
  };
687
- exports.WorkflowRunStatusEnum = {
688
- AwaitingInput: 'awaiting_input',
689
- Processing: 'processing',
690
- Abandoned: 'abandoned',
691
- Error: 'error',
692
- Approved: 'approved',
693
- Review: 'review',
694
- Declined: 'declined',
695
- UnknownDefaultOpenApi: '11184809'
696
- };
697
- exports.WorkflowRunResponseStatusEnum = {
698
- AwaitingInput: 'awaiting_input',
699
- Processing: 'processing',
700
- Abandoned: 'abandoned',
701
- Error: 'error',
702
- Approved: 'approved',
703
- Review: 'review',
704
- Declined: 'declined',
705
- UnknownDefaultOpenApi: '11184809'
706
- };
707
- exports.WorkflowRunSharedLinkLanguageEnum = {
734
+ exports.WorkflowRunLinkLanguageEnum = {
708
735
  EnUs: 'en_US',
709
736
  DeDe: 'de_DE',
710
737
  EsEs: 'es_ES',
@@ -714,6 +741,22 @@ exports.WorkflowRunSharedLinkLanguageEnum = {
714
741
  NlNl: 'nl_NL',
715
742
  UnknownDefaultOpenApi: '11184809'
716
743
  };
744
+ /**
745
+ *
746
+ * @export
747
+ * @enum {string}
748
+ */
749
+ exports.WorkflowRunStatus = {
750
+ Processing: 'processing',
751
+ AwaitingInput: 'awaiting_input',
752
+ AwaitingClientInput: 'awaiting_client_input',
753
+ Approved: 'approved',
754
+ Declined: 'declined',
755
+ Review: 'review',
756
+ Abandoned: 'abandoned',
757
+ Error: 'error',
758
+ UnknownDefaultOpenApi: '11184809'
759
+ };
717
760
  /**
718
761
  * DefaultApi - axios parameter creator
719
762
  * @export
@@ -2736,7 +2779,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
2736
2779
  /**
2737
2780
  * Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.
2738
2781
  * @summary Upload a document
2739
- * @param {string} type The type of document
2782
+ * @param {DocumentTypes} type The type of document
2740
2783
  * @param {string} applicantId The ID of the applicant whose document is being uploaded.
2741
2784
  * @param {FileTransfer} file The file to be uploaded.
2742
2785
  * @param {UploadDocumentFileTypeEnum} [fileType] The file type of the uploaded file
@@ -3899,7 +3942,7 @@ const DefaultApiFp = function (configuration) {
3899
3942
  /**
3900
3943
  * Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.
3901
3944
  * @summary Upload a document
3902
- * @param {string} type The type of document
3945
+ * @param {DocumentTypes} type The type of document
3903
3946
  * @param {string} applicantId The ID of the applicant whose document is being uploaded.
3904
3947
  * @param {FileTransfer} file The file to be uploaded.
3905
3948
  * @param {UploadDocumentFileTypeEnum} [fileType] The file type of the uploaded file
@@ -4600,7 +4643,7 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
4600
4643
  /**
4601
4644
  * Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.
4602
4645
  * @summary Upload a document
4603
- * @param {string} type The type of document
4646
+ * @param {DocumentTypes} type The type of document
4604
4647
  * @param {string} applicantId The ID of the applicant whose document is being uploaded.
4605
4648
  * @param {FileTransfer} file The file to be uploaded.
4606
4649
  * @param {UploadDocumentFileTypeEnum} [fileType] The file type of the uploaded file
@@ -5345,7 +5388,7 @@ class DefaultApi extends base_1.BaseAPI {
5345
5388
  /**
5346
5389
  * Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.
5347
5390
  * @summary Upload a document
5348
- * @param {string} type The type of document
5391
+ * @param {DocumentTypes} type The type of document
5349
5392
  * @param {string} applicantId The ID of the applicant whose document is being uploaded.
5350
5393
  * @param {FileTransfer} file The file to be uploaded.
5351
5394
  * @param {UploadDocumentFileTypeEnum} [fileType] The file type of the uploaded file
@@ -32,7 +32,7 @@ class Configuration {
32
32
  }
33
33
  this.apiKey = 'Token token=' + param.apiToken;
34
34
  this.basePath = param.basePath || base_1.BASE_PATH.replace('.eu.', `.${Region[param.region || Region.EU].toLowerCase()}.`);
35
- this.baseOptions = Object.assign(Object.assign({ timeout: 30000 }, param.baseOptions), { headers: Object.assign(Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers), { 'User-Agent': 'onfido-node/3.6.0' }) });
35
+ this.baseOptions = Object.assign(Object.assign({ timeout: 30000 }, param.baseOptions), { headers: Object.assign(Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers), { 'User-Agent': 'onfido-node/4.1.0' }) });
36
36
  this.formDataCtor = param.formDataCtor || require('form-data'); // Injiect form data constructor (if needed)
37
37
  }
38
38
  /**