@kard-financial/sdk 14.3.0 → 15.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 (58) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/internalOrganizations/types/index.d.ts +0 -2
  3. package/dist/cjs/api/resources/internalOrganizations/types/index.js +0 -2
  4. package/dist/cjs/api/resources/organizations/client/Client.d.ts +2 -3
  5. package/dist/cjs/api/resources/organizations/client/Client.js +6 -7
  6. package/dist/cjs/api/resources/organizations/resources/children/client/Client.d.ts +3 -3
  7. package/dist/cjs/api/resources/organizations/resources/children/client/Client.js +12 -3
  8. package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationAttributes.d.ts +11 -0
  9. package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.d.ts +1 -1
  10. package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationResponse.d.ts +10 -0
  11. package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationResponse.js +3 -0
  12. package/dist/cjs/api/resources/organizations/resources/children/types/index.d.ts +2 -0
  13. package/dist/cjs/api/resources/organizations/resources/children/types/index.js +2 -0
  14. package/dist/cjs/api/resources/organizations/types/ExternalOrganizationAttributes.d.ts +6 -16
  15. package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsResponse.d.ts +16 -2
  16. package/dist/cjs/api/resources/transactions/types/MerchantAsset.d.ts +9 -0
  17. package/dist/cjs/api/resources/transactions/types/MerchantAsset.js +3 -0
  18. package/dist/cjs/api/resources/transactions/types/MerchantAssetType.d.ts +5 -0
  19. package/dist/cjs/api/resources/transactions/types/MerchantAssetType.js +8 -0
  20. package/dist/cjs/api/resources/transactions/types/TransactionMerchantAttributes.d.ts +7 -0
  21. package/dist/cjs/api/resources/transactions/types/index.d.ts +2 -0
  22. package/dist/cjs/api/resources/transactions/types/index.js +2 -0
  23. package/dist/cjs/version.d.ts +1 -1
  24. package/dist/cjs/version.js +1 -1
  25. package/dist/esm/BaseClient.mjs +2 -2
  26. package/dist/esm/api/resources/internalOrganizations/types/index.d.mts +0 -2
  27. package/dist/esm/api/resources/internalOrganizations/types/index.mjs +0 -2
  28. package/dist/esm/api/resources/organizations/client/Client.d.mts +2 -3
  29. package/dist/esm/api/resources/organizations/client/Client.mjs +6 -7
  30. package/dist/esm/api/resources/organizations/resources/children/client/Client.d.mts +3 -3
  31. package/dist/esm/api/resources/organizations/resources/children/client/Client.mjs +12 -3
  32. package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationAttributes.d.mts +11 -0
  33. package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.d.mts +1 -1
  34. package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationResponse.d.mts +10 -0
  35. package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationResponse.mjs +2 -0
  36. package/dist/esm/api/resources/organizations/resources/children/types/index.d.mts +2 -0
  37. package/dist/esm/api/resources/organizations/resources/children/types/index.mjs +2 -0
  38. package/dist/esm/api/resources/organizations/types/ExternalOrganizationAttributes.d.mts +6 -16
  39. package/dist/esm/api/resources/transactions/types/GetEarnedRewardsResponse.d.mts +16 -2
  40. package/dist/esm/api/resources/transactions/types/MerchantAsset.d.mts +9 -0
  41. package/dist/esm/api/resources/transactions/types/MerchantAsset.mjs +2 -0
  42. package/dist/esm/api/resources/transactions/types/MerchantAssetType.d.mts +5 -0
  43. package/dist/esm/api/resources/transactions/types/MerchantAssetType.mjs +5 -0
  44. package/dist/esm/api/resources/transactions/types/TransactionMerchantAttributes.d.mts +7 -0
  45. package/dist/esm/api/resources/transactions/types/index.d.mts +2 -0
  46. package/dist/esm/api/resources/transactions/types/index.mjs +2 -0
  47. package/dist/esm/version.d.mts +1 -1
  48. package/dist/esm/version.mjs +1 -1
  49. package/package.json +1 -1
  50. package/reference.md +5 -13
  51. package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetwork.d.ts +0 -10
  52. package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetworkName.d.ts +0 -11
  53. package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetworkName.js +0 -14
  54. package/dist/esm/api/resources/internalOrganizations/types/MerchantNetwork.d.mts +0 -10
  55. package/dist/esm/api/resources/internalOrganizations/types/MerchantNetworkName.d.mts +0 -11
  56. package/dist/esm/api/resources/internalOrganizations/types/MerchantNetworkName.mjs +0 -11
  57. /package/dist/cjs/api/resources/{internalOrganizations/types/MerchantNetwork.js → organizations/resources/children/types/ChildOrganizationAttributes.js} +0 -0
  58. /package/dist/esm/api/resources/{internalOrganizations/types/MerchantNetwork.mjs → organizations/resources/children/types/ChildOrganizationAttributes.mjs} +0 -0
