@lendi/integrations-transform 1.5.0 → 1.5.1

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.
@@ -39,9 +39,14 @@
39
39
  "description": "Application ID",
40
40
  "type": "string"
41
41
  },
42
+ "expiryDate": {
43
+ "description": "Expiry Date (can be null if no expiry date set)",
44
+ "type": ["string", "null"],
45
+ "format": "date"
46
+ },
42
47
  "status": {
43
48
  "description": "Status",
44
- "type": "string",
49
+ "type": ["string"],
45
50
  "enum": [
46
51
  "pending_upload",
47
52
  "pending_verification",
@@ -87,6 +92,269 @@
87
92
  "description": "ID Title (can be null if migrated from SF as they do not have this field)",
88
93
  "type": ["string", "null"],
89
94
  "enum": ["DR", "MISS", "MR", "MRS", "MS", "OTHER", "UNKNOWN", null]
95
+ },
96
+ "idFirstName": {
97
+ "description": "ID First Name",
98
+ "type": "string"
99
+ },
100
+ "idMiddleName": {
101
+ "description": "ID Middle Name (can be null as it is an optional field)",
102
+ "type": ["string", "null"]
103
+ },
104
+ "idLastName": {
105
+ "description": "ID Last Name",
106
+ "type": "string"
107
+ },
108
+ "australianState": {
109
+ "description": "Australian State (can be null as it is an optional field)",
110
+ "type": ["string", "null"],
111
+ "enum": ["NSW", "QLD", "VIC", "ACT", "WA", "SA", "NT", "TAS", null]
112
+ },
113
+ "issuingCountry": {
114
+ "description": "Issuing Country (can be null as it is an optional field)",
115
+ "type": ["string", "null"],
116
+ "enum": [
117
+ "Afghanistan",
118
+ "Albania",
119
+ "Algeria",
120
+ "American Samoa",
121
+ "Andorra",
122
+ "Angola",
123
+ "Anguilla",
124
+ "Antarctica",
125
+ "Antigua And Barbuda",
126
+ "Argentina",
127
+ "Armenia",
128
+ "Aruba",
129
+ "Australia",
130
+ "Austria",
131
+ "Azerbaijan",
132
+ "Bahamas",
133
+ "Bahrain",
134
+ "Bangladesh",
135
+ "Barbados",
136
+ "Belarus",
137
+ "Belgium",
138
+ "Belize",
139
+ "Benin",
140
+ "Bermuda",
141
+ "Bhutan",
142
+ "Bolivia",
143
+ "Bosnia And Herzegovina",
144
+ "Botswana",
145
+ "Bouvet Island",
146
+ "Brazil",
147
+ "British Indian Ocean Territory",
148
+ "Brunei Darussalam",
149
+ "Bulgaria",
150
+ "Burkina Faso",
151
+ "Burundi",
152
+ "Cambodia",
153
+ "Cameroon",
154
+ "Canada",
155
+ "Cape Verde",
156
+ "Cayman Islands",
157
+ "Central African Republic",
158
+ "Chad",
159
+ "Chile",
160
+ "China",
161
+ "Christmas Island",
162
+ "Cocos (Keeling) Islands",
163
+ "Colombia",
164
+ "Comoros",
165
+ "Democratic People's Republic of Korea",
166
+ "Democratic Republic Of The Congo",
167
+ "Cook Islands",
168
+ "Costa Rica",
169
+ "Cote D'ivoire",
170
+ "Croatia",
171
+ "Cuba",
172
+ "Cyprus",
173
+ "Czech Republic",
174
+ "Denmark",
175
+ "Djibouti",
176
+ "Dominica",
177
+ "Dominican Republic",
178
+ "East Timor",
179
+ "Ecuador",
180
+ "Egypt",
181
+ "El Salvador",
182
+ "Equatorial Guinea",
183
+ "Eritrea",
184
+ "Estonia",
185
+ "Ethiopia",
186
+ "Falkland Islands",
187
+ "Faroe Islands",
188
+ "Fiji",
189
+ "Finland",
190
+ "France",
191
+ "French Guiana",
192
+ "French Polynesia",
193
+ "French Southern Territories",
194
+ "Gabon",
195
+ "Gambia",
196
+ "Georgia",
197
+ "Germany",
198
+ "Ghana",
199
+ "Gibraltar",
200
+ "Greece",
201
+ "Greenland",
202
+ "Grenada",
203
+ "Guadeloupe",
204
+ "Guam",
205
+ "Guatemala",
206
+ "Guinea",
207
+ "Guinea-bissau",
208
+ "Guyana",
209
+ "Haiti",
210
+ "Heard Island And Mcdonald Islands",
211
+ "Holy See (Vatican City State)",
212
+ "Honduras",
213
+ "Hong Kong",
214
+ "Hungary",
215
+ "Iceland",
216
+ "India",
217
+ "Indonesia",
218
+ "Iran",
219
+ "Iraq",
220
+ "Ireland",
221
+ "Israel",
222
+ "Italy",
223
+ "Jamaica",
224
+ "Japan",
225
+ "Jordan",
226
+ "Kazakstan",
227
+ "Kenya",
228
+ "Kiribati",
229
+ "Kosovo",
230
+ "Kuwait",
231
+ "Kyrgyzstan",
232
+ "Laos",
233
+ "Latvia",
234
+ "Lebanon",
235
+ "Lesotho",
236
+ "Liberia",
237
+ "Libyan Arab Jamahiriya",
238
+ "Liechtenstein",
239
+ "Lithuania",
240
+ "Luxembourg",
241
+ "Macau",
242
+ "Macedonia",
243
+ "Madagascar",
244
+ "Malawi",
245
+ "Malaysia",
246
+ "Maldives",
247
+ "Mali",
248
+ "Malta",
249
+ "Marshall Islands",
250
+ "Martinique",
251
+ "Mauritania",
252
+ "Mauritius",
253
+ "Mayotte",
254
+ "Mexico",
255
+ "Federated States Of Micronesia",
256
+ "Republic Of Moldova",
257
+ "Monaco",
258
+ "Mongolia",
259
+ "Montserrat",
260
+ "Montenegro",
261
+ "Morocco",
262
+ "Mozambique",
263
+ "Myanmar",
264
+ "Namibia",
265
+ "Nauru",
266
+ "Nepal",
267
+ "Netherlands",
268
+ "Netherlands Antilles",
269
+ "New Caledonia",
270
+ "New Zealand",
271
+ "Nicaragua",
272
+ "Niger",
273
+ "Nigeria",
274
+ "Niue",
275
+ "Norfolk Island",
276
+ "Northern Mariana Islands",
277
+ "Norway",
278
+ "Oman",
279
+ "Pakistan",
280
+ "Palau",
281
+ "Palestinian Territory",
282
+ "Panama",
283
+ "Papua New Guinea",
284
+ "Paraguay",
285
+ "Peru",
286
+ "Philippines",
287
+ "Pitcairn",
288
+ "Poland",
289
+ "Portugal",
290
+ "Puerto Rico",
291
+ "Qatar",
292
+ "Romania",
293
+ "Russian Federation",
294
+ "Rwanda",
295
+ "Saint Helena",
296
+ "Saint Kitts And Nevis",
297
+ "Saint Lucia",
298
+ "Saint Pierre And Miquelon",
299
+ "Saint Vincent And The Grenadines",
300
+ "Samoa",
301
+ "San Marino",
302
+ "Sao Tome And Principe",
303
+ "Saudi Arabia",
304
+ "Senegal",
305
+ "Serbia",
306
+ "Seychelles",
307
+ "Sierra Leone",
308
+ "Singapore",
309
+ "Slovakia",
310
+ "Slovenia",
311
+ "Solomon Islands",
312
+ "Somalia",
313
+ "South Africa",
314
+ "South Georgia And The South Sandwich Islands",
315
+ "The Republic of South Korea",
316
+ "Spain",
317
+ "Sri Lanka",
318
+ "Sudan",
319
+ "Suriname",
320
+ "Svalbard And Jan Mayen",
321
+ "Swaziland",
322
+ "Sweden",
323
+ "Switzerland",
324
+ "Syrian Arab Republic",
325
+ "Taiwan",
326
+ "Tajikistan",
327
+ "Tanzania",
328
+ "Thailand",
329
+ "Togo",
330
+ "Tokelau",
331
+ "Tonga",
332
+ "Trinidad And Tobago",
333
+ "Tunisia",
334
+ "Turkey",
335
+ "Turkmenistan",
336
+ "Turks And Caicos Islands",
337
+ "Tuvalu",
338
+ "Uganda",
339
+ "Ukraine",
340
+ "United Arab Emirates",
341
+ "United Kingdom",
342
+ "United States of America",
343
+ "United States Minor Outlying Islands",
344
+ "Uruguay",
345
+ "Uzbekistan",
346
+ "Vanuatu",
347
+ "Venezuela",
348
+ "Vietnam",
349
+ "British Virgin Islands",
350
+ "US Virgin Islands",
351
+ "Wallis And Futuna",
352
+ "Western Sahara",
353
+ "Yemen",
354
+ "Zambia",
355
+ "Zimbabwe",
356
+ null
357
+ ]
90
358
  }
91
359
  },
