@kard-financial/sdk 8.1.0 → 9.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 (32) 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.js +30 -40
  10. package/dist/cjs/api/resources/users/client/Client.js +24 -32
  11. package/dist/cjs/api/resources/users/resources/attributions/client/Client.js +18 -24
  12. package/dist/cjs/api/resources/users/resources/auth/client/Client.js +6 -8
  13. package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +12 -16
  14. package/dist/cjs/api/resources/users/resources/uploads/client/Client.js +18 -24
  15. package/dist/cjs/version.d.ts +1 -1
  16. package/dist/cjs/version.js +1 -1
  17. package/dist/esm/BaseClient.d.mts +0 -4
  18. package/dist/esm/BaseClient.mjs +2 -3
  19. package/dist/esm/api/resources/auth/client/Client.mjs +19 -7
  20. package/dist/esm/api/resources/auth/client/requests/GetTokenRequest.d.mts +2 -0
  21. package/dist/esm/api/resources/files/client/Client.mjs +7 -9
  22. package/dist/esm/api/resources/notifications/resources/subscriptions/client/Client.mjs +19 -25
  23. package/dist/esm/api/resources/ping/client/Client.mjs +7 -9
  24. package/dist/esm/api/resources/transactions/client/Client.mjs +31 -41
  25. package/dist/esm/api/resources/users/client/Client.mjs +25 -33
  26. package/dist/esm/api/resources/users/resources/attributions/client/Client.mjs +19 -25
  27. package/dist/esm/api/resources/users/resources/auth/client/Client.mjs +7 -9
  28. package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +13 -17
  29. package/dist/esm/api/resources/users/resources/uploads/client/Client.mjs +19 -25
  30. package/dist/esm/version.d.mts +1 -1
  31. package/dist/esm/version.mjs +1 -1
  32. package/package.json +1 -1
