@kard-financial/sdk 22.1.0 → 22.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.
Files changed (80) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementAttributes.d.ts +14 -0
  3. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementAttributes.js +3 -0
  4. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.d.ts +9 -0
  5. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.js +3 -0
  6. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationSlot.d.ts +11 -0
  7. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationSlot.js +3 -0
  8. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateBatchActivationAttributes.d.ts +22 -0
  9. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateBatchActivationAttributes.js +3 -0
  10. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateBatchActivationPlacementData.d.ts +8 -0
  11. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateBatchActivationPlacementData.js +3 -0
  12. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.d.ts +9 -0
  13. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.js +3 -0
  14. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.ts +4 -1
  15. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.ts +20 -1
  16. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementTypeFilter.d.ts +1 -0
  17. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementTypeFilter.js +1 -0
  18. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateBatchActivationAttributes.d.ts +23 -0
  19. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateBatchActivationAttributes.js +3 -0
  20. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateBatchActivationPlacementData.d.ts +8 -0
  21. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateBatchActivationPlacementData.js +3 -0
  22. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.d.ts +11 -0
  23. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.js +3 -0
  24. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.ts +4 -1
  25. package/dist/cjs/api/resources/organizations/resources/placements/types/index.d.ts +9 -0
  26. package/dist/cjs/api/resources/organizations/resources/placements/types/index.js +9 -0
  27. package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +27 -0
  28. package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +76 -0
  29. package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetBatchesByPlacementRequest.d.ts +9 -0
  30. package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetBatchesByPlacementRequest.js +3 -0
  31. package/dist/cjs/api/resources/users/resources/rewards/client/requests/index.d.ts +1 -0
  32. package/dist/cjs/api/resources/users/resources/rewards/types/BatchSlotData.d.ts +18 -0
  33. package/dist/cjs/api/resources/users/resources/rewards/types/BatchSlotData.js +3 -0
  34. package/dist/cjs/api/resources/users/resources/rewards/types/BatchesResponseObject.d.ts +7 -0
  35. package/dist/cjs/api/resources/users/resources/rewards/types/BatchesResponseObject.js +3 -0
  36. package/dist/cjs/api/resources/users/resources/rewards/types/index.d.ts +2 -0
  37. package/dist/cjs/api/resources/users/resources/rewards/types/index.js +2 -0
  38. package/dist/cjs/version.d.ts +1 -1
  39. package/dist/cjs/version.js +1 -1
  40. package/dist/esm/BaseClient.mjs +2 -2
  41. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementAttributes.d.mts +14 -0
  42. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementAttributes.mjs +2 -0
  43. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.d.mts +9 -0
  44. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.mjs +2 -0
  45. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationSlot.d.mts +11 -0
  46. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationSlot.mjs +2 -0
  47. package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationAttributes.d.mts +22 -0
  48. package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationAttributes.mjs +2 -0
  49. package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationPlacementData.d.mts +8 -0
  50. package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationPlacementData.mjs +2 -0
  51. package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.d.mts +9 -0
  52. package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.mjs +2 -0
  53. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.mts +4 -1
  54. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.mts +20 -1
  55. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementTypeFilter.d.mts +1 -0
  56. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementTypeFilter.mjs +1 -0
  57. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationAttributes.d.mts +23 -0
  58. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationAttributes.mjs +2 -0
  59. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationPlacementData.d.mts +8 -0
  60. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationPlacementData.mjs +2 -0
  61. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.d.mts +11 -0
  62. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.mjs +2 -0
  63. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.mts +4 -1
  64. package/dist/esm/api/resources/organizations/resources/placements/types/index.d.mts +9 -0
  65. package/dist/esm/api/resources/organizations/resources/placements/types/index.mjs +9 -0
  66. package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +27 -0
  67. package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +76 -0
  68. package/dist/esm/api/resources/users/resources/rewards/client/requests/GetBatchesByPlacementRequest.d.mts +9 -0
  69. package/dist/esm/api/resources/users/resources/rewards/client/requests/GetBatchesByPlacementRequest.mjs +2 -0
  70. package/dist/esm/api/resources/users/resources/rewards/client/requests/index.d.mts +1 -0
  71. package/dist/esm/api/resources/users/resources/rewards/types/BatchSlotData.d.mts +18 -0
  72. package/dist/esm/api/resources/users/resources/rewards/types/BatchSlotData.mjs +2 -0
  73. package/dist/esm/api/resources/users/resources/rewards/types/BatchesResponseObject.d.mts +7 -0
  74. package/dist/esm/api/resources/users/resources/rewards/types/BatchesResponseObject.mjs +2 -0
  75. package/dist/esm/api/resources/users/resources/rewards/types/index.d.mts +2 -0
  76. package/dist/esm/api/resources/users/resources/rewards/types/index.mjs +2 -0
  77. package/dist/esm/version.d.mts +1 -1
  78. package/dist/esm/version.mjs +1 -1
  79. package/package.json +1 -1
  80. package/reference.md +95 -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": "22.1.0",