92
360
  "required": ["idNumber", "idType"]
@@ -1,8 +1,51 @@
1
- import { Payload as RequiredDocumentPayload } from '../types/events/public-required-document';
1
+ import { PersonApplicantPrivacy } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
2
+ import { ProofOfIdentity } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
+ import { EConsent, Identification, Payload as RequiredDocumentPayload } from '../types/events/public-required-document';
2
4
  /**
3
- * Generates a partial internal request from a partial required document event.
5
+ * Gets the applicant gender from the identification data
4
6
  *
5
- * @param requiredDocument: A partial required document event.
6
- * @return A partial InternalRequest.
7
+ * @param identification Identification data
8
+ *
9
+ * @returns The gender of the applicant
10
+ */
11
+ export declare const getApplicantGenderFromIdentification: (identification: Identification) => string;
12
+ /**
13
+ * Gets full name on document from the identification data
14
+ *
15
+ * @param identification Identification data
16
+ *
17
+ * @returns The full name on document
18
+ */
19
+ export declare const getNameOnDocument: (identification: Identification) => string;
20
+ /**
21
+ * Transforms identification data into a partial proof of identity document
22
+ *
23
+ * @param identification Identification data
24
+ *
25
+ * @returns Partial proof of identity object
26
+ */
27
+ export declare const transformIdentification: (identification: Identification) => Partial<ProofOfIdentity>;
28
+ /**
29
+ * Generates partial details for document used to verify identity
30
+ *
31
+ * @param requiredDocument RequiredDocumentCreated/RequiredDocumentUpdated event payload
32
+ *
33
+ * @returns Partial proof of identity document object
34
+ */
35
+ export declare const generateProofOfIdentity: (requiredDocument: RequiredDocumentPayload) => Partial<ProofOfIdentity>;
36
+ /**
37
+ * Generates an applicants disclosure details mapping for the partial application
38
+ *
39
+ * @param eConsent E-Consent detials from the RequiredDocumentCreated/RequqiredDocumentUpdated event payload
40
+ *
41
+ * @returns Applicant disclosure details for partial application
42
+ */
43
+ export declare const generatePersonApplicantPrivacy: (eConsent: EConsent) => PersonApplicantPrivacy;
44
+ /**
45
+ * Transforms a RequiredDocumentCreated or RequiredDocumentUpdated event payload into a partial application
46
+ *
47
+ * @param requiredDocument A RequiredDocumentCreated or RequiredDocumentUpdated event payload
48
+ *
49
+ * @return A partial application
7
50
  */
8
- export declare function generateRequiredDocument(requiredDocument: RequiredDocumentPayload): {};
51
+ export declare function transformRequiredDocument(requiredDocument: RequiredDocumentPayload): {};
@@ -1,54 +1,123 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  exports.__esModule = true;
3
- exports.generateRequiredDocument = void 0;
14
+ exports.transformRequiredDocument = exports.generatePersonApplicantPrivacy = exports.generateProofOfIdentity = exports.transformIdentification = exports.getNameOnDocument = exports.getApplicantGenderFromIdentification = void 0;
4
15
  var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
5
16
  var application_paths_1 = require("@lendi/integrations-protocol/lib/utils/application-paths");
6
- var date_fns_1 = require("date-fns");
7
17
  var lodash_1 = require("lodash");
18
+ var enum_mappings_1 = require("../types/enum-mappings");
8
19
  var proof_of_identity_1 = require("../types/enum-mappings/proof-of-identity");
9
20
  var title_gender_1 = require("../types/enum-mappings/title-gender");
21
+ var verification_1 = require("../types/enum-mappings/verification");
10
22
  var public_required_document_1 = require("../types/events/public-required-document");
23
+ var formatYesNo_1 = require("../utils/formatYesNo");
24
+ var iso_date_1 = require("../utils/iso-date");
11
25
  /**
12
- * Generates a partial internal request from a partial required document event.
26
+ * Gets the applicant gender from the identification data
13
27
  *
14
- * @param requiredDocument: A partial required document event.
15
- * @return A partial InternalRequest.
28
+ * @param identification Identification data
29
+ *
30
+ * @returns The gender of the applicant
16
31
  */
