@marqeta/ux-toolkit-sdk-javascript 2.18.2 → 2.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-H7FAQYRY.js → chunk-DCUOKAHQ.js} +40 -12
- package/dist/{chunk-QMET4POX.mjs → chunk-ETU5DMN7.mjs} +40 -12
- 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
|
@@ -3593,6 +3593,7 @@ var envConfigIOCModule = new (0, _inversify.ContainerModule)(function(bind) {
|
|
|
3593
3593
|
// src/env-configs/ioc/mockEnvConfigIOCModule.ts
|
|
3594
3594
|
var mockEnvConfigIOCModule = new (0, _inversify.ContainerModule)(function(bind) {
|
|
3595
3595
|
bind(INTR_GET_ENV_CONFIG_VALUE_BY_NAME).to(MockGetEnvConfigValueByName).inSingletonScope();
|
|
3596
|
+
bind(INTR_GET_ACTIVE_ENV_NAME).to(GetActiveEnvName).inSingletonScope();
|
|
3596
3597
|
bind(INTR_SET_ACTIVE_ENV_NAME).to(SetActiveEnvName).inSingletonScope();
|
|
3597
3598
|
bind(INTR_SET_MOCK_MODE).to(SetMockMode).inSingletonScope();
|
|
3598
3599
|
bind(INTR_IS_MOCK_MODE_ENABLED).to(IsMockModeEnabled).inSingletonScope();
|
|
@@ -17159,13 +17160,13 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
17159
17160
|
_this.httpClient.post(url, {
|
|
17160
17161
|
method: "POST",
|
|
17161
17162
|
headers: {
|
|
17162
|
-
"Content-Type": "application/
|
|
17163
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
17163
17164
|
},
|
|
17164
|
-
body:
|
|
17165
|
+
body: new URLSearchParams({
|
|
17165
17166
|
mfa_token: request.mfaToken,
|
|
17166
17167
|
challenge_type: "oob",
|
|
17167
17168
|
client_id: request.clientId
|
|
17168
|
-
})
|
|
17169
|
+
}).toString()
|
|
17169
17170
|
})
|
|
17170
17171
|
];
|
|
17171
17172
|
case 1:
|
|
@@ -17206,16 +17207,16 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
17206
17207
|
_this.httpClient.post(url, {
|
|
17207
17208
|
method: "POST",
|
|
17208
17209
|
headers: {
|
|
17209
|
-
"Content-Type": "application/
|
|
17210
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
17210
17211
|
},
|
|
17211
|
-
body:
|
|
17212
|
+
body: new URLSearchParams({
|
|
17212
17213
|
grant_type: "password",
|
|
17213
17214
|
username: request.identifier,
|
|
17214
17215
|
password: request.password,
|
|
17215
17216
|
client_id: request.clientId,
|
|
17216
17217
|
scope: request.scope || "openid email profile offline_access cardholder:all",
|
|
17217
17218
|
audience: request.audience || audience
|
|
17218
|
-
})
|
|
17219
|
+
}).toString()
|
|
17219
17220
|
})
|
|
17220
17221
|
];
|
|
17221
17222
|
case 2:
|
|
@@ -17281,15 +17282,15 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
17281
17282
|
_this.httpClient.post(url, {
|
|
17282
17283
|
method: "POST",
|
|
17283
17284
|
headers: {
|
|
17284
|
-
"Content-Type": "application/
|
|
17285
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
17285
17286
|
},
|
|
17286
|
-
body:
|
|
17287
|
+
body: new URLSearchParams({
|
|
17287
17288
|
grant_type: "refresh_token",
|
|
17288
17289
|
refresh_token: request.refreshToken,
|
|
17289
17290
|
client_id: request.clientId,
|
|
17290
17291
|
scope: request.scope,
|
|
17291
17292
|
login_status: request.loginStatus
|
|
17292
|
-
})
|
|
17293
|
+
}).toString()
|
|
17293
17294
|
})
|
|
17294
17295
|
];
|
|
17295
17296
|
case 2:
|
|
@@ -17411,16 +17412,16 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
17411
17412
|
_this.httpClient.post(url, {
|
|
17412
17413
|
method: "POST",
|
|
17413
17414
|
headers: {
|
|
17414
|
-
"Content-Type": "application/
|
|
17415
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
17415
17416
|
},
|
|
17416
|
-
body:
|
|
17417
|
+
body: new URLSearchParams({
|
|
17417
17418
|
// Auth0's token endpoint specifically looks for the exact string http://auth0.com/oauth/grant-type/mfa-oob to identify MFA OOB requests.
|
|
17418
17419
|
grant_type: "http://auth0.com/oauth/grant-type/mfa-oob",
|
|
17419
17420
|
client_id: request.clientId,
|
|
17420
17421
|
mfa_token: request.mfaToken,
|
|
17421
17422
|
oob_code: request.oobCode,
|
|
17422
17423
|
binding_code: request.bindingCode
|
|
17423
|
-
})
|
|
17424
|
+
}).toString()
|
|
17424
17425
|
})
|
|
17425
17426
|
];
|
|
17426
17427
|
case 2:
|
|
@@ -17627,6 +17628,7 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17627
17628
|
_class_call_check(this, _RestStatementsRepository);
|
|
17628
17629
|
__publicField(this, "httpClient");
|
|
17629
17630
|
__publicField(this, "getEnvConfigValueByName");
|
|
17631
|
+
__publicField(this, "getActiveEnvName");
|
|
17630
17632
|
}
|
|
17631
17633
|
_create_class(_RestStatementsRepository, [
|
|
17632
17634
|
{
|
|
@@ -17645,6 +17647,13 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17645
17647
|
3
|
|
17646
17648
|
]);
|
|
17647
17649
|
queryParams = _this.convertPaginationParamsToQueryParams(paginationParams);
|
|
17650
|
+
if ([
|
|
17651
|
+
"localhost",
|
|
17652
|
+
"qa",
|
|
17653
|
+
"development"
|
|
17654
|
+
].includes(_this.getActiveEnvName.execute())) {
|
|
17655
|
+
queryParams.set("direct", "true");
|
|
17656
|
+
}
|
|
17648
17657
|
cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
|
|
17649
17658
|
path = "".concat(cuiApiBaseUrl, "/api/v1/statements?").concat(queryParams.toString());
|
|
17650
17659
|
return [
|
|
@@ -17688,6 +17697,13 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17688
17697
|
if (accountToken) {
|
|
17689
17698
|
queryParams.set("account_token", accountToken);
|
|
17690
17699
|
}
|
|
17700
|
+
if ([
|
|
17701
|
+
"localhost",
|
|
17702
|
+
"qa",
|
|
17703
|
+
"development"
|
|
17704
|
+
].includes(_this.getActiveEnvName.execute())) {
|
|
17705
|
+
queryParams.set("direct", "true");
|
|
17706
|
+
}
|
|
17691
17707
|
cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
|
|
17692
17708
|
path = "".concat(cuiApiBaseUrl, "/api/v1/statements/").concat(issuedDate, "/download?").concat(queryParams.toString());
|
|
17693
17709
|
return [
|
|
@@ -17747,6 +17763,10 @@ _ts_decorate99([
|
|
|
17747
17763
|
_inversify.inject.call(void 0, INTR_GET_ENV_CONFIG_VALUE_BY_NAME),
|
|
17748
17764
|
_ts_metadata54("design:type", typeof GetEnvConfigValueByName === "undefined" ? Object : GetEnvConfigValueByName)
|
|
17749
17765
|
], 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);
|
|
17750
17770
|
RestStatementsRepository = _ts_decorate99([
|
|
17751
17771
|
_inversify.injectable.call(void 0)
|
|
17752
17772
|
], RestStatementsRepository);
|
|
@@ -17944,11 +17964,15 @@ var mswStatementsHandlers = [
|
|
|
17944
17964
|
var queryIssuedEndDate = queryParams.get("issued_end_date");
|
|
17945
17965
|
var queryIssuedStartDate = queryParams.get("issued_start_date");
|
|
17946
17966
|
var queryAccountToken = queryParams.get("account_token");
|
|
17967
|
+
var directParam = queryParams.get("direct");
|
|
17947
17968
|
var authorizationError = handleAuthorizationCheck(authorization);
|
|
17948
17969
|
if (authorizationError !== null) {
|
|
17949
17970
|
return authorizationError;
|
|
17950
17971
|
}
|
|
17951
17972
|
var response = handleGetStatements(VALID_USER_TOKEN, queryIssuedEndDate, queryIssuedStartDate, queryAccountToken);
|
|
17973
|
+
if (directParam === "true") {
|
|
17974
|
+
response.direct_mode = true;
|
|
17975
|
+
}
|
|
17952
17976
|
return HttpResponse.json(response);
|
|
17953
17977
|
}),
|
|
17954
17978
|
http.get("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/statements/:issuedDate/download"), function(param) {
|
|
@@ -17957,6 +17981,7 @@ var mswStatementsHandlers = [
|
|
|
17957
17981
|
var authorizationError = handleAuthorizationCheck(authorization);
|
|
17958
17982
|
var queryParams = new URLSearchParams(new URL(request.url).search);
|
|
17959
17983
|
var queryAccountToken = queryParams.get("account_token");
|
|
17984
|
+
var directParam = queryParams.get("direct");
|
|
17960
17985
|
if (authorizationError !== null) {
|
|
17961
17986
|
return authorizationError;
|
|
17962
17987
|
}
|
|
@@ -17978,6 +18003,9 @@ var mswStatementsHandlers = [
|
|
|
17978
18003
|
if (assetIndex === 10) {
|
|
17979
18004
|
response.state = StatementAssetStateEnum.PENDING;
|
|
17980
18005
|
}
|
|
18006
|
+
if (directParam === "true") {
|
|
18007
|
+
response.direct_mode = true;
|
|
18008
|
+
}
|
|
17981
18009
|
return HttpResponse.json(response);
|
|
17982
18010
|
})
|
|
17983
18011
|
];
|
|
@@ -3598,6 +3598,7 @@ var envConfigIOCModule = new ContainerModule3(function(bind) {
|
|
|
3598
3598
|
import { ContainerModule as ContainerModule4 } from "inversify";
|
|
3599
3599
|
var mockEnvConfigIOCModule = new ContainerModule4(function(bind) {
|
|
3600
3600
|
bind(INTR_GET_ENV_CONFIG_VALUE_BY_NAME).to(MockGetEnvConfigValueByName).inSingletonScope();
|
|
3601
|
+
bind(INTR_GET_ACTIVE_ENV_NAME).to(GetActiveEnvName).inSingletonScope();
|
|
3601
3602
|
bind(INTR_SET_ACTIVE_ENV_NAME).to(SetActiveEnvName).inSingletonScope();
|
|
3602
3603
|
bind(INTR_SET_MOCK_MODE).to(SetMockMode).inSingletonScope();
|
|
3603
3604
|
bind(INTR_IS_MOCK_MODE_ENABLED).to(IsMockModeEnabled).inSingletonScope();
|
|
@@ -16743,13 +16744,13 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
16743
16744
|
_this.httpClient.post(url, {
|
|
16744
16745
|
method: "POST",
|
|
16745
16746
|
headers: {
|
|
16746
|
-
"Content-Type": "application/
|
|
16747
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
16747
16748
|
},
|
|
16748
|
-
body:
|
|
16749
|
+
body: new URLSearchParams({
|
|
16749
16750
|
mfa_token: request.mfaToken,
|
|
16750
16751
|
challenge_type: "oob",
|
|
16751
16752
|
client_id: request.clientId
|
|
16752
|
-
})
|
|
16753
|
+
}).toString()
|
|
16753
16754
|
})
|
|
16754
16755
|
];
|
|
16755
16756
|
case 1:
|
|
@@ -16790,16 +16791,16 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
16790
16791
|
_this.httpClient.post(url, {
|
|
16791
16792
|
method: "POST",
|
|
16792
16793
|
headers: {
|
|
16793
|
-
"Content-Type": "application/
|
|
16794
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
16794
16795
|
},
|
|
16795
|
-
body:
|
|
16796
|
+
body: new URLSearchParams({
|
|
16796
16797
|
grant_type: "password",
|
|
16797
16798
|
username: request.identifier,
|
|
16798
16799
|
password: request.password,
|
|
16799
16800
|
client_id: request.clientId,
|
|
16800
16801
|
scope: request.scope || "openid email profile offline_access cardholder:all",
|
|
16801
16802
|
audience: request.audience || audience
|
|
16802
|
-
})
|
|
16803
|
+
}).toString()
|
|
16803
16804
|
})
|
|
16804
16805
|
];
|
|
16805
16806
|
case 2:
|
|
@@ -16865,15 +16866,15 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
16865
16866
|
_this.httpClient.post(url, {
|
|
16866
16867
|
method: "POST",
|
|
16867
16868
|
headers: {
|
|
16868
|
-
"Content-Type": "application/
|
|
16869
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
16869
16870
|
},
|
|
16870
|
-
body:
|
|
16871
|
+
body: new URLSearchParams({
|
|
16871
16872
|
grant_type: "refresh_token",
|
|
16872
16873
|
refresh_token: request.refreshToken,
|
|
16873
16874
|
client_id: request.clientId,
|
|
16874
16875
|
scope: request.scope,
|
|
16875
16876
|
login_status: request.loginStatus
|
|
16876
|
-
})
|
|
16877
|
+
}).toString()
|
|
16877
16878
|
})
|
|
16878
16879
|
];
|
|
16879
16880
|
case 2:
|
|
@@ -16995,16 +16996,16 @@ var _RestIdpService = /*#__PURE__*/ function(iIdpService) {
|
|
|
16995
16996
|
_this.httpClient.post(url, {
|
|
16996
16997
|
method: "POST",
|
|
16997
16998
|
headers: {
|
|
16998
|
-
"Content-Type": "application/
|
|
16999
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
16999
17000
|
},
|
|
17000
|
-
body:
|
|
17001
|
+
body: new URLSearchParams({
|
|
17001
17002
|
// Auth0's token endpoint specifically looks for the exact string http://auth0.com/oauth/grant-type/mfa-oob to identify MFA OOB requests.
|
|
17002
17003
|
grant_type: "http://auth0.com/oauth/grant-type/mfa-oob",
|
|
17003
17004
|
client_id: request.clientId,
|
|
17004
17005
|
mfa_token: request.mfaToken,
|
|
17005
17006
|
oob_code: request.oobCode,
|
|
17006
17007
|
binding_code: request.bindingCode
|
|
17007
|
-
})
|
|
17008
|
+
}).toString()
|
|
17008
17009
|
})
|
|
17009
17010
|
];
|
|
17010
17011
|
case 2:
|
|
@@ -17222,6 +17223,7 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17222
17223
|
_class_call_check(this, _RestStatementsRepository);
|
|
17223
17224
|
__publicField(this, "httpClient");
|
|
17224
17225
|
__publicField(this, "getEnvConfigValueByName");
|
|
17226
|
+
__publicField(this, "getActiveEnvName");
|
|
17225
17227
|
}
|
|
17226
17228
|
_create_class(_RestStatementsRepository, [
|
|
17227
17229
|
{
|
|
@@ -17240,6 +17242,13 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17240
17242
|
3
|
|
17241
17243
|
]);
|
|
17242
17244
|
queryParams = _this.convertPaginationParamsToQueryParams(paginationParams);
|
|
17245
|
+
if ([
|
|
17246
|
+
"localhost",
|
|
17247
|
+
"qa",
|
|
17248
|
+
"development"
|
|
17249
|
+
].includes(_this.getActiveEnvName.execute())) {
|
|
17250
|
+
queryParams.set("direct", "true");
|
|
17251
|
+
}
|
|
17243
17252
|
cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
|
|
17244
17253
|
path = "".concat(cuiApiBaseUrl, "/api/v1/statements?").concat(queryParams.toString());
|
|
17245
17254
|
return [
|
|
@@ -17283,6 +17292,13 @@ var _RestStatementsRepository = /*#__PURE__*/ function() {
|
|
|
17283
17292
|
if (accountToken) {
|
|
17284
17293
|
queryParams.set("account_token", accountToken);
|
|
17285
17294
|
}
|
|
17295
|
+
if ([
|
|
17296
|
+
"localhost",
|
|
17297
|
+
"qa",
|
|
17298
|
+
"development"
|
|
17299
|
+
].includes(_this.getActiveEnvName.execute())) {
|
|
17300
|
+
queryParams.set("direct", "true");
|
|
17301
|
+
}
|
|
17286
17302
|
cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
|
|
17287
17303
|
path = "".concat(cuiApiBaseUrl, "/api/v1/statements/").concat(issuedDate, "/download?").concat(queryParams.toString());
|
|
17288
17304
|
return [
|
|
@@ -17342,6 +17358,10 @@ _ts_decorate99([
|
|
|
17342
17358
|
inject52(INTR_GET_ENV_CONFIG_VALUE_BY_NAME),
|
|
17343
17359
|
_ts_metadata54("design:type", typeof GetEnvConfigValueByName === "undefined" ? Object : GetEnvConfigValueByName)
|
|
17344
17360
|
], RestStatementsRepository.prototype, "getEnvConfigValueByName", void 0);
|
|
17361
|
+
_ts_decorate99([
|
|
17362
|
+
inject52(INTR_GET_ACTIVE_ENV_NAME),
|
|
17363
|
+
_ts_metadata54("design:type", typeof GetActiveEnvName === "undefined" ? Object : GetActiveEnvName)
|
|
17364
|
+
], RestStatementsRepository.prototype, "getActiveEnvName", void 0);
|
|
17345
17365
|
RestStatementsRepository = _ts_decorate99([
|
|
17346
17366
|
injectable99()
|
|
17347
17367
|
], RestStatementsRepository);
|
|
@@ -17539,11 +17559,15 @@ var mswStatementsHandlers = [
|
|
|
17539
17559
|
var queryIssuedEndDate = queryParams.get("issued_end_date");
|
|
17540
17560
|
var queryIssuedStartDate = queryParams.get("issued_start_date");
|
|
17541
17561
|
var queryAccountToken = queryParams.get("account_token");
|
|
17562
|
+
var directParam = queryParams.get("direct");
|
|
17542
17563
|
var authorizationError = handleAuthorizationCheck(authorization);
|
|
17543
17564
|
if (authorizationError !== null) {
|
|
17544
17565
|
return authorizationError;
|
|
17545
17566
|
}
|
|
17546
17567
|
var response = handleGetStatements(VALID_USER_TOKEN, queryIssuedEndDate, queryIssuedStartDate, queryAccountToken);
|
|
17568
|
+
if (directParam === "true") {
|
|
17569
|
+
response.direct_mode = true;
|
|
17570
|
+
}
|
|
17547
17571
|
return HttpResponse.json(response);
|
|
17548
17572
|
}),
|
|
17549
17573
|
http.get("".concat(mockMode_exports.CUI_API_BASE_URL, "/api/v1/statements/:issuedDate/download"), function(param) {
|
|
@@ -17552,6 +17576,7 @@ var mswStatementsHandlers = [
|
|
|
17552
17576
|
var authorizationError = handleAuthorizationCheck(authorization);
|
|
17553
17577
|
var queryParams = new URLSearchParams(new URL(request.url).search);
|
|
17554
17578
|
var queryAccountToken = queryParams.get("account_token");
|
|
17579
|
+
var directParam = queryParams.get("direct");
|
|
17555
17580
|
if (authorizationError !== null) {
|
|
17556
17581
|
return authorizationError;
|
|
17557
17582
|
}
|
|
@@ -17573,6 +17598,9 @@ var mswStatementsHandlers = [
|
|
|
17573
17598
|
if (assetIndex === 10) {
|
|
17574
17599
|
response.state = StatementAssetStateEnum.PENDING;
|
|
17575
17600
|
}
|
|
17601
|
+
if (directParam === "true") {
|
|
17602
|
+
response.direct_mode = true;
|
|
17603
|
+
}
|
|
17576
17604
|
return HttpResponse.json(response);
|
|
17577
17605
|
})
|
|
17578
17606
|
];
|