@kard-financial/sdk 2.2.1 → 2.3.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.
@@ -43,8 +43,8 @@ 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": "2.2.1",
47
- "User-Agent": "@kard-financial/sdk/2.2.1",
46
+ "X-Fern-SDK-Version": "2.3.0",
47
+ "User-Agent": "@kard-financial/sdk/2.3.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -207,7 +207,7 @@ class AttributionsClient {
207
207
  const _authRequest = yield this._options.authProvider.getAuthRequest();
208
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);
209
209
  const _response = yield core.fetcher({
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)}/attributions/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`),
211
211
  method: "POST",
212
212
  headers: _headers,
213
213
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -249,7 +249,7 @@ class AttributionsClient {
249
249
  rawResponse: _response.rawResponse,
250
250
  });
251
251
  case "timeout":
252
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/attributions/offers/{offerId}/activate.");
252
+ throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/activate.");
253
253
  case "unknown":
254
254
  throw new errors.KardApiError({
255
255
  message: _response.error.errorMessage,
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Action configuration for CTA button
3
+ */
4
+ export interface CtaAction {
5
+ /** URL endpoint to call when button is clicked */
6
+ url: string;
7
+ /** HTTP method to use (e.g., POST) */
8
+ method: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,4 +7,6 @@ export interface CtaComponent {
7
7
  buttonText: string;
8
8
  /** Style of the button */
9
9
  buttonStyle: KardApi.users.ButtonStyle;
10
+ /** Action to perform when the button is clicked */
11
+ action?: KardApi.users.CtaAction;
10
12
  }
@@ -11,6 +11,7 @@ export * from "./CategoryRelationshipObject.js";
11
11
  export * from "./Commission.js";
12
12
  export * from "./ComponentType.js";
13
13
  export * from "./Coordinates.js";
14
+ export * from "./CtaAction.js";
14
15
  export * from "./CtaComponent.js";
15
16
  export * from "./EligibilityLocationAddress.js";
16
17
  export * from "./EligibilityLocationIncluded.js";
@@ -27,6 +27,7 @@ __exportStar(require("./CategoryRelationshipObject.js"), exports);
27
27
  __exportStar(require("./Commission.js"), exports);
28
28
  __exportStar(require("./ComponentType.js"), exports);
29
29
  __exportStar(require("./Coordinates.js"), exports);
30
+ __exportStar(require("./CtaAction.js"), exports);
30
31
  __exportStar(require("./CtaComponent.js"), exports);
31
32
  __exportStar(require("./EligibilityLocationAddress.js"), exports);
32
33
  __exportStar(require("./EligibilityLocationIncluded.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.2.1";
1
+ export declare const SDK_VERSION = "2.3.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 = "2.2.1";
4
+ exports.SDK_VERSION = "2.3.0";
@@ -6,8 +6,8 @@ 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": "2.2.1",
10
- "User-Agent": "@kard-financial/sdk/2.2.1",
9
+ "X-Fern-SDK-Version": "2.3.0",
10
+ "User-Agent": "@kard-financial/sdk/2.3.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -171,7 +171,7 @@ export class AttributionsClient {
171
171
  const _authRequest = yield this._options.authProvider.getAuthRequest();
172
172
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
173
173
  const _response = yield core.fetcher({
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)}/users/${core.url.encodePathParam(userId)}/attributions/offers/${core.url.encodePathParam(offerId)}/activate`),
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)}/users/${core.url.encodePathParam(userId)}/offers/${core.url.encodePathParam(offerId)}/activate`),
175
175
  method: "POST",
176
176
  headers: _headers,
177
177
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -213,7 +213,7 @@ export class AttributionsClient {
213
213
  rawResponse: _response.rawResponse,
214
214
  });
215
215
  case "timeout":
216
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/attributions/offers/{offerId}/activate.");
216
+ throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/activate.");
217
217
  case "unknown":
218
218
  throw new errors.KardApiError({
219
219
  message: _response.error.errorMessage,
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Action configuration for CTA button
3
+ */
4
+ export interface CtaAction {
5
+ /** URL endpoint to call when button is clicked */
6
+ url: string;
7
+ /** HTTP method to use (e.g., POST) */
8
+ method: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -7,4 +7,6 @@ export interface CtaComponent {
7
7
  buttonText: string;
8
8
  /** Style of the button */
9
9
  buttonStyle: KardApi.users.ButtonStyle;
10
+ /** Action to perform when the button is clicked */
11
+ action?: KardApi.users.CtaAction;
10
12
  }
@@ -11,6 +11,7 @@ export * from "./CategoryRelationshipObject.mjs";
11
11
  export * from "./Commission.mjs";
12
12
  export * from "./ComponentType.mjs";
13
13
  export * from "./Coordinates.mjs";
14
+ export * from "./CtaAction.mjs";
14
15
  export * from "./CtaComponent.mjs";
15
16
  export * from "./EligibilityLocationAddress.mjs";
16
17
  export * from "./EligibilityLocationIncluded.mjs";
@@ -11,6 +11,7 @@ export * from "./CategoryRelationshipObject.mjs";
11
11
  export * from "./Commission.mjs";
12
12
  export * from "./ComponentType.mjs";
13
13
  export * from "./Coordinates.mjs";
14
+ export * from "./CtaAction.mjs";
14
15
  export * from "./CtaComponent.mjs";
15
16
  export * from "./EligibilityLocationAddress.mjs";
16
17
  export * from "./EligibilityLocationIncluded.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.2.1";
1
+ export declare const SDK_VERSION = "2.3.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.2.1";
1
+ export const SDK_VERSION = "2.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kard-financial/sdk",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "private": false,
5
5
  "repository": "github:KardFinancial/kard-node-sdk",
6
6
  "type": "commonjs",