btrz-api-client 8.71.1 → 8.72.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.
@@ -66,6 +66,30 @@ function externalCustomersFactory(_ref) {
66
66
  });
67
67
  }
68
68
 
69
+ /**
70
+ * POST /external-customers/ado/confirmation/resend – Resend a Saldo Max Profile V2 quick registration OTP.
71
+ * Requires BETTEREZ_APP JWT.
72
+ * @param {Object} opts
73
+ * @param {string} [opts.token] - API key
74
+ * @param {string} [opts.jwtToken] - JWT (BETTEREZ_APP audience)
75
+ * @param {{confirmationToken: string}} opts.data - Confirmation token returned by quick registration
76
+ * @param {Object} [opts.headers] - Optional headers
77
+ * @returns {Promise<import("axios").AxiosResponse<{ code: string, message?: string }>>}
78
+ */
79
+ function resendSaldoMaxRegistrationConfirmation(_ref4) {
80
+ var data = _ref4.data,
81
+ token = _ref4.token,
82
+ jwtToken = _ref4.jwtToken,
83
+ headers = _ref4.headers;
84
+
85
+ return client({
86
+ url: "/external-customers/ado/confirmation/resend",
87
+ method: "post",
88
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
89
+ data: data
90
+ });
91
+ }
92
+
69
93
  var saldoMax = {
70
94
  /**
71
95
  * GET /external-customers/ado - get SaldoMax user by email, phone or walletId.
@@ -84,11 +108,11 @@ function externalCustomersFactory(_ref) {
84
108
  * @returns {Promise<import("axios").AxiosResponse<{ adoUsers: Array<Object> }>>}
85
109
  * @throws When response is 4xx/5xx (400, 401, 404 EXTERNAL_WALLET_NOT_FOUND, 500)
86
110
  */
87
- get: function get(_ref4) {
88
- var token = _ref4.token,
89
- jwtToken = _ref4.jwtToken,
90
- query = _ref4.query,
91
- headers = _ref4.headers;
111
+ get: function get(_ref5) {
112
+ var token = _ref5.token,
113
+ jwtToken = _ref5.jwtToken,
114
+ query = _ref5.query,
115
+ headers = _ref5.headers;
92
116
 
93
117
  return client.get("/external-customers/ado", {
94
118
  params: query,
@@ -97,7 +121,10 @@ function externalCustomersFactory(_ref) {
97
121
  },
98
122
  create: registerSaldoMax,
99
123
  confirmation: {
100
- create: confirmSaldoMaxRegistration
124
+ create: confirmSaldoMaxRegistration,
125
+ resend: {
126
+ create: resendSaldoMaxRegistrationConfirmation
127
+ }
101
128
  }
102
129
  };
103
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "8.71.1",
3
+ "version": "8.72.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -48,6 +48,25 @@ function externalCustomersFactory({client, internalAuthTokenProvider}) {
48
48
  });
49
49
  }
50
50
 
51
+ /**
52
+ * POST /external-customers/ado/confirmation/resend – Resend a Saldo Max Profile V2 quick registration OTP.
53
+ * Requires BETTEREZ_APP JWT.
54
+ * @param {Object} opts
55
+ * @param {string} [opts.token] - API key
56
+ * @param {string} [opts.jwtToken] - JWT (BETTEREZ_APP audience)
57
+ * @param {{confirmationToken: string}} opts.data - Confirmation token returned by quick registration
58
+ * @param {Object} [opts.headers] - Optional headers
59
+ * @returns {Promise<import("axios").AxiosResponse<{ code: string, message?: string }>>}
60
+ */
61
+ function resendSaldoMaxRegistrationConfirmation({data, token, jwtToken, headers}) {
62
+ return client({
63
+ url: "/external-customers/ado/confirmation/resend",
64
+ method: "post",
65
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
66
+ data
67
+ });
68
+ }
69
+
51
70
  const saldoMax = {
52
71
  /**
53
72
  * GET /external-customers/ado - get SaldoMax user by email, phone or walletId.
@@ -74,7 +93,10 @@ function externalCustomersFactory({client, internalAuthTokenProvider}) {
74
93
  },
75
94
  create: registerSaldoMax,
76
95
  confirmation: {
77
- create: confirmSaldoMaxRegistration
96
+ create: confirmSaldoMaxRegistration,
97
+ resend: {
98
+ create: resendSaldoMaxRegistrationConfirmation
99
+ }
78
100
  }
79
101
  };
80
102
 
@@ -77,4 +77,21 @@ describe("accounts/external-customers", () => {
77
77
  data
78
78
  });
79
79
  });
80
+
81
+ it("should POST Saldo Max Profile V2 registration confirmation resend", () => {
82
+ const data = {
83
+ confirmationToken: "confirmation-token"
84
+ };
85
+ axiosMock.onPost("/external-customers/ado/confirmation/resend").reply(expectRequest({
86
+ statusCode: 200,
87
+ token,
88
+ jwtToken,
89
+ body: data
90
+ }));
91
+ return api.accounts.externalCustomers.saldoMax.confirmation.resend.create({
92
+ token,
93
+ jwtToken,
94
+ data
95
+ });
96
+ });
80
97
  });