47
- "User-Agent": "@kard-financial/sdk/22.1.0",
46
+ "X-Fern-SDK-Version": "22.3.0",
47
+ "User-Agent": "@kard-financial/sdk/22.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);
@@ -0,0 +1,14 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Attributes for a batch-activation placement
4
+ */
5
+ export interface BatchActivationPlacementAttributes {
6
+ /** Name of the placement */
7
+ name: string;
8
+ /** ID of the organization this placement belongs to */
9
+ organizationId: string;
10
+ /** ISO-8601 duration that controls how often the activation cohort refreshes (e.g. "P7D" for weekly). */
11
+ refreshInterval: string;
12
+ /** Slots that make up the activation cohort */
13
+ slots: KardApi.organizations.BatchActivationSlot[];
14
+ }
@@ -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,9 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Batch-activation placement resource data
4
+ */
5
+ export interface BatchActivationPlacementData {
6
+ /** Unique identifier of the placement (UUID v7) */
7
+ id: string;
8
+ attributes: KardApi.organizations.BatchActivationPlacementAttributes;
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,11 @@
1
+ /**
2
+ * A slot within a batch-activation placement
3
+ */
4
+ export interface BatchActivationSlot {
5
+ /** Stable identifier for the slot within the placement */
6
+ slotId: string;
7
+ /** ID of the content strategy linked to this slot */
8
+ contentStrategyId: string;
9
+ /** Customer-defined alias for the slot, unique within the placement */
10
+ alias: string;
11
+ }
@@ -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,22 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Attributes for creating a batch-activation placement
4
+ *
5
+ * @example
6
+ * {
7
+ * name: "Weekly Cohort",
8
+ * refreshInterval: "P7D",
9
+ * slots: [{
10
+ * contentStrategyId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
11
+ * alias: "primary"
12
+ * }]
13
+ * }
14
+ */
15
+ export interface CreateBatchActivationAttributes {
16
+ /** Name of the placement */
17
+ name: string;
18
+ /** ISO-8601 duration controlling how often the activation cohort refreshes */
19
+ refreshInterval: string;
20
+ /** Slots that make up the activation cohort */
21
+ slots: KardApi.organizations.CreateBatchActivationSlot[];
22
+ }
@@ -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,8 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Data for creating a batch-activation placement
4
+ */
5
+ export interface CreateBatchActivationPlacementData {
6
+ /** Batch-activation placement attributes for creation */
7
+ attributes: KardApi.organizations.CreateBatchActivationAttributes;
8
+ }
@@ -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,9 @@
1
+ /**
2
+ * A slot in a batch-activation placement at creation time
3
+ */
4
+ export interface CreateBatchActivationSlot {
5
+ /** ID of the content strategy that fills this slot */
6
+ contentStrategyId: string;
7
+ /** Customer-defined alias for the slot, unique within the placement */
8
+ alias: 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 });
@@ -2,7 +2,7 @@ import type * as KardApi from "../../../../../index.js";
2
2
  /**
3
3
  * Discriminated union for creating a placement
4
4
  */