package/README.md CHANGED
@@ -22,7 +22,7 @@ Instantiate and use the client with the following:
22
22
  ```typescript
23
23
  import { KardApiClient } from "@kard-financial/sdk";
24
24
 
25
- const client = new KardApiClient({ clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET", xKardTargetIssuer: "YOUR_X_KARD_TARGET_ISSUER" });
25
+ const client = new KardApiClient({ clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET" });
26
26
  await client.users.create("organization-123", {
27
27
  data: [{
28
28
  type: "user",
@@ -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. */
@@ -43,11 +43,10 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@kard-financial/sdk",
46
- "X-Fern-SDK-Version": "8.1.0",
47
- "User-Agent": "@kard-financial/sdk/8.1.0",
46
+ "X-Fern-SDK-Version": "9.0.0",
47
+ "User-Agent": "@kard-financial/sdk/9.0.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
- "X-Kard-Target-Issuer": options === null || options === void 0 ? void 0 : options.xKardTargetIssuer,
51
50
  }, options === null || options === void 0 ? void 0 : options.headers);
52
51
  return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
53
52
  }
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
42
  step((generator = generator.apply(thisArg, _arguments || [])).next());
43
43
  });
44
44
  };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
45
56
  Object.defineProperty(exports, "__esModule", { value: true });
46
57
  exports.AuthClient = void 0;
47
58
  const BaseClient_js_1 = require("../../../../BaseClient.js");
@@ -68,22 +79,23 @@ class AuthClient {
68
79
  }
69
80
  __getToken(request, requestOptions) {
70
81
  return __awaiter(this, void 0, void 0, function* () {
71
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
82
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
83
+ const { "X-Kard-Target-Issuer": xKardTargetIssuer } = request, _body = __rest(request, ["X-Kard-Target-Issuer"]);
72
84
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
73
- "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,
85
+ "X-Kard-Target-Issuer": xKardTargetIssuer != null ? xKardTargetIssuer : undefined,
74
86
  }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
75
87
  const _response = yield core.fetcher({
76
- 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"),
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/auth/token"),
77
89
  method: "POST",
78
90
  headers: _headers,
79
91
  contentType: "application/json",
80
92
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
81
93
  requestType: "json",
82
- body: request,
83
- 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,
84
- 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,
94
+ body: _body,
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,
85
97
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
86
- 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,
87
99
  logging: this._options.logging,
88
100
  });
89
101
  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
  }
@@ -83,7 +83,7 @@ class FilesClient {
83
83
  }
84
84
  __getMetadata(organizationId_1) {
85
85
  return __awaiter(this, arguments, void 0, function* (organizationId, 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 { "filter[dateFrom]": filterDateFrom, "filter[dateTo]": filterDateTo, "filter[fileType]": filterFileType, "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, sort, } = request;
88
88
  const _queryParams = {};
89
89
  if (filterDateFrom != null) {
@@ -113,18 +113,16 @@ class FilesClient {
113
113
  }
114
114
  }
115
115
  const _authRequest = yield this._options.authProvider.getAuthRequest();
116
- 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)({
117
- "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,
118
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
116
+ 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);
119
117
  const _response = yield core.fetcher({
120
- 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)}/files/metadata`),
118
+ 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)}/files/metadata`),
121
119
  method: "GET",
122
120
  headers: _headers,
123
121
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
124
- 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,
125
- 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,
122
+ 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,
123
+ 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,
126
124
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
127
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
125
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
128
126
  logging: this._options.logging,
129
127
  });
130
128
  if (_response.ok) {
@@ -74,25 +74,23 @@ class SubscriptionsClient {
74
74
  }
75
75
  __get(organizationId_1) {
76
76
  return __awaiter(this, arguments, void 0, function* (organizationId, request = {}, requestOptions) {
77
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
77
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
78
78
  const { "filter[eventName]": filterEventName } = request;
79
79
  const _queryParams = {};
80
80
  if (filterEventName != null) {
81
81
  _queryParams["filter[eventName]"] = filterEventName;
82
82
  }
83
83
  const _authRequest = yield this._options.authProvider.getAuthRequest();
84
- 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)({
85
- "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,
86
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
84
+ 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);
87
85
  const _response = yield core.fetcher({
88
- 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)}/subscriptions`),
86
+ 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)}/subscriptions`),
89
87
  method: "GET",
90
88
  headers: _headers,
91
89
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
92
- 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,
93
- 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,
90
+ 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,
91
+ 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,
94
92
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
93
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
96
94
  logging: this._options.logging,
97
95
  });
98
96
  if (_response.ok) {
@@ -169,23 +167,21 @@ class SubscriptionsClient {
169
167
  }
170
168
  __create(organizationId, request, requestOptions) {
171
169
  return __awaiter(this, void 0, void 0, function* () {
172
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
170
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
173
171
  const _authRequest = yield this._options.authProvider.getAuthRequest();
174
- 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)({
175
- "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,
176
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
172
+ 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);
177
173
  const _response = yield core.fetcher({
178
- 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)}/subscriptions`),
174
+ 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)}/subscriptions`),
179
175
  method: "POST",
180
176
  headers: _headers,
181
177
  contentType: "application/json",
182
178
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
183
179
  requestType: "json",
184
180
  body: request,
185
- 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,
186
- 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,
181
+ 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,
182
+ 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,
187
183
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
188
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
184
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
189
185
  logging: this._options.logging,
190
186
  });
191
187
  if (_response.ok) {
@@ -265,23 +261,21 @@ class SubscriptionsClient {
265
261
  }
266
262
  __update(organizationId, subscriptionId, request, requestOptions) {
267
263
  return __awaiter(this, void 0, void 0, function* () {
268
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
264
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
269
265
  const _authRequest = yield this._options.authProvider.getAuthRequest();
270
- 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)({
271
- "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,
272
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
266
+ 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);
273
267
  const _response = yield core.fetcher({
274
- 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)}/subscriptions/${core.url.encodePathParam(subscriptionId)}`),
268
+ 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)}/subscriptions/${core.url.encodePathParam(subscriptionId)}`),
275
269
  method: "PATCH",
276
270
  headers: _headers,
277
271
  contentType: "application/json",
278
272
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
279
273
  requestType: "json",
280
274
  body: request,
281
- 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,
282
- 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,
275
+ 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,
276
+ 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,
283
277
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
284
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
278
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
285
279
  logging: this._options.logging,
286
280
  });
287
281
  if (_response.ok) {
@@ -69,19 +69,17 @@ class PingClient {
69
69
  }
70
70
  __ping(requestOptions) {
71
71
  return __awaiter(this, void 0, void 0, function* () {
72
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
73
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
74
- "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,
75
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
72
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
73
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
76
74
  const _response = yield core.fetcher({
77
- 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/ping"),
75
+ 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/ping"),
78
76
  method: "GET",
79
77
  headers: _headers,
80
78
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
81
- 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,
82
- 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,
79
+ 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,
80
+ 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,
83
81
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
84
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
82
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
85
83
  logging: this._options.logging,
86
84
  });
87
85
  if (_response.ok) {
@@ -220,23 +220,21 @@ class TransactionsClient {
220
220
  }
221
221
  __create(organizationId, request, requestOptions) {
222
222
  return __awaiter(this, void 0, void 0, function* () {
223
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
223
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
224
224
  const _authRequest = yield this._options.authProvider.getAuthRequest();
225
- 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)({
226
- "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,
227
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
225
+ 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);
228
226
  const _response = yield core.fetcher({
229
- 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)}/transactions`),
227
+ 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)}/transactions`),
230
228
  method: "POST",
231
229
  headers: _headers,
232
230
  contentType: "application/json",
233
231
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
234
232
  requestType: "json",
235
233
  body: request,
236
- 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,
237
- 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,
234
+ 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,
235
+ 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,
238
236
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
239
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
237
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
240
238
  logging: this._options.logging,
241
239
  });
242
240
  if (_response.ok) {
@@ -315,23 +313,21 @@ class TransactionsClient {
315
313
  }
316
314
  __createFraudMarkers(organizationId, request, requestOptions) {
317
315
  return __awaiter(this, void 0, void 0, function* () {
318
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
316
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
319
317
  const _authRequest = yield this._options.authProvider.getAuthRequest();
320
- 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)({
321
- "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,
322
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
318
+ 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);
323
319
  const _response = yield core.fetcher({
324
- 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)}/fraud`),
320
+ 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)}/fraud`),
325
321
  method: "POST",
326
322
  headers: _headers,
327
323
  contentType: "application/json",
328
324
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
329
325
  requestType: "json",
330
326
  body: request,
331
- 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,
332
- 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,
327
+ 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,
328
+ 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,
333
329
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
334
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
330
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
335
331
  logging: this._options.logging,
336
332
  });
337
333
  if (_response.ok) {
@@ -411,23 +407,21 @@ class TransactionsClient {
411
407
  }
412
408
  __createAudits(organizationId, userId, request, requestOptions) {
413
409
  return __awaiter(this, void 0, void 0, function* () {
414
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
410
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
415
411
  const _authRequest = yield this._options.authProvider.getAuthRequest();
416
- 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)({
417
- "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,
418
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
412
+ 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);
419
413
  const _response = yield core.fetcher({
420
- 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)}/audits`),
414
+ 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)}/audits`),
421
415
  method: "POST",
422
416
  headers: _headers,
423
417
  contentType: "application/json",
424
418
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
425
419
  requestType: "json",
426
420
  body: request,
427
- 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,
428
- 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,
421
+ 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,
422
+ 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,
429
423
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
430
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
424
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
431
425
  logging: this._options.logging,
432
426
  });
433
427
  if (_response.ok) {
@@ -514,23 +508,21 @@ class TransactionsClient {
514
508
  }
515
509
  __createBulkTransactionsUploadUrl(organizationId, request, requestOptions) {
516
510
  return __awaiter(this, void 0, void 0, function* () {
517
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
511
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
518
512
  const _authRequest = yield this._options.authProvider.getAuthRequest();
519
- 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)({
520
- "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,
521
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
513
+ 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);
522
514
  const _response = yield core.fetcher({
523
- 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)}/transactions/uploads`),
515
+ 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)}/transactions/uploads`),
524
516
  method: "POST",
525
517
  headers: _headers,
526
518
  contentType: "application/json",
527
519
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
528
520
  requestType: "json",
529
521
  body: request,
530
- 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,
531
- 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,
522
+ 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,
523
+ 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,
532
524
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
533
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
525
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
534
526
  logging: this._options.logging,
535
527
  });
536
528
  if (_response.ok) {
@@ -603,7 +595,7 @@ class TransactionsClient {
603
595
  }
604
596
  __getEarnedRewards(organizationId_1, userId_1) {
605
597
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
606
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
598
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
607
599
  const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize } = request;
608
600
  const _queryParams = {};
609
601
  if (pageAfter != null) {
@@ -616,18 +608,16 @@ class TransactionsClient {
616
608
  _queryParams["page[size]"] = pageSize.toString();
617
609
  }
618
610
  const _authRequest = yield this._options.authProvider.getAuthRequest();
619
- 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)({
620
- "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,
621
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
611
+ 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);
622
612
  const _response = yield core.fetcher({
623
- 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)}/earned-rewards`),
613
+ 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)}/earned-rewards`),
624
614
  method: "GET",
625
615
  headers: _headers,
626
616
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
627
- 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,
628
- 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,
617
+ 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,
618
+ 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,
629
619
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
630
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
620
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
631
621
  logging: this._options.logging,
632
622
  });
633
623
  if (_response.ok) {
@@ -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) {