@@ -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": "14.3.0",
47
- "User-Agent": "@kard-financial/sdk/14.3.0",
46
+ "X-Fern-SDK-Version": "15.0.0",
47
+ "User-Agent": "@kard-financial/sdk/15.0.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);
@@ -1,6 +1,4 @@
1
1
  export * from "./DeleteResourceData.js";
2
2
  export * from "./DeleteResourceResponse.js";
3
3
  export * from "./EnrolledReward.js";
4
- export * from "./MerchantNetwork.js";
5
- export * from "./MerchantNetworkName.js";
6
4
  export * from "./OrganizationPaginationMetadata.js";
@@ -17,6 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./DeleteResourceData.js"), exports);
18
18
  __exportStar(require("./DeleteResourceResponse.js"), exports);
19
19
  __exportStar(require("./EnrolledReward.js"), exports);
20
- __exportStar(require("./MerchantNetwork.js"), exports);
21
- __exportStar(require("./MerchantNetworkName.js"), exports);
22
20
  __exportStar(require("./OrganizationPaginationMetadata.js"), exports);
@@ -19,7 +19,6 @@ export declare class OrganizationsClient {
19
19
  /**
20
20
  * Retrieve organization details for the authenticated issuer
21
21
  *
22
- * @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
23
22
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
24
23
  *
25
24
  * @throws {@link KardApi.UnauthorizedError}
@@ -28,8 +27,8 @@ export declare class OrganizationsClient {
28
27
  * @throws {@link KardApi.InternalServerError}
29
28
  *
30
29
  * @example
31
- * await client.organizations.get("organizationId")
30
+ * await client.organizations.get()
32
31
  */
33
- get(organizationId: string, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
32
+ get(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
34
33
  private __get;
35
34
  }
@@ -68,7 +68,6 @@ class OrganizationsClient {
68
68
  /**
69
69
  * Retrieve organization details for the authenticated issuer
70
70
  *
71
- * @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
72
71
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
73
72
  *
74
73
  * @throws {@link KardApi.UnauthorizedError}
@@ -77,18 +76,18 @@ class OrganizationsClient {
77
76
  * @throws {@link KardApi.InternalServerError}
78
77
  *
79
78
  * @example
80
- * await client.organizations.get("organizationId")
79
+ * await client.organizations.get()
81
80
  */
82
- get(organizationId, requestOptions) {
83
- return core.HttpResponsePromise.fromPromise(this.__get(organizationId, requestOptions));
81
+ get(requestOptions) {
82
+ return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
84
83
  }
85
- __get(organizationId, requestOptions) {
84
+ __get(requestOptions) {
86
85
  return __awaiter(this, void 0, void 0, function* () {
87
86
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
88
87
  const _authRequest = yield this._options.authProvider.getAuthRequest();
89
88
  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);
90
89
  const _response = yield core.fetcher({
91
- 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)}`),
90
+ 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/issuer"),
92
91
  method: "GET",
93
92
  headers: _headers,
94
93
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -119,7 +118,7 @@ class OrganizationsClient {
119
118
  });
120
119
  }
121
120
  }
122
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}");
121
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuer");
123
122
  });
124
123
  }
125
124
  }
@@ -50,7 +50,7 @@ export declare class ChildrenClient {
50
50
  * }
51
51
  * })
52
52
  */
53
- create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
53
+ create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
54
54
  private __create;
55
55
  /**
56
56
  * Retrieve a specific child organization
@@ -67,7 +67,7 @@ export declare class ChildrenClient {
67
67
  * @example
68
68
  * await client.organizations.children.get("organizationId", "childId")
69
69
  */
70
- get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
70
+ get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
71
71
  private __get;
72
72
  /**
73
73
  * Update a child organization. Only the name can be changed.
@@ -91,7 +91,7 @@ export declare class ChildrenClient {
91
91
  * }
92
92
  * })
93
93
  */
94
- update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
94
+ update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
95
95
  private __update;
96
96
  /**
97
97
  * Delete a child organization
@@ -167,7 +167,10 @@ class ChildrenClient {
167
167
  logging: this._options.logging,
168
168
  });
169
169
  if (_response.ok) {
170
- return { data: _response.body, rawResponse: _response.rawResponse };
170
+ return {
171
+ data: _response.body,
172
+ rawResponse: _response.rawResponse,
173
+ };
171
174
  }
172
175
  if (_response.error.reason === "status-code") {
173
176
  switch (_response.error.statusCode) {
@@ -227,7 +230,10 @@ class ChildrenClient {
227
230
  logging: this._options.logging,
228
231
  });
229
232
  if (_response.ok) {
230
- return { data: _response.body, rawResponse: _response.rawResponse };
233
+ return {
234
+ data: _response.body,
235
+ rawResponse: _response.rawResponse,
236
+ };
231
237
  }
232
238
  if (_response.error.reason === "status-code") {
233
239
  switch (_response.error.statusCode) {
@@ -295,7 +301,10 @@ class ChildrenClient {
295
301
  logging: this._options.logging,
296
302
  });
297
303
  if (_response.ok) {
298
- return { data: _response.body, rawResponse: _response.rawResponse };
304
+ return {
305
+ data: _response.body,
306
+ rawResponse: _response.rawResponse,
307
+ };
299
308
  }
300
309
  if (_response.error.reason === "status-code") {
301
310
  switch (_response.error.statusCode) {
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Limited set of child organization attributes exposed to external consumers
3
+ */
4
+ export interface ChildOrganizationAttributes {
5
+ /** Name of the child organization (uppercase, no spaces) */
6
+ name: string;
7
+ /** External identifier for the child organization */
8
+ externalId?: string | undefined;
9
+ /** Bank Identification Numbers for the child organization */
10
+ bins: string[];
11
+ }
@@ -4,7 +4,7 @@ import type * as KardApi from "../../../../../index.js";
4
4
  */
5
5
  export interface ChildOrganizationListResponse {
6
6
  /** Array of child organization resources */
7
- data: KardApi.ExternalOrganizationResponse[];
7
+ data: KardApi.organizations.ChildOrganizationResponse[];
8
8
  links?: KardApi.Links | undefined;
9
9
  /** Pagination metadata */
10
10
  meta?: KardApi.OrganizationPaginationMetadata | undefined;
@@ -0,0 +1,10 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Child organization resource response
4
+ */
5
+ export interface ChildOrganizationResponse {
6
+ type: "organization";
7
+ /** Unique identifier of the child organization */
8
+ id: string;
9
+ attributes: KardApi.organizations.ChildOrganizationAttributes;
10
+ }
@@ -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 });
@@ -1,4 +1,6 @@
1
+ export * from "./ChildOrganizationAttributes.js";
1
2
  export * from "./ChildOrganizationListResponse.js";
3
+ export * from "./ChildOrganizationResponse.js";
2
4
  export * from "./CreateChildAttributes.js";
3
5
  export * from "./CreateChildRequestBody.js";
4
6
  export * from "./CreateChildRequestData.js";
@@ -14,7 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ChildOrganizationAttributes.js"), exports);
17
18
  __exportStar(require("./ChildOrganizationListResponse.js"), exports);
19
+ __exportStar(require("./ChildOrganizationResponse.js"), exports);
18
20
  __exportStar(require("./CreateChildAttributes.js"), exports);
19
21
  __exportStar(require("./CreateChildRequestBody.js"), exports);
20
22
  __exportStar(require("./CreateChildRequestData.js"), exports);
@@ -5,26 +5,16 @@ import type * as KardApi from "../../../index.js";
5
5
  export interface ExternalOrganizationAttributes {
6
6
  /** Name of the organization (uppercase, no spaces) */
7
7
  name: string;
8
- /** External identifier for the organization */
9
- externalId?: string | undefined;
10
- /** ID of the parent organization */
11
- parentOrganizationId?: string | undefined;
12
8
  /** Rewards programs the organization is enrolled in */
13
9
  enrolledRewards: KardApi.EnrolledReward[];
14
10
  /** Card networks supported by the organization */
15
11
  cardNetworks: KardApi.CardNetwork[];
16
- /** Merchant networks with priority for the organization */
17
- merchantNetworks?: KardApi.MerchantNetwork[] | undefined;
18
- /** Whether national offers are enabled */
19
- nationalOffers: boolean;
20
- /** Whether local offers are enabled */
21
- localOffers: boolean;
22
- /** Whether attribution tracking is enabled */
23
- useAttribution: boolean;
24
12
  /** Bank Identification Numbers for the organization */
25
13
  bins: string[];
26
- /** When the organization was created (ISO 8601 UTC) */
27
- createdAt?: string | undefined;
28
- /** When the organization was last updated (ISO 8601 UTC) */
29
- updatedAt?: string | undefined;
14
+ /** Affiliate commission split percentage */
15
+ affiliateCommissionSplit: number;
16
+ /** Cardlinked commission split percentage */
17
+ cardlinkedCommissionSplit: number;
18
+ /** Cardlinked user commission split percentage */
19
+ cardlinkedUserCommissionSplit: number;
30
20
  }
@@ -100,13 +100,27 @@ import type * as KardApi from "../../../index.js";
100
100
  * type: "merchant",
101
101
  * id: "633ed2ab30dcb60009dd5699",
102
102
  * attributes: {
103
- * name: "Forever 21"
103
+ * name: "Forever 21",
104
+ * assets: [{
105
+ * type: KardApi.MerchantAssetType.ImgView,
106
+ * url: "https://attribution.getkard.com/public/logos/forever21.jpg?subtype=IMG_VIEW&offerId=OFF-F21-INSTORE-2024Q4-001&token=signed-token",
107
+ * alt: "Forever 21 Logo Image"
108
+ * }, {
109
+ * type: KardApi.MerchantAssetType.BannerView,
110
+ * url: "https://attribution.getkard.com/public/banners/forever21.jpg?subtype=BANNER_VIEW&offerId=OFF-F21-INSTORE-2024Q4-001&token=signed-token",
111
+ * alt: "Forever 21 Banner Image"
112
+ * }]
104
113
  * }
105
114
  * }, {
106
115
  * type: "merchant",
107
116
  * id: "5f3e2d1c40abc50008cc4821",
108
117
  * attributes: {
109
- * name: "Target"
118
+ * name: "Target",
119
+ * assets: [{
120
+ * type: KardApi.MerchantAssetType.ImgView,
121
+ * url: "https://attribution.getkard.com/public/logos/target.jpg?subtype=IMG_VIEW&offerId=OFF-TGT-ONLINE-2024Q4-002&token=signed-token",
122
+ * alt: "Target Logo Image"
123
+ * }]
110
124
  * }
111
125
  * }, {
112
126
  * type: "offer",
@@ -0,0 +1,9 @@
1
+ import type * as KardApi from "../../../index.js";
2
+ export interface MerchantAsset {
3
+ /** The type of asset being tracked. */
4
+ type: KardApi.MerchantAssetType;
5
+ /** Attribution-signed URL for loading the asset. */
6
+ url: string;
7
+ /** Alt text describing the asset for accessibility. */
8
+ alt?: string | undefined;
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 });
@@ -0,0 +1,5 @@
1
+ export declare const MerchantAssetType: {
2
+ readonly ImgView: "IMG_VIEW";
3
+ readonly BannerView: "BANNER_VIEW";
4
+ };
5
+ export type MerchantAssetType = (typeof MerchantAssetType)[keyof typeof MerchantAssetType];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.MerchantAssetType = void 0;
5
+ exports.MerchantAssetType = {
6
+ ImgView: "IMG_VIEW",
7
+ BannerView: "BANNER_VIEW",
8
+ };
@@ -1,4 +1,11 @@
1
+ import type * as KardApi from "../../../index.js";
1
2
  export interface TransactionMerchantAttributes {
2
3
  /** Merchant name */
3
4
  name: string;
5
+ /**
6
+ * Tracked asset images for the merchant (logo, banner, etc.). Each asset
7
+ * URL is signed for attribution tracking and should be loaded as-is by the
8
+ * client.
9
+ */
10
+ assets?: KardApi.MerchantAsset[] | undefined;
4
11
  }
@@ -29,6 +29,8 @@ export * from "./GetEarnedRewardsResponse.js";
29
29
  export * from "./MatchedTransactionsAttributes.js";
30
30
  export * from "./MatchedTransactionsRequest.js";
31
31
  export * from "./Merchant.js";
32
+ export * from "./MerchantAsset.js";
33
+ export * from "./MerchantAssetType.js";
32
34
  export * from "./PaymentStatus.js";
33
35
  export * from "./PaymentType.js";
34
36
  export * from "./ProcessorMid.js";
@@ -45,6 +45,8 @@ __exportStar(require("./GetEarnedRewardsResponse.js"), exports);
45
45
  __exportStar(require("./MatchedTransactionsAttributes.js"), exports);
46
46
  __exportStar(require("./MatchedTransactionsRequest.js"), exports);
47
47
  __exportStar(require("./Merchant.js"), exports);
48
+ __exportStar(require("./MerchantAsset.js"), exports);
49
+ __exportStar(require("./MerchantAssetType.js"), exports);
48
50
  __exportStar(require("./PaymentStatus.js"), exports);
49
51
  __exportStar(require("./PaymentType.js"), exports);
50
52
  __exportStar(require("./ProcessorMid.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "14.3.0";
1
+ export declare const SDK_VERSION = "15.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 = "14.3.0";
4
+ exports.SDK_VERSION = "15.0.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": "14.3.0",
10
- "User-Agent": "@kard-financial/sdk/14.3.0",
9
+ "X-Fern-SDK-Version": "15.0.0",
10
+ "User-Agent": "@kard-financial/sdk/15.0.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);
@@ -1,6 +1,4 @@
1
1
  export * from "./DeleteResourceData.mjs";
2
2
  export * from "./DeleteResourceResponse.mjs";
3
3
  export * from "./EnrolledReward.mjs";
4
- export * from "./MerchantNetwork.mjs";
5
- export * from "./MerchantNetworkName.mjs";
6
4
  export * from "./OrganizationPaginationMetadata.mjs";
@@ -1,6 +1,4 @@
1
1
  export * from "./DeleteResourceData.mjs";
2
2
  export * from "./DeleteResourceResponse.mjs";
3
3
  export * from "./EnrolledReward.mjs";
4
- export * from "./MerchantNetwork.mjs";
5
- export * from "./MerchantNetworkName.mjs";
6
4
  export * from "./OrganizationPaginationMetadata.mjs";
@@ -19,7 +19,6 @@ export declare class OrganizationsClient {
19
19
  /**
20
20
  * Retrieve organization details for the authenticated issuer
21
21
  *
22
- * @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
23
22
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
24
23
  *
25
24
  * @throws {@link KardApi.UnauthorizedError}
@@ -28,8 +27,8 @@ export declare class OrganizationsClient {
28
27
  * @throws {@link KardApi.InternalServerError}
29
28
  *
30
29
  * @example
31
- * await client.organizations.get("organizationId")
30
+ * await client.organizations.get()
32
31
  */
33
- get(organizationId: string, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
32
+ get(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
34
33
  private __get;
35
34
  }
@@ -32,7 +32,6 @@ export class OrganizationsClient {
32
32
  /**
33
33
  * Retrieve organization details for the authenticated issuer
34
34
  *
35
- * @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
36
35
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
37
36
  *
38
37
  * @throws {@link KardApi.UnauthorizedError}
@@ -41,18 +40,18 @@ export class OrganizationsClient {
41
40
  * @throws {@link KardApi.InternalServerError}
42
41
  *
43
42
  * @example
44
- * await client.organizations.get("organizationId")
43
+ * await client.organizations.get()
45
44
  */
46
- get(organizationId, requestOptions) {
47
- return core.HttpResponsePromise.fromPromise(this.__get(organizationId, requestOptions));
45
+ get(requestOptions) {
46
+ return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
48
47
  }
49
- __get(organizationId, requestOptions) {
48
+ __get(requestOptions) {
50
49
  return __awaiter(this, void 0, void 0, function* () {
51
50
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
52
51
  const _authRequest = yield this._options.authProvider.getAuthRequest();
53
52
  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);
54
53
  const _response = yield core.fetcher({
55
- 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)}`),
54
+ 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/issuer"),
56
55
  method: "GET",
57
56
  headers: _headers,
58
57
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -83,7 +82,7 @@ export class OrganizationsClient {
83
82
  });
84
83
  }
85
84
  }
86
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}");
85
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuer");
87
86
  });