5
- export type CreatePlacementDataUnion = KardApi.organizations.CreatePlacementDataUnion.PlacementMainPage | KardApi.organizations.CreatePlacementDataUnion.PlacementPushNotification;
5
+ export type CreatePlacementDataUnion = KardApi.organizations.CreatePlacementDataUnion.PlacementMainPage | KardApi.organizations.CreatePlacementDataUnion.PlacementPushNotification | KardApi.organizations.CreatePlacementDataUnion.PlacementBatchActivation;
6
6
  export declare namespace CreatePlacementDataUnion {
7
7
  interface PlacementMainPage extends KardApi.organizations.CreateMainPagePlacementData {
8
8
  type: "placementMainPage";
@@ -10,4 +10,7 @@ export declare namespace CreatePlacementDataUnion {
10
10
  interface PlacementPushNotification extends KardApi.organizations.CreatePushNotificationPlacementData {
11
11
  type: "placementPushNotification";
12
12
  }
13
+ interface PlacementBatchActivation extends KardApi.organizations.CreateBatchActivationPlacementData {
14
+ type: "placementBatchActivation";
15
+ }
13
16
  }
@@ -26,8 +26,24 @@ import type * as KardApi from "../../../../../index.js";
26
26
  * }
27
27
  * }
28
28
  * }
29
+ *
30
+ * @example
31
+ * {
32
+ * type: "placementBatchActivation",
33
+ * id: "01961e5a-d94e-7c22-ac3f-f8b5a7e92c45",
34
+ * attributes: {
35
+ * name: "Weekly Cohort",
36
+ * organizationId: "org-123",
37
+ * refreshInterval: "P7D",
38
+ * slots: [{
39
+ * slotId: "01961e5a-e15f-7d33-bd4f-09c6b8fa3d56",
40
+ * contentStrategyId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
41
+ * alias: "primary"
42
+ * }]
43
+ * }
44
+ * }
29
45
  */
30
- export type PlacementFormatUnion = KardApi.organizations.PlacementFormatUnion.PlacementMainPage | KardApi.organizations.PlacementFormatUnion.PlacementPushNotification;
46
+ export type PlacementFormatUnion = KardApi.organizations.PlacementFormatUnion.PlacementMainPage | KardApi.organizations.PlacementFormatUnion.PlacementPushNotification | KardApi.organizations.PlacementFormatUnion.PlacementBatchActivation;
31
47
  export declare namespace PlacementFormatUnion {
32
48
  interface PlacementMainPage extends KardApi.organizations.MainPagePlacementData {
33
49
  type: "placementMainPage";
@@ -35,4 +51,7 @@ export declare namespace PlacementFormatUnion {
35
51
  interface PlacementPushNotification extends KardApi.organizations.PushNotificationPlacementData {
36
52
  type: "placementPushNotification";
37
53
  }
54
+ interface PlacementBatchActivation extends KardApi.organizations.BatchActivationPlacementData {
55
+ type: "placementBatchActivation";
56
+ }
38
57
  }
@@ -2,5 +2,6 @@
2
2
  export declare const PlacementTypeFilter: {
3
3
  readonly PlacementMainPage: "placementMainPage";
4
4
  readonly PlacementPushNotification: "placementPushNotification";
5
+ readonly PlacementBatchActivation: "placementBatchActivation";
5
6
  };
6
7
  export type PlacementTypeFilter = (typeof PlacementTypeFilter)[keyof typeof PlacementTypeFilter];
@@ -6,4 +6,5 @@ exports.PlacementTypeFilter = void 0;
6
6
  exports.PlacementTypeFilter = {
7
7
  PlacementMainPage: "placementMainPage",
8
8
  PlacementPushNotification: "placementPushNotification",
9
+ PlacementBatchActivation: "placementBatchActivation",
9
10
  };
@@ -0,0 +1,23 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Attributes for updating a batch-activation placement. All fields are required.
4
+ *
5
+ * @example
6
+ * {
7
+ * name: "Updated Cohort",
8
+ * refreshInterval: "P14D",
9
+ * slots: [{
10
+ * slotId: "01961e5a-e15f-7d33-bd4f-09c6b8fa3d56",
11
+ * contentStrategyId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
12
+ * alias: "primary"
13
+ * }]
14
+ * }
15
+ */
16
+ export interface UpdateBatchActivationAttributes {
17
+ /** Name of the placement */
18
+ name: string;
19
+ /** ISO-8601 duration controlling how often the activation cohort refreshes */
20
+ refreshInterval: string;
21
+ /** Slots that make up the activation cohort. Slots present in the prior state but absent from this list are removed. */
22
+ slots: KardApi.organizations.UpdateBatchActivationSlot[];
23
+ }
@@ -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,8 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Data for updating a batch-activation placement
4
+ */
5
+ export interface UpdateBatchActivationPlacementData {
6
+ /** Batch-activation placement attributes for update */
7
+ attributes: KardApi.organizations.UpdateBatchActivationAttributes;
8
+ }
@@ -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,11 @@
1
+ /**
2
+ * A slot in a batch-activation placement at update time
3
+ */
4
+ export interface UpdateBatchActivationSlot {
5
+ /** Existing slot identifier. Echo the value from a prior GET to keep the slot stable; omit to mint a fresh slot. If the contentStrategyId changes, the slotId is regenerated regardless of what was echoed. */
6
+ slotId?: string | undefined;
7
+ /** ID of the content strategy that fills this slot */
8
+ contentStrategyId: string;
9
+ /** Customer-defined alias for the slot, unique within the placement */
10
+ alias: string;
11
+ }
@@ -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 });
@@ -2,7 +2,7 @@ import type * as KardApi from "../../../../../index.js";
2
2
  /**
3
3
  * Discriminated union for updating a placement
4
4
  */
