@kard-financial/sdk 8.1.0 → 10.0.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.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/BaseClient.d.ts +0 -4
  3. package/dist/cjs/BaseClient.js +2 -3
  4. package/dist/cjs/api/resources/auth/client/Client.js +19 -7
  5. package/dist/cjs/api/resources/auth/client/requests/GetTokenRequest.d.ts +2 -0
  6. package/dist/cjs/api/resources/files/client/Client.js +6 -8
  7. package/dist/cjs/api/resources/notifications/resources/subscriptions/client/Client.js +18 -24
  8. package/dist/cjs/api/resources/ping/client/Client.js +6 -8
  9. package/dist/cjs/api/resources/transactions/client/Client.d.ts +2 -1
  10. package/dist/cjs/api/resources/transactions/client/Client.js +32 -41
  11. package/dist/cjs/api/resources/transactions/types/CoreTransactionAttributes.d.ts +2 -2
  12. package/dist/cjs/api/resources/transactions/types/TransactionsRequestBody.d.ts +2 -1
  13. package/dist/cjs/api/resources/users/client/Client.js +24 -32
  14. package/dist/cjs/api/resources/users/resources/attributions/client/Client.js +18 -24
  15. package/dist/cjs/api/resources/users/resources/auth/client/Client.js +6 -8
  16. package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +12 -16
  17. package/dist/cjs/api/resources/users/resources/uploads/client/Client.js +18 -24
  18. package/dist/cjs/version.d.ts +1 -1
  19. package/dist/cjs/version.js +1 -1
  20. package/dist/esm/BaseClient.d.mts +0 -4
  21. package/dist/esm/BaseClient.mjs +2 -3
  22. package/dist/esm/api/resources/auth/client/Client.mjs +19 -7
  23. package/dist/esm/api/resources/auth/client/requests/GetTokenRequest.d.mts +2 -0
  24. package/dist/esm/api/resources/files/client/Client.mjs +7 -9
  25. package/dist/esm/api/resources/notifications/resources/subscriptions/client/Client.mjs +19 -25
  26. package/dist/esm/api/resources/ping/client/Client.mjs +7 -9
  27. package/dist/esm/api/resources/transactions/client/Client.d.mts +2 -1
  28. package/dist/esm/api/resources/transactions/client/Client.mjs +33 -42
  29. package/dist/esm/api/resources/transactions/types/CoreTransactionAttributes.d.mts +2 -2
  30. package/dist/esm/api/resources/transactions/types/TransactionsRequestBody.d.mts +2 -1
  31. package/dist/esm/api/resources/users/client/Client.mjs +25 -33
  32. package/dist/esm/api/resources/users/resources/attributions/client/Client.mjs +19 -25
  33. package/dist/esm/api/resources/users/resources/auth/client/Client.mjs +7 -9
  34. package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +13 -17
  35. package/dist/esm/api/resources/users/resources/uploads/client/Client.mjs +19 -25
  36. package/dist/esm/version.d.mts +1 -1
  37. package/dist/esm/version.mjs +1 -1
  38. package/package.json +1 -1
@@ -112,23 +112,21 @@ class UsersClient {
112
112
  }
