@marqeta/ux-toolkit-sdk-javascript 2.19.0 → 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.
@@ -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)
@@ -3593,6 +3590,7 @@ var envConfigIOCModule = new (0, _inversify.ContainerModule)(function(bind) {
3593
3590
  // src/env-configs/ioc/mockEnvConfigIOCModule.ts
3594
3591
  var mockEnvConfigIOCModule = new (0, _inversify.ContainerModule)(function(bind) {
3595
3592
  bind(INTR_GET_ENV_CONFIG_VALUE_BY_NAME).to(MockGetEnvConfigValueByName).inSingletonScope();
3593
+ bind(INTR_GET_ACTIVE_ENV_NAME).to(GetActiveEnvName).inSingletonScope();
3596
3594
  bind(INTR_SET_ACTIVE_ENV_NAME).to(SetActiveEnvName).inSingletonScope();
3597
3595
  bind(INTR_SET_MOCK_MODE).to(SetMockMode).inSingletonScope();
3598
3596
  bind(INTR_IS_MOCK_MODE_ENABLED).to(IsMockModeEnabled).inSingletonScope();
@@ -4407,42 +4405,25 @@ var _MockAuthCredentialService = /*#__PURE__*/ function() {
4407
4405
  value: function generateAuthKeyPair() {
4408
4406
  var _this = this;
4409
4407
  return _async_to_generator(function() {
4410
- var _ref, publicKey, privateKey, _, _tmp;
4411
4408
  return _ts_generator(this, function(_state) {
4412
- switch(_state.label){
4413
- case 0:
4414
- return [
4415
- 4,
4416
- crypto.subtle.generateKey({
4417
- name: "ECDSA",
4418
- namedCurve: "P-256"
4419
- }, true, [
4420
- "sign",
4421
- "verify"
4422
- ])
4423
- ];
4424
- case 1:
4425
- _ref = _state.sent(), publicKey = _ref.publicKey, privateKey = _ref.privateKey;
4426
- _ = _this.setAuthKeyPair;
4427
- _tmp = {};
4428
- return [
4429
- 4,
4430
- crypto.subtle.exportKey("jwk", publicKey)
4431
- ];
4432
- case 2:
4433
- _tmp.publicJwk = _state.sent();
4434
- return [
4435
- 4,
4436
- crypto.subtle.exportKey("jwk", privateKey)
4437
- ];
4438
- case 3:
4439
- _.apply(_this, [
4440
- (_tmp.privateJwk = _state.sent(), _tmp)
4441
- ]);
4442
- return [
4443
- 2
4444
- ];
4445
- }
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
+ ];
4446
4427
  });
4447
4428
  })();
4448
4429
  }
@@ -9212,7 +9193,7 @@ var _RestCardRepository = /*#__PURE__*/ function() {
9212
9193
  _create_class(_RestCardRepository, [
9213
9194
  {
9214
9195
  key: "getCardByToken",
9215
- value: function getCardByToken(cardToken) {
9196
+ value: function getCardByToken(cardToken, shortCode) {
9216
9197
  var _this = this;
9217
9198
  return _async_to_generator(function() {
9218
9199
  var cuiApiBaseUrl, path, data, convertedData, error2;
@@ -9226,7 +9207,7 @@ var _RestCardRepository = /*#__PURE__*/ function() {
9226
9207
  3
9227
9208
  ]);
9228
9209
  cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
9229
- path = "".concat(cuiApiBaseUrl, "/api/v1/cards/").concat(cardToken);
9210
+ path = "".concat(cuiApiBaseUrl, "/api/v1/cards/").concat(cardToken).concat(shortCode ? "?short_code=".concat(shortCode) : "");
9230
9211
  return [
9231
9212
  4,
9232
9213
  _this.httpClient.get(path)
@@ -9300,7 +9281,7 @@ var _RestCardRepository = /*#__PURE__*/ function() {
9300
9281
  },
9301
9282
  {
9302
9283
  key: "getShowpanByCardToken",
9303
- value: function getShowpanByCardToken(cardToken) {
9284
+ value: function getShowpanByCardToken(cardToken, shortCode) {
9304
9285
  var _this = this;
9305
9286
  return _async_to_generator(function() {
9306
9287
  var cuiApiBaseUrl, path, data, convertedData, error2;
@@ -9314,7 +9295,7 @@ var _RestCardRepository = /*#__PURE__*/ function() {
9314
9295
  3
9315
9296
  ]);
9316
9297
  cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
9317
- 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) : "");
9318
9299
  return [
9319
9300
  4,
9320
9301
  _this.httpClient.get(path)
@@ -15184,22 +15165,7 @@ var iKycRepository = _iKycRepository;
15184
15165
  iKycRepository = exports.iKycRepository = _ts_decorate81([
15185
15166
  _inversify.injectable.call(void 0)
15186
15167
  ], iKycRepository);
15187
- // src/kyc/adapters/rest/httpMocks.ts
15188
- var createJsonResponse = /* @__PURE__ */ __name(function(ok, status, errorId) {
15189
- return HttpResponse.json(_object_spread({
15190
- ok: ok
15191
- }, errorId && {
15192
- error: {
15193
- id: errorId,
15194
- debug: []
15195
- }
15196
- }, ok && {
15197
- result: mockKycVerificationResponse,
15198
- status: status
15199
- }), {
15200
- status: status
15201
- });
15202
- }, "createJsonResponse");
15168
+ // src/kyc/adapters/rest/httpMocks/mswKycHandlers.ts
15203
15169
  var mswKycHandlers = [
15204
15170
  http.post("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/kyc"), function() {
15205
15171
  var _ref = _async_to_generator(function(param) {
@@ -15217,13 +15183,18 @@ var mswKycHandlers = [
15217
15183
  if (body.accountHolderGroupToken === INVALID_ACCOUNT_HOLDER) {
15218
15184
  return [
15219
15185
  2,
15220
- createJsonResponse(false, 400)
15186
+ new HttpResponse(null, {
15187
+ status: 400,
15188
+ statusText: "Bad Request"
15189
+ })
15221
15190
  ];
15222
15191
  }
15223
15192
  if (body.lastName === "approve") {
15224
15193
  return [
15225
15194
  2,
15226
- createJsonResponse(true, 200)
15195
+ HttpResponse.json(mockKycVerificationResponse, {
15196
+ status: 200
15197
+ })
15227
15198
  ];
15228
15199
  }
15229
15200
  errorMap = {
@@ -15234,40 +15205,65 @@ var mswKycHandlers = [
15234
15205
  if (body.lastName && errorMap[body.lastName]) {
15235
15206
  return [
15236
15207
  2,
15237
- createJsonResponse(false, 400, errorMap[body.lastName || ""])
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
+ })
15238
15221
  ];
15239
15222
  }
15240
- if (!(body.identifierType === "SSN")) return [
15241
- 3,
15242
- 4
15243
- ];
15244
- 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);
15245
- if (!(body.identifierValue === LOADING_SSN)) return [
15246
- 3,
15247
- 3
15248
- ];
15249
- return [
15250
- 4,
15251
- delay("infinite")
15252
- ];
15253
- case 2:
15254
- return [
15255
- 2,
15256
- _state.sent()
15257
- ];
15258
- case 3:
15259
- if (body.identifierValue && ssnErrorMap[body.identifierValue]) {
15260
- errorId = ssnErrorMap[body.identifierValue];
15261
- return [
15262
- 2,
15263
- createJsonResponse(false, 400, errorId)
15264
- ];
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
+ }
15265
15261
  }
15266
- _state.label = 4;
15267
- case 4:
15268
15262
  return [
15269
15263
  2,
15270
- createJsonResponse(true, 200)
15264
+ HttpResponse.json(mockKycVerificationResponse, {
15265
+ status: 200
15266
+ })
15271
15267
  ];
15272
15268
  }
15273
15269
  });
@@ -15514,182 +15510,1274 @@ var mockKybEvaluationRequest = {
15514
15510
  ]
15515
15511
  };
15516
15512
  var mockKybVerificationResponse = {
15517
- infoMessage: "KYB verification in progress",
15513
+ status: KybEvaluationStatus.IN_PROGRESS,
15518
15514
  schema: {
15519
15515
  properties: {
15520
- "67c69b6f8bf323715f63302b": {
15521
- type: "string",
15522
- title: "Company name",
15523
- validationRules: []
15524
- },
15525
- "67c69b6f8bf323715f63302c": {
15516
+ "6603a3e6287d3100e9568837": {
15526
15517
  type: "string",
15527
- title: "Company number",
15528
- validationRules: []
15529
- }
15530
- },
15531
- required: [
15532
- "67c69b6f8bf323715f63302b",
15533
- "67c69b6f8bf323715f63302c"
15534
- ]
15535
- },
15536
- uiSchemaObject: {
15537
- "ui:rootFieldId": "kyc",
15538
- "ui:fields": {}
15539
- },
15540
- status: KybEvaluationStatus.IN_PROGRESS
15541
- };
15542
- // src/kyb/adapters/rest/httpMocks/mswKybHandlers.ts
15543
- var createJsonResponse2 = /* @__PURE__ */ __name(function(ok, status, errorId) {
15544
- var successResponse = mockKybVerificationResponse;
15545
- if (!ok) {
15546
- return HttpResponse.json({
15547
- status: "ERROR",
15548
- errorMessage: errorId || "Unknown error occurred"
15549
- }, {
15550
- status: status
15551
- });
15552
- }
15553
- return HttpResponse.json(successResponse, {
15554
- status: status
15555
- });
15556
- }, "createJsonResponse");
15557
- var validateWorkflowAnswer = /* @__PURE__ */ __name(function(answer) {
15558
- if (!answer.id || !answer.type || !("value" in answer)) {
15559
- return false;
15560
- }
15561
- switch(answer.type){
15562
- case "string":
15563
- case "phone":
15564
- return typeof answer.value === "string";
15565
- case "number":
15566
- case "integer":
15567
- return typeof answer.value === "number";
15568
- case "boolean":
15569
- return typeof answer.value === "boolean";
15570
- case "object":
15571
- return _type_of(answer.value) === "object";
15572
- default:
15573
- return false;
15574
- }
15575
- }, "validateWorkflowAnswer");
15576
- var mswKybHandlers = [
15577
- http.get("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/kyb/onboarding"), function() {
15578
- var _ref = _async_to_generator(function(param) {
15579
- var request, url, countryCode;
15580
- return _ts_generator(this, function(_state) {
15581
- request = param.request;
15582
- url = new URL(request.url);
15583
- countryCode = url.searchParams.get("locale_code");
15584
- if (!countryCode) {
15585
- return [
15586
- 2,
15587
- createJsonResponse2(false, 400, "KYB_MISSING_REQUIRED_PARAMS")
15588
- ];
15589
- }
15590
- return [
15591
- 2,
15592
- createJsonResponse2(true, 200)
15593
- ];
15594
- });
15595
- });
15596
- return function(_) {
15597
- return _ref.apply(this, arguments);
15598
- };
15599
- }()),
15600
- http.post("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/kyb/onboarding"), function() {
15601
- var _ref = _async_to_generator(function(param) {
15602
- var request, body, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, answer;
15603
- return _ts_generator(this, function(_state) {
15604
- switch(_state.label){
15605
- case 0:
15606
- request = param.request;
15607
- return [
15608
- 4,
15609
- request.json()
15610
- ];
15611
- case 1:
15612
- body = _state.sent();
15613
- if (!body.locale_code || !body.answers) {
15614
- return [
15615
- 2,
15616
- createJsonResponse2(false, 400, "KYB_MISSING_REQUIRED_FIELDS")
15617
- ];
15618
- }
15619
- if (!Array.isArray(body.answers) || body.answers.length === 0) {
15620
- return [
15621
- 2,
15622
- createJsonResponse2(false, 400, "KYB_INVALID_ANSWERS_FORMAT")
15623
- ];
15624
- }
15625
- _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
15626
- try {
15627
- for(_iterator = body.answers[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
15628
- answer = _step.value;
15629
- if (!validateWorkflowAnswer(answer)) {
15630
- return [
15631
- 2,
15632
- createJsonResponse2(false, 400, "KYB_INVALID_ANSWER_FORMAT")
15633
- ];
15634
- }
15635
- }
15636
- } catch (err) {
15637
- _didIteratorError = true;
15638
- _iteratorError = err;
15639
- } finally{
15640
- try {
15641
- if (!_iteratorNormalCompletion && _iterator.return != null) {
15642
- _iterator.return();
15643
- }
15644
- } finally{
15645
- if (_didIteratorError) {
15646
- throw _iteratorError;
15647
- }
15648
- }
15649
- }
15650
- return [
15651
- 2,
15652
- HttpResponse.json({
15653
- status: "COMPLETE",
15654
- infoMessage: "KYB verification completed successfully"
15655
- }, {
15656
- status: 200
15657
- })
15658
- ];
15659
- }
15660
- });
15661
- });
15662
- return function(_) {
15663
- return _ref.apply(this, arguments);
15664
- };
15665
- }())
15666
- ];
15667
- // src/kyb/adapters/rest/RestKybRepository.ts
15668
- function _ts_decorate84(decorators, target, key, desc) {
15669
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15670
- if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15671
- 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;
15672
- return c > 3 && r && Object.defineProperty(target, key, r), r;
15673
- }
15674
- __name(_ts_decorate84, "_ts_decorate");
15675
- function _ts_metadata45(k, v) {
15676
- if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15677
- }
15678
- __name(_ts_metadata45, "_ts_metadata");
15679
- var _RestKybRepository = /*#__PURE__*/ function() {
15680
- function _RestKybRepository() {
15681
- _class_call_check(this, _RestKybRepository);
15682
- __publicField(this, "httpClient");
15683
- __publicField(this, "getEnvConfigValueByName");
15684
- }
15685
- _create_class(_RestKybRepository, [
15686
- {
15687
- key: "initializeOnboarding",
15688
- value: function initializeOnboarding(localeCode) {
15689
- var _this = this;
15690
- return _async_to_generator(function() {
15691
- var cuiApiBaseUrl, path, queryParams, err, error2;
15692
- return _ts_generator(this, function(_state) {
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) {
15693
16781
  switch(_state.label){
15694
16782
  case 0:
15695
16783
  _state.trys.push([
@@ -17148,10 +18236,16 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
17148
18236
  value: function requestOtpCode(request) {
17149
18237
  var _this = this;
17150
18238
  return _async_to_generator(function() {
17151
- var url, response;
18239
+ var url, response, error2;
17152
18240
  return _ts_generator(this, function(_state) {
17153
18241
  switch(_state.label){
17154
18242
  case 0:
18243
+ _state.trys.push([
18244
+ 0,
18245
+ 2,
18246
+ ,
18247
+ 3
18248
+ ]);
17155
18249
  _this.validateOAuthBaseUrl(request.oauthBaseUrl);
17156
18250
  url = "".concat(request.oauthBaseUrl, "/mfa/challenge");
17157
18251
  return [
@@ -17176,6 +18270,13 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
17176
18270
  oobCode: response.oob_code
17177
18271
  }
17178
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
+ ];
17179
18280
  }
17180
18281
  });
17181
18282
  })();
@@ -17377,7 +18478,7 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
17377
18478
  ];
17378
18479
  case 3:
17379
18480
  error2 = _state.sent();
17380
- throw new Error(error2.error_description || error2.error);
18481
+ throw new Error(error2.error_description || error2.error || error2);
17381
18482
  case 4:
17382
18483
  return [
17383
18484
  2
@@ -17645,6 +18746,7 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
17645
18746
  3
17646
18747
  ]);
17647
18748
  queryParams = _this.convertPaginationParamsToQueryParams(paginationParams);
18749
+ queryParams.set("direct", "true");
17648
18750
  cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
17649
18751
  path = "".concat(cuiApiBaseUrl, "/api/v1/statements?").concat(queryParams.toString());
17650
18752
  return [
@@ -17685,6 +18787,7 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
17685
18787
  3
17686
18788
  ]);
17687
18789
  queryParams = new URLSearchParams();
18790
+ queryParams.set("direct", "true");
17688
18791
  if (accountToken) {
17689
18792
  queryParams.set("account_token", accountToken);
17690
18793
  }
@@ -17944,11 +19047,15 @@ var mswStatementsHandlers = [
17944
19047
  var queryIssuedEndDate = queryParams.get("issued_end_date");
17945
19048
  var queryIssuedStartDate = queryParams.get("issued_start_date");
17946
19049
  var queryAccountToken = queryParams.get("account_token");
19050
+ var directParam = queryParams.get("direct");
17947
19051
  var authorizationError = handleAuthorizationCheck(authorization);
17948
19052
  if (authorizationError !== null) {
17949
19053
  return authorizationError;
17950
19054
  }
17951
19055
  var response = handleGetStatements(VALID_USER_TOKEN, queryIssuedEndDate, queryIssuedStartDate, queryAccountToken);
19056
+ if (directParam === "true") {
19057
+ response.direct_mode = true;
19058
+ }
17952
19059
  return HttpResponse.json(response);
17953
19060
  }),
17954
19061
  http.get("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/statements/:issuedDate/download"), function(param) {
@@ -17957,6 +19064,7 @@ var mswStatementsHandlers = [
17957
19064
  var authorizationError = handleAuthorizationCheck(authorization);
17958
19065
  var queryParams = new URLSearchParams(new URL(request.url).search);
17959
19066
  var queryAccountToken = queryParams.get("account_token");
19067
+ var directParam = queryParams.get("direct");
17960
19068
  if (authorizationError !== null) {
17961
19069
  return authorizationError;
17962
19070
  }
@@ -17978,6 +19086,9 @@ var mswStatementsHandlers = [
17978
19086
  if (assetIndex === 10) {
17979
19087
  response.state = StatementAssetStateEnum.PENDING;
17980
19088
  }
19089
+ if (directParam === "true") {
19090
+ response.direct_mode = true;
19091
+ }
17981
19092
  return HttpResponse.json(response);
17982
19093
  })
17983
19094
  ];