88
87
  }
89
88
  }
@@ -50,7 +50,7 @@ export declare class ChildrenClient {
50
50
  * }
51
51
  * })
52
52
  */
53
- create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
53
+ create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
54
54
  private __create;
55
55
  /**
56
56
  * Retrieve a specific child organization
@@ -67,7 +67,7 @@ export declare class ChildrenClient {
67
67
  * @example
68
68
  * await client.organizations.children.get("organizationId", "childId")
69
69
  */
70
- get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
70
+ get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
71
71
  private __get;
72
72
  /**
73
73
  * Update a child organization. Only the name can be changed.
@@ -91,7 +91,7 @@ export declare class ChildrenClient {
91
91
  * }
92
92
  * })
93
93
  */
94
- update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
94
+ update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
95
95
  private __update;
96
96
  /**
97
97
  * Delete a child organization
@@ -131,7 +131,10 @@ export class ChildrenClient {
131
131
  logging: this._options.logging,
132
132
  });
133
133
  if (_response.ok) {
134
- return { data: _response.body, rawResponse: _response.rawResponse };
134
+ return {
135
+ data: _response.body,
136
+ rawResponse: _response.rawResponse,
137
+ };
135
138
  }
136
139
  if (_response.error.reason === "status-code") {
137
140
  switch (_response.error.statusCode) {
@@ -191,7 +194,10 @@ export class ChildrenClient {
191
194
  logging: this._options.logging,
192
195
  });
193
196
  if (_response.ok) {
194
- return { data: _response.body, rawResponse: _response.rawResponse };
197
+ return {
198
+ data: _response.body,
199
+ rawResponse: _response.rawResponse,
200
+ };
195
201
  }
196
202
  if (_response.error.reason === "status-code") {
197
203
  switch (_response.error.statusCode) {
@@ -259,7 +265,10 @@ export class ChildrenClient {
259
265
  logging: this._options.logging,
260
266
  });
261
267
  if (_response.ok) {
262
- return { data: _response.body, rawResponse: _response.rawResponse };
268
+ return {
269
+ data: _response.body,
270
+ rawResponse: _response.rawResponse,
271
+ };
263
272
  }
264
273
  if (_response.error.reason === "status-code") {
265
274
  switch (_response.error.statusCode) {
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Limited set of child organization attributes exposed to external consumers
3
+ */
4
+ export interface ChildOrganizationAttributes {
5
+ /** Name of the child organization (uppercase, no spaces) */
6
+ name: string;
7
+ /** External identifier for the child organization */
8
+ externalId?: string | undefined;
9
+ /** Bank Identification Numbers for the child organization */
10
+ bins: string[];
11
+ }
@@ -4,7 +4,7 @@ import type * as KardApi from "../../../../../index.mjs";
4
4
  */