17
- function generateRequiredDocument(requiredDocument) {
18
- var partialApplication = {};
19
- var requiredDocsMapping = {
20
- applicantId: "".concat(application_paths_1.paths.PersonApplicant, ".@UniqueID"),
21
- applicationId: application_paths_1.paths.ApplicationId,
22
- eConsent: application_paths_1.paths.Privacy,
23
- identification: application_paths_1.paths.ProofOfIdentity
24
- };
25
- for (var _i = 0, _a = Object.entries(requiredDocument); _i < _a.length; _i++) {
26
- var _b = _a[_i], key = _b[0], value = _b[1];
27
- if (requiredDocsMapping[key]) {
28
- switch (key) {
29
- case 'identification':
30
- var _c = value, idType = _c.idType, idNumber = _c.idNumber, _d = _c.idTitle, idTitle = _d === void 0 ? public_required_document_1.IDTitle.Unknown : _d, gender = _c.gender;
31
- (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.ProofOfIdentity, ".@DocumentType"), proof_of_identity_1.proofOfIdentityMapping[idType]);
32
- (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.ProofOfIdentity, ".@DocumentNumber"), idNumber);
33
- if (gender) {
34
- (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.PersonApplicant, ".@Gender"), (0, lodash_1.capitalize)(gender));
35
- }
36
- else {
37
- (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.PersonApplicant, ".@Gender"), title_gender_1.titleGenderMapping[idTitle]);
38
- }
39
- break;
40
- case 'eConsent':
41
- var _e = requiredDocument.eConsent.consentedAt, consentedAt = _e === void 0 ? new Date() : _e;
42
- var hasValidConsent = requiredDocument.status === public_required_document_1.Status.Verified ? lixi_internal_request_1.YesNoList.Yes : lixi_internal_request_1.YesNoList.No;
43
- (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Privacy, ".@CreditAuthoritySigned"), hasValidConsent);
44
- (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Privacy, ".@DateSigned"), (0, date_fns_1.format)(new Date(consentedAt), 'yyyy-MM-dd'));
45
- break;
46
- default:
47
- (0, lodash_1.set)(partialApplication, requiredDocsMapping[key], value);
48
- break;
49
- }
32
+ var getApplicantGenderFromIdentification = function (identification) {
33
+ var gender = identification.gender, idTitle = identification.idTitle;
34
+ return gender ? (0, lodash_1.capitalize)(gender) : title_gender_1.titleGenderMapping[idTitle || public_required_document_1.IDTitle.Unknown];
35
+ };
36
+ exports.getApplicantGenderFromIdentification = getApplicantGenderFromIdentification;
37
+ /**
38
+ * Gets full name on document from the identification data
39
+ *
40
+ * @param identification Identification data
41
+ *
42
+ * @returns The full name on document
43
+ */
44
+ var getNameOnDocument = function (identification) {
45
+ var idFirstName = identification.idFirstName, idMiddleName = identification.idMiddleName, idLastName = identification.idLastName;
46
+ return [idFirstName, idMiddleName, idLastName].reduce(function (fullName, nameComponent) {
47
+ var newFullName = fullName;
48
+ var nameSubstring = nameComponent === null || nameComponent === void 0 ? void 0 : nameComponent.trim();
49
+ if (nameSubstring) {
50
+ newFullName += "".concat(fullName ? ' ' : '').concat(nameSubstring);
50
51
  }
52
+ return newFullName;
53
+ }, '');
54
+ };
55
+ exports.getNameOnDocument = getNameOnDocument;
56
+ /**
57
+ * Transforms identification data into a partial proof of identity document
58
+ *
59
+ * @param identification Identification data
60
+ *
61
+ * @returns Partial proof of identity object
62
+ */
63
+ var transformIdentification = function (identification) {
64
+ var australianState = identification.australianState, idNumber = identification.idNumber, idType = identification.idType, _a = identification.issuingCountry, issuingCountry = _a === void 0 ? public_required_document_1.IssuingCountry.Australia : _a;
65
+ var nameOnDocument = (0, exports.getNameOnDocument)(identification);
66
+ return __assign(__assign(__assign(__assign({}, (nameOnDocument && { '@NameOnDocument': nameOnDocument })), (idNumber && { '@DocumentNumber': idNumber })), (australianState && { '@PlaceOfIssue': australianState })), (idType === public_required_document_1.IDType.Passport && issuingCountry !== public_required_document_1.IssuingCountry.Australia
67
+ ? {
68
+ '@DocumentType': lixi_internal_request_1.DocumentTypeList.InternationalPassport,
69
+ '@CountryOfIssue': enum_mappings_1.countryCodeMapping[issuingCountry],
70
+ '@PlaceOfIssue': enum_mappings_1.countryCodeMapping[issuingCountry]
71
+ }
72
+ : { '@DocumentType': proof_of_identity_1.proofOfIdentityMapping[idType] }));
73
+ };
74
+ exports.transformIdentification = transformIdentification;
75
+ /**
76
+ * Generates partial details for document used to verify identity
77
+ *
78
+ * @param requiredDocument RequiredDocumentCreated/RequiredDocumentUpdated event payload
79
+ *
80
+ * @returns Partial proof of identity document object
81
+ */
82
+ var generateProofOfIdentity = function (requiredDocument) {
83
+ var id = requiredDocument.id, status = requiredDocument.status, expiryDate = requiredDocument.expiryDate, identification = requiredDocument.identification;
84
+ return __assign(__assign(__assign({ '@UniqueID': id, '@CountryOfIssue': lixi_internal_request_1.CountryCodeList.Au, '@PlaceOfIssue': lixi_internal_request_1.CountryCodeList.Au }, (expiryDate && { '@ExpiryDate': (0, iso_date_1.isoDate)(expiryDate) })), (status && { '@PhotographVerified': verification_1.verificationMapping[status] })), (identification && (0, exports.transformIdentification)(identification)));
85
+ };
86
+ exports.generateProofOfIdentity = generateProofOfIdentity;
87
+ /**
88
+ * Generates an applicants disclosure details mapping for the partial application
89
+ *
90
+ * @param eConsent E-Consent detials from the RequiredDocumentCreated/RequqiredDocumentUpdated event payload
91
+ *
92
+ * @returns Applicant disclosure details for partial application
93
+ */
94
+ var generatePersonApplicantPrivacy = function (eConsent) {
95
+ var hasConsented = eConsent.hasConsented, _a = eConsent.consentedAt, consentedAt = _a === void 0 ? new Date() : _a;
96
+ return {
97
+ '@CreditAuthoritySigned': (0, formatYesNo_1.formatYesNo)(hasConsented),
98
+ '@DateSigned': (0, iso_date_1.isoDate)(consentedAt)
99
+ };
100
+ };
101
+ exports.generatePersonApplicantPrivacy = generatePersonApplicantPrivacy;
102
+ /**
103
+ * Transforms a RequiredDocumentCreated or RequiredDocumentUpdated event payload into a partial application
104
+ *
105
+ * @param requiredDocument A RequiredDocumentCreated or RequiredDocumentUpdated event payload
106
+ *
107
+ * @return A partial application
108
+ */
109
+ function transformRequiredDocument(requiredDocument) {
110
+ var partialApplication = {};
111
+ var applicantId = requiredDocument.applicantId, applicationId = requiredDocument.applicationId, identification = requiredDocument.identification, eConsent = requiredDocument.eConsent;
112
+ (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.PersonApplicant, ".@UniqueID"), applicantId);
113
+ (0, lodash_1.set)(partialApplication, application_paths_1.paths.ApplicationId, applicationId);
114
+ if (identification) {
115
+ (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.PersonApplicant, ".@Gender"), (0, exports.getApplicantGenderFromIdentification)(identification));
116
+ (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.ProofOfIdentity), (0, exports.generateProofOfIdentity)(requiredDocument));
117
+ }
118
+ if (eConsent) {
119
+ (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Privacy), (0, exports.generatePersonApplicantPrivacy)(eConsent));
51
120
  }
52
121
  return partialApplication;
53
122
  }