5
- export type UpdatePlacementDataUnion = KardApi.organizations.UpdatePlacementDataUnion.PlacementMainPage | KardApi.organizations.UpdatePlacementDataUnion.PlacementPushNotification;
5
+ export type UpdatePlacementDataUnion = KardApi.organizations.UpdatePlacementDataUnion.PlacementMainPage | KardApi.organizations.UpdatePlacementDataUnion.PlacementPushNotification | KardApi.organizations.UpdatePlacementDataUnion.PlacementBatchActivation;
6
6
  export declare namespace UpdatePlacementDataUnion {
7
7
  interface PlacementMainPage extends KardApi.organizations.UpdateMainPagePlacementData {
8
8
  type: "placementMainPage";
@@ -10,4 +10,7 @@ export declare namespace UpdatePlacementDataUnion {
10
10
  interface PlacementPushNotification extends KardApi.organizations.UpdatePushNotificationPlacementData {
11
11
  type: "placementPushNotification";
12
12
  }
13
+ interface PlacementBatchActivation extends KardApi.organizations.UpdateBatchActivationPlacementData {
14
+ type: "placementBatchActivation";
15
+ }
13
16
  }
@@ -1,5 +1,11 @@
1
+ export * from "./BatchActivationPlacementAttributes.js";
2
+ export * from "./BatchActivationPlacementData.js";
3
+ export * from "./BatchActivationSlot.js";
1
4
  export * from "./Cadence.js";
2
5
  export * from "./CadenceFrequency.js";
6
+ export * from "./CreateBatchActivationAttributes.js";
7
+ export * from "./CreateBatchActivationPlacementData.js";
8
+ export * from "./CreateBatchActivationSlot.js";
3
9
  export * from "./CreateMainPageAttributes.js";
4
10
  export * from "./CreateMainPagePlacementData.js";
5
11
  export * from "./CreatePlacementDataUnion.js";
@@ -15,6 +21,9 @@ export * from "./PlacementResource.js";
15
21
  export * from "./PlacementTypeFilter.js";
16
22
  export * from "./PushNotificationPlacementAttributes.js";
17
23
  export * from "./PushNotificationPlacementData.js";
24
+ export * from "./UpdateBatchActivationAttributes.js";
25
+ export * from "./UpdateBatchActivationPlacementData.js";
26
+ export * from "./UpdateBatchActivationSlot.js";
18
27
  export * from "./UpdateMainPageAttributes.js";
19
28
  export * from "./UpdateMainPagePlacementData.js";
20
29
  export * from "./UpdatePlacementDataUnion.js";
@@ -14,8 +14,14 @@ 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("./BatchActivationPlacementAttributes.js"), exports);
18
+ __exportStar(require("./BatchActivationPlacementData.js"), exports);
19
+ __exportStar(require("./BatchActivationSlot.js"), exports);
17
20
  __exportStar(require("./Cadence.js"), exports);
18
21
  __exportStar(require("./CadenceFrequency.js"), exports);
22
+ __exportStar(require("./CreateBatchActivationAttributes.js"), exports);
23
+ __exportStar(require("./CreateBatchActivationPlacementData.js"), exports);
24
+ __exportStar(require("./CreateBatchActivationSlot.js"), exports);
19
25
  __exportStar(require("./CreateMainPageAttributes.js"), exports);
20
26
  __exportStar(require("./CreateMainPagePlacementData.js"), exports);
21
27
  __exportStar(require("./CreatePlacementDataUnion.js"), exports);
@@ -31,6 +37,9 @@ __exportStar(require("./PlacementResource.js"), exports);
31
37
  __exportStar(require("./PlacementTypeFilter.js"), exports);
32
38
  __exportStar(require("./PushNotificationPlacementAttributes.js"), exports);
33
39
  __exportStar(require("./PushNotificationPlacementData.js"), exports);
40
+ __exportStar(require("./UpdateBatchActivationAttributes.js"), exports);
41
+ __exportStar(require("./UpdateBatchActivationPlacementData.js"), exports);
42
+ __exportStar(require("./UpdateBatchActivationSlot.js"), exports);
34
43
  __exportStar(require("./UpdateMainPageAttributes.js"), exports);
35
44
  __exportStar(require("./UpdateMainPagePlacementData.js"), exports);
36
45
  __exportStar(require("./UpdatePlacementDataUnion.js"), exports);
@@ -56,6 +56,33 @@ export declare class RewardsClient {
56
56
  */
57
57
  placementOffers(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, placementId: string, request?: KardApi.users.GetOffersByPlacementRequest, requestOptions?: RewardsClient.RequestOptions): core.HttpResponsePromise<KardApi.users.OffersResponseObject>;
58
58
  private __placementOffers;
59
+ /**
60
+ * Retrieve batches for a batch-activation placement. Returns each slot in slot
61
+ * order with its current offer set, alias, and freshness fields (`isActive`,
62
+ * `lastActivatedAt`, `expiresAt`). Applies the same per-user eligibility and
63
+ * per-slot content-strategy filter as Get Offers By Placement, independently
64
+ * per slot. A slot only flips to `isActive: false` when its refresh interval
65
+ * has elapsed AND its post-eligibility `offers[]` is non-empty; otherwise the
66
+ * slot is still returned and stays active so the partner UI does not promote
67
+ * "refresh" with nothing to show.<br/>
68
+ * <b>Required scopes:</b> `rewards:read`
69
+ *
70
+ * @param {KardApi.OrganizationId} organizationId
71
+ * @param {KardApi.UserId} userId
72
+ * @param {string} placementId
73
+ * @param {KardApi.users.GetBatchesByPlacementRequest} request
74
+ * @param {RewardsClient.RequestOptions} requestOptions - Request-specific configuration.
75
+ *
76
+ * @throws {@link KardApi.InternalServerError}
77
+ * @throws {@link KardApi.InvalidRequest}
78
+ * @throws {@link KardApi.DoesNotExistError}
79
+ * @throws {@link KardApi.UnauthorizedError}
80
+ *
81
+ * @example
82
+ * await client.users.rewards.placementBatches("organizationId", "userId", "placementId")
83
+ */
84
+ placementBatches(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, placementId: string, request?: KardApi.users.GetBatchesByPlacementRequest, requestOptions?: RewardsClient.RequestOptions): core.HttpResponsePromise<KardApi.users.BatchesResponseObject>;
85
+ private __placementBatches;
59
86
  /**
60
87
  * Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
61
88
  * out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
@@ -214,6 +214,82 @@ class RewardsClient {
214
214
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/placements/{placementId}/offers");
215
215
  });
216
216
  }
217
+ /**
218
+ * Retrieve batches for a batch-activation placement. Returns each slot in slot
219
+ * order with its current offer set, alias, and freshness fields (`isActive`,
220
+ * `lastActivatedAt`, `expiresAt`). Applies the same per-user eligibility and
221
+ * per-slot content-strategy filter as Get Offers By Placement, independently
222
+ * per slot. A slot only flips to `isActive: false` when its refresh interval
223
+ * has elapsed AND its post-eligibility `offers[]` is non-empty; otherwise the
224
+ * slot is still returned and stays active so the partner UI does not promote
225
+ * "refresh" with nothing to show.<br/>
226
+ * <b>Required scopes:</b> `rewards:read`
227
+ *
228
+ * @param {KardApi.OrganizationId} organizationId
229
+ * @param {KardApi.UserId} userId
230
+ * @param {string} placementId
231
+ * @param {KardApi.users.GetBatchesByPlacementRequest} request
232
+ * @param {RewardsClient.RequestOptions} requestOptions - Request-specific configuration.
233
+ *
234
+ * @throws {@link KardApi.InternalServerError}
235
+ * @throws {@link KardApi.InvalidRequest}
236
+ * @throws {@link KardApi.DoesNotExistError}
237
+ * @throws {@link KardApi.UnauthorizedError}
238
+ *
239
+ * @example
240
+ * await client.users.rewards.placementBatches("organizationId", "userId", "placementId")
241
+ */
242
+ placementBatches(organizationId, userId, placementId, request = {}, requestOptions) {
243
+ return core.HttpResponsePromise.fromPromise(this.__placementBatches(organizationId, userId, placementId, request, requestOptions));
244
+ }
245
+ __placementBatches(organizationId_1, userId_1, placementId_1) {
246
+ return __awaiter(this, arguments, void 0, function* (organizationId, userId, placementId, request = {}, requestOptions) {
247
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
248
+ const { supportedComponents } = request;
249
+ const _queryParams = {
250
+ supportedComponents: Array.isArray(supportedComponents)
251
+ ? supportedComponents.map((item) => item)
252
+ : supportedComponents != null
253
+ ? supportedComponents
254
+ : undefined,
255
+ };
256
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
257
+ 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);
258
+ const _response = yield core.fetcher({
259
+ 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)}/placements/${core.url.encodePathParam(placementId)}/batches`),
260
+ method: "GET",
261
+ headers: _headers,
262
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
263
+ 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,
264
+ 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,
265
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
266
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
267
+ logging: this._options.logging,
268
+ });
269
+ if (_response.ok) {
270
+ return { data: _response.body, rawResponse: _response.rawResponse };
271
+ }
272
+ if (_response.error.reason === "status-code") {
273
+ switch (_response.error.statusCode) {
274
+ case 500:
275
+ throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
276
+ case 400:
277
+ throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
278
+ case 404:
279
+ throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
280
+ case 401:
281
+ throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
282
+ default:
283
+ throw new errors.KardApiError({
284
+ statusCode: _response.error.statusCode,
285
+ body: _response.error.body,
286
+ rawResponse: _response.rawResponse,
287
+ });
288
+ }
289
+ }
290
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/placements/{placementId}/batches");
291
+ });
292
+ }
217
293
  /**
218
294
  * Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
219
295
  * out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
@@ -0,0 +1,9 @@
1
+ import type * as KardApi from "../../../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface GetBatchesByPlacementRequest {
7
+ /** UI component types to include in the response. */
8
+ supportedComponents?: KardApi.users.ComponentType | KardApi.users.ComponentType[];
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 });
@@ -1,3 +1,4 @@
1
+ export type { GetBatchesByPlacementRequest } from "./GetBatchesByPlacementRequest.js";
1
2
  export type { GetLocationsByUserRequest } from "./GetLocationsByUserRequest.js";
2
3
  export type { GetOffersByPlacementRequest } from "./GetOffersByPlacementRequest.js";
3
4
  export type { GetOffersByUserRequest } from "./GetOffersByUserRequest.js";
@@ -0,0 +1,18 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * One slot in a batch-activation placement, with freshness fields and the offers that resolve under the slot's content strategy.
4
+ */
5
+ export interface BatchSlotData {
6
+ /** Stable identifier for the slot within the placement */
7
+ slotId: string;
8
+ /** Customer-defined alias for the slot, unique within the placement */
9
+ alias: string;
10
+ /** Whether the slot is still considered "fresh" for the user. Set to false only when the slot's `expiresAt` is in the past AND the slot resolves to a non-empty offer set; an empty offer set keeps the slot active so partner UIs do not promote "tap to refresh" with nothing to show. */
11
+ isActive: boolean;
12
+ /** Timestamp of the most recent placementSlotAttribution ACTIVATE event for this (user, placement, slot). Absent for cold slots that have never been activated. */
13
+ lastActivatedAt?: string | undefined;
14
+ /** Computed as `lastActivatedAt + placement.refreshInterval`. Absent for cold slots that have never been activated. */
15
+ expiresAt?: string | undefined;
16
+ /** The set of offers eligible for the user under this slot's content strategy. */
17
+ offers: KardApi.users.OfferDataUnion[];
18
+ }
@@ -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,7 @@
1
+ import type * as KardApi from "../../../../../index.js";
2
+ /**
3
+ * Ordered list of slots for a batch-activation placement, with freshness fields and per-slot offer sets.
4
+ */
5
+ export interface BatchesResponseObject {
6
+ data: KardApi.users.BatchSlotData[];
7
+ }
@@ -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,6 +1,8 @@
1
1
  export * from "./Amount.js";
2
2
  export * from "./AmountType.js";
3
3
  export * from "./Asset.js";
4
+ export * from "./BatchesResponseObject.js";
5
+ export * from "./BatchSlotData.js";
4
6
  export * from "./ButtonStyle.js";
5
7
  export * from "./CategoryData.js";
6
8
  export * from "./CategoryFields.js";
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Amount.js"), exports);
18
18
  __exportStar(require("./AmountType.js"), exports);
19
19
  __exportStar(require("./Asset.js"), exports);
20
+ __exportStar(require("./BatchesResponseObject.js"), exports);
21
+ __exportStar(require("./BatchSlotData.js"), exports);
20
22
  __exportStar(require("./ButtonStyle.js"), exports);
21
23
  __exportStar(require("./CategoryData.js"), exports);
22
24
  __exportStar(require("./CategoryFields.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "22.1.0";
1
+ export declare const SDK_VERSION = "22.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 = "22.1.0";
4
+ exports.SDK_VERSION = "22.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": "22.1.0",
10
- "User-Agent": "@kard-financial/sdk/22.1.0",
9
+ "X-Fern-SDK-Version": "22.3.0",
10
+ "User-Agent": "@kard-financial/sdk/22.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);
@@ -0,0 +1,14 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Attributes for a batch-activation placement
4
+ */
5
+ export interface BatchActivationPlacementAttributes {
6
+ /** Name of the placement */
7
+ name: string;
8
+ /** ID of the organization this placement belongs to */
9
+ organizationId: string;
10
+ /** ISO-8601 duration that controls how often the activation cohort refreshes (e.g. "P7D" for weekly). */
11
+ refreshInterval: string;
12
+ /** Slots that make up the activation cohort */
13
+ slots: KardApi.organizations.BatchActivationSlot[];
14
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Batch-activation placement resource data
4
+ */
5
+ export interface BatchActivationPlacementData {
6
+ /** Unique identifier of the placement (UUID v7) */
7
+ id: string;
8
+ attributes: KardApi.organizations.BatchActivationPlacementAttributes;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A slot within a batch-activation placement
3
+ */
4
+ export interface BatchActivationSlot {
5
+ /** Stable identifier for the slot within the placement */
6
+ slotId: string;
7
+ /** ID of the content strategy linked to this slot */
8
+ contentStrategyId: string;
9
+ /** Customer-defined alias for the slot, unique within the placement */
10
+ alias: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,22 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Attributes for creating a batch-activation placement
4
+ *
5
+ * @example
6
+ * {
7
+ * name: "Weekly Cohort",
8
+ * refreshInterval: "P7D",
9
+ * slots: [{
10
+ * contentStrategyId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
11
+ * alias: "primary"
12
+ * }]
13
+ * }
14
+ */
15
+ export interface CreateBatchActivationAttributes {
16
+ /** Name of the placement */
17
+ name: string;
18
+ /** ISO-8601 duration controlling how often the activation cohort refreshes */
19
+ refreshInterval: string;
20
+ /** Slots that make up the activation cohort */
21
+ slots: KardApi.organizations.CreateBatchActivationSlot[];
22
+ }