5
5
  export interface ChildOrganizationListResponse {
6
6
  /** Array of child organization resources */
7
- data: KardApi.ExternalOrganizationResponse[];
7
+ data: KardApi.organizations.ChildOrganizationResponse[];
8
8
  links?: KardApi.Links | undefined;
9
9
  /** Pagination metadata */
10
10
  meta?: KardApi.OrganizationPaginationMetadata | undefined;
@@ -0,0 +1,10 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Child organization resource response
4
+ */
5
+ export interface ChildOrganizationResponse {
6
+ type: "organization";
7
+ /** Unique identifier of the child organization */
8
+ id: string;
9
+ attributes: KardApi.organizations.ChildOrganizationAttributes;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,4 +1,6 @@
1
+ export * from "./ChildOrganizationAttributes.mjs";
1
2
  export * from "./ChildOrganizationListResponse.mjs";
3
+ export * from "./ChildOrganizationResponse.mjs";
2
4
  export * from "./CreateChildAttributes.mjs";
3
5
  export * from "./CreateChildRequestBody.mjs";
4
6
  export * from "./CreateChildRequestData.mjs";
@@ -1,4 +1,6 @@
1
+ export * from "./ChildOrganizationAttributes.mjs";
1
2
  export * from "./ChildOrganizationListResponse.mjs";
3
+ export * from "./ChildOrganizationResponse.mjs";
2
4
  export * from "./CreateChildAttributes.mjs";
3
5
  export * from "./CreateChildRequestBody.mjs";
4
6
  export * from "./CreateChildRequestData.mjs";
@@ -5,26 +5,16 @@ import type * as KardApi from "../../../index.mjs";
5
5
  export interface ExternalOrganizationAttributes {
6
6
  /** Name of the organization (uppercase, no spaces) */
7
7
  name: string;
8
- /** External identifier for the organization */
9
- externalId?: string | undefined;
10
- /** ID of the parent organization */
11
- parentOrganizationId?: string | undefined;
12
8
  /** Rewards programs the organization is enrolled in */
13
9
  enrolledRewards: KardApi.EnrolledReward[];
14
10
  /** Card networks supported by the organization */
15
11
  cardNetworks: KardApi.CardNetwork[];
16
- /** Merchant networks with priority for the organization */
17
- merchantNetworks?: KardApi.MerchantNetwork[] | undefined;
18
- /** Whether national offers are enabled */
19
- nationalOffers: boolean;
20
- /** Whether local offers are enabled */
21
- localOffers: boolean;
22
- /** Whether attribution tracking is enabled */
23
- useAttribution: boolean;
24
12
  /** Bank Identification Numbers for the organization */
25
13
  bins: string[];
26
- /** When the organization was created (ISO 8601 UTC) */
27
- createdAt?: string | undefined;
28
- /** When the organization was last updated (ISO 8601 UTC) */
29
- updatedAt?: string | undefined;
14
+ /** Affiliate commission split percentage */
15
+ affiliateCommissionSplit: number;
16
+ /** Cardlinked commission split percentage */
17
+ cardlinkedCommissionSplit: number;
18
+ /** Cardlinked user commission split percentage */
19
+ cardlinkedUserCommissionSplit: number;
30
20
  }
@@ -100,13 +100,27 @@ import type * as KardApi from "../../../index.mjs";
100
100
  * type: "merchant",
101
101
  * id: "633ed2ab30dcb60009dd5699",
102
102
  * attributes: {
103
- * name: "Forever 21"
103
+ * name: "Forever 21",
104
+ * assets: [{
105
+ * type: KardApi.MerchantAssetType.ImgView,
106
+ * url: "https://attribution.getkard.com/public/logos/forever21.jpg?subtype=IMG_VIEW&offerId=OFF-F21-INSTORE-2024Q4-001&token=signed-token",
107
+ * alt: "Forever 21 Logo Image"
108
+ * }, {
109
+ * type: KardApi.MerchantAssetType.BannerView,
110
+ * url: "https://attribution.getkard.com/public/banners/forever21.jpg?subtype=BANNER_VIEW&offerId=OFF-F21-INSTORE-2024Q4-001&token=signed-token",
111
+ * alt: "Forever 21 Banner Image"
112
+ * }]
104
113
  * }
105
114
  * }, {
106
115
  * type: "merchant",
107
116
  * id: "5f3e2d1c40abc50008cc4821",
108
117
  * attributes: {
109
- * name: "Target"
118
+ * name: "Target",
119
+ * assets: [{
120
+ * type: KardApi.MerchantAssetType.ImgView,
121
+ * url: "https://attribution.getkard.com/public/logos/target.jpg?subtype=IMG_VIEW&offerId=OFF-TGT-ONLINE-2024Q4-002&token=signed-token",
122
+ * alt: "Target Logo Image"
123
+ * }]
110
124
  * }
111
125
  * }, {
112
126
  * type: "offer",
@@ -0,0 +1,9 @@
1
+ import type * as KardApi from "../../../index.mjs";
2
+ export interface MerchantAsset {
3
+ /** The type of asset being tracked. */
4
+ type: KardApi.MerchantAssetType;
5
+ /** Attribution-signed URL for loading the asset. */
6
+ url: string;
7
+ /** Alt text describing the asset for accessibility. */
8
+ alt?: string | undefined;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const MerchantAssetType: {
2
+ readonly ImgView: "IMG_VIEW";
3
+ readonly BannerView: "BANNER_VIEW";
4
+ };
5
+ export type MerchantAssetType = (typeof MerchantAssetType)[keyof typeof MerchantAssetType];
@@ -0,0 +1,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const MerchantAssetType = {
3
+ ImgView: "IMG_VIEW",
4
+ BannerView: "BANNER_VIEW",
5
+ };
@@ -1,4 +1,11 @@
1
+ import type * as KardApi from "../../../index.mjs";
1
2
  export interface TransactionMerchantAttributes {
2
3
  /** Merchant name */
3
4
  name: string;
5
+ /**
6
+ * Tracked asset images for the merchant (logo, banner, etc.). Each asset
7
+ * URL is signed for attribution tracking and should be loaded as-is by the
8
+ * client.
9
+ */
10
+ assets?: KardApi.MerchantAsset[] | undefined;
4
11
  }
@@ -29,6 +29,8 @@ export * from "./GetEarnedRewardsResponse.mjs";
29
29
  export * from "./MatchedTransactionsAttributes.mjs";
30
30
  export * from "./MatchedTransactionsRequest.mjs";
31
31
  export * from "./Merchant.mjs";
32
+ export * from "./MerchantAsset.mjs";
33
+ export * from "./MerchantAssetType.mjs";
32
34
  export * from "./PaymentStatus.mjs";
33
35
  export * from "./PaymentType.mjs";
34
36
  export * from "./ProcessorMid.mjs";
@@ -29,6 +29,8 @@ export * from "./GetEarnedRewardsResponse.mjs";
29
29
  export * from "./MatchedTransactionsAttributes.mjs";
30
30
  export * from "./MatchedTransactionsRequest.mjs";
31
31
  export * from "./Merchant.mjs";
32
+ export * from "./MerchantAsset.mjs";
33
+ export * from "./MerchantAssetType.mjs";
32
34
  export * from "./PaymentStatus.mjs";
33
35
  export * from "./PaymentType.mjs";
34
36
  export * from "./ProcessorMid.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "14.3.0";
1
+ export declare const SDK_VERSION = "15.0.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "14.3.0";
1
+ export const SDK_VERSION = "15.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kard-financial/sdk",
3
- "version": "14.3.0",
3
+ "version": "15.0.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -377,7 +377,7 @@ await client.notifications.subscriptions.update("organization-123", "subscriptio
377
377
  </details>
378
378
 
379
379
  ## Organizations
380
- <details><summary><code>client.organizations.<a href="/src/api/resources/organizations/client/Client.ts">get</a>(organizationId) -> KardApi.ExternalOrganizationResponse</code></summary>
380
+ <details><summary><code>client.organizations.<a href="/src/api/resources/organizations/client/Client.ts">get</a>() -> KardApi.ExternalOrganizationResponse</code></summary>
381
381
  <dl>
382
382
  <dd>
383
383
 
@@ -404,7 +404,7 @@ Retrieve organization details for the authenticated issuer
404
404
  <dd>
405
405
 
406
406
  ```typescript
407
- await client.organizations.get("organizationId");
407
+ await client.organizations.get();
408
408
 
409
409
  ```
410
410
  </dd>
@@ -420,14 +420,6 @@ await client.organizations.get("organizationId");
420
420
  <dl>
421
421
  <dd>
422
422
 
423
- **organizationId:** `string` — Unique identifier of the organization (must match the authenticated issuer)
424
-
425
- </dd>
426
- </dl>
427
-
428
- <dl>
429
- <dd>
430
-
431
423
  **requestOptions:** `OrganizationsClient.RequestOptions`
432
424
 
433
425
  </dd>
@@ -512,7 +504,7 @@ await client.organizations.children.list("organizationId");
512
504
  </dl>
513
505
  </details>
514
506
 
515
- <details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">create</a>(organizationId, { ...params }) -> KardApi.ExternalOrganizationResponse</code></summary>
507
+ <details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">create</a>(organizationId, { ...params }) -> KardApi.ChildOrganizationResponse</code></summary>
516
508
  <dl>
517
509
  <dd>
518
510
 
@@ -590,7 +582,7 @@ await client.organizations.children.create("organizationId", {
590
582
  </dl>
591
583
  </details>
592
584
 
593
- <details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">get</a>(organizationId, childId) -> KardApi.ExternalOrganizationResponse</code></summary>
585
+ <details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">get</a>(organizationId, childId) -> KardApi.ChildOrganizationResponse</code></summary>
594
586
  <dl>
595
587
  <dd>
596
588
 
@@ -661,7 +653,7 @@ await client.organizations.children.get("organizationId", "childId");
661
653
  </dl>
662
654
  </details>
663
655
 
664
- <details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">update</a>(organizationId, childId, { ...params }) -> KardApi.ExternalOrganizationResponse</code></summary>
656
+ <details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">update</a>(organizationId, childId, { ...params }) -> KardApi.ChildOrganizationResponse</code></summary>
665
657
  <dl>
666
658
  <dd>
667
659
 
@@ -1,10 +0,0 @@
1
- import type * as KardApi from "../../../index.js";
2
- /**
3
- * Merchant network with priority for an organization
4
- */
5
- export interface MerchantNetwork {
6
- /** Name of the merchant network */
7
- name: KardApi.MerchantNetworkName;
8
- /** Priority of the merchant network (higher = more preferred) */
9
- priority: number;
10
- }
@@ -1,11 +0,0 @@
1
- /** Merchant network name */
2
- export declare const MerchantNetworkName: {
3
- readonly Empyr: "EMPYR";
4
- readonly Rewardsnetwork: "REWARDSNETWORK";
5
- readonly Kard: "KARD";
6
- readonly Collinson: "COLLINSON";
7
- readonly Seated: "SEATED";
8
- readonly Franki: "FRANKI";
9
- readonly Lux: "LUX";
10
- };
11
- export type MerchantNetworkName = (typeof MerchantNetworkName)[keyof typeof MerchantNetworkName];
@@ -1,14 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.MerchantNetworkName = void 0;
5
- /** Merchant network name */
6
- exports.MerchantNetworkName = {
7
- Empyr: "EMPYR",
8
- Rewardsnetwork: "REWARDSNETWORK",
9
- Kard: "KARD",
10
- Collinson: "COLLINSON",
11
- Seated: "SEATED",
12
- Franki: "FRANKI",
13
- Lux: "LUX",
14
- };
@@ -1,10 +0,0 @@
1
- import type * as KardApi from "../../../index.mjs";
2
- /**
3
- * Merchant network with priority for an organization
4
- */
5
- export interface MerchantNetwork {
6
- /** Name of the merchant network */
7
- name: KardApi.MerchantNetworkName;
8
- /** Priority of the merchant network (higher = more preferred) */
9
- priority: number;
10
- }
@@ -1,11 +0,0 @@
1
- /** Merchant network name */
2
- export declare const MerchantNetworkName: {
3
- readonly Empyr: "EMPYR";
4
- readonly Rewardsnetwork: "REWARDSNETWORK";
5
- readonly Kard: "KARD";
6
- readonly Collinson: "COLLINSON";
7
- readonly Seated: "SEATED";
8
- readonly Franki: "FRANKI";
9
- readonly Lux: "LUX";
10
- };
11
- export type MerchantNetworkName = (typeof MerchantNetworkName)[keyof typeof MerchantNetworkName];
@@ -1,11 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- /** Merchant network name */
3
- export const MerchantNetworkName = {
4
- Empyr: "EMPYR",
5
- Rewardsnetwork: "REWARDSNETWORK",
6
- Kard: "KARD",
7
- Collinson: "COLLINSON",
8
- Seated: "SEATED",
9
- Franki: "FRANKI",
10
- Lux: "LUX",
11
- };