@marqeta/ux-toolkit-sdk-javascript 2.2.0 → 2.2.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/index.d.mts CHANGED
@@ -3742,7 +3742,7 @@ declare abstract class iWlaService {
3742
3742
  abstract getAccountTransactions(requestBody: GetAccountTransactionsRequest): Promise<TransactionListResponse>;
3743
3743
  abstract getCardByToken(cardToken: string): Promise<CardResponse>;
3744
3744
  abstract getConsentById(id: string, country_code: string): Promise<ConsentResponse>;
3745
- abstract getConsents(country_code: string): Promise<ConsentListResponse>;
3745
+ abstract getConsents(userId: string, country_code: string): Promise<ConsentListResponse>;
3746
3746
  abstract getExternalAccount(token: string): Promise<ExternalAccountResponse>;
3747
3747
  abstract getExternalAccountList(requestBody: ExternalAccountListRequest): Promise<ExternalAccountListResponse>;
3748
3748
  abstract getOfferDetails(offerId: string): Promise<OfferResponse>;
@@ -3816,7 +3816,7 @@ declare class RestWlaService implements iWlaService {
3816
3816
  getOutagesList(devicePlatform?: string): Promise<OutagesListResponse>;
3817
3817
  getConsentById(id: string, country_code?: string): Promise<ConsentResponse>;
3818
3818
  getTransferByToken(token: string, country_code?: string): Promise<TransferResponse>;
3819
- getConsents(country_code?: string): Promise<ConsentListResponse>;
3819
+ getConsents(userId: string, country_code?: string): Promise<ConsentListResponse>;
3820
3820
  getTransfers(country_code?: string): Promise<TransferListResponse>;
3821
3821
  updateConsentStatus(id: string, country_code: string | undefined, requestBody: UpdateConsentStatusRequest): Promise<UpdateConsentStatusResponse>;
3822
3822
  revokeConsent(id: string, country_code: string | undefined, requestBody: UpdateConsentStatusRequest): Promise<RevokeConsentResponse>;
@@ -3836,7 +3836,7 @@ declare function getAccountTransactions(requestBody: GetAccountTransactionsReque
3836
3836
 
3837
3837
  declare function getConsentById(id: string, country_code?: string): Promise<ConsentResponse>;
3838
3838
 
3839
- declare function getConsents(country_code?: string): Promise<ConsentListResponse>;
3839
+ declare function getConsents(userId: string, country_code?: string): Promise<ConsentListResponse>;
3840
3840
 
3841
3841
  declare function getExternalAccount(token: string): Promise<ExternalAccountResponse>;
3842
3842
 
package/dist/index.d.ts CHANGED
@@ -3742,7 +3742,7 @@ declare abstract class iWlaService {
3742
3742
  abstract getAccountTransactions(requestBody: GetAccountTransactionsRequest): Promise<TransactionListResponse>;
3743
3743
  abstract getCardByToken(cardToken: string): Promise<CardResponse>;
3744
3744
  abstract getConsentById(id: string, country_code: string): Promise<ConsentResponse>;
3745
- abstract getConsents(country_code: string): Promise<ConsentListResponse>;
3745
+ abstract getConsents(userId: string, country_code: string): Promise<ConsentListResponse>;
3746
3746
  abstract getExternalAccount(token: string): Promise<ExternalAccountResponse>;
3747
3747
  abstract getExternalAccountList(requestBody: ExternalAccountListRequest): Promise<ExternalAccountListResponse>;
3748
3748
  abstract getOfferDetails(offerId: string): Promise<OfferResponse>;
@@ -3816,7 +3816,7 @@ declare class RestWlaService implements iWlaService {
3816
3816
  getOutagesList(devicePlatform?: string): Promise<OutagesListResponse>;
3817
3817
  getConsentById(id: string, country_code?: string): Promise<ConsentResponse>;
3818
3818
  getTransferByToken(token: string, country_code?: string): Promise<TransferResponse>;
3819
- getConsents(country_code?: string): Promise<ConsentListResponse>;
3819
+ getConsents(userId: string, country_code?: string): Promise<ConsentListResponse>;
3820
3820
  getTransfers(country_code?: string): Promise<TransferListResponse>;
3821
3821
  updateConsentStatus(id: string, country_code: string | undefined, requestBody: UpdateConsentStatusRequest): Promise<UpdateConsentStatusResponse>;
3822
3822
  revokeConsent(id: string, country_code: string | undefined, requestBody: UpdateConsentStatusRequest): Promise<RevokeConsentResponse>;
@@ -3836,7 +3836,7 @@ declare function getAccountTransactions(requestBody: GetAccountTransactionsReque
3836
3836
 
3837
3837
  declare function getConsentById(id: string, country_code?: string): Promise<ConsentResponse>;
3838
3838
 
3839
- declare function getConsents(country_code?: string): Promise<ConsentListResponse>;
3839
+ declare function getConsents(userId: string, country_code?: string): Promise<ConsentListResponse>;
3840
3840
 
3841
3841
  declare function getExternalAccount(token: string): Promise<ExternalAccountResponse>;
3842
3842
 
package/dist/index.js CHANGED
@@ -20815,11 +20815,11 @@ var _RestWlaService = /*#__PURE__*/ function() {
20815
20815
  },
20816
20816
  {
20817
20817
  key: "getConsents",
20818
- value: function getConsents() {
20819
- var country_code = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "GB";
20818
+ value: function getConsents(userId) {
20819
+ var country_code = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "GB";
20820
20820
  var _this = this;
20821
20821
  return _async_to_generator(function() {
20822
- var cuiApiBaseUrl, path, params, error2;
20822
+ var queryParams, cuiApiBaseUrl, path, params, error2;
20823
20823
  return _ts_generator(this, function(_state) {
20824
20824
  switch(_state.label){
20825
20825
  case 0:
@@ -20829,8 +20829,11 @@ var _RestWlaService = /*#__PURE__*/ function() {
20829
20829
  ,
20830
20830
  3
20831
20831
  ]);
20832
+ queryParams = new URLSearchParams({
20833
+ userId: userId
20834
+ });
20832
20835
  cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
20833
- path = "".concat(cuiApiBaseUrl, "/api/v1/wla/open-banking/").concat(country_code, "/consents");
20836
+ path = "".concat(cuiApiBaseUrl, "/api/v1/wla/open-banking/").concat(country_code, "/consents?").concat(queryParams.toString());
20834
20837
  params = {
20835
20838
  headers: _this.getCommonWlaApiHeaders()
20836
20839
  };
@@ -20922,7 +20925,7 @@ var _RestWlaService = /*#__PURE__*/ function() {
20922
20925
  path = "".concat(cuiApiBaseUrl, "/api/v1/wla/open-banking/").concat(country_code, "/consents/").concat(id);
20923
20926
  return [
20924
20927
  4,
20925
- _this.httpClient.post(path, params)
20928
+ _this.httpClient.patch(path, params)
20926
20929
  ];
20927
20930
  case 1:
20928
20931
  data = _state.sent();
@@ -20967,7 +20970,7 @@ var _RestWlaService = /*#__PURE__*/ function() {
20967
20970
  path = "".concat(cuiApiBaseUrl, "/api/v1/wla/open-banking/").concat(country_code, "/consents/revoke/").concat(id);
20968
20971
  return [
20969
20972
  4,
20970
- _this.httpClient.post(path, params)
20973
+ _this.httpClient.patch(path, params)
20971
20974
  ];
20972
20975
  case 1:
20973
20976
  data = _state.sent();
@@ -21218,23 +21221,23 @@ function _getConsentById() {
21218
21221
  return _getConsentById.apply(this, arguments);
21219
21222
  }
21220
21223
  __name(getConsentById, "getConsentById");
21221
- function getConsents() {
21224
+ function getConsents(userId) {
21222
21225
  return _getConsents.apply(this, arguments);
21223
21226
  }
21224
21227
  function _getConsents() {
21225
21228
  _getConsents = // src/wla/base/interactors/getConsents.ts
21226
- _async_to_generator(function() {
21229
+ _async_to_generator(function(userId) {
21227
21230
  var country_code, container2, wlaService;
21228
21231
  var _arguments = arguments;
21229
21232
  return _ts_generator(this, function(_state) {
21230
21233
  switch(_state.label){
21231
21234
  case 0:
21232
- country_code = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : "GB";
21235
+ country_code = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : "GB";
21233
21236
  container2 = getActiveIocContainer();
21234
21237
  wlaService = container2.get(ITF_WLA_SERVICE);
21235
21238
  return [
21236
21239
  4,
21237
- wlaService.getConsents(country_code)
21240
+ wlaService.getConsents(userId, country_code)
21238
21241
  ];
21239
21242
  case 1:
21240
21243
  return [
package/dist/index.mjs CHANGED
@@ -19568,11 +19568,11 @@ var _RestWlaService = /*#__PURE__*/ function() {
19568
19568
  },
19569
19569
  {
19570
19570
  key: "getConsents",
19571
- value: function getConsents() {
19572
- var country_code = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "GB";
19571
+ value: function getConsents(userId) {
19572
+ var country_code = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "GB";
19573
19573
  var _this = this;
19574
19574
  return _async_to_generator(function() {
19575
- var cuiApiBaseUrl, path, params, error2;
19575
+ var queryParams, cuiApiBaseUrl, path, params, error2;
19576
19576
  return _ts_generator(this, function(_state) {
19577
19577
  switch(_state.label){
19578
19578
  case 0:
@@ -19582,8 +19582,11 @@ var _RestWlaService = /*#__PURE__*/ function() {
19582
19582
  ,
19583
19583
  3
19584
19584
  ]);
19585
+ queryParams = new URLSearchParams({
19586
+ userId: userId
19587
+ });
19585
19588
  cuiApiBaseUrl = _this.getEnvConfigValueByName.execute("CUI_API_BASE_URL");
19586
- path = "".concat(cuiApiBaseUrl, "/api/v1/wla/open-banking/").concat(country_code, "/consents");
19589
+ path = "".concat(cuiApiBaseUrl, "/api/v1/wla/open-banking/").concat(country_code, "/consents?").concat(queryParams.toString());
19587
19590
  params = {
19588
19591
  headers: _this.getCommonWlaApiHeaders()
19589
19592
  };
@@ -19675,7 +19678,7 @@ var _RestWlaService = /*#__PURE__*/ function() {
19675
19678
  path = "".concat(cuiApiBaseUrl, "/api/v1/wla/open-banking/").concat(country_code, "/consents/").concat(id);
19676
19679
  return [
19677
19680
  4,
19678
- _this.httpClient.post(path, params)
19681
+ _this.httpClient.patch(path, params)
19679
19682
  ];
19680
19683
  case 1:
19681
19684
  data = _state.sent();
@@ -19720,7 +19723,7 @@ var _RestWlaService = /*#__PURE__*/ function() {
19720
19723
  path = "".concat(cuiApiBaseUrl, "/api/v1/wla/open-banking/").concat(country_code, "/consents/revoke/").concat(id);
19721
19724
  return [
19722
19725
  4,
19723
- _this.httpClient.post(path, params)
19726
+ _this.httpClient.patch(path, params)
19724
19727
  ];
19725
19728
  case 1:
19726
19729
  data = _state.sent();
@@ -19971,23 +19974,23 @@ function _getConsentById() {
19971
19974
  return _getConsentById.apply(this, arguments);
19972
19975
  }
19973
19976
  __name(getConsentById, "getConsentById");
19974
- function getConsents() {
19977
+ function getConsents(userId) {
19975
19978
  return _getConsents.apply(this, arguments);
19976
19979
  }
19977
19980
  function _getConsents() {
19978
19981
  _getConsents = // src/wla/base/interactors/getConsents.ts
19979
- _async_to_generator(function() {
19982
+ _async_to_generator(function(userId) {
19980
19983
  var country_code, container2, wlaService;
19981
19984
  var _arguments = arguments;
19982
19985
  return _ts_generator(this, function(_state) {
19983
19986
  switch(_state.label){
19984
19987
  case 0:
19985
- country_code = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : "GB";
19988
+ country_code = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : "GB";
19986
19989
  container2 = getActiveIocContainer();
19987
19990
  wlaService = container2.get(ITF_WLA_SERVICE);
19988
19991
  return [
19989
19992
  4,
19990
- wlaService.getConsents(country_code)
19993
+ wlaService.getConsents(userId, country_code)
19991
19994
  ];
19992
19995
  case 1:
19993
19996
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marqeta/ux-toolkit-sdk-javascript",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",