54
- exports.generateRequiredDocument = generateRequiredDocument;
123
+ exports.transformRequiredDocument = transformRequiredDocument;
@@ -0,0 +1,7 @@
1
+ import { Status } from '../events/public-required-document';
2
+ import { YesNoList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
3
+ declare type VerificationMapping = {
4
+ [key in Status]: YesNoList;
5
+ };
6
+ export declare const verificationMapping: VerificationMapping;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.verificationMapping = void 0;
5
+ var public_required_document_1 = require("../events/public-required-document");
6
+ var lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
7
+ exports.verificationMapping = (_a = {},
8
+ _a[public_required_document_1.Status.Expired] = lixi_internal_request_1.YesNoList.No,
9
+ _a[public_required_document_1.Status.FailedVerification] = lixi_internal_request_1.YesNoList.No,
10
+ _a[public_required_document_1.Status.NotRequired] = lixi_internal_request_1.YesNoList.No,
11
+ _a[public_required_document_1.Status.PendingUpload] = lixi_internal_request_1.YesNoList.No,
12
+ _a[public_required_document_1.Status.Verified] = lixi_internal_request_1.YesNoList.Yes,
13
+ _a[public_required_document_1.Status.PendingVerification] = lixi_internal_request_1.YesNoList.No,
14
+ _a);
@@ -23,6 +23,10 @@ export interface Payload {
23
23
  */
24
24
  createdAt?: string;
25
25
  eConsent?: EConsent;
26
+ /**
27
+ * Expiry Date (can be null if no expiry date set)
28
+ */
29
+ expiryDate?: null | string;
26
30
  /**
27
31
  * Required Document ID
28
32
  */
@@ -44,10 +48,26 @@ export interface EConsent {
44
48
  hasConsented: boolean;
45
49
  }
46
50
  export interface Identification {
51
+ /**
52
+ * Australian State (can be null as it is an optional field)
53
+ */
54
+ australianState?: AustralianState | null;
47
55
  /**
48
56
  * Gender (can be null if migrated from SF as they do not have this field)
49
57
  */
50
58
  gender?: Gender | null;
59
+ /**
60
+ * ID First Name
61
+ */
62
+ idFirstName?: string;
63
+ /**
64
+ * ID Last Name
65
+ */
66
+ idLastName?: string;
67
+ /**
68
+ * ID Middle Name (can be null as it is an optional field)
69
+ */
70
+ idMiddleName?: null | string;
51
71
  /**
52
72
  * ID Number
53
73
  */
@@ -60,6 +80,20 @@ export interface Identification {
60
80
  * ID Type
61
81
  */
62
82
  idType: IDType;
83
+ /**
84
+ * Issuing Country (can be null as it is an optional field)
85
+ */
86
+ issuingCountry?: IssuingCountry | null;
87
+ }
88
+ export declare enum AustralianState {
89
+ Act = "ACT",
90
+ NT = "NT",
91
+ Nsw = "NSW",
92
+ Qld = "QLD",
93
+ Sa = "SA",
94
+ Tas = "TAS",
95
+ Vic = "VIC",
96
+ Wa = "WA"
63
97
  }
64
98
  export declare enum Gender {
65
99
  Female = "FEMALE",
@@ -82,6 +116,247 @@ export declare enum IDType {
82
116
  NationalIDCard = "national_id_card",
83
117
  Passport = "passport"
84
118
  }
119
+ export declare enum IssuingCountry {
120
+ Afghanistan = "Afghanistan",
121
+ Albania = "Albania",
122
+ Algeria = "Algeria",
123
+ AmericanSamoa = "American Samoa",
124
+ Andorra = "Andorra",
125
+ Angola = "Angola",
126
+ Anguilla = "Anguilla",
127
+ Antarctica = "Antarctica",
128
+ AntiguaAndBarbuda = "Antigua And Barbuda",
129
+ Argentina = "Argentina",
130
+ Armenia = "Armenia",
131
+ Aruba = "Aruba",
132
+ Australia = "Australia",
133
+ Austria = "Austria",
134
+ Azerbaijan = "Azerbaijan",
135
+ Bahamas = "Bahamas",
136
+ Bahrain = "Bahrain",
137
+ Bangladesh = "Bangladesh",
138
+ Barbados = "Barbados",
139
+ Belarus = "Belarus",
140
+ Belgium = "Belgium",
141
+ Belize = "Belize",
142
+ Benin = "Benin",
143
+ Bermuda = "Bermuda",
144
+ Bhutan = "Bhutan",
145
+ Bolivia = "Bolivia",
146
+ BosniaAndHerzegovina = "Bosnia And Herzegovina",
147
+ Botswana = "Botswana",
148
+ BouvetIsland = "Bouvet Island",
149
+ Brazil = "Brazil",
150
+ BritishIndianOceanTerritory = "British Indian Ocean Territory",
151
+ BritishVirginIslands = "British Virgin Islands",
152
+ BruneiDarussalam = "Brunei Darussalam",
153
+ Bulgaria = "Bulgaria",
154
+ BurkinaFaso = "Burkina Faso",
155
+ Burundi = "Burundi",
156
+ Cambodia = "Cambodia",
157
+ Cameroon = "Cameroon",
158
+ Canada = "Canada",
159
+ CapeVerde = "Cape Verde",
160
+ CaymanIslands = "Cayman Islands",
161
+ CentralAfricanRepublic = "Central African Republic",
162
+ Chad = "Chad",
163
+ Chile = "Chile",
164
+ China = "China",
165
+ ChristmasIsland = "Christmas Island",
166
+ CocosKeelingIslands = "Cocos (Keeling) Islands",
167
+ Colombia = "Colombia",
168
+ Comoros = "Comoros",
169
+ CookIslands = "Cook Islands",
170
+ CostaRica = "Costa Rica",
171
+ CoteDIvoire = "Cote D'ivoire",
172
+ Croatia = "Croatia",
173
+ Cuba = "Cuba",
174
+ Cyprus = "Cyprus",
175
+ CzechRepublic = "Czech Republic",
176
+ DemocraticPeopleSRepublicOfKorea = "Democratic People's Republic of Korea",
177
+ DemocraticRepublicOfTheCongo = "Democratic Republic Of The Congo",
178
+ Denmark = "Denmark",
179
+ Djibouti = "Djibouti",
180
+ Dominica = "Dominica",
181
+ DominicanRepublic = "Dominican Republic",
182
+ EastTimor = "East Timor",
183
+ Ecuador = "Ecuador",
184
+ Egypt = "Egypt",
185
+ ElSalvador = "El Salvador",
186
+ EquatorialGuinea = "Equatorial Guinea",
187
+ Eritrea = "Eritrea",
188
+ Estonia = "Estonia",
189
+ Ethiopia = "Ethiopia",
190
+ FalklandIslands = "Falkland Islands",
191
+ FaroeIslands = "Faroe Islands",
192
+ FederatedStatesOfMicronesia = "Federated States Of Micronesia",
193
+ Fiji = "Fiji",
194
+ Finland = "Finland",
195
+ France = "France",
196
+ FrenchGuiana = "French Guiana",
197
+ FrenchPolynesia = "French Polynesia",
198
+ FrenchSouthernTerritories = "French Southern Territories",
199
+ Gabon = "Gabon",
200
+ Gambia = "Gambia",
201
+ Georgia = "Georgia",
202
+ Germany = "Germany",
203
+ Ghana = "Ghana",
204
+ Gibraltar = "Gibraltar",
205
+ Greece = "Greece",
206
+ Greenland = "Greenland",
207
+ Grenada = "Grenada",
208
+ Guadeloupe = "Guadeloupe",
209
+ Guam = "Guam",
210
+ Guatemala = "Guatemala",
211
+ Guinea = "Guinea",
212
+ GuineaBissau = "Guinea-bissau",
213
+ Guyana = "Guyana",
214
+ Haiti = "Haiti",
215
+ HeardIslandAndMcdonaldIslands = "Heard Island And Mcdonald Islands",
216
+ HolySeeVaticanCityState = "Holy See (Vatican City State)",
217
+ Honduras = "Honduras",
218
+ HongKong = "Hong Kong",
219
+ Hungary = "Hungary",
220
+ Iceland = "Iceland",
221
+ India = "India",
222
+ Indonesia = "Indonesia",
223
+ Iran = "Iran",
224
+ Iraq = "Iraq",
225
+ Ireland = "Ireland",
226
+ Israel = "Israel",
227
+ Italy = "Italy",
228
+ Jamaica = "Jamaica",
229
+ Japan = "Japan",
230
+ Jordan = "Jordan",
231
+ Kazakstan = "Kazakstan",
232
+ Kenya = "Kenya",
233
+ Kiribati = "Kiribati",
234
+ Kosovo = "Kosovo",
235
+ Kuwait = "Kuwait",
236
+ Kyrgyzstan = "Kyrgyzstan",
237
+ Laos = "Laos",
238
+ Latvia = "Latvia",
239
+ Lebanon = "Lebanon",
240
+ Lesotho = "Lesotho",
241
+ Liberia = "Liberia",
242
+ LibyanArabJamahiriya = "Libyan Arab Jamahiriya",
243
+ Liechtenstein = "Liechtenstein",
244
+ Lithuania = "Lithuania",
245
+ Luxembourg = "Luxembourg",
246
+ Macau = "Macau",
247
+ Macedonia = "Macedonia",
248
+ Madagascar = "Madagascar",
249
+ Malawi = "Malawi",
250
+ Malaysia = "Malaysia",
251
+ Maldives = "Maldives",
252
+ Mali = "Mali",
253
+ Malta = "Malta",
254
+ MarshallIslands = "Marshall Islands",
255
+ Martinique = "Martinique",
256
+ Mauritania = "Mauritania",
257
+ Mauritius = "Mauritius",
258
+ Mayotte = "Mayotte",
259
+ Mexico = "Mexico",
260
+ Monaco = "Monaco",
261
+ Mongolia = "Mongolia",
262
+ Montenegro = "Montenegro",
263
+ Montserrat = "Montserrat",
264
+ Morocco = "Morocco",
265
+ Mozambique = "Mozambique",
266
+ Myanmar = "Myanmar",
267
+ Namibia = "Namibia",
268
+ Nauru = "Nauru",
269
+ Nepal = "Nepal",
270
+ Netherlands = "Netherlands",
271
+ NetherlandsAntilles = "Netherlands Antilles",
272
+ NewCaledonia = "New Caledonia",
273
+ NewZealand = "New Zealand",
274
+ Nicaragua = "Nicaragua",
275
+ Niger = "Niger",
276
+ Nigeria = "Nigeria",
277
+ Niue = "Niue",
278
+ NorfolkIsland = "Norfolk Island",
279
+ NorthernMarianaIslands = "Northern Mariana Islands",
280
+ Norway = "Norway",
281
+ Oman = "Oman",
282
+ Pakistan = "Pakistan",
283
+ Palau = "Palau",
284
+ PalestinianTerritory = "Palestinian Territory",
285
+ Panama = "Panama",
286
+ PapuaNewGuinea = "Papua New Guinea",
287
+ Paraguay = "Paraguay",
288
+ Peru = "Peru",
289
+ Philippines = "Philippines",
290
+ Pitcairn = "Pitcairn",
291
+ Poland = "Poland",
292
+ Portugal = "Portugal",
293
+ PuertoRico = "Puerto Rico",
294
+ Qatar = "Qatar",
295
+ RepublicOfMoldova = "Republic Of Moldova",
296
+ Romania = "Romania",
297
+ RussianFederation = "Russian Federation",
298
+ Rwanda = "Rwanda",
299
+ SANMarino = "San Marino",
300
+ SaintHelena = "Saint Helena",
301
+ SaintKittsAndNevis = "Saint Kitts And Nevis",
302
+ SaintLucia = "Saint Lucia",
303
+ SaintPierreAndMiquelon = "Saint Pierre And Miquelon",
304
+ SaintVincentAndTheGrenadines = "Saint Vincent And The Grenadines",
305
+ Samoa = "Samoa",
306
+ SaoTomeAndPrincipe = "Sao Tome And Principe",
307
+ SaudiArabia = "Saudi Arabia",
308
+ Senegal = "Senegal",
309
+ Serbia = "Serbia",
310
+ Seychelles = "Seychelles",
311
+ SierraLeone = "Sierra Leone",
312
+ Singapore = "Singapore",
313
+ Slovakia = "Slovakia",
314
+ Slovenia = "Slovenia",
315
+ SolomonIslands = "Solomon Islands",
316
+ Somalia = "Somalia",
317
+ SouthAfrica = "South Africa",
318
+ SouthGeorgiaAndTheSouthSandwichIslands = "South Georgia And The South Sandwich Islands",
319
+ Spain = "Spain",
320
+ SriLanka = "Sri Lanka",
321
+ Sudan = "Sudan",
322
+ Suriname = "Suriname",
323
+ SvalbardAndJanMayen = "Svalbard And Jan Mayen",
324
+ Swaziland = "Swaziland",
325
+ Sweden = "Sweden",
326
+ Switzerland = "Switzerland",
327
+ SyrianArabRepublic = "Syrian Arab Republic",
328
+ Taiwan = "Taiwan",
329
+ Tajikistan = "Tajikistan",
330
+ Tanzania = "Tanzania",
331
+ Thailand = "Thailand",
332
+ TheRepublicOfSouthKorea = "The Republic of South Korea",
333
+ Togo = "Togo",
334
+ Tokelau = "Tokelau",
335
+ Tonga = "Tonga",
336
+ TrinidadAndTobago = "Trinidad And Tobago",
337
+ Tunisia = "Tunisia",
338
+ Turkey = "Turkey",
339
+ Turkmenistan = "Turkmenistan",
340
+ TurksAndCaicosIslands = "Turks And Caicos Islands",
341
+ Tuvalu = "Tuvalu",
342
+ USVirginIslands = "US Virgin Islands",
343
+ Uganda = "Uganda",
344
+ Ukraine = "Ukraine",
345
+ UnitedArabEmirates = "United Arab Emirates",
346
+ UnitedKingdom = "United Kingdom",
347
+ UnitedStatesMinorOutlyingIslands = "United States Minor Outlying Islands",
348
+ UnitedStatesOfAmerica = "United States of America",
349
+ Uruguay = "Uruguay",
350
+ Uzbekistan = "Uzbekistan",
351
+ Vanuatu = "Vanuatu",
352
+ Venezuela = "Venezuela",
353
+ Vietnam = "Vietnam",
354
+ WallisAndFutuna = "Wallis And Futuna",
355
+ WesternSahara = "Western Sahara",
356
+ Yemen = "Yemen",
357
+ Zambia = "Zambia",
358
+ Zimbabwe = "Zimbabwe"
359
+ }
85
360
  /**
86
361
  * Status
87
362
  */
@@ -1,6 +1,17 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.Type = exports.Status = exports.IDType = exports.IDTitle = exports.Gender = void 0;
3
+ exports.Type = exports.Status = exports.IssuingCountry = exports.IDType = exports.IDTitle = exports.Gender = exports.AustralianState = void 0;
4
+ var AustralianState;
5
+ (function (AustralianState) {
6
+ AustralianState["Act"] = "ACT";
7
+ AustralianState["NT"] = "NT";
8
+ AustralianState["Nsw"] = "NSW";
9
+ AustralianState["Qld"] = "QLD";
10
+ AustralianState["Sa"] = "SA";
11
+ AustralianState["Tas"] = "TAS";
12
+ AustralianState["Vic"] = "VIC";
13
+ AustralianState["Wa"] = "WA";
14
+ })(AustralianState = exports.AustralianState || (exports.AustralianState = {}));
4
15
  var Gender;
5
16
  (function (Gender) {
6
17
  Gender["Female"] = "FEMALE";
@@ -25,6 +36,248 @@ var IDType;
25
36
  IDType["NationalIDCard"] = "national_id_card";
26
37
  IDType["Passport"] = "passport";
27
38
  })(IDType = exports.IDType || (exports.IDType = {}));
39
+ var IssuingCountry;
40
+ (function (IssuingCountry) {
41
+ IssuingCountry["Afghanistan"] = "Afghanistan";
42
+ IssuingCountry["Albania"] = "Albania";
43
+ IssuingCountry["Algeria"] = "Algeria";
44
+ IssuingCountry["AmericanSamoa"] = "American Samoa";
45
+ IssuingCountry["Andorra"] = "Andorra";
46
+ IssuingCountry["Angola"] = "Angola";
47
+ IssuingCountry["Anguilla"] = "Anguilla";
48
+ IssuingCountry["Antarctica"] = "Antarctica";
49
+ IssuingCountry["AntiguaAndBarbuda"] = "Antigua And Barbuda";
50
+ IssuingCountry["Argentina"] = "Argentina";
51
+ IssuingCountry["Armenia"] = "Armenia";
52
+ IssuingCountry["Aruba"] = "Aruba";
53
+ IssuingCountry["Australia"] = "Australia";
54
+ IssuingCountry["Austria"] = "Austria";
55
+ IssuingCountry["Azerbaijan"] = "Azerbaijan";
56
+ IssuingCountry["Bahamas"] = "Bahamas";
57
+ IssuingCountry["Bahrain"] = "Bahrain";
58
+ IssuingCountry["Bangladesh"] = "Bangladesh";
59
+ IssuingCountry["Barbados"] = "Barbados";
60
+ IssuingCountry["Belarus"] = "Belarus";
61
+ IssuingCountry["Belgium"] = "Belgium";
62
+ IssuingCountry["Belize"] = "Belize";
63
+ IssuingCountry["Benin"] = "Benin";
64
+ IssuingCountry["Bermuda"] = "Bermuda";
65
+ IssuingCountry["Bhutan"] = "Bhutan";
66
+ IssuingCountry["Bolivia"] = "Bolivia";
67
+ IssuingCountry["BosniaAndHerzegovina"] = "Bosnia And Herzegovina";
68
+ IssuingCountry["Botswana"] = "Botswana";
69
+ IssuingCountry["BouvetIsland"] = "Bouvet Island";
70
+ IssuingCountry["Brazil"] = "Brazil";
71
+ IssuingCountry["BritishIndianOceanTerritory"] = "British Indian Ocean Territory";
72
+ IssuingCountry["BritishVirginIslands"] = "British Virgin Islands";
73
+ IssuingCountry["BruneiDarussalam"] = "Brunei Darussalam";
74
+ IssuingCountry["Bulgaria"] = "Bulgaria";
75
+ IssuingCountry["BurkinaFaso"] = "Burkina Faso";
76
+ IssuingCountry["Burundi"] = "Burundi";
77
+ IssuingCountry["Cambodia"] = "Cambodia";
78
+ IssuingCountry["Cameroon"] = "Cameroon";
79
+ IssuingCountry["Canada"] = "Canada";
80
+ IssuingCountry["CapeVerde"] = "Cape Verde";
81
+ IssuingCountry["CaymanIslands"] = "Cayman Islands";
82
+ IssuingCountry["CentralAfricanRepublic"] = "Central African Republic";
83
+ IssuingCountry["Chad"] = "Chad";
84
+ IssuingCountry["Chile"] = "Chile";
85
+ IssuingCountry["China"] = "China";
86
+ IssuingCountry["ChristmasIsland"] = "Christmas Island";
87
+ IssuingCountry["CocosKeelingIslands"] = "Cocos (Keeling) Islands";
88
+ IssuingCountry["Colombia"] = "Colombia";
89
+ IssuingCountry["Comoros"] = "Comoros";
90
+ IssuingCountry["CookIslands"] = "Cook Islands";
91
+ IssuingCountry["CostaRica"] = "Costa Rica";
92
+ IssuingCountry["CoteDIvoire"] = "Cote D'ivoire";
93
+ IssuingCountry["Croatia"] = "Croatia";
94
+ IssuingCountry["Cuba"] = "Cuba";
95
+ IssuingCountry["Cyprus"] = "Cyprus";
96
+ IssuingCountry["CzechRepublic"] = "Czech Republic";
97
+ IssuingCountry["DemocraticPeopleSRepublicOfKorea"] = "Democratic People's Republic of Korea";
98
+ IssuingCountry["DemocraticRepublicOfTheCongo"] = "Democratic Republic Of The Congo";
99
+ IssuingCountry["Denmark"] = "Denmark";
100
+ IssuingCountry["Djibouti"] = "Djibouti";
101
+ IssuingCountry["Dominica"] = "Dominica";
102
+ IssuingCountry["DominicanRepublic"] = "Dominican Republic";
103
+ IssuingCountry["EastTimor"] = "East Timor";
104
+ IssuingCountry["Ecuador"] = "Ecuador";
105
+ IssuingCountry["Egypt"] = "Egypt";
106
+ IssuingCountry["ElSalvador"] = "El Salvador";
107
+ IssuingCountry["EquatorialGuinea"] = "Equatorial Guinea";
108
+ IssuingCountry["Eritrea"] = "Eritrea";
109
+ IssuingCountry["Estonia"] = "Estonia";
110
+ IssuingCountry["Ethiopia"] = "Ethiopia";
111
+ IssuingCountry["FalklandIslands"] = "Falkland Islands";
112
+ IssuingCountry["FaroeIslands"] = "Faroe Islands";
113
+ IssuingCountry["FederatedStatesOfMicronesia"] = "Federated States Of Micronesia";
114
+ IssuingCountry["Fiji"] = "Fiji";
115
+ IssuingCountry["Finland"] = "Finland";
116
+ IssuingCountry["France"] = "France";
117
+ IssuingCountry["FrenchGuiana"] = "French Guiana";
118
+ IssuingCountry["FrenchPolynesia"] = "French Polynesia";
119
+ IssuingCountry["FrenchSouthernTerritories"] = "French Southern Territories";
120
+ IssuingCountry["Gabon"] = "Gabon";
121
+ IssuingCountry["Gambia"] = "Gambia";
122
+ IssuingCountry["Georgia"] = "Georgia";
123
+ IssuingCountry["Germany"] = "Germany";
124
+ IssuingCountry["Ghana"] = "Ghana";
125
+ IssuingCountry["Gibraltar"] = "Gibraltar";
126
+ IssuingCountry["Greece"] = "Greece";
127
+ IssuingCountry["Greenland"] = "Greenland";
128
+ IssuingCountry["Grenada"] = "Grenada";
129
+ IssuingCountry["Guadeloupe"] = "Guadeloupe";
130
+ IssuingCountry["Guam"] = "Guam";
131
+ IssuingCountry["Guatemala"] = "Guatemala";
132
+ IssuingCountry["Guinea"] = "Guinea";
133
+ IssuingCountry["GuineaBissau"] = "Guinea-bissau";
134
+ IssuingCountry["Guyana"] = "Guyana";
135
+ IssuingCountry["Haiti"] = "Haiti";
136
+ IssuingCountry["HeardIslandAndMcdonaldIslands"] = "Heard Island And Mcdonald Islands";
137
+ IssuingCountry["HolySeeVaticanCityState"] = "Holy See (Vatican City State)";
138
+ IssuingCountry["Honduras"] = "Honduras";
139
+ IssuingCountry["HongKong"] = "Hong Kong";
140
+ IssuingCountry["Hungary"] = "Hungary";
141
+ IssuingCountry["Iceland"] = "Iceland";
142
+ IssuingCountry["India"] = "India";
143
+ IssuingCountry["Indonesia"] = "Indonesia";
144
+ IssuingCountry["Iran"] = "Iran";
145
+ IssuingCountry["Iraq"] = "Iraq";
146
+ IssuingCountry["Ireland"] = "Ireland";
147
+ IssuingCountry["Israel"] = "Israel";
148
+ IssuingCountry["Italy"] = "Italy";
149
+ IssuingCountry["Jamaica"] = "Jamaica";
150
+ IssuingCountry["Japan"] = "Japan";
151
+ IssuingCountry["Jordan"] = "Jordan";
152
+ IssuingCountry["Kazakstan"] = "Kazakstan";
153
+ IssuingCountry["Kenya"] = "Kenya";
154
+ IssuingCountry["Kiribati"] = "Kiribati";
155
+ IssuingCountry["Kosovo"] = "Kosovo";
156
+ IssuingCountry["Kuwait"] = "Kuwait";
157
+ IssuingCountry["Kyrgyzstan"] = "Kyrgyzstan";
158
+ IssuingCountry["Laos"] = "Laos";
159
+ IssuingCountry["Latvia"] = "Latvia";
160
+ IssuingCountry["Lebanon"] = "Lebanon";
161
+ IssuingCountry["Lesotho"] = "Lesotho";
162
+ IssuingCountry["Liberia"] = "Liberia";
163
+ IssuingCountry["LibyanArabJamahiriya"] = "Libyan Arab Jamahiriya";
164
+ IssuingCountry["Liechtenstein"] = "Liechtenstein";
165
+ IssuingCountry["Lithuania"] = "Lithuania";
166
+ IssuingCountry["Luxembourg"] = "Luxembourg";
167
+ IssuingCountry["Macau"] = "Macau";
168
+ IssuingCountry["Macedonia"] = "Macedonia";
169
+ IssuingCountry["Madagascar"] = "Madagascar";
170
+ IssuingCountry["Malawi"] = "Malawi";
171
+ IssuingCountry["Malaysia"] = "Malaysia";
172
+ IssuingCountry["Maldives"] = "Maldives";
173
+ IssuingCountry["Mali"] = "Mali";
174
+ IssuingCountry["Malta"] = "Malta";
175
+ IssuingCountry["MarshallIslands"] = "Marshall Islands";
176
+ IssuingCountry["Martinique"] = "Martinique";
177
+ IssuingCountry["Mauritania"] = "Mauritania";
178
+ IssuingCountry["Mauritius"] = "Mauritius";
179
+ IssuingCountry["Mayotte"] = "Mayotte";
180
+ IssuingCountry["Mexico"] = "Mexico";
181
+ IssuingCountry["Monaco"] = "Monaco";
182
+ IssuingCountry["Mongolia"] = "Mongolia";
183
+ IssuingCountry["Montenegro"] = "Montenegro";
184
+ IssuingCountry["Montserrat"] = "Montserrat";
185
+ IssuingCountry["Morocco"] = "Morocco";
186
+ IssuingCountry["Mozambique"] = "Mozambique";
187
+ IssuingCountry["Myanmar"] = "Myanmar";
188
+ IssuingCountry["Namibia"] = "Namibia";
189
+ IssuingCountry["Nauru"] = "Nauru";
190
+ IssuingCountry["Nepal"] = "Nepal";
191
+ IssuingCountry["Netherlands"] = "Netherlands";
192
+ IssuingCountry["NetherlandsAntilles"] = "Netherlands Antilles";
193
+ IssuingCountry["NewCaledonia"] = "New Caledonia";
194
+ IssuingCountry["NewZealand"] = "New Zealand";
195
+ IssuingCountry["Nicaragua"] = "Nicaragua";
196
+ IssuingCountry["Niger"] = "Niger";
197
+ IssuingCountry["Nigeria"] = "Nigeria";
198
+ IssuingCountry["Niue"] = "Niue";
199
+ IssuingCountry["NorfolkIsland"] = "Norfolk Island";
200
+ IssuingCountry["NorthernMarianaIslands"] = "Northern Mariana Islands";
201
+ IssuingCountry["Norway"] = "Norway";
202
+ IssuingCountry["Oman"] = "Oman";
203
+ IssuingCountry["Pakistan"] = "Pakistan";
204
+ IssuingCountry["Palau"] = "Palau";
205
+ IssuingCountry["PalestinianTerritory"] = "Palestinian Territory";
206
+ IssuingCountry["Panama"] = "Panama";
207
+ IssuingCountry["PapuaNewGuinea"] = "Papua New Guinea";
208
+ IssuingCountry["Paraguay"] = "Paraguay";
209
+ IssuingCountry["Peru"] = "Peru";
210
+ IssuingCountry["Philippines"] = "Philippines";
211
+ IssuingCountry["Pitcairn"] = "Pitcairn";
212
+ IssuingCountry["Poland"] = "Poland";
213
+ IssuingCountry["Portugal"] = "Portugal";
214
+ IssuingCountry["PuertoRico"] = "Puerto Rico";
215
+ IssuingCountry["Qatar"] = "Qatar";
216
+ IssuingCountry["RepublicOfMoldova"] = "Republic Of Moldova";
217
+ IssuingCountry["Romania"] = "Romania";
218
+ IssuingCountry["RussianFederation"] = "Russian Federation";
219
+ IssuingCountry["Rwanda"] = "Rwanda";
220
+ IssuingCountry["SANMarino"] = "San Marino";
221
+ IssuingCountry["SaintHelena"] = "Saint Helena";
222
+ IssuingCountry["SaintKittsAndNevis"] = "Saint Kitts And Nevis";
223
+ IssuingCountry["SaintLucia"] = "Saint Lucia";
224
+ IssuingCountry["SaintPierreAndMiquelon"] = "Saint Pierre And Miquelon";
225
+ IssuingCountry["SaintVincentAndTheGrenadines"] = "Saint Vincent And The Grenadines";
226
+ IssuingCountry["Samoa"] = "Samoa";
227
+ IssuingCountry["SaoTomeAndPrincipe"] = "Sao Tome And Principe";
228
+ IssuingCountry["SaudiArabia"] = "Saudi Arabia";
229
+ IssuingCountry["Senegal"] = "Senegal";
230
+ IssuingCountry["Serbia"] = "Serbia";
231
+ IssuingCountry["Seychelles"] = "Seychelles";
232
+ IssuingCountry["SierraLeone"] = "Sierra Leone";
233
+ IssuingCountry["Singapore"] = "Singapore";
234
+ IssuingCountry["Slovakia"] = "Slovakia";
235
+ IssuingCountry["Slovenia"] = "Slovenia";
236
+ IssuingCountry["SolomonIslands"] = "Solomon Islands";
237
+ IssuingCountry["Somalia"] = "Somalia";
238
+ IssuingCountry["SouthAfrica"] = "South Africa";
239
+ IssuingCountry["SouthGeorgiaAndTheSouthSandwichIslands"] = "South Georgia And The South Sandwich Islands";
240
+ IssuingCountry["Spain"] = "Spain";
241
+ IssuingCountry["SriLanka"] = "Sri Lanka";
242
+ IssuingCountry["Sudan"] = "Sudan";
243
+ IssuingCountry["Suriname"] = "Suriname";
244
+ IssuingCountry["SvalbardAndJanMayen"] = "Svalbard And Jan Mayen";
245
+ IssuingCountry["Swaziland"] = "Swaziland";
246
+ IssuingCountry["Sweden"] = "Sweden";
247
+ IssuingCountry["Switzerland"] = "Switzerland";
248
+ IssuingCountry["SyrianArabRepublic"] = "Syrian Arab Republic";
249
+ IssuingCountry["Taiwan"] = "Taiwan";
250
+ IssuingCountry["Tajikistan"] = "Tajikistan";
251
+ IssuingCountry["Tanzania"] = "Tanzania";
252
+ IssuingCountry["Thailand"] = "Thailand";
253
+ IssuingCountry["TheRepublicOfSouthKorea"] = "The Republic of South Korea";
254
+ IssuingCountry["Togo"] = "Togo";
255
+ IssuingCountry["Tokelau"] = "Tokelau";
256
+ IssuingCountry["Tonga"] = "Tonga";
257
+ IssuingCountry["TrinidadAndTobago"] = "Trinidad And Tobago";
258
+ IssuingCountry["Tunisia"] = "Tunisia";
259
+ IssuingCountry["Turkey"] = "Turkey";
260
+ IssuingCountry["Turkmenistan"] = "Turkmenistan";
261
+ IssuingCountry["TurksAndCaicosIslands"] = "Turks And Caicos Islands";
262
+ IssuingCountry["Tuvalu"] = "Tuvalu";
263
+ IssuingCountry["USVirginIslands"] = "US Virgin Islands";
264
+ IssuingCountry["Uganda"] = "Uganda";
265
+ IssuingCountry["Ukraine"] = "Ukraine";
266
+ IssuingCountry["UnitedArabEmirates"] = "United Arab Emirates";
267
+ IssuingCountry["UnitedKingdom"] = "United Kingdom";
268
+ IssuingCountry["UnitedStatesMinorOutlyingIslands"] = "United States Minor Outlying Islands";
269
+ IssuingCountry["UnitedStatesOfAmerica"] = "United States of America";
270
+ IssuingCountry["Uruguay"] = "Uruguay";
271
+ IssuingCountry["Uzbekistan"] = "Uzbekistan";
272
+ IssuingCountry["Vanuatu"] = "Vanuatu";
273
+ IssuingCountry["Venezuela"] = "Venezuela";
274
+ IssuingCountry["Vietnam"] = "Vietnam";
275
+ IssuingCountry["WallisAndFutuna"] = "Wallis And Futuna";
276
+ IssuingCountry["WesternSahara"] = "Western Sahara";
277
+ IssuingCountry["Yemen"] = "Yemen";
278
+ IssuingCountry["Zambia"] = "Zambia";
279
+ IssuingCountry["Zimbabwe"] = "Zimbabwe";
280
+ })(IssuingCountry = exports.IssuingCountry || (exports.IssuingCountry = {}));
28
281
  /**
29
282
  * Status
30
283
  */
@@ -0,0 +1,9 @@
1
+ import { YesNoList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
2
+ /**
3
+ * Formats a value as Yes or No
4
+ *
5
+ * @param isTruthy Some value to be formatted as Yes/No
6
+ *
7
+ * @returns Yes/No
8
+ */
9
+ export declare const formatYesNo: (isTruthy: any) => YesNoList;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.formatYesNo = void 0;
4
+ var lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
5
+ /**
6
+ * Formats a value as Yes or No
7
+ *
8
+ * @param isTruthy Some value to be formatted as Yes/No
9
+ *
10
+ * @returns Yes/No
11
+ */
12
+ var formatYesNo = function (isTruthy) { return (isTruthy ? lixi_internal_request_1.YesNoList.Yes : lixi_internal_request_1.YesNoList.No); };
13
+ exports.formatYesNo = formatYesNo;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Formats a date to ISO 8601 format with time
3
+ *
4
+ * @param {string | Date} str - A string that could be converted to a Date (or) a Date.
5
+ *
6
+ * @returns {string} - A ISO Date format without the time. (yyyy-MM-dd)
7
+ */
8
+ export declare const isoDate: (str: string | Date) => string;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.isoDate = void 0;
4
+ var date_fns_1 = require("date-fns");
5
+ /**
6
+ * Formats a date to ISO 8601 format with time
7
+ *
8
+ * @param {string | Date} str - A string that could be converted to a Date (or) a Date.
9
+ *
10
+ * @returns {string} - A ISO Date format without the time. (yyyy-MM-dd)
11
+ */
12
+ var isoDate = function (str) { return (0, date_fns_1.formatISO)(new Date(str), { representation: 'date' }); };
13
+ exports.isoDate = isoDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Library for kafka event data transforming",
5
5
  "author": "Integrations <integrations@lendi.com.au>",
6
6
  "homepage": "https://bitbucket.org/lendi-dev/integrations-shared-packages#readme",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@lendi/integrations-credit-protocol": "1.17.1",
25
- "@lendi/integrations-protocol": "2.5.4",
25
+ "@lendi/integrations-protocol": "2.6.1",
26
26
  "clean-deep": "^3.4.0",
27
27
  "date-fns": "2.19.0",
28
28
  "lodash": "^4.17.15",