@marqeta/ux-toolkit-sdk-javascript 2.19.1 → 2.20.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/{chunk-ETU5DMN7.mjs → chunk-KQ3M4IEL.mjs} +1374 -291
- package/dist/{chunk-DCUOKAHQ.js → chunk-TE7F5GLR.js} +1373 -290
- package/dist/index.d.mts +11 -6
- package/dist/index.d.ts +11 -6
- package/dist/index.js +482 -482
- package/dist/index.mjs +1 -1
- package/dist/react-native.js +523 -523
- package/dist/react-native.mjs +1 -1
- package/package.json +1 -1
|
@@ -2264,7 +2264,7 @@ var _MockCardRepository = /*#__PURE__*/ function() {
|
|
|
2264
2264
|
},
|
|
2265
2265
|
{
|
|
2266
2266
|
key: "getShowpanByCardToken",
|
|
2267
|
-
value: function getShowpanByCardToken(cardToken) {
|
|
2267
|
+
value: function getShowpanByCardToken(cardToken, shortCode) {
|
|
2268
2268
|
return _async_to_generator(function() {
|
|
2269
2269
|
var testCardTokenState;
|
|
2270
2270
|
return _ts_generator(this, function(_state) {
|
|
@@ -2288,7 +2288,7 @@ var _MockCardRepository = /*#__PURE__*/ function() {
|
|
|
2288
2288
|
},
|
|
2289
2289
|
{
|
|
2290
2290
|
key: "getCardByToken",
|
|
2291
|
-
value: function getCardByToken(cardToken) {
|
|
2291
|
+
value: function getCardByToken(cardToken, shortCode) {
|
|
2292
2292
|
return _async_to_generator(function() {
|
|
2293
2293
|
var testCardTokenState, testInstrumentType;
|
|
2294
2294
|
return _ts_generator(this, function(_state) {
|
|
@@ -2442,7 +2442,7 @@ var _GetCardByToken = /*#__PURE__*/ function() {
|
|
|
2442
2442
|
_create_class(_GetCardByToken, [
|
|
2443
2443
|
{
|
|
2444
2444
|
key: "execute",
|
|
2445
|
-
value: function execute(cardToken) {
|
|
2445
|
+
value: function execute(cardToken, shortCode) {
|
|
2446
2446
|
var _this = this;
|
|
2447
2447
|
return _async_to_generator(function() {
|
|
2448
2448
|
return _ts_generator(this, function(_state) {
|
|
@@ -2450,7 +2450,7 @@ var _GetCardByToken = /*#__PURE__*/ function() {
|
|
|
2450
2450
|
case 0:
|
|
2451
2451
|
return [
|
|
2452
2452
|
4,
|
|
2453
|
-
_this.cardRepository.getCardByToken(cardToken)
|
|
2453
|
+
_this.cardRepository.getCardByToken(cardToken, shortCode)
|
|
2454
2454
|
];
|
|
2455
2455
|
case 1:
|
|
2456
2456
|
return [
|
|
@@ -2560,7 +2560,7 @@ var _GetShowpanByCardToken = /*#__PURE__*/ function() {
|
|
|
2560
2560
|
_create_class(_GetShowpanByCardToken, [
|
|
2561
2561
|
{
|
|
2562
2562
|
key: "execute",
|
|
2563
|
-
value: function execute(cardToken) {
|
|
2563
|
+
value: function execute(cardToken, shortCode) {
|
|
2564
2564
|
var _this = this;
|
|
2565
2565
|
return _async_to_generator(function() {
|
|
2566
2566
|
return _ts_generator(this, function(_state) {
|
|
@@ -2568,7 +2568,7 @@ var _GetShowpanByCardToken = /*#__PURE__*/ function() {
|
|
|
2568
2568
|
case 0:
|
|
2569
2569
|
return [
|
|
2570
2570
|
4,
|
|
2571
|
-
_this.cardRepository.getShowpanByCardToken(cardToken)
|
|
2571
|
+
_this.cardRepository.getShowpanByCardToken(cardToken, shortCode)
|
|
2572
2572
|
];
|
|
2573
2573
|
case 1:
|
|
2574
2574
|
return [
|
|
@@ -2895,9 +2895,6 @@ var _UpdatePinByCardToken = /*#__PURE__*/ function() {
|
|
|
2895
2895
|
];
|
|
2896
2896
|
case 1:
|
|
2897
2897
|
card = _state.sent();
|
|
2898
|
-
if (card.state === CardStates.UNACTIVATED) {
|
|
2899
|
-
throw new MqSDKError("A card must be activated before its PIN can be updated");
|
|
2900
|
-
}
|
|
2901
2898
|
return [
|
|
2902
2899
|
4,
|
|
2903
2900
|
_this.cardRepository.updatePinByCardToken(pin, cardToken)
|
|
@@ -4408,42 +4405,25 @@ var _MockAuthCredentialService = /*#__PURE__*/ function() {
|
|
|
4408
4405
|
value: function generateAuthKeyPair() {
|
|
4409
4406
|
var _this = this;
|
|
4410
4407
|
return _async_to_generator(function() {
|
|
4411
|
-
var _ref, publicKey, privateKey, _, _tmp;
|
|
4412
4408
|
return _ts_generator(this, function(_state) {
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
crypto.subtle.exportKey("jwk", publicKey)
|
|
4432
|
-
];
|
|
4433
|
-
case 2:
|
|
4434
|
-
_tmp.publicJwk = _state.sent();
|
|
4435
|
-
return [
|
|
4436
|
-
4,
|
|
4437
|
-
crypto.subtle.exportKey("jwk", privateKey)
|
|
4438
|
-
];
|
|
4439
|
-
case 3:
|
|
4440
|
-
_.apply(_this, [
|
|
4441
|
-
(_tmp.privateJwk = _state.sent(), _tmp)
|
|
4442
|
-
]);
|
|
4443
|
-
return [
|
|
4444
|
-
2
|
|
4445
|
-
];
|
|
4446
|
-
}
|
|
4409
|
+
_this.setAuthKeyPair({
|
|
4410
|
+
publicJwk: {
|
|
4411
|
+
kty: "EC",
|
|
4412
|
+
crv: "P-256",
|
|
4413
|
+
x: "mock-x",
|
|
4414
|
+
y: "mock-y"
|
|
4415
|
+
},
|
|
4416
|
+
privateJwk: {
|
|
4417
|
+
kty: "EC",
|
|
4418
|
+
crv: "P-256",
|
|
4419
|
+
x: "mock-x",
|
|
4420
|
+
y: "mock-y",
|
|
4421
|
+
d: "mock-d"
|
|
4422
|
+
}
|
|
4423
|
+
});
|
|
4424
|
+
return [
|
|
4425
|
+
2
|
|
4426
|
+
];
|
|
4447
4427
|
});
|
|
4448
4428
|
})();
|
|
4449
4429
|
}
|
|
@@ -9213,7 +9193,7 @@ var _RestCardRepository = /*#__PURE__*/ function() {
|
|
|
9213
9193
|
_create_class(_RestCardRepository, [
|
|
9214
9194
|
{
|
|
9215
9195
|
key: "getCardByToken",
|
|
9216
|
-
value: function getCardByToken(cardToken) {
|
|
9196
|
+
value: function getCardByToken(cardToken, shortCode) {
|
|
9217
9197
|
var _this = this;
|
|
9218
9198
|
return _async_to_generator(function() {
|
|
9219
9199
|
var cuiApiBaseUrl, path, data, convertedData, error2;
|
|
@@ -9227,7 +9207,7 @@ var _RestCardRepository = /*#__PURE__*/ function() {
|
|
|
9227
9207
|
3
|
|
9228
9208
|
]);
|
|
9229
9209
|
cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
|
|
9230
|
-
path = "".concat(cuiApiBaseUrl, "/api/v1/cards/").concat(cardToken);
|
|
9210
|
+
path = "".concat(cuiApiBaseUrl, "/api/v1/cards/").concat(cardToken).concat(shortCode ? "?short_code=".concat(shortCode) : "");
|
|
9231
9211
|
return [
|
|
9232
9212
|
4,
|
|
9233
9213
|
_this.httpClient.get(path)
|
|
@@ -9301,7 +9281,7 @@ var _RestCardRepository = /*#__PURE__*/ function() {
|
|
|
9301
9281
|
},
|
|
9302
9282
|
{
|
|
9303
9283
|
key: "getShowpanByCardToken",
|
|
9304
|
-
value: function getShowpanByCardToken(cardToken) {
|
|
9284
|
+
value: function getShowpanByCardToken(cardToken, shortCode) {
|
|
9305
9285
|
var _this = this;
|
|
9306
9286
|
return _async_to_generator(function() {
|
|
9307
9287
|
var cuiApiBaseUrl, path, data, convertedData, error2;
|
|
@@ -9315,7 +9295,7 @@ var _RestCardRepository = /*#__PURE__*/ function() {
|
|
|
9315
9295
|
3
|
|
9316
9296
|
]);
|
|
9317
9297
|
cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
|
|
9318
|
-
path = "".concat(cuiApiBaseUrl, "/api/v1/cards/").concat(cardToken, "/showpan?show_cvv_number=true");
|
|
9298
|
+
path = "".concat(cuiApiBaseUrl, "/api/v1/cards/").concat(cardToken, "/showpan?show_cvv_number=true").concat(shortCode ? "&short_code=".concat(shortCode) : "");
|
|
9319
9299
|
return [
|
|
9320
9300
|
4,
|
|
9321
9301
|
_this.httpClient.get(path)
|
|
@@ -15185,22 +15165,7 @@ var iKycRepository = _iKycRepository;
|
|
|
15185
15165
|
iKycRepository = exports.iKycRepository = _ts_decorate81([
|
|
15186
15166
|
_inversify.injectable.call(void 0)
|
|
15187
15167
|
], iKycRepository);
|
|
15188
|
-
// src/kyc/adapters/rest/httpMocks.ts
|
|
15189
|
-
var createJsonResponse = /* @__PURE__ */ __name(function(ok, status, errorId) {
|
|
15190
|
-
return HttpResponse.json(_object_spread({
|
|
15191
|
-
ok: ok
|
|
15192
|
-
}, errorId && {
|
|
15193
|
-
error: {
|
|
15194
|
-
id: errorId,
|
|
15195
|
-
debug: []
|
|
15196
|
-
}
|
|
15197
|
-
}, ok && {
|
|
15198
|
-
result: mockKycVerificationResponse,
|
|
15199
|
-
status: status
|
|
15200
|
-
}), {
|
|
15201
|
-
status: status
|
|
15202
|
-
});
|
|
15203
|
-
}, "createJsonResponse");
|
|
15168
|
+
// src/kyc/adapters/rest/httpMocks/mswKycHandlers.ts
|
|
15204
15169
|
var mswKycHandlers = [
|
|
15205
15170
|
http.post("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/kyc"), function() {
|
|
15206
15171
|
var _ref = _async_to_generator(function(param) {
|
|
@@ -15218,13 +15183,18 @@ var mswKycHandlers = [
|
|
|
15218
15183
|
if (body.accountHolderGroupToken === INVALID_ACCOUNT_HOLDER) {
|
|
15219
15184
|
return [
|
|
15220
15185
|
2,
|
|
15221
|
-
|
|
15186
|
+
new HttpResponse(null, {
|
|
15187
|
+
status: 400,
|
|
15188
|
+
statusText: "Bad Request"
|
|
15189
|
+
})
|
|
15222
15190
|
];
|
|
15223
15191
|
}
|
|
15224
15192
|
if (body.lastName === "approve") {
|
|
15225
15193
|
return [
|
|
15226
15194
|
2,
|
|
15227
|
-
|
|
15195
|
+
HttpResponse.json(mockKycVerificationResponse, {
|
|
15196
|
+
status: 200
|
|
15197
|
+
})
|
|
15228
15198
|
];
|
|
15229
15199
|
}
|
|
15230
15200
|
errorMap = {
|
|
@@ -15235,40 +15205,65 @@ var mswKycHandlers = [
|
|
|
15235
15205
|
if (body.lastName && errorMap[body.lastName]) {
|
|
15236
15206
|
return [
|
|
15237
15207
|
2,
|
|
15238
|
-
|
|
15208
|
+
new HttpResponse(JSON.stringify({
|
|
15209
|
+
ok: false,
|
|
15210
|
+
error: {
|
|
15211
|
+
id: errorMap[body.lastName],
|
|
15212
|
+
debug: []
|
|
15213
|
+
}
|
|
15214
|
+
}), {
|
|
15215
|
+
headers: {
|
|
15216
|
+
"content-type": "application/json"
|
|
15217
|
+
},
|
|
15218
|
+
status: 400,
|
|
15219
|
+
statusText: "Bad Request"
|
|
15220
|
+
})
|
|
15239
15221
|
];
|
|
15240
15222
|
}
|
|
15241
|
-
if (
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15251
|
-
|
|
15252
|
-
|
|
15253
|
-
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15257
|
-
|
|
15258
|
-
|
|
15259
|
-
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15223
|
+
if (body.identifierType === "SSN") {
|
|
15224
|
+
;
|
|
15225
|
+
ssnErrorMap = (_obj = {}, _define_property(_obj, DOB_ISSUE_SSN, "KYC_BAD_DOB"), _define_property(_obj, NAME_ISSUE_SSN, "KYC_BAD_NAME"), _define_property(_obj, ADDRESS_ISSUE_SSN, "KYC_BAD_ADDRESS"), _define_property(_obj, OBAC_ISSUE_SSN, "KYC_OFAC_FAILURE"), _define_property(_obj, BAD_GENERAL_SSN, void 0), _obj);
|
|
15226
|
+
if (body.identifierValue === LOADING_SSN) {
|
|
15227
|
+
return [
|
|
15228
|
+
2,
|
|
15229
|
+
new Promise(function() {})
|
|
15230
|
+
];
|
|
15231
|
+
}
|
|
15232
|
+
if (body.identifierValue && ssnErrorMap[body.identifierValue]) {
|
|
15233
|
+
errorId = ssnErrorMap[body.identifierValue];
|
|
15234
|
+
if (errorId) {
|
|
15235
|
+
return [
|
|
15236
|
+
2,
|
|
15237
|
+
new HttpResponse(JSON.stringify({
|
|
15238
|
+
ok: false,
|
|
15239
|
+
error: {
|
|
15240
|
+
id: errorId,
|
|
15241
|
+
debug: []
|
|
15242
|
+
}
|
|
15243
|
+
}), {
|
|
15244
|
+
headers: {
|
|
15245
|
+
"content-type": "application/json"
|
|
15246
|
+
},
|
|
15247
|
+
status: 400,
|
|
15248
|
+
statusText: "Bad Request"
|
|
15249
|
+
})
|
|
15250
|
+
];
|
|
15251
|
+
} else {
|
|
15252
|
+
return [
|
|
15253
|
+
2,
|
|
15254
|
+
new HttpResponse(null, {
|
|
15255
|
+
status: 400,
|
|
15256
|
+
statusText: "Bad Request"
|
|
15257
|
+
})
|
|
15258
|
+
];
|
|
15259
|
+
}
|
|
15260
|
+
}
|
|
15266
15261
|
}
|
|
15267
|
-
_state.label = 4;
|
|
15268
|
-
case 4:
|
|
15269
15262
|
return [
|
|
15270
15263
|
2,
|
|
15271
|
-
|
|
15264
|
+
HttpResponse.json(mockKycVerificationResponse, {
|
|
15265
|
+
status: 200
|
|
15266
|
+
})
|
|
15272
15267
|
];
|
|
15273
15268
|
}
|
|
15274
15269
|
});
|
|
@@ -15515,183 +15510,1275 @@ var mockKybEvaluationRequest = {
|
|
|
15515
15510
|
]
|
|
15516
15511
|
};
|
|
15517
15512
|
var mockKybVerificationResponse = {
|
|
15518
|
-
|
|
15513
|
+
status: KybEvaluationStatus.IN_PROGRESS,
|
|
15519
15514
|
schema: {
|
|
15520
15515
|
properties: {
|
|
15521
|
-
"
|
|
15522
|
-
type: "string",
|
|
15523
|
-
title: "Company name",
|
|
15524
|
-
validationRules: []
|
|
15525
|
-
},
|
|
15526
|
-
"67c69b6f8bf323715f63302c": {
|
|
15516
|
+
"6603a3e6287d3100e9568837": {
|
|
15527
15517
|
type: "string",
|
|
15528
|
-
title: "
|
|
15529
|
-
validationRules: []
|
|
15530
|
-
|
|
15531
|
-
|
|
15532
|
-
|
|
15533
|
-
|
|
15534
|
-
|
|
15535
|
-
|
|
15536
|
-
|
|
15537
|
-
|
|
15538
|
-
|
|
15539
|
-
|
|
15540
|
-
|
|
15541
|
-
|
|
15542
|
-
}
|
|
15543
|
-
|
|
15544
|
-
|
|
15545
|
-
|
|
15546
|
-
|
|
15547
|
-
|
|
15548
|
-
|
|
15549
|
-
|
|
15550
|
-
|
|
15551
|
-
|
|
15552
|
-
|
|
15553
|
-
|
|
15554
|
-
|
|
15555
|
-
|
|
15556
|
-
|
|
15557
|
-
|
|
15558
|
-
|
|
15559
|
-
|
|
15560
|
-
|
|
15561
|
-
|
|
15562
|
-
|
|
15563
|
-
|
|
15564
|
-
|
|
15565
|
-
|
|
15566
|
-
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
|
|
15571
|
-
|
|
15572
|
-
|
|
15573
|
-
|
|
15574
|
-
|
|
15575
|
-
|
|
15576
|
-
|
|
15577
|
-
|
|
15578
|
-
|
|
15579
|
-
|
|
15580
|
-
|
|
15581
|
-
|
|
15582
|
-
|
|
15583
|
-
|
|
15584
|
-
|
|
15585
|
-
|
|
15586
|
-
|
|
15587
|
-
|
|
15588
|
-
|
|
15589
|
-
|
|
15590
|
-
|
|
15591
|
-
|
|
15592
|
-
|
|
15593
|
-
|
|
15594
|
-
|
|
15595
|
-
|
|
15596
|
-
|
|
15597
|
-
|
|
15598
|
-
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
|
|
15602
|
-
|
|
15603
|
-
|
|
15604
|
-
|
|
15605
|
-
|
|
15606
|
-
|
|
15607
|
-
|
|
15608
|
-
|
|
15609
|
-
|
|
15610
|
-
|
|
15611
|
-
|
|
15612
|
-
|
|
15613
|
-
|
|
15614
|
-
|
|
15615
|
-
|
|
15616
|
-
|
|
15617
|
-
|
|
15618
|
-
|
|
15619
|
-
|
|
15620
|
-
|
|
15621
|
-
|
|
15622
|
-
|
|
15623
|
-
|
|
15624
|
-
|
|
15625
|
-
|
|
15626
|
-
|
|
15627
|
-
|
|
15628
|
-
|
|
15629
|
-
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
|
|
15633
|
-
|
|
15634
|
-
|
|
15635
|
-
|
|
15636
|
-
|
|
15637
|
-
|
|
15638
|
-
|
|
15639
|
-
|
|
15640
|
-
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15645
|
-
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
|
|
15650
|
-
|
|
15651
|
-
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
15663
|
-
|
|
15664
|
-
|
|
15665
|
-
|
|
15666
|
-
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
15673
|
-
|
|
15674
|
-
}
|
|
15675
|
-
|
|
15676
|
-
|
|
15677
|
-
|
|
15678
|
-
}
|
|
15679
|
-
|
|
15680
|
-
|
|
15681
|
-
|
|
15682
|
-
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
|
|
15694
|
-
|
|
15518
|
+
title: "Country of incorporation",
|
|
15519
|
+
validationRules: [],
|
|
15520
|
+
oneOf: [
|
|
15521
|
+
{
|
|
15522
|
+
const: "AF",
|
|
15523
|
+
title: "Afghanistan"
|
|
15524
|
+
},
|
|
15525
|
+
{
|
|
15526
|
+
const: "AL",
|
|
15527
|
+
title: "Albania"
|
|
15528
|
+
},
|
|
15529
|
+
{
|
|
15530
|
+
const: "DZ",
|
|
15531
|
+
title: "Algeria"
|
|
15532
|
+
},
|
|
15533
|
+
{
|
|
15534
|
+
const: "AS",
|
|
15535
|
+
title: "American Samoa"
|
|
15536
|
+
},
|
|
15537
|
+
{
|
|
15538
|
+
const: "AD",
|
|
15539
|
+
title: "Andorra"
|
|
15540
|
+
},
|
|
15541
|
+
{
|
|
15542
|
+
const: "AO",
|
|
15543
|
+
title: "Angola"
|
|
15544
|
+
},
|
|
15545
|
+
{
|
|
15546
|
+
const: "AI",
|
|
15547
|
+
title: "Anguilla"
|
|
15548
|
+
},
|
|
15549
|
+
{
|
|
15550
|
+
const: "AQ",
|
|
15551
|
+
title: "Antarctica"
|
|
15552
|
+
},
|
|
15553
|
+
{
|
|
15554
|
+
const: "AG",
|
|
15555
|
+
title: "Antigua and Barbuda"
|
|
15556
|
+
},
|
|
15557
|
+
{
|
|
15558
|
+
const: "AR",
|
|
15559
|
+
title: "Argentina"
|
|
15560
|
+
},
|
|
15561
|
+
{
|
|
15562
|
+
const: "AM",
|
|
15563
|
+
title: "Armenia"
|
|
15564
|
+
},
|
|
15565
|
+
{
|
|
15566
|
+
const: "AW",
|
|
15567
|
+
title: "Aruba"
|
|
15568
|
+
},
|
|
15569
|
+
{
|
|
15570
|
+
const: "AU",
|
|
15571
|
+
title: "Australia"
|
|
15572
|
+
},
|
|
15573
|
+
{
|
|
15574
|
+
const: "AT",
|
|
15575
|
+
title: "Austria"
|
|
15576
|
+
},
|
|
15577
|
+
{
|
|
15578
|
+
const: "AZ",
|
|
15579
|
+
title: "Azerbaijan"
|
|
15580
|
+
},
|
|
15581
|
+
{
|
|
15582
|
+
const: "BS",
|
|
15583
|
+
title: "Bahamas"
|
|
15584
|
+
},
|
|
15585
|
+
{
|
|
15586
|
+
const: "BH",
|
|
15587
|
+
title: "Bahrain"
|
|
15588
|
+
},
|
|
15589
|
+
{
|
|
15590
|
+
const: "BD",
|
|
15591
|
+
title: "Bangladesh"
|
|
15592
|
+
},
|
|
15593
|
+
{
|
|
15594
|
+
const: "BB",
|
|
15595
|
+
title: "Barbados"
|
|
15596
|
+
},
|
|
15597
|
+
{
|
|
15598
|
+
const: "BY",
|
|
15599
|
+
title: "Belarus"
|
|
15600
|
+
},
|
|
15601
|
+
{
|
|
15602
|
+
const: "BE",
|
|
15603
|
+
title: "Belgium"
|
|
15604
|
+
},
|
|
15605
|
+
{
|
|
15606
|
+
const: "BZ",
|
|
15607
|
+
title: "Belize"
|
|
15608
|
+
},
|
|
15609
|
+
{
|
|
15610
|
+
const: "BJ",
|
|
15611
|
+
title: "Benin"
|
|
15612
|
+
},
|
|
15613
|
+
{
|
|
15614
|
+
const: "BM",
|
|
15615
|
+
title: "Bermuda"
|
|
15616
|
+
},
|
|
15617
|
+
{
|
|
15618
|
+
const: "BT",
|
|
15619
|
+
title: "Bhutan"
|
|
15620
|
+
},
|
|
15621
|
+
{
|
|
15622
|
+
const: "BO",
|
|
15623
|
+
title: "Bolivia, Plurinational State of"
|
|
15624
|
+
},
|
|
15625
|
+
{
|
|
15626
|
+
const: "BQ",
|
|
15627
|
+
title: "Bonaire, Sint Eustatius and Saba"
|
|
15628
|
+
},
|
|
15629
|
+
{
|
|
15630
|
+
const: "BA",
|
|
15631
|
+
title: "Bosnia and Herzegovina"
|
|
15632
|
+
},
|
|
15633
|
+
{
|
|
15634
|
+
const: "BW",
|
|
15635
|
+
title: "Botswana"
|
|
15636
|
+
},
|
|
15637
|
+
{
|
|
15638
|
+
const: "BV",
|
|
15639
|
+
title: "Bouvet Island"
|
|
15640
|
+
},
|
|
15641
|
+
{
|
|
15642
|
+
const: "BR",
|
|
15643
|
+
title: "Brazil"
|
|
15644
|
+
},
|
|
15645
|
+
{
|
|
15646
|
+
const: "IO",
|
|
15647
|
+
title: "British Indian Ocean Territory"
|
|
15648
|
+
},
|
|
15649
|
+
{
|
|
15650
|
+
const: "BN",
|
|
15651
|
+
title: "Brunei Darussalam"
|
|
15652
|
+
},
|
|
15653
|
+
{
|
|
15654
|
+
const: "BG",
|
|
15655
|
+
title: "Bulgaria"
|
|
15656
|
+
},
|
|
15657
|
+
{
|
|
15658
|
+
const: "BF",
|
|
15659
|
+
title: "Burkina Faso"
|
|
15660
|
+
},
|
|
15661
|
+
{
|
|
15662
|
+
const: "BI",
|
|
15663
|
+
title: "Burundi"
|
|
15664
|
+
},
|
|
15665
|
+
{
|
|
15666
|
+
const: "CV",
|
|
15667
|
+
title: "Cabo Verde"
|
|
15668
|
+
},
|
|
15669
|
+
{
|
|
15670
|
+
const: "KH",
|
|
15671
|
+
title: "Cambodia"
|
|
15672
|
+
},
|
|
15673
|
+
{
|
|
15674
|
+
const: "CM",
|
|
15675
|
+
title: "Cameroon"
|
|
15676
|
+
},
|
|
15677
|
+
{
|
|
15678
|
+
const: "CA",
|
|
15679
|
+
title: "Canada"
|
|
15680
|
+
},
|
|
15681
|
+
{
|
|
15682
|
+
const: "KY",
|
|
15683
|
+
title: "Cayman Islands"
|
|
15684
|
+
},
|
|
15685
|
+
{
|
|
15686
|
+
const: "CF",
|
|
15687
|
+
title: "Central African Republic"
|
|
15688
|
+
},
|
|
15689
|
+
{
|
|
15690
|
+
const: "TD",
|
|
15691
|
+
title: "Chad"
|
|
15692
|
+
},
|
|
15693
|
+
{
|
|
15694
|
+
const: "CL",
|
|
15695
|
+
title: "Chile"
|
|
15696
|
+
},
|
|
15697
|
+
{
|
|
15698
|
+
const: "CN",
|
|
15699
|
+
title: "China"
|
|
15700
|
+
},
|
|
15701
|
+
{
|
|
15702
|
+
const: "CX",
|
|
15703
|
+
title: "Christmas Island"
|
|
15704
|
+
},
|
|
15705
|
+
{
|
|
15706
|
+
const: "CC",
|
|
15707
|
+
title: "Cocos (Keeling) Islands"
|
|
15708
|
+
},
|
|
15709
|
+
{
|
|
15710
|
+
const: "CO",
|
|
15711
|
+
title: "Colombia"
|
|
15712
|
+
},
|
|
15713
|
+
{
|
|
15714
|
+
const: "KM",
|
|
15715
|
+
title: "Comoros"
|
|
15716
|
+
},
|
|
15717
|
+
{
|
|
15718
|
+
const: "CG",
|
|
15719
|
+
title: "Congo"
|
|
15720
|
+
},
|
|
15721
|
+
{
|
|
15722
|
+
const: "CD",
|
|
15723
|
+
title: "Congo, Democratic Republic of the"
|
|
15724
|
+
},
|
|
15725
|
+
{
|
|
15726
|
+
const: "CK",
|
|
15727
|
+
title: "Cook Islands"
|
|
15728
|
+
},
|
|
15729
|
+
{
|
|
15730
|
+
const: "CR",
|
|
15731
|
+
title: "Costa Rica"
|
|
15732
|
+
},
|
|
15733
|
+
{
|
|
15734
|
+
const: "CI",
|
|
15735
|
+
title: "C\xF4te d'Ivoire"
|
|
15736
|
+
},
|
|
15737
|
+
{
|
|
15738
|
+
const: "HR",
|
|
15739
|
+
title: "Croatia"
|
|
15740
|
+
},
|
|
15741
|
+
{
|
|
15742
|
+
const: "CU",
|
|
15743
|
+
title: "Cuba"
|
|
15744
|
+
},
|
|
15745
|
+
{
|
|
15746
|
+
const: "CW",
|
|
15747
|
+
title: "Cura\xE7ao"
|
|
15748
|
+
},
|
|
15749
|
+
{
|
|
15750
|
+
const: "CY",
|
|
15751
|
+
title: "Cyprus"
|
|
15752
|
+
},
|
|
15753
|
+
{
|
|
15754
|
+
const: "CZ",
|
|
15755
|
+
title: "Czechia"
|
|
15756
|
+
},
|
|
15757
|
+
{
|
|
15758
|
+
const: "DK",
|
|
15759
|
+
title: "Denmark"
|
|
15760
|
+
},
|
|
15761
|
+
{
|
|
15762
|
+
const: "DJ",
|
|
15763
|
+
title: "Djibouti"
|
|
15764
|
+
},
|
|
15765
|
+
{
|
|
15766
|
+
const: "DM",
|
|
15767
|
+
title: "Dominica"
|
|
15768
|
+
},
|
|
15769
|
+
{
|
|
15770
|
+
const: "DO",
|
|
15771
|
+
title: "Dominican Republic"
|
|
15772
|
+
},
|
|
15773
|
+
{
|
|
15774
|
+
const: "EC",
|
|
15775
|
+
title: "Ecuador"
|
|
15776
|
+
},
|
|
15777
|
+
{
|
|
15778
|
+
const: "EG",
|
|
15779
|
+
title: "Egypt"
|
|
15780
|
+
},
|
|
15781
|
+
{
|
|
15782
|
+
const: "SV",
|
|
15783
|
+
title: "El Salvador"
|
|
15784
|
+
},
|
|
15785
|
+
{
|
|
15786
|
+
const: "GQ",
|
|
15787
|
+
title: "Equatorial Guinea"
|
|
15788
|
+
},
|
|
15789
|
+
{
|
|
15790
|
+
const: "ER",
|
|
15791
|
+
title: "Eritrea"
|
|
15792
|
+
},
|
|
15793
|
+
{
|
|
15794
|
+
const: "EE",
|
|
15795
|
+
title: "Estonia"
|
|
15796
|
+
},
|
|
15797
|
+
{
|
|
15798
|
+
const: "SZ",
|
|
15799
|
+
title: "Eswatini"
|
|
15800
|
+
},
|
|
15801
|
+
{
|
|
15802
|
+
const: "ET",
|
|
15803
|
+
title: "Ethiopia"
|
|
15804
|
+
},
|
|
15805
|
+
{
|
|
15806
|
+
const: "FK",
|
|
15807
|
+
title: "Falkland Islands (Malvinas)"
|
|
15808
|
+
},
|
|
15809
|
+
{
|
|
15810
|
+
const: "FO",
|
|
15811
|
+
title: "Faroe Islands"
|
|
15812
|
+
},
|
|
15813
|
+
{
|
|
15814
|
+
const: "FJ",
|
|
15815
|
+
title: "Fiji"
|
|
15816
|
+
},
|
|
15817
|
+
{
|
|
15818
|
+
const: "FI",
|
|
15819
|
+
title: "Finland"
|
|
15820
|
+
},
|
|
15821
|
+
{
|
|
15822
|
+
const: "FR",
|
|
15823
|
+
title: "France"
|
|
15824
|
+
},
|
|
15825
|
+
{
|
|
15826
|
+
const: "GF",
|
|
15827
|
+
title: "French Guiana"
|
|
15828
|
+
},
|
|
15829
|
+
{
|
|
15830
|
+
const: "PF",
|
|
15831
|
+
title: "French Polynesia"
|
|
15832
|
+
},
|
|
15833
|
+
{
|
|
15834
|
+
const: "TF",
|
|
15835
|
+
title: "French Southern Territories"
|
|
15836
|
+
},
|
|
15837
|
+
{
|
|
15838
|
+
const: "GA",
|
|
15839
|
+
title: "Gabon"
|
|
15840
|
+
},
|
|
15841
|
+
{
|
|
15842
|
+
const: "GM",
|
|
15843
|
+
title: "Gambia"
|
|
15844
|
+
},
|
|
15845
|
+
{
|
|
15846
|
+
const: "GE",
|
|
15847
|
+
title: "Georgia"
|
|
15848
|
+
},
|
|
15849
|
+
{
|
|
15850
|
+
const: "DE",
|
|
15851
|
+
title: "Germany"
|
|
15852
|
+
},
|
|
15853
|
+
{
|
|
15854
|
+
const: "GH",
|
|
15855
|
+
title: "Ghana"
|
|
15856
|
+
},
|
|
15857
|
+
{
|
|
15858
|
+
const: "GI",
|
|
15859
|
+
title: "Gibraltar"
|
|
15860
|
+
},
|
|
15861
|
+
{
|
|
15862
|
+
const: "GR",
|
|
15863
|
+
title: "Greece"
|
|
15864
|
+
},
|
|
15865
|
+
{
|
|
15866
|
+
const: "GL",
|
|
15867
|
+
title: "Greenland"
|
|
15868
|
+
},
|
|
15869
|
+
{
|
|
15870
|
+
const: "GD",
|
|
15871
|
+
title: "Grenada"
|
|
15872
|
+
},
|
|
15873
|
+
{
|
|
15874
|
+
const: "GP",
|
|
15875
|
+
title: "Guadeloupe"
|
|
15876
|
+
},
|
|
15877
|
+
{
|
|
15878
|
+
const: "GU",
|
|
15879
|
+
title: "Guam"
|
|
15880
|
+
},
|
|
15881
|
+
{
|
|
15882
|
+
const: "GT",
|
|
15883
|
+
title: "Guatemala"
|
|
15884
|
+
},
|
|
15885
|
+
{
|
|
15886
|
+
const: "GG",
|
|
15887
|
+
title: "Guernsey"
|
|
15888
|
+
},
|
|
15889
|
+
{
|
|
15890
|
+
const: "GN",
|
|
15891
|
+
title: "Guinea"
|
|
15892
|
+
},
|
|
15893
|
+
{
|
|
15894
|
+
const: "GW",
|
|
15895
|
+
title: "Guinea-Bissau"
|
|
15896
|
+
},
|
|
15897
|
+
{
|
|
15898
|
+
const: "GY",
|
|
15899
|
+
title: "Guyana"
|
|
15900
|
+
},
|
|
15901
|
+
{
|
|
15902
|
+
const: "HT",
|
|
15903
|
+
title: "Haiti"
|
|
15904
|
+
},
|
|
15905
|
+
{
|
|
15906
|
+
const: "HM",
|
|
15907
|
+
title: "Heard Island and McDonald Islands"
|
|
15908
|
+
},
|
|
15909
|
+
{
|
|
15910
|
+
const: "VA",
|
|
15911
|
+
title: "Holy See"
|
|
15912
|
+
},
|
|
15913
|
+
{
|
|
15914
|
+
const: "HN",
|
|
15915
|
+
title: "Honduras"
|
|
15916
|
+
},
|
|
15917
|
+
{
|
|
15918
|
+
const: "HK",
|
|
15919
|
+
title: "Hong Kong"
|
|
15920
|
+
},
|
|
15921
|
+
{
|
|
15922
|
+
const: "HU",
|
|
15923
|
+
title: "Hungary"
|
|
15924
|
+
},
|
|
15925
|
+
{
|
|
15926
|
+
const: "IS",
|
|
15927
|
+
title: "Iceland"
|
|
15928
|
+
},
|
|
15929
|
+
{
|
|
15930
|
+
const: "IN",
|
|
15931
|
+
title: "India"
|
|
15932
|
+
},
|
|
15933
|
+
{
|
|
15934
|
+
const: "ID",
|
|
15935
|
+
title: "Indonesia"
|
|
15936
|
+
},
|
|
15937
|
+
{
|
|
15938
|
+
const: "IR",
|
|
15939
|
+
title: "Iran, Islamic Republic of"
|
|
15940
|
+
},
|
|
15941
|
+
{
|
|
15942
|
+
const: "IQ",
|
|
15943
|
+
title: "Iraq"
|
|
15944
|
+
},
|
|
15945
|
+
{
|
|
15946
|
+
const: "IE",
|
|
15947
|
+
title: "Ireland"
|
|
15948
|
+
},
|
|
15949
|
+
{
|
|
15950
|
+
const: "IM",
|
|
15951
|
+
title: "Isle of Man"
|
|
15952
|
+
},
|
|
15953
|
+
{
|
|
15954
|
+
const: "IL",
|
|
15955
|
+
title: "Israel"
|
|
15956
|
+
},
|
|
15957
|
+
{
|
|
15958
|
+
const: "IT",
|
|
15959
|
+
title: "Italy"
|
|
15960
|
+
},
|
|
15961
|
+
{
|
|
15962
|
+
const: "JM",
|
|
15963
|
+
title: "Jamaica"
|
|
15964
|
+
},
|
|
15965
|
+
{
|
|
15966
|
+
const: "JP",
|
|
15967
|
+
title: "Japan"
|
|
15968
|
+
},
|
|
15969
|
+
{
|
|
15970
|
+
const: "JE",
|
|
15971
|
+
title: "Jersey"
|
|
15972
|
+
},
|
|
15973
|
+
{
|
|
15974
|
+
const: "JO",
|
|
15975
|
+
title: "Jordan"
|
|
15976
|
+
},
|
|
15977
|
+
{
|
|
15978
|
+
const: "KZ",
|
|
15979
|
+
title: "Kazakhstan"
|
|
15980
|
+
},
|
|
15981
|
+
{
|
|
15982
|
+
const: "KE",
|
|
15983
|
+
title: "Kenya"
|
|
15984
|
+
},
|
|
15985
|
+
{
|
|
15986
|
+
const: "KI",
|
|
15987
|
+
title: "Kiribati"
|
|
15988
|
+
},
|
|
15989
|
+
{
|
|
15990
|
+
const: "KP",
|
|
15991
|
+
title: "Korea, Democratic People's Republic of"
|
|
15992
|
+
},
|
|
15993
|
+
{
|
|
15994
|
+
const: "KR",
|
|
15995
|
+
title: "Korea, Republic of"
|
|
15996
|
+
},
|
|
15997
|
+
{
|
|
15998
|
+
const: "KW",
|
|
15999
|
+
title: "Kuwait"
|
|
16000
|
+
},
|
|
16001
|
+
{
|
|
16002
|
+
const: "KG",
|
|
16003
|
+
title: "Kyrgyzstan"
|
|
16004
|
+
},
|
|
16005
|
+
{
|
|
16006
|
+
const: "LA",
|
|
16007
|
+
title: "Lao People's Democratic Republic"
|
|
16008
|
+
},
|
|
16009
|
+
{
|
|
16010
|
+
const: "LV",
|
|
16011
|
+
title: "Latvia"
|
|
16012
|
+
},
|
|
16013
|
+
{
|
|
16014
|
+
const: "LB",
|
|
16015
|
+
title: "Lebanon"
|
|
16016
|
+
},
|
|
16017
|
+
{
|
|
16018
|
+
const: "LS",
|
|
16019
|
+
title: "Lesotho"
|
|
16020
|
+
},
|
|
16021
|
+
{
|
|
16022
|
+
const: "LR",
|
|
16023
|
+
title: "Liberia"
|
|
16024
|
+
},
|
|
16025
|
+
{
|
|
16026
|
+
const: "LY",
|
|
16027
|
+
title: "Libya"
|
|
16028
|
+
},
|
|
16029
|
+
{
|
|
16030
|
+
const: "LI",
|
|
16031
|
+
title: "Liechtenstein"
|
|
16032
|
+
},
|
|
16033
|
+
{
|
|
16034
|
+
const: "LT",
|
|
16035
|
+
title: "Lithuania"
|
|
16036
|
+
},
|
|
16037
|
+
{
|
|
16038
|
+
const: "LU",
|
|
16039
|
+
title: "Luxembourg"
|
|
16040
|
+
},
|
|
16041
|
+
{
|
|
16042
|
+
const: "MO",
|
|
16043
|
+
title: "Macao"
|
|
16044
|
+
},
|
|
16045
|
+
{
|
|
16046
|
+
const: "MG",
|
|
16047
|
+
title: "Madagascar"
|
|
16048
|
+
},
|
|
16049
|
+
{
|
|
16050
|
+
const: "MW",
|
|
16051
|
+
title: "Malawi"
|
|
16052
|
+
},
|
|
16053
|
+
{
|
|
16054
|
+
const: "MY",
|
|
16055
|
+
title: "Malaysia"
|
|
16056
|
+
},
|
|
16057
|
+
{
|
|
16058
|
+
const: "MV",
|
|
16059
|
+
title: "Maldives"
|
|
16060
|
+
},
|
|
16061
|
+
{
|
|
16062
|
+
const: "ML",
|
|
16063
|
+
title: "Mali"
|
|
16064
|
+
},
|
|
16065
|
+
{
|
|
16066
|
+
const: "MT",
|
|
16067
|
+
title: "Malta"
|
|
16068
|
+
},
|
|
16069
|
+
{
|
|
16070
|
+
const: "MH",
|
|
16071
|
+
title: "Marshall Islands"
|
|
16072
|
+
},
|
|
16073
|
+
{
|
|
16074
|
+
const: "MQ",
|
|
16075
|
+
title: "Martinique"
|
|
16076
|
+
},
|
|
16077
|
+
{
|
|
16078
|
+
const: "MR",
|
|
16079
|
+
title: "Mauritania"
|
|
16080
|
+
},
|
|
16081
|
+
{
|
|
16082
|
+
const: "MU",
|
|
16083
|
+
title: "Mauritius"
|
|
16084
|
+
},
|
|
16085
|
+
{
|
|
16086
|
+
const: "YT",
|
|
16087
|
+
title: "Mayotte"
|
|
16088
|
+
},
|
|
16089
|
+
{
|
|
16090
|
+
const: "MX",
|
|
16091
|
+
title: "Mexico"
|
|
16092
|
+
},
|
|
16093
|
+
{
|
|
16094
|
+
const: "FM",
|
|
16095
|
+
title: "Micronesia, Federated States of"
|
|
16096
|
+
},
|
|
16097
|
+
{
|
|
16098
|
+
const: "MD",
|
|
16099
|
+
title: "Moldova, Republic of"
|
|
16100
|
+
},
|
|
16101
|
+
{
|
|
16102
|
+
const: "MC",
|
|
16103
|
+
title: "Monaco"
|
|
16104
|
+
},
|
|
16105
|
+
{
|
|
16106
|
+
const: "MN",
|
|
16107
|
+
title: "Mongolia"
|
|
16108
|
+
},
|
|
16109
|
+
{
|
|
16110
|
+
const: "ME",
|
|
16111
|
+
title: "Montenegro"
|
|
16112
|
+
},
|
|
16113
|
+
{
|
|
16114
|
+
const: "MS",
|
|
16115
|
+
title: "Montserrat"
|
|
16116
|
+
},
|
|
16117
|
+
{
|
|
16118
|
+
const: "MA",
|
|
16119
|
+
title: "Morocco"
|
|
16120
|
+
},
|
|
16121
|
+
{
|
|
16122
|
+
const: "MZ",
|
|
16123
|
+
title: "Mozambique"
|
|
16124
|
+
},
|
|
16125
|
+
{
|
|
16126
|
+
const: "MM",
|
|
16127
|
+
title: "Myanmar"
|
|
16128
|
+
},
|
|
16129
|
+
{
|
|
16130
|
+
const: "NA",
|
|
16131
|
+
title: "Namibia"
|
|
16132
|
+
},
|
|
16133
|
+
{
|
|
16134
|
+
const: "NR",
|
|
16135
|
+
title: "Nauru"
|
|
16136
|
+
},
|
|
16137
|
+
{
|
|
16138
|
+
const: "NP",
|
|
16139
|
+
title: "Nepal"
|
|
16140
|
+
},
|
|
16141
|
+
{
|
|
16142
|
+
const: "NL",
|
|
16143
|
+
title: "Netherlands, Kingdom of the"
|
|
16144
|
+
},
|
|
16145
|
+
{
|
|
16146
|
+
const: "NC",
|
|
16147
|
+
title: "New Caledonia"
|
|
16148
|
+
},
|
|
16149
|
+
{
|
|
16150
|
+
const: "NZ",
|
|
16151
|
+
title: "New Zealand"
|
|
16152
|
+
},
|
|
16153
|
+
{
|
|
16154
|
+
const: "NI",
|
|
16155
|
+
title: "Nicaragua"
|
|
16156
|
+
},
|
|
16157
|
+
{
|
|
16158
|
+
const: "NE",
|
|
16159
|
+
title: "Niger"
|
|
16160
|
+
},
|
|
16161
|
+
{
|
|
16162
|
+
const: "NG",
|
|
16163
|
+
title: "Nigeria"
|
|
16164
|
+
},
|
|
16165
|
+
{
|
|
16166
|
+
const: "NU",
|
|
16167
|
+
title: "Niue"
|
|
16168
|
+
},
|
|
16169
|
+
{
|
|
16170
|
+
const: "NF",
|
|
16171
|
+
title: "Norfolk Island"
|
|
16172
|
+
},
|
|
16173
|
+
{
|
|
16174
|
+
const: "MK",
|
|
16175
|
+
title: "North Macedonia"
|
|
16176
|
+
},
|
|
16177
|
+
{
|
|
16178
|
+
const: "MP",
|
|
16179
|
+
title: "Northern Mariana Islands"
|
|
16180
|
+
},
|
|
16181
|
+
{
|
|
16182
|
+
const: "NO",
|
|
16183
|
+
title: "Norway"
|
|
16184
|
+
},
|
|
16185
|
+
{
|
|
16186
|
+
const: "OM",
|
|
16187
|
+
title: "Oman"
|
|
16188
|
+
},
|
|
16189
|
+
{
|
|
16190
|
+
const: "PK",
|
|
16191
|
+
title: "Pakistan"
|
|
16192
|
+
},
|
|
16193
|
+
{
|
|
16194
|
+
const: "PW",
|
|
16195
|
+
title: "Palau"
|
|
16196
|
+
},
|
|
16197
|
+
{
|
|
16198
|
+
const: "PS",
|
|
16199
|
+
title: "Palestine, State of"
|
|
16200
|
+
},
|
|
16201
|
+
{
|
|
16202
|
+
const: "PA",
|
|
16203
|
+
title: "Panama"
|
|
16204
|
+
},
|
|
16205
|
+
{
|
|
16206
|
+
const: "PG",
|
|
16207
|
+
title: "Papua New Guinea"
|
|
16208
|
+
},
|
|
16209
|
+
{
|
|
16210
|
+
const: "PY",
|
|
16211
|
+
title: "Paraguay"
|
|
16212
|
+
},
|
|
16213
|
+
{
|
|
16214
|
+
const: "PE",
|
|
16215
|
+
title: "Peru"
|
|
16216
|
+
},
|
|
16217
|
+
{
|
|
16218
|
+
const: "PH",
|
|
16219
|
+
title: "Philippines"
|
|
16220
|
+
},
|
|
16221
|
+
{
|
|
16222
|
+
const: "PN",
|
|
16223
|
+
title: "Pitcairn"
|
|
16224
|
+
},
|
|
16225
|
+
{
|
|
16226
|
+
const: "PL",
|
|
16227
|
+
title: "Poland"
|
|
16228
|
+
},
|
|
16229
|
+
{
|
|
16230
|
+
const: "PT",
|
|
16231
|
+
title: "Portugal"
|
|
16232
|
+
},
|
|
16233
|
+
{
|
|
16234
|
+
const: "PR",
|
|
16235
|
+
title: "Puerto Rico"
|
|
16236
|
+
},
|
|
16237
|
+
{
|
|
16238
|
+
const: "QA",
|
|
16239
|
+
title: "Qatar"
|
|
16240
|
+
},
|
|
16241
|
+
{
|
|
16242
|
+
const: "RE",
|
|
16243
|
+
title: "R\xE9union"
|
|
16244
|
+
},
|
|
16245
|
+
{
|
|
16246
|
+
const: "RO",
|
|
16247
|
+
title: "Romania"
|
|
16248
|
+
},
|
|
16249
|
+
{
|
|
16250
|
+
const: "RU",
|
|
16251
|
+
title: "Russian Federation"
|
|
16252
|
+
},
|
|
16253
|
+
{
|
|
16254
|
+
const: "RW",
|
|
16255
|
+
title: "Rwanda"
|
|
16256
|
+
},
|
|
16257
|
+
{
|
|
16258
|
+
const: "BL",
|
|
16259
|
+
title: "Saint Barth\xE9lemy"
|
|
16260
|
+
},
|
|
16261
|
+
{
|
|
16262
|
+
const: "SH",
|
|
16263
|
+
title: "Saint Helena, Ascension and Tristan da Cunha"
|
|
16264
|
+
},
|
|
16265
|
+
{
|
|
16266
|
+
const: "KN",
|
|
16267
|
+
title: "Saint Kitts and Nevis"
|
|
16268
|
+
},
|
|
16269
|
+
{
|
|
16270
|
+
const: "LC",
|
|
16271
|
+
title: "Saint Lucia"
|
|
16272
|
+
},
|
|
16273
|
+
{
|
|
16274
|
+
const: "MF",
|
|
16275
|
+
title: "Saint Martin (French part)"
|
|
16276
|
+
},
|
|
16277
|
+
{
|
|
16278
|
+
const: "PM",
|
|
16279
|
+
title: "Saint Pierre and Miquelon"
|
|
16280
|
+
},
|
|
16281
|
+
{
|
|
16282
|
+
const: "VC",
|
|
16283
|
+
title: "Saint Vincent and the Grenadines"
|
|
16284
|
+
},
|
|
16285
|
+
{
|
|
16286
|
+
const: "WS",
|
|
16287
|
+
title: "Samoa"
|
|
16288
|
+
},
|
|
16289
|
+
{
|
|
16290
|
+
const: "SM",
|
|
16291
|
+
title: "San Marino"
|
|
16292
|
+
},
|
|
16293
|
+
{
|
|
16294
|
+
const: "ST",
|
|
16295
|
+
title: "Sao Tome and Principe"
|
|
16296
|
+
},
|
|
16297
|
+
{
|
|
16298
|
+
const: "SA",
|
|
16299
|
+
title: "Saudi Arabia"
|
|
16300
|
+
},
|
|
16301
|
+
{
|
|
16302
|
+
const: "SN",
|
|
16303
|
+
title: "Senegal"
|
|
16304
|
+
},
|
|
16305
|
+
{
|
|
16306
|
+
const: "RS",
|
|
16307
|
+
title: "Serbia"
|
|
16308
|
+
},
|
|
16309
|
+
{
|
|
16310
|
+
const: "SC",
|
|
16311
|
+
title: "Seychelles"
|
|
16312
|
+
},
|
|
16313
|
+
{
|
|
16314
|
+
const: "SL",
|
|
16315
|
+
title: "Sierra Leone"
|
|
16316
|
+
},
|
|
16317
|
+
{
|
|
16318
|
+
const: "SG",
|
|
16319
|
+
title: "Singapore"
|
|
16320
|
+
},
|
|
16321
|
+
{
|
|
16322
|
+
const: "SX",
|
|
16323
|
+
title: "Sint Maarten (Dutch part)"
|
|
16324
|
+
},
|
|
16325
|
+
{
|
|
16326
|
+
const: "SK",
|
|
16327
|
+
title: "Slovakia"
|
|
16328
|
+
},
|
|
16329
|
+
{
|
|
16330
|
+
const: "SI",
|
|
16331
|
+
title: "Slovenia"
|
|
16332
|
+
},
|
|
16333
|
+
{
|
|
16334
|
+
const: "SB",
|
|
16335
|
+
title: "Solomon Islands"
|
|
16336
|
+
},
|
|
16337
|
+
{
|
|
16338
|
+
const: "SO",
|
|
16339
|
+
title: "Somalia"
|
|
16340
|
+
},
|
|
16341
|
+
{
|
|
16342
|
+
const: "ZA",
|
|
16343
|
+
title: "South Africa"
|
|
16344
|
+
},
|
|
16345
|
+
{
|
|
16346
|
+
const: "GS",
|
|
16347
|
+
title: "South Georgia and the South Sandwich Islands"
|
|
16348
|
+
},
|
|
16349
|
+
{
|
|
16350
|
+
const: "SS",
|
|
16351
|
+
title: "South Sudan"
|
|
16352
|
+
},
|
|
16353
|
+
{
|
|
16354
|
+
const: "ES",
|
|
16355
|
+
title: "Spain"
|
|
16356
|
+
},
|
|
16357
|
+
{
|
|
16358
|
+
const: "LK",
|
|
16359
|
+
title: "Sri Lanka"
|
|
16360
|
+
},
|
|
16361
|
+
{
|
|
16362
|
+
const: "SD",
|
|
16363
|
+
title: "Sudan"
|
|
16364
|
+
},
|
|
16365
|
+
{
|
|
16366
|
+
const: "SR",
|
|
16367
|
+
title: "Suriname"
|
|
16368
|
+
},
|
|
16369
|
+
{
|
|
16370
|
+
const: "SJ",
|
|
16371
|
+
title: "Svalbard and Jan Mayen"
|
|
16372
|
+
},
|
|
16373
|
+
{
|
|
16374
|
+
const: "SE",
|
|
16375
|
+
title: "Sweden"
|
|
16376
|
+
},
|
|
16377
|
+
{
|
|
16378
|
+
const: "CH",
|
|
16379
|
+
title: "Switzerland"
|
|
16380
|
+
},
|
|
16381
|
+
{
|
|
16382
|
+
const: "SY",
|
|
16383
|
+
title: "Syrian Arab Republic"
|
|
16384
|
+
},
|
|
16385
|
+
{
|
|
16386
|
+
const: "TW",
|
|
16387
|
+
title: "Taiwan, Province of China"
|
|
16388
|
+
},
|
|
16389
|
+
{
|
|
16390
|
+
const: "TJ",
|
|
16391
|
+
title: "Tajikistan"
|
|
16392
|
+
},
|
|
16393
|
+
{
|
|
16394
|
+
const: "TZ",
|
|
16395
|
+
title: "Tanzania, United Republic of"
|
|
16396
|
+
},
|
|
16397
|
+
{
|
|
16398
|
+
const: "TH",
|
|
16399
|
+
title: "Thailand"
|
|
16400
|
+
},
|
|
16401
|
+
{
|
|
16402
|
+
const: "TL",
|
|
16403
|
+
title: "Timor-Leste"
|
|
16404
|
+
},
|
|
16405
|
+
{
|
|
16406
|
+
const: "TG",
|
|
16407
|
+
title: "Togo"
|
|
16408
|
+
},
|
|
16409
|
+
{
|
|
16410
|
+
const: "TK",
|
|
16411
|
+
title: "Tokelau"
|
|
16412
|
+
},
|
|
16413
|
+
{
|
|
16414
|
+
const: "TO",
|
|
16415
|
+
title: "Tonga"
|
|
16416
|
+
},
|
|
16417
|
+
{
|
|
16418
|
+
const: "TT",
|
|
16419
|
+
title: "Trinidad and Tobago"
|
|
16420
|
+
},
|
|
16421
|
+
{
|
|
16422
|
+
const: "TN",
|
|
16423
|
+
title: "Tunisia"
|
|
16424
|
+
},
|
|
16425
|
+
{
|
|
16426
|
+
const: "TR",
|
|
16427
|
+
title: "Turkey"
|
|
16428
|
+
},
|
|
16429
|
+
{
|
|
16430
|
+
const: "TM",
|
|
16431
|
+
title: "Turkmenistan"
|
|
16432
|
+
},
|
|
16433
|
+
{
|
|
16434
|
+
const: "TC",
|
|
16435
|
+
title: "Turks and Caicos Islands"
|
|
16436
|
+
},
|
|
16437
|
+
{
|
|
16438
|
+
const: "TV",
|
|
16439
|
+
title: "Tuvalu"
|
|
16440
|
+
},
|
|
16441
|
+
{
|
|
16442
|
+
const: "UG",
|
|
16443
|
+
title: "Uganda"
|
|
16444
|
+
},
|
|
16445
|
+
{
|
|
16446
|
+
const: "UA",
|
|
16447
|
+
title: "Ukraine"
|
|
16448
|
+
},
|
|
16449
|
+
{
|
|
16450
|
+
const: "AE",
|
|
16451
|
+
title: "United Arab Emirates"
|
|
16452
|
+
},
|
|
16453
|
+
{
|
|
16454
|
+
const: "GB",
|
|
16455
|
+
title: "United Kingdom of Great Britain and Northern Ireland"
|
|
16456
|
+
},
|
|
16457
|
+
{
|
|
16458
|
+
const: "UM",
|
|
16459
|
+
title: "United States Minor Outlying Islands"
|
|
16460
|
+
},
|
|
16461
|
+
{
|
|
16462
|
+
const: "US",
|
|
16463
|
+
title: "United States of America"
|
|
16464
|
+
},
|
|
16465
|
+
{
|
|
16466
|
+
const: "UY",
|
|
16467
|
+
title: "Uruguay"
|
|
16468
|
+
},
|
|
16469
|
+
{
|
|
16470
|
+
const: "UZ",
|
|
16471
|
+
title: "Uzbekistan"
|
|
16472
|
+
},
|
|
16473
|
+
{
|
|
16474
|
+
const: "VU",
|
|
16475
|
+
title: "Vanuatu"
|
|
16476
|
+
},
|
|
16477
|
+
{
|
|
16478
|
+
const: "VE",
|
|
16479
|
+
title: "Venezuela, Bolivarian Republic of"
|
|
16480
|
+
},
|
|
16481
|
+
{
|
|
16482
|
+
const: "VN",
|
|
16483
|
+
title: "Viet Nam"
|
|
16484
|
+
},
|
|
16485
|
+
{
|
|
16486
|
+
const: "VG",
|
|
16487
|
+
title: "Virgin Islands (British)"
|
|
16488
|
+
},
|
|
16489
|
+
{
|
|
16490
|
+
const: "VI",
|
|
16491
|
+
title: "Virgin Islands (U.S.)"
|
|
16492
|
+
},
|
|
16493
|
+
{
|
|
16494
|
+
const: "WF",
|
|
16495
|
+
title: "Wallis and Futuna"
|
|
16496
|
+
},
|
|
16497
|
+
{
|
|
16498
|
+
const: "EH",
|
|
16499
|
+
title: "Western Sahara"
|
|
16500
|
+
},
|
|
16501
|
+
{
|
|
16502
|
+
const: "YE",
|
|
16503
|
+
title: "Yemen"
|
|
16504
|
+
},
|
|
16505
|
+
{
|
|
16506
|
+
const: "ZM",
|
|
16507
|
+
title: "Zambia"
|
|
16508
|
+
},
|
|
16509
|
+
{
|
|
16510
|
+
const: "ZW",
|
|
16511
|
+
title: "Zimbabwe"
|
|
16512
|
+
}
|
|
16513
|
+
]
|
|
16514
|
+
},
|
|
16515
|
+
"67c5e0988bf323715f63030c": {
|
|
16516
|
+
type: "string",
|
|
16517
|
+
title: "Date of incorporation",
|
|
16518
|
+
validationRules: []
|
|
16519
|
+
},
|
|
16520
|
+
"67c5e091ed74a27d4474c780": {
|
|
16521
|
+
type: "string",
|
|
16522
|
+
title: "Business type",
|
|
16523
|
+
validationRules: []
|
|
16524
|
+
},
|
|
16525
|
+
"6603ab69287d3100e9569177": {
|
|
16526
|
+
type: "phone",
|
|
16527
|
+
title: "Business Phone number",
|
|
16528
|
+
validationRules: [
|
|
16529
|
+
{
|
|
16530
|
+
type: "stringMaxLength",
|
|
16531
|
+
value: 12,
|
|
16532
|
+
errorMessage: "field_too_long",
|
|
16533
|
+
priority: 1
|
|
16534
|
+
}
|
|
16535
|
+
]
|
|
16536
|
+
},
|
|
16537
|
+
"6682cfaf91f1621d0a26ad93": {
|
|
16538
|
+
type: "string",
|
|
16539
|
+
title: "Registered Business Name",
|
|
16540
|
+
validationRules: []
|
|
16541
|
+
},
|
|
16542
|
+
"6603aa0df673303eedf37c3d": {
|
|
16543
|
+
type: "string",
|
|
16544
|
+
title: "Doing Business as Name",
|
|
16545
|
+
validationRules: []
|
|
16546
|
+
},
|
|
16547
|
+
"66a7f8bab582af0691139a8f": {
|
|
16548
|
+
type: "string",
|
|
16549
|
+
title: "Business Registration Number",
|
|
16550
|
+
validationRules: []
|
|
16551
|
+
},
|
|
16552
|
+
"672a78c9c5105823eb193535": {
|
|
16553
|
+
type: "string",
|
|
16554
|
+
title: "TaxID or VAT number",
|
|
16555
|
+
validationRules: []
|
|
16556
|
+
},
|
|
16557
|
+
"6603a3e6287d3100e9568836": {
|
|
16558
|
+
type: "string",
|
|
16559
|
+
title: "Jurisdiction of Incorporation",
|
|
16560
|
+
validationRules: []
|
|
16561
|
+
},
|
|
16562
|
+
"68c40a8e0fcf327e2fce4d62": {
|
|
16563
|
+
type: "string",
|
|
16564
|
+
title: "Street",
|
|
16565
|
+
validationRules: []
|
|
16566
|
+
},
|
|
16567
|
+
"68c40a8e0fcf327e2fce4d63": {
|
|
16568
|
+
type: "string",
|
|
16569
|
+
title: "Building number",
|
|
16570
|
+
validationRules: []
|
|
16571
|
+
},
|
|
16572
|
+
"66a7f906b582af0691139b49": {
|
|
16573
|
+
type: "string",
|
|
16574
|
+
title: "City",
|
|
16575
|
+
validationRules: []
|
|
16576
|
+
},
|
|
16577
|
+
"666868112bfde900dccacefb": {
|
|
16578
|
+
type: "string",
|
|
16579
|
+
title: "State / Province ",
|
|
16580
|
+
validationRules: []
|
|
16581
|
+
},
|
|
16582
|
+
"6603a3e6287d3100e9568835": {
|
|
16583
|
+
type: "string",
|
|
16584
|
+
title: "ZIP code / Postal Code",
|
|
16585
|
+
validationRules: []
|
|
16586
|
+
},
|
|
16587
|
+
"67d95b0da078851d45fabd9d": {
|
|
16588
|
+
type: "string",
|
|
16589
|
+
title: "Business email",
|
|
16590
|
+
validationRules: []
|
|
16591
|
+
}
|
|
16592
|
+
},
|
|
16593
|
+
required: [
|
|
16594
|
+
"6603a3e6287d3100e9568837",
|
|
16595
|
+
"67c5e0988bf323715f63030c",
|
|
16596
|
+
"67c5e091ed74a27d4474c780",
|
|
16597
|
+
"6682cfaf91f1621d0a26ad93",
|
|
16598
|
+
"66a7f8bab582af0691139a8f",
|
|
16599
|
+
"672a78c9c5105823eb193535",
|
|
16600
|
+
"68c40a8e0fcf327e2fce4d62",
|
|
16601
|
+
"68c40a8e0fcf327e2fce4d63",
|
|
16602
|
+
"66a7f906b582af0691139b49",
|
|
16603
|
+
"666868112bfde900dccacefb",
|
|
16604
|
+
"6603a3e6287d3100e9568835",
|
|
16605
|
+
"67d95b0da078851d45fabd9d"
|
|
16606
|
+
]
|
|
16607
|
+
},
|
|
16608
|
+
uiSchemaObject: {
|
|
16609
|
+
"ui:rootFieldId": "kyc",
|
|
16610
|
+
"ui:fields": {
|
|
16611
|
+
"6603a3e6287d3100e9568837": {
|
|
16612
|
+
"ui:widget": "select"
|
|
16613
|
+
},
|
|
16614
|
+
"67c5e0988bf323715f63030c": {
|
|
16615
|
+
"ui:widget": "date"
|
|
16616
|
+
},
|
|
16617
|
+
"6603ab69287d3100e9569177": {
|
|
16618
|
+
"ui:widget": "masked",
|
|
16619
|
+
"ui:inputType": "tel",
|
|
16620
|
+
"ui:maskOptions": {
|
|
16621
|
+
maskOptions: {
|
|
16622
|
+
mask: "000-000-0000"
|
|
16623
|
+
},
|
|
16624
|
+
maskedFieldName: "6603ab69287d3100e9569177"
|
|
16625
|
+
}
|
|
16626
|
+
}
|
|
16627
|
+
}
|
|
16628
|
+
}
|
|
16629
|
+
};
|
|
16630
|
+
// src/kyb/adapters/rest/httpMocks/mswKybHandlers.ts
|
|
16631
|
+
var createJsonResponse = /* @__PURE__ */ __name(function(ok, status, errorId) {
|
|
16632
|
+
var successResponse = mockKybVerificationResponse;
|
|
16633
|
+
if (!ok) {
|
|
16634
|
+
return HttpResponse.json({
|
|
16635
|
+
status: "ERROR",
|
|
16636
|
+
errorMessage: errorId || "Unknown error occurred"
|
|
16637
|
+
}, {
|
|
16638
|
+
status: status
|
|
16639
|
+
});
|
|
16640
|
+
}
|
|
16641
|
+
return HttpResponse.json(successResponse, {
|
|
16642
|
+
status: status
|
|
16643
|
+
});
|
|
16644
|
+
}, "createJsonResponse");
|
|
16645
|
+
var validateWorkflowAnswer = /* @__PURE__ */ __name(function(answer) {
|
|
16646
|
+
if (!answer.id || !answer.type || !("value" in answer)) {
|
|
16647
|
+
return false;
|
|
16648
|
+
}
|
|
16649
|
+
switch(answer.type){
|
|
16650
|
+
case "string":
|
|
16651
|
+
case "phone":
|
|
16652
|
+
return typeof answer.value === "string";
|
|
16653
|
+
case "number":
|
|
16654
|
+
case "integer":
|
|
16655
|
+
return typeof answer.value === "number";
|
|
16656
|
+
case "boolean":
|
|
16657
|
+
return typeof answer.value === "boolean";
|
|
16658
|
+
case "object":
|
|
16659
|
+
return _type_of(answer.value) === "object";
|
|
16660
|
+
default:
|
|
16661
|
+
return false;
|
|
16662
|
+
}
|
|
16663
|
+
}, "validateWorkflowAnswer");
|
|
16664
|
+
var mswKybHandlers = [
|
|
16665
|
+
http.get("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/kyb/onboarding"), function() {
|
|
16666
|
+
var _ref = _async_to_generator(function(param) {
|
|
16667
|
+
var request, url, countryCode;
|
|
16668
|
+
return _ts_generator(this, function(_state) {
|
|
16669
|
+
request = param.request;
|
|
16670
|
+
url = new URL(request.url);
|
|
16671
|
+
countryCode = url.searchParams.get("locale_code");
|
|
16672
|
+
if (!countryCode) {
|
|
16673
|
+
return [
|
|
16674
|
+
2,
|
|
16675
|
+
createJsonResponse(false, 400, "KYB_MISSING_REQUIRED_PARAMS")
|
|
16676
|
+
];
|
|
16677
|
+
}
|
|
16678
|
+
return [
|
|
16679
|
+
2,
|
|
16680
|
+
createJsonResponse(true, 200)
|
|
16681
|
+
];
|
|
16682
|
+
});
|
|
16683
|
+
});
|
|
16684
|
+
return function(_) {
|
|
16685
|
+
return _ref.apply(this, arguments);
|
|
16686
|
+
};
|
|
16687
|
+
}()),
|
|
16688
|
+
http.post("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/kyb/onboarding"), function() {
|
|
16689
|
+
var _ref = _async_to_generator(function(param) {
|
|
16690
|
+
var request, body, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, answer;
|
|
16691
|
+
return _ts_generator(this, function(_state) {
|
|
16692
|
+
switch(_state.label){
|
|
16693
|
+
case 0:
|
|
16694
|
+
request = param.request;
|
|
16695
|
+
return [
|
|
16696
|
+
4,
|
|
16697
|
+
request.json()
|
|
16698
|
+
];
|
|
16699
|
+
case 1:
|
|
16700
|
+
body = _state.sent();
|
|
16701
|
+
if (!body.locale_code || !body.answers) {
|
|
16702
|
+
return [
|
|
16703
|
+
2,
|
|
16704
|
+
createJsonResponse(false, 400, "KYB_MISSING_REQUIRED_FIELDS")
|
|
16705
|
+
];
|
|
16706
|
+
}
|
|
16707
|
+
if (!Array.isArray(body.answers) || body.answers.length === 0) {
|
|
16708
|
+
return [
|
|
16709
|
+
2,
|
|
16710
|
+
createJsonResponse(false, 400, "KYB_INVALID_ANSWERS_FORMAT")
|
|
16711
|
+
];
|
|
16712
|
+
}
|
|
16713
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
16714
|
+
try {
|
|
16715
|
+
for(_iterator = body.answers[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
16716
|
+
answer = _step.value;
|
|
16717
|
+
if (!validateWorkflowAnswer(answer)) {
|
|
16718
|
+
return [
|
|
16719
|
+
2,
|
|
16720
|
+
createJsonResponse(false, 400, "KYB_INVALID_ANSWER_FORMAT")
|
|
16721
|
+
];
|
|
16722
|
+
}
|
|
16723
|
+
}
|
|
16724
|
+
} catch (err) {
|
|
16725
|
+
_didIteratorError = true;
|
|
16726
|
+
_iteratorError = err;
|
|
16727
|
+
} finally{
|
|
16728
|
+
try {
|
|
16729
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
16730
|
+
_iterator.return();
|
|
16731
|
+
}
|
|
16732
|
+
} finally{
|
|
16733
|
+
if (_didIteratorError) {
|
|
16734
|
+
throw _iteratorError;
|
|
16735
|
+
}
|
|
16736
|
+
}
|
|
16737
|
+
}
|
|
16738
|
+
return [
|
|
16739
|
+
2,
|
|
16740
|
+
HttpResponse.json({
|
|
16741
|
+
status: "COMPLETE",
|
|
16742
|
+
infoMessage: "KYB verification completed successfully"
|
|
16743
|
+
}, {
|
|
16744
|
+
status: 200
|
|
16745
|
+
})
|
|
16746
|
+
];
|
|
16747
|
+
}
|
|
16748
|
+
});
|
|
16749
|
+
});
|
|
16750
|
+
return function(_) {
|
|
16751
|
+
return _ref.apply(this, arguments);
|
|
16752
|
+
};
|
|
16753
|
+
}())
|
|
16754
|
+
];
|
|
16755
|
+
// src/kyb/adapters/rest/RestKybRepository.ts
|
|
16756
|
+
function _ts_decorate84(decorators, target, key, desc) {
|
|
16757
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16758
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16759
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16760
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16761
|
+
}
|
|
16762
|
+
__name(_ts_decorate84, "_ts_decorate");
|
|
16763
|
+
function _ts_metadata45(k, v) {
|
|
16764
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
16765
|
+
}
|
|
16766
|
+
__name(_ts_metadata45, "_ts_metadata");
|
|
16767
|
+
var _RestKybRepository = /*#__PURE__*/ function() {
|
|
16768
|
+
function _RestKybRepository() {
|
|
16769
|
+
_class_call_check(this, _RestKybRepository);
|
|
16770
|
+
__publicField(this, "httpClient");
|
|
16771
|
+
__publicField(this, "getEnvConfigValueByName");
|
|
16772
|
+
}
|
|
16773
|
+
_create_class(_RestKybRepository, [
|
|
16774
|
+
{
|
|
16775
|
+
key: "initializeOnboarding",
|
|
16776
|
+
value: function initializeOnboarding(localeCode) {
|
|
16777
|
+
var _this = this;
|
|
16778
|
+
return _async_to_generator(function() {
|
|
16779
|
+
var cuiApiBaseUrl, path, queryParams, err, error2;
|
|
16780
|
+
return _ts_generator(this, function(_state) {
|
|
16781
|
+
switch(_state.label){
|
|
15695
16782
|
case 0:
|
|
15696
16783
|
_state.trys.push([
|
|
15697
16784
|
0,
|
|
@@ -17149,10 +18236,16 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
17149
18236
|
value: function requestOtpCode(request) {
|
|
17150
18237
|
var _this = this;
|
|
17151
18238
|
return _async_to_generator(function() {
|
|
17152
|
-
var url, response;
|
|
18239
|
+
var url, response, error2;
|
|
17153
18240
|
return _ts_generator(this, function(_state) {
|
|
17154
18241
|
switch(_state.label){
|
|
17155
18242
|
case 0:
|
|
18243
|
+
_state.trys.push([
|
|
18244
|
+
0,
|
|
18245
|
+
2,
|
|
18246
|
+
,
|
|
18247
|
+
3
|
|
18248
|
+
]);
|
|
17156
18249
|
_this.validateOAuthBaseUrl(request.oauthBaseUrl);
|
|
17157
18250
|
url = "".concat(request.oauthBaseUrl, "/mfa/challenge");
|
|
17158
18251
|
return [
|
|
@@ -17177,6 +18270,13 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
17177
18270
|
oobCode: response.oob_code
|
|
17178
18271
|
}
|
|
17179
18272
|
];
|
|
18273
|
+
case 2:
|
|
18274
|
+
error2 = _state.sent();
|
|
18275
|
+
throw new Error(error2.error_description || error2.error || error2);
|
|
18276
|
+
case 3:
|
|
18277
|
+
return [
|
|
18278
|
+
2
|
|
18279
|
+
];
|
|
17180
18280
|
}
|
|
17181
18281
|
});
|
|
17182
18282
|
})();
|
|
@@ -17378,7 +18478,7 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
17378
18478
|
];
|
|
17379
18479
|
case 3:
|
|
17380
18480
|
error2 = _state.sent();
|
|
17381
|
-
throw new Error(error2.error_description || error2.error);
|
|
18481
|
+
throw new Error(error2.error_description || error2.error || error2);
|
|
17382
18482
|
case 4:
|
|
17383
18483
|
return [
|
|
17384
18484
|
2
|
|
@@ -17628,7 +18728,6 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17628
18728
|
_class_call_check(this, _RestStatementsRepository);
|
|
17629
18729
|
__publicField(this, "httpClient");
|
|
17630
18730
|
__publicField(this, "getEnvConfigValueByName");
|
|
17631
|
-
__publicField(this, "getActiveEnvName");
|
|
17632
18731
|
}
|
|
17633
18732
|
_create_class(_RestStatementsRepository, [
|
|
17634
18733
|
{
|
|
@@ -17647,13 +18746,7 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17647
18746
|
3
|
|
17648
18747
|
]);
|
|
17649
18748
|
queryParams = _this.convertPaginationParamsToQueryParams(paginationParams);
|
|
17650
|
-
|
|
17651
|
-
"localhost",
|
|
17652
|
-
"qa",
|
|
17653
|
-
"development"
|
|
17654
|
-
].includes(_this.getActiveEnvName.execute())) {
|
|
17655
|
-
queryParams.set("direct", "true");
|
|
17656
|
-
}
|
|
18749
|
+
queryParams.set("direct", "true");
|
|
17657
18750
|
cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
|
|
17658
18751
|
path = "".concat(cuiApiBaseUrl, "/api/v1/statements?").concat(queryParams.toString());
|
|
17659
18752
|
return [
|
|
@@ -17694,16 +18787,10 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17694
18787
|
3
|
|
17695
18788
|
]);
|
|
17696
18789
|
queryParams = new URLSearchParams();
|
|
18790
|
+
queryParams.set("direct", "true");
|
|
17697
18791
|
if (accountToken) {
|
|
17698
18792
|
queryParams.set("account_token", accountToken);
|
|
17699
18793
|
}
|
|
17700
|
-
if ([
|
|
17701
|
-
"localhost",
|
|
17702
|
-
"qa",
|
|
17703
|
-
"development"
|
|
17704
|
-
].includes(_this.getActiveEnvName.execute())) {
|
|
17705
|
-
queryParams.set("direct", "true");
|
|
17706
|
-
}
|
|
17707
18794
|
cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
|
|
17708
18795
|
path = "".concat(cuiApiBaseUrl, "/api/v1/statements/").concat(issuedDate, "/download?").concat(queryParams.toString());
|
|
17709
18796
|
return [
|
|
@@ -17763,10 +18850,6 @@ _ts_decorate99([
|
|
|
17763
18850
|
_inversify.inject.call(void 0, INTR_GET_ENV_CONFIG_VALUE_BY_NAME),
|
|
17764
18851
|
_ts_metadata54("design:type", typeof GetEnvConfigValueByName === "undefined" ? Object : GetEnvConfigValueByName)
|
|
17765
18852
|
], RestStatementsRepository.prototype, "getEnvConfigValueByName", void 0);
|
|
17766
|
-
_ts_decorate99([
|
|
17767
|
-
_inversify.inject.call(void 0, INTR_GET_ACTIVE_ENV_NAME),
|
|
17768
|
-
_ts_metadata54("design:type", typeof GetActiveEnvName === "undefined" ? Object : GetActiveEnvName)
|
|
17769
|
-
], RestStatementsRepository.prototype, "getActiveEnvName", void 0);
|
|
17770
18853
|
RestStatementsRepository = _ts_decorate99([
|
|
17771
18854
|
_inversify.injectable.call(void 0)
|
|
17772
18855
|
], RestStatementsRepository);
|