113
113
  __create(organizationId, request, requestOptions) {
114
114
  return __awaiter(this, void 0, void 0, function* () {
115
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
115
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
116
116
  const _authRequest = yield this._options.authProvider.getAuthRequest();
117
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
118
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
119
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
117
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
120
118
  const _response = yield core.fetcher({
121
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users`),
119
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users`),
122
120
  method: "POST",
123
121
  headers: _headers,
124
122
  contentType: "application/json",
125
123
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
126
124
  requestType: "json",
127
125
  body: request,
128
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
129
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
126
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
127
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
130
128
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
131
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
129
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
132
130
  logging: this._options.logging,
133
131
  });
134
132
  if (_response.ok) {
@@ -212,23 +210,21 @@ class UsersClient {
212
210
  }
213
211
  __update(organizationId, userId, request, requestOptions) {
214
212
  return __awaiter(this, void 0, void 0, function* () {
215
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
213
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
216
214
  const _authRequest = yield this._options.authProvider.getAuthRequest();
217
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
218
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
219
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
215
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
220
216
  const _response = yield core.fetcher({
221
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
217
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
222
218
  method: "PUT",
223
219
  headers: _headers,
224
220
  contentType: "application/json",
225
221
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
226
222
  requestType: "json",
227
223
  body: request,
228
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
229
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
224
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
225
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
230
226
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
231
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
227
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
232
228
  logging: this._options.logging,
233
229
  });
234
230
  if (_response.ok) {
@@ -296,20 +292,18 @@ class UsersClient {
296
292
  }
297
293
  __delete(organizationId, userId, requestOptions) {
298
294
  return __awaiter(this, void 0, void 0, function* () {
299
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
295
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
300
296
  const _authRequest = yield this._options.authProvider.getAuthRequest();
301
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
302
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
303
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
297
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
304
298
  const _response = yield core.fetcher({
305
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
299
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
306
300
  method: "DELETE",
307
301
  headers: _headers,
308
302
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
309
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
310
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
303
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
304
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
311
305
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
312
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
306
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
313
307
  logging: this._options.logging,
314
308
  });
315
309
  if (_response.ok) {
@@ -376,20 +370,18 @@ class UsersClient {
376
370
  }
377
371
  __get(organizationId, userId, requestOptions) {
378
372
  return __awaiter(this, void 0, void 0, function* () {
379
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
373
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
380
374
  const _authRequest = yield this._options.authProvider.getAuthRequest();
381
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
382
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
383
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
375
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
384
376
  const _response = yield core.fetcher({
385
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
377
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}`),
386
378
  method: "GET",
387
379
  headers: _headers,
388
380
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
389
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
390
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
381
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
382
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
391
383
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
392
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
384
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
393
385
  logging: this._options.logging,
394
386
  });
395
387
  if (_response.ok) {
@@ -102,23 +102,21 @@ class AttributionsClient {
102
102
  }
103
103
  __create(organizationId, userId, request, requestOptions) {
104
104
  return __awaiter(this, void 0, void 0, function* () {
105
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
105
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
106
106
  const _authRequest = yield this._options.authProvider.getAuthRequest();
107
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
108
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
109
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
107
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
110
108
  const _response = yield core.fetcher({
111
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/attributions`),
109
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/attributions`),
112
110
  method: "POST",
113
111
  headers: _headers,
114
112
  contentType: "application/json",
115
113
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
116
114
  requestType: "json",
117
115
  body: request,
118
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
119
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
116
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
117
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
120
118
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
121
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
119
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
122
120
  logging: this._options.logging,
123
121
  });
124
122
  if (_response.ok) {
@@ -187,7 +185,7 @@ class AttributionsClient {
187
185
  }
188
186
  __activate(organizationId_1, userId_1, offerId_1) {
189
187
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, offerId, request = {}, requestOptions) {
190
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
188
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
191
189
  const { supportedComponents, include } = request;
192
190
  const _queryParams = {};
193
191
  if (supportedComponents != null) {
@@ -207,18 +205,16 @@ class AttributionsClient {
207
205
  }
208
206
  }
209
207
  const _authRequest = yield this._options.authProvider.getAuthRequest();
210
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
211
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
212
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
208
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
213
209
  const _response = yield core.fetcher({
214
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/offers/${core.url.encodePathParam(offerId)}/activate`),
210
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/offers/${core.url.encodePathParam(offerId)}/activate`),
215
211
  method: "POST",
216
212
  headers: _headers,
217
213
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
218
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
219
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
214
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
215
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
220
216
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
221
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
217
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
222
218
  logging: this._options.logging,
223
219
  });
224
220
  if (_response.ok) {
@@ -284,7 +280,7 @@ class AttributionsClient {
284
280
  }
285
281
  __boost(organizationId_1, userId_1, offerId_1) {
286
282
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, offerId, request = {}, requestOptions) {
287
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
283
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
288
284
  const { supportedComponents, include } = request;
289
285
  const _queryParams = {};
290
286
  if (supportedComponents != null) {
@@ -304,18 +300,16 @@ class AttributionsClient {
304
300
  }
305
301
  }
306
302
  const _authRequest = yield this._options.authProvider.getAuthRequest();
307
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
308
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
309
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
303
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
310
304
  const _response = yield core.fetcher({
311
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/offers/${core.url.encodePathParam(offerId)}/boost`),
305
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/offers/${core.url.encodePathParam(offerId)}/boost`),
312
306
  method: "POST",
313
307
  headers: _headers,
314
308
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
315
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
316
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
309
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
310
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
317
311
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
318
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
312
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
319
313
  logging: this._options.logging,
320
314
  });
321
315
  if (_response.ok) {
@@ -72,20 +72,18 @@ class AuthClient {
72
72
  }
73
73
  __getWebViewToken(organizationId, userId, requestOptions) {
74
74
  return __awaiter(this, void 0, void 0, function* () {
75
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
75
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
76
76
  const _authRequest = yield this._options.authProvider.getAuthRequest();
77
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
78
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
79
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
77
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
80
78
  const _response = yield core.fetcher({
81
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/auth/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/token`),
79
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/auth/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/token`),
82
80
  method: "POST",
83
81
  headers: _headers,
84
82
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
85
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
86
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
83
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
84
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
87
85
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
88
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
86
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
89
87
  logging: this._options.logging,
90
88
  });
91
89
  if (_response.ok) {
@@ -83,7 +83,7 @@ class RewardsClient {
83
83
  }
84
84
  __offers(organizationId_1, userId_1) {
85
85
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
86
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
86
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
87
87
  const { "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, "filter[search]": filterSearch, "filter[purchaseChannel]": filterPurchaseChannel, "filter[category]": filterCategory, "filter[isTargeted]": filterIsTargeted, sort, include, supportedComponents, } = request;
88
88
  const _queryParams = {};
89
89
  if (pageSize != null) {
@@ -132,18 +132,16 @@ class RewardsClient {
132
132
  }
133
133
  }
134
134
  const _authRequest = yield this._options.authProvider.getAuthRequest();
135
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
136
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
137
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
135
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
138
136
  const _response = yield core.fetcher({
139
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/offers`),
137
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/offers`),
140
138
  method: "GET",
141
139
  headers: _headers,
142
140
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
143
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
144
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
141
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
142
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
145
143
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
146
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
144
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
147
145
  logging: this._options.logging,
148
146
  });
149
147
  if (_response.ok) {
@@ -221,7 +219,7 @@ class RewardsClient {
221
219
  }
222
220
  __locations(organizationId_1, userId_1) {
223
221
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
224
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
222
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
225
223
  const { "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, "filter[name]": filterName, "filter[city]": filterCity, "filter[zipCode]": filterZipCode, "filter[state]": filterState, "filter[category]": filterCategory, "filter[longitude]": filterLongitude, "filter[latitude]": filterLatitude, "filter[radius]": filterRadius, sort, include, supportedComponents, } = request;
226
224
  const _queryParams = {};
227
225
  if (pageSize != null) {
@@ -282,18 +280,16 @@ class RewardsClient {
282
280
  }
283
281
  }
284
282
  const _authRequest = yield this._options.authProvider.getAuthRequest();
285
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
286
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
287
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
283
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
288
284
  const _response = yield core.fetcher({
289
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/locations`),
285
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/locations`),
290
286
  method: "GET",
291
287
  headers: _headers,
292
288
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
293
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
294
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
289
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
290
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
295
291
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
296
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
292
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
297
293
  logging: this._options.logging,
298
294
  });
299
295
  if (_response.ok) {
@@ -81,23 +81,21 @@ class UploadsClient {
81
81
  }
82
82
  __create(organizationId, userId, request, requestOptions) {
83
83
  return __awaiter(this, void 0, void 0, function* () {
84
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
84
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
85
85
  const _authRequest = yield this._options.authProvider.getAuthRequest();
86
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
87
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
88
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
86
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
89
87
  const _response = yield core.fetcher({
90
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/uploads`),
88
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/uploads`),
91
89
  method: "POST",
92
90
  headers: _headers,
93
91
  contentType: "application/json",
94
92
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
95
93
  requestType: "json",
96
94
  body: request,
97
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
98
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
95
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
96
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
99
97
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
100
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
98
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
101
99
  logging: this._options.logging,
102
100
  });
103
101
  if (_response.ok) {
@@ -205,23 +203,21 @@ class UploadsClient {
205
203
  }
206
204
  __createPart(organizationId, userId, uploadId, request, requestOptions) {
207
205
  return __awaiter(this, void 0, void 0, function* () {
208
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
206
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
209
207
  const _authRequest = yield this._options.authProvider.getAuthRequest();
210
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
211
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
212
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
208
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
213
209
  const _response = yield core.fetcher({
214
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/uploads/${core.url.encodePathParam(uploadId)}/parts`),
210
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/uploads/${core.url.encodePathParam(uploadId)}/parts`),
215
211
  method: "PUT",
216
212
  headers: _headers,
217
213
  contentType: "application/json",
218
214
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
219
215
  requestType: "json",
220
216
  body: request,
221
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
222
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
217
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
218
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
223
219
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
224
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
220
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
225
221
  logging: this._options.logging,
226
222
  });
227
223
  if (_response.ok) {
@@ -299,23 +295,21 @@ class UploadsClient {
299
295
  }
300
296
  __update(organizationId, userId, uploadId, request, requestOptions) {
301
297
  return __awaiter(this, void 0, void 0, function* () {
302
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
298
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
303
299
  const _authRequest = yield this._options.authProvider.getAuthRequest();
304
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
305
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
306
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
300
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
307
301
  const _response = yield core.fetcher({
308
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/uploads/${core.url.encodePathParam(uploadId)}`),
302
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/users/${core.url.encodePathParam(userId)}/uploads/${core.url.encodePathParam(uploadId)}`),
309
303
  method: "PUT",
310
304
  headers: _headers,
311
305
  contentType: "application/json",
312
306
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
313
307
  requestType: "json",
314
308
  body: request,
315
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
316
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
309
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
310
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
317
311
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
318
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
312
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
319
313
  logging: this._options.logging,
320
314
  });
321
315
  if (_response.ok) {
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "8.1.0";
1
+ export declare const SDK_VERSION = "10.0.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "8.1.0";
4
+ exports.SDK_VERSION = "10.0.0";
@@ -6,8 +6,6 @@ export interface BaseClientOptions {
6
6
  baseUrl?: core.Supplier<string>;
7
7
  clientId?: core.Supplier<string>;
8
8
  clientSecret?: core.Supplier<string>;
9
- /** Override the X-Kard-Target-Issuer header */
10
- xKardTargetIssuer?: core.Supplier<string | undefined>;
11
9
  /** Additional headers to include in requests. */
12
10
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
13
11
  /** The default maximum time to wait for a response in seconds. */
@@ -26,8 +24,6 @@ export interface BaseRequestOptions {
26
24
  maxRetries?: number;
27
25
  /** A hook to abort the request. */
28
26
  abortSignal?: AbortSignal;
29
- /** Override the X-Kard-Target-Issuer header */
30
- xKardTargetIssuer?: string | undefined;
31
27
  /** Additional query string parameters to include in the request. */
32
28
  queryParams?: Record<string, unknown>;
33
29
  /** Additional headers to include in the request. */
@@ -6,11 +6,10 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@kard-financial/sdk",
9
- "X-Fern-SDK-Version": "8.1.0",
10
- "User-Agent": "@kard-financial/sdk/8.1.0",
9
+ "X-Fern-SDK-Version": "10.0.0",
10
+ "User-Agent": "@kard-financial/sdk/10.0.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
- "X-Kard-Target-Issuer": options === null || options === void 0 ? void 0 : options.xKardTargetIssuer,
14
13
  }, options === null || options === void 0 ? void 0 : options.headers);
15
14
  return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
16
15
  }
@@ -8,6 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
11
22
  import { normalizeClientOptions } from "../../../../BaseClient.mjs";
12
23
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
13
24
  import * as core from "../../../../core/index.mjs";
@@ -32,22 +43,23 @@ export class AuthClient {
32
43
  }
33
44
  __getToken(request, requestOptions) {
34
45
  return __awaiter(this, void 0, void 0, function* () {
35
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
46
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
47
+ const { "X-Kard-Target-Issuer": xKardTargetIssuer } = request, _body = __rest(request, ["X-Kard-Target-Issuer"]);
36
48
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
37
- "X-Kard-Target-Issuer": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xKardTargetIssuer) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.xKardTargetIssuer,
49
+ "X-Kard-Target-Issuer": xKardTargetIssuer != null ? xKardTargetIssuer : undefined,
38
50
  }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
39
51
  const _response = yield core.fetcher({
40
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.KardApiEnvironment.Production, "/v2/auth/token"),
52
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, "/v2/auth/token"),
41
53
  method: "POST",
42
54
  headers: _headers,
43
55
  contentType: "application/json",
44
56
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
45
57
  requestType: "json",
46
- body: request,
47
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
48
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
58
+ body: _body,
59
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
60
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
49
61
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
50
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
62
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
51
63
  logging: this._options.logging,
52
64
  });
53
65
  if (_response.ok) {
@@ -6,6 +6,8 @@
6
6
  * }
7
7
  */
8
8
  export interface GetTokenRequest {
9
+ /** (Beta) Target issuer ID for partners managing multiple issuers on the Kard platform. When set, the auth token will be scoped to this specific issuer. Required if you manage more than one issuer; omit if you operate a single issuer integration. */
10
+ "X-Kard-Target-Issuer"?: string;
9
11
  client_id: string;
10
12
  client_secret: string;
11
13
  }