@kard-financial/sdk 28.2.0 → 29.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 (142) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/organizations/resources/placements/client/Client.d.ts +51 -4
  3. package/dist/cjs/api/resources/organizations/resources/placements/client/Client.js +51 -4
  4. package/dist/cjs/api/resources/organizations/resources/placements/client/requests/GetPlacementRequest.d.ts +1 -1
  5. package/dist/cjs/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.ts +2 -2
  6. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.d.ts +1 -1
  7. package/dist/cjs/api/resources/organizations/resources/placements/types/Cadence.d.ts +1 -1
  8. package/dist/cjs/api/resources/organizations/resources/placements/types/CadenceFrequency.d.ts +1 -1
  9. package/dist/cjs/api/resources/organizations/resources/placements/types/CadenceFrequency.js +1 -1
  10. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.d.ts +1 -1
  11. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateEmailAttributes.d.ts +25 -0
  12. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateEmailPlacementData.d.ts +8 -0
  13. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateGroupAttributes.d.ts +20 -0
  14. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateGroupPlacementData.d.ts +8 -0
  15. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.ts +9 -3
  16. package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.ts +48 -1
  17. package/dist/{esm/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.mts → cjs/api/resources/organizations/resources/placements/types/CreateStandardAttributes.d.ts} +2 -2
  18. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateStandardPlacementData.d.ts +8 -0
  19. package/dist/cjs/api/resources/organizations/resources/placements/types/EmailPlacementAttributes.d.ts +16 -0
  20. package/dist/cjs/api/resources/organizations/resources/placements/types/{MainPagePlacementData.d.ts → EmailPlacementData.d.ts} +3 -3
  21. package/dist/cjs/api/resources/organizations/resources/placements/types/EmailPlacementData.js +3 -0
  22. package/dist/cjs/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.d.ts +9 -0
  23. package/dist/cjs/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.js +3 -0
  24. package/dist/cjs/api/resources/organizations/resources/placements/types/GroupPlacementData.d.ts +11 -0
  25. package/dist/cjs/api/resources/organizations/resources/placements/types/GroupPlacementData.js +3 -0
  26. package/dist/cjs/api/resources/organizations/resources/placements/types/IncludedResource.d.ts +6 -3
  27. package/dist/{esm/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.mts → cjs/api/resources/organizations/resources/placements/types/PlacementAttributes.d.ts} +2 -2
  28. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementAttributes.js +3 -0
  29. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementData.d.ts +11 -0
  30. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementData.js +3 -0
  31. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.ts +44 -4
  32. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementListResponse.d.ts +1 -1
  33. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementResource.d.ts +1 -1
  34. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementTypeFilter.d.ts +3 -1
  35. package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementTypeFilter.js +3 -1
  36. package/dist/cjs/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.d.ts +8 -0
  37. package/dist/cjs/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.js +3 -0
  38. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.d.ts +1 -1
  39. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.d.ts +25 -0
  40. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.js +3 -0
  41. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.d.ts +8 -0
  42. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.js +3 -0
  43. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.d.ts +21 -0
  44. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.js +3 -0
  45. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.d.ts +8 -0
  46. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.js +3 -0
  47. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.ts +9 -3
  48. package/dist/cjs/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.d.ts → UpdateStandardAttributes.d.ts} +2 -2
  49. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateStandardAttributes.js +3 -0
  50. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.d.ts +8 -0
  51. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.js +3 -0
  52. package/dist/cjs/api/resources/organizations/resources/placements/types/index.d.ts +19 -7
  53. package/dist/cjs/api/resources/organizations/resources/placements/types/index.js +19 -7
  54. package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +12 -8
  55. package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +12 -8
  56. package/dist/cjs/api/resources/users/resources/rewards/types/BatchesResponseObject.d.ts +1 -1
  57. package/dist/cjs/api/resources/users/resources/rewards/types/PlacementBatchAttributes.d.ts +2 -2
  58. package/dist/cjs/api/resources/users/resources/rewards/types/PlacementBatchData.d.ts +1 -1
  59. package/dist/cjs/version.d.ts +1 -1
  60. package/dist/cjs/version.js +1 -1
  61. package/dist/esm/BaseClient.mjs +2 -2
  62. package/dist/esm/api/resources/organizations/resources/placements/client/Client.d.mts +51 -4
  63. package/dist/esm/api/resources/organizations/resources/placements/client/Client.mjs +51 -4
  64. package/dist/esm/api/resources/organizations/resources/placements/client/requests/GetPlacementRequest.d.mts +1 -1
  65. package/dist/esm/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.mts +2 -2
  66. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.d.mts +1 -1
  67. package/dist/esm/api/resources/organizations/resources/placements/types/Cadence.d.mts +1 -1
  68. package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.d.mts +1 -1
  69. package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.mjs +1 -1
  70. package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.d.mts +1 -1
  71. package/dist/esm/api/resources/organizations/resources/placements/types/CreateEmailAttributes.d.mts +25 -0
  72. package/dist/esm/api/resources/organizations/resources/placements/types/CreateEmailPlacementData.d.mts +8 -0
  73. package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupAttributes.d.mts +20 -0
  74. package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupPlacementData.d.mts +8 -0
  75. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.mts +9 -3
  76. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.mts +48 -1
  77. package/dist/{cjs/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.ts → esm/api/resources/organizations/resources/placements/types/CreateStandardAttributes.d.mts} +2 -2
  78. package/dist/esm/api/resources/organizations/resources/placements/types/CreateStandardPlacementData.d.mts +8 -0
  79. package/dist/esm/api/resources/organizations/resources/placements/types/EmailPlacementAttributes.d.mts +16 -0
  80. package/dist/esm/api/resources/organizations/resources/placements/types/{MainPagePlacementData.d.mts → EmailPlacementData.d.mts} +3 -3
  81. package/dist/esm/api/resources/organizations/resources/placements/types/EmailPlacementData.mjs +2 -0
  82. package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.d.mts +9 -0
  83. package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.mjs +2 -0
  84. package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementData.d.mts +11 -0
  85. package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementData.mjs +2 -0
  86. package/dist/esm/api/resources/organizations/resources/placements/types/IncludedResource.d.mts +6 -3
  87. package/dist/{cjs/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.ts → esm/api/resources/organizations/resources/placements/types/PlacementAttributes.d.mts} +2 -2
  88. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementAttributes.mjs +2 -0
  89. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementData.d.mts +11 -0
  90. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementData.mjs +2 -0
  91. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.mts +44 -4
  92. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementListResponse.d.mts +1 -1
  93. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementResource.d.mts +1 -1
  94. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementTypeFilter.d.mts +3 -1
  95. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementTypeFilter.mjs +3 -1
  96. package/dist/esm/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.d.mts +8 -0
  97. package/dist/esm/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.mjs +2 -0
  98. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.d.mts +1 -1
  99. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.d.mts +25 -0
  100. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.mjs +2 -0
  101. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.d.mts +8 -0
  102. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.mjs +2 -0
  103. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.d.mts +21 -0
  104. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.mjs +2 -0
  105. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.d.mts +8 -0
  106. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.mjs +2 -0
  107. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.mts +9 -3
  108. package/dist/esm/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.d.mts → UpdateStandardAttributes.d.mts} +2 -2
  109. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardAttributes.mjs +2 -0
  110. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.d.mts +8 -0
  111. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.mjs +2 -0
  112. package/dist/esm/api/resources/organizations/resources/placements/types/index.d.mts +19 -7
  113. package/dist/esm/api/resources/organizations/resources/placements/types/index.mjs +19 -7
  114. package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +12 -8
  115. package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +12 -8
  116. package/dist/esm/api/resources/users/resources/rewards/types/BatchesResponseObject.d.mts +1 -1
  117. package/dist/esm/api/resources/users/resources/rewards/types/PlacementBatchAttributes.d.mts +2 -2
  118. package/dist/esm/api/resources/users/resources/rewards/types/PlacementBatchData.d.mts +1 -1
  119. package/dist/esm/version.d.mts +1 -1
  120. package/dist/esm/version.mjs +1 -1
  121. package/package.json +1 -1
  122. package/reference.md +16 -12
  123. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementRelationships.d.ts +0 -8
  124. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.ts +0 -8
  125. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.ts +0 -8
  126. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementRelationships.d.mts +0 -8
  127. package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.mts +0 -8
  128. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.mts +0 -8
  129. /package/dist/cjs/api/resources/organizations/resources/placements/types/{BatchActivationPlacementRelationships.js → CreateEmailAttributes.js} +0 -0
  130. /package/dist/cjs/api/resources/organizations/resources/placements/types/{CreateMainPageAttributes.js → CreateEmailPlacementData.js} +0 -0
  131. /package/dist/cjs/api/resources/organizations/resources/placements/types/{CreateMainPagePlacementData.js → CreateGroupAttributes.js} +0 -0
  132. /package/dist/cjs/api/resources/organizations/resources/placements/types/{MainPagePlacementAttributes.js → CreateGroupPlacementData.js} +0 -0
  133. /package/dist/cjs/api/resources/organizations/resources/placements/types/{MainPagePlacementData.js → CreateStandardAttributes.js} +0 -0
  134. /package/dist/cjs/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.js → CreateStandardPlacementData.js} +0 -0
  135. /package/dist/cjs/api/resources/organizations/resources/placements/types/{UpdateMainPagePlacementData.js → EmailPlacementAttributes.js} +0 -0
  136. /package/dist/esm/api/resources/organizations/resources/placements/types/{BatchActivationPlacementRelationships.mjs → CreateEmailAttributes.mjs} +0 -0
  137. /package/dist/esm/api/resources/organizations/resources/placements/types/{CreateMainPageAttributes.mjs → CreateEmailPlacementData.mjs} +0 -0
  138. /package/dist/esm/api/resources/organizations/resources/placements/types/{CreateMainPagePlacementData.mjs → CreateGroupAttributes.mjs} +0 -0
  139. /package/dist/esm/api/resources/organizations/resources/placements/types/{MainPagePlacementAttributes.mjs → CreateGroupPlacementData.mjs} +0 -0
  140. /package/dist/esm/api/resources/organizations/resources/placements/types/{MainPagePlacementData.mjs → CreateStandardAttributes.mjs} +0 -0
  141. /package/dist/esm/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.mjs → CreateStandardPlacementData.mjs} +0 -0
  142. /package/dist/esm/api/resources/organizations/resources/placements/types/{UpdateMainPagePlacementData.mjs → EmailPlacementAttributes.mjs} +0 -0
@@ -20,7 +20,7 @@ export class PlacementsClient {
20
20
  this._options = normalizeClientOptionsWithAuth(options);
21
21
  }
22
22
  /**
23
- * Create a placement for the organization. Use type "placementMainPage" for main-page placements (requires name and availableSlots) or "placementPushNotification" for push-notification placements (requires name and cadence; availableSlots is automatically set to 1).
23
+ * Create a placement for the organization. Use type "placement" for standard placements (requires name and availableSlots), "placementPushNotification" for push-notification placements (requires name and cadence; availableSlots is automatically set to 1), "placementEmail" for email placements (requires name, cadence, and availableSlots), "placementBatchActivation" for batch-activation placements (requires name, refreshInterval, and slots), or "placementGroup" for group placements (requires name and slots).
24
24
  *
25
25
  * @param {string} organizationId - Unique identifier of the organization
26
26
  * @param {KardApi.organizations.CreatePlacementRequestBody} request
@@ -35,7 +35,7 @@ export class PlacementsClient {
35
35
  * @example
36
36
  * await client.organizations.placements.create("org-123", {
37
37
  * data: {
38
- * type: "placementMainPage",
38
+ * type: "placement",
39
39
  * attributes: {
40
40
  * name: "Homepage Banner",
41
41
  * availableSlots: 5
@@ -56,6 +56,53 @@ export class PlacementsClient {
56
56
  * }
57
57
  * }
58
58
  * })
59
+ *
60
+ * @example
61
+ * await client.organizations.placements.create("org-123", {
62
+ * data: {
63
+ * type: "placementEmail",
64
+ * attributes: {
65
+ * name: "Weekly Deals Email",
66
+ * availableSlots: 10,
67
+ * cadence: {
68
+ * frequency: "WEEKLY",
69
+ * timeOfDay: "10:00",
70
+ * dayOfWeek: "MON"
71
+ * }
72
+ * }
73
+ * }
74
+ * })
75
+ *
76
+ * @example
77
+ * await client.organizations.placements.create("org-123", {
78
+ * data: {
79
+ * type: "placementBatchActivation",
80
+ * attributes: {
81
+ * name: "Weekly Cohort",
82
+ * refreshInterval: "P7D",
83
+ * slots: [{
84
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
85
+ * alias: "primary",
86
+ * shortDescription: "Featured deals refreshed each week"
87
+ * }]
88
+ * }
89
+ * }
90
+ * })
91
+ *
92
+ * @example
93
+ * await client.organizations.placements.create("org-123", {
94
+ * data: {
95
+ * type: "placementGroup",
96
+ * attributes: {
97
+ * name: "Seasonal Collection",
98
+ * slots: [{
99
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
100
+ * alias: "primary",
101
+ * shortDescription: "Seasonal picks"
102
+ * }]
103
+ * }
104
+ * }
105
+ * })
59
106
  */
60
107
  create(organizationId, request, requestOptions) {
61
108
  return core.HttpResponsePromise.fromPromise(this.__create(organizationId, request, requestOptions));
@@ -248,7 +295,7 @@ export class PlacementsClient {
248
295
  });
249
296
  }
250
297
  /**
251
- * Replace a placement. All fields must be provided. Use type "placementMainPage" or "placementPushNotification" to set the placement kind. If the type is "placementPushNotification", availableSlots is automatically set to 1.
298
+ * Replace a placement. All fields must be provided. Use type "placement", "placementPushNotification", "placementEmail", "placementBatchActivation", or "placementGroup" to set the placement kind. If the type is "placementPushNotification", availableSlots is automatically set to 1.
252
299
  *
253
300
  * @param {string} organizationId - Unique identifier of the organization
254
301
  * @param {string} placementId - Unique identifier of the placement (UUID v7)
@@ -264,7 +311,7 @@ export class PlacementsClient {
264
311
  * @example
265
312
  * await client.organizations.placements.update("organizationId", "placementId", {
266
313
  * data: {
267
- * type: "placementMainPage",
314
+ * type: "placement",
268
315
  * attributes: {
269
316
  * name: "name",
270
317
  * availableSlots: 1
@@ -3,6 +3,6 @@
3
3
  * {}
4
4
  */
5
5
  export interface GetPlacementRequest {
6
- /** CSV list of related resources to embed in the `included` array. Supported paths: `contentStrategy` (the direct content strategy of a non-batch placement), `slots` (the slot resources of a batch-activation placement), `slots.placement` (and the placement each slot references), and `slots.placement.contentStrategy` (and the content strategy of each referenced placement). Dotted paths implicitly include all intermediate resources. */
6
+ /** CSV list of related resources to embed in the `included` array. Supported paths: `contentStrategy` (the direct content strategy of a non-batch placement), `slots` (the slot resources of a batch-activation or group placement), `slots.placement` (and the placement each slot references), and `slots.placement.contentStrategy` (and the content strategy of each referenced placement). Dotted paths implicitly include all intermediate resources. */
7
7
  include?: string;
8
8
  }
@@ -4,13 +4,13 @@ import type * as KardApi from "../../../../../../index.mjs";
4
4
  * {}
5
5
  */
6
6
  export interface ListPlacementsRequest {
7
- /** Filter by placement type (placementMainPage or placementPushNotification) */
7
+ /** Filter by placement type (placement, placementPushNotification, placementEmail, placementBatchActivation, or placementGroup) */
8
8
  "filter[type]"?: KardApi.organizations.PlacementTypeFilter;
9
9
  /** Filter by exact placement name (unique within an organization per type) */
10
10
  "filter[name]"?: string;
11
11
  /** Filter by the ID of the content strategy linked to the placement */
12
12
  "filter[contentStrategyId]"?: string;
13
- /** CSV list of related resources to embed in the `included` array. Supported paths: `contentStrategy` (the direct content strategy of a non-batch placement), `slots` (the slot resources of a batch-activation placement), `slots.placement` (and the placement each slot references), and `slots.placement.contentStrategy` (and the content strategy of each referenced placement). Dotted paths implicitly include all intermediate resources. */
13
+ /** CSV list of related resources to embed in the `included` array. Supported paths: `contentStrategy` (the direct content strategy of a non-batch placement), `slots` (the slot resources of a batch-activation or group placement), `slots.placement` (and the placement each slot references), and `slots.placement.contentStrategy` (and the content strategy of each referenced placement). Dotted paths implicitly include all intermediate resources. */
14
14
  include?: string;
15
15
  /** Cursor value for the next page of results */
16
16
  "page[after]"?: string;
@@ -7,5 +7,5 @@ export interface BatchActivationPlacementData {
7
7
  id: string;
8
8
  attributes: KardApi.organizations.BatchActivationPlacementAttributes;
9
9
  /** JSON:API relationships for the placement. Always present on a batch-activation placement; the `slots` to-many relationship lists the slot resource identifiers. */
10
- relationships: KardApi.organizations.BatchActivationPlacementRelationships;
10
+ relationships: KardApi.organizations.SlottedPlacementRelationships;
11
11
  }
@@ -1,6 +1,6 @@
1
1
  import type * as KardApi from "../../../../../index.mjs";
2
2
  /**
3
- * Cadence schedule for push notification placements
3
+ * Cadence schedule for push notification and email placements
4
4
  */
5
5
  export interface Cadence {
6
6
  /** Delivery frequency */
@@ -1,4 +1,4 @@
1
- /** How often a push notification placement delivers */
1
+ /** How often a push notification or email placement delivers */
2
2
  export declare const CadenceFrequency: {
3
3
  readonly Daily: "DAILY";
4
4
  readonly Weekly: "WEEKLY";
@@ -1,5 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** How often a push notification placement delivers */
2
+ /** How often a push notification or email placement delivers */
3
3
  export const CadenceFrequency = {
4
4
  Daily: "DAILY",
5
5
  Weekly: "WEEKLY",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A slot in a batch-activation placement at creation time
2
+ * A slot in a batch-activation or group placement at creation time
3
3
  */
4
4
  export interface CreateBatchActivationSlot {
5
5
  /** ID of another placement that fills this slot. The referenced placement provides both the content strategy and the limit on the number of offers available to the slot. */
@@ -0,0 +1,25 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Attributes for creating an email placement
4
+ *
5
+ * @example
6
+ * {
7
+ * name: "Weekly Deals Email",
8
+ * availableSlots: 10,
9
+ * cadence: {
10
+ * frequency: KardApi.organizations.CadenceFrequency.Weekly,
11
+ * timeOfDay: "10:00",
12
+ * dayOfWeek: KardApi.organizations.DayOfWeek.Mon
13
+ * }
14
+ * }
15
+ */
16
+ export interface CreateEmailAttributes {
17
+ /** Name of the placement */
18
+ name: string;
19
+ /** Number of available slots (minimum 1) */
20
+ availableSlots: number;
21
+ /** Delivery cadence for the email */
22
+ cadence: KardApi.organizations.Cadence;
23
+ /** ID of the content strategy to link this placement to */
24
+ contentStrategyId?: string | undefined;
25
+ }
@@ -0,0 +1,8 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Data for creating an email placement
4
+ */
5
+ export interface CreateEmailPlacementData {
6
+ /** Email placement attributes for creation */
7
+ attributes: KardApi.organizations.CreateEmailAttributes;
8
+ }
@@ -0,0 +1,20 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Attributes for creating a group placement
4
+ *
5
+ * @example
6
+ * {
7
+ * name: "Seasonal Collection",
8
+ * slots: [{
9
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
10
+ * alias: "primary",
11
+ * shortDescription: "Seasonal picks"
12
+ * }]
13
+ * }
14
+ */
15
+ export interface CreateGroupAttributes {
16
+ /** Name of the placement */
17
+ name: string;
18
+ /** Slots that make up the group */
19
+ slots: KardApi.organizations.CreateBatchActivationSlot[];
20
+ }
@@ -0,0 +1,8 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Data for creating a group placement
4
+ */
5
+ export interface CreateGroupPlacementData {
6
+ /** Group placement attributes for creation */
7
+ attributes: KardApi.organizations.CreateGroupAttributes;
8
+ }
@@ -2,15 +2,21 @@ import type * as KardApi from "../../../../../index.mjs";
2
2
  /**
3
3
  * Discriminated union for creating a placement
4
4
  */
5
- export type CreatePlacementDataUnion = KardApi.organizations.CreatePlacementDataUnion.PlacementMainPage | KardApi.organizations.CreatePlacementDataUnion.PlacementPushNotification | KardApi.organizations.CreatePlacementDataUnion.PlacementBatchActivation;
5
+ export type CreatePlacementDataUnion = KardApi.organizations.CreatePlacementDataUnion.Placement | KardApi.organizations.CreatePlacementDataUnion.PlacementPushNotification | KardApi.organizations.CreatePlacementDataUnion.PlacementEmail | KardApi.organizations.CreatePlacementDataUnion.PlacementBatchActivation | KardApi.organizations.CreatePlacementDataUnion.PlacementGroup;
6
6
  export declare namespace CreatePlacementDataUnion {
7
- interface PlacementMainPage extends KardApi.organizations.CreateMainPagePlacementData {
8
- type: "placementMainPage";
7
+ interface Placement extends KardApi.organizations.CreateStandardPlacementData {
8
+ type: "placement";
9
9
  }
10
10
  interface PlacementPushNotification extends KardApi.organizations.CreatePushNotificationPlacementData {
11
11
  type: "placementPushNotification";
12
12
  }
13
+ interface PlacementEmail extends KardApi.organizations.CreateEmailPlacementData {
14
+ type: "placementEmail";
15
+ }
13
16
  interface PlacementBatchActivation extends KardApi.organizations.CreateBatchActivationPlacementData {
14
17
  type: "placementBatchActivation";
15
18
  }
19
+ interface PlacementGroup extends KardApi.organizations.CreateGroupPlacementData {
20
+ type: "placementGroup";
21
+ }
16
22
  }
@@ -5,7 +5,7 @@ import type * as KardApi from "../../../../../index.mjs";
5
5
  * @example
6
6
  * {
7
7
  * data: {
8
- * type: "placementMainPage",
8
+ * type: "placement",
9
9
  * attributes: {
10
10
  * name: "Homepage Banner",
11
11
  * availableSlots: 5
@@ -26,6 +26,53 @@ import type * as KardApi from "../../../../../index.mjs";
26
26
  * }
27
27
  * }
28
28
  * }
29
+ *
30
+ * @example
31
+ * {
32
+ * data: {
33
+ * type: "placementEmail",
34
+ * attributes: {
35
+ * name: "Weekly Deals Email",
36
+ * availableSlots: 10,
37
+ * cadence: {
38
+ * frequency: KardApi.organizations.CadenceFrequency.Weekly,
39
+ * timeOfDay: "10:00",
40
+ * dayOfWeek: KardApi.organizations.DayOfWeek.Mon
41
+ * }
42
+ * }
43
+ * }
44
+ * }
45
+ *
46
+ * @example
47
+ * {
48
+ * data: {
49
+ * type: "placementBatchActivation",
50
+ * attributes: {
51
+ * name: "Weekly Cohort",
52
+ * refreshInterval: "P7D",
53
+ * slots: [{
54
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
55
+ * alias: "primary",
56
+ * shortDescription: "Featured deals refreshed each week"
57
+ * }]
58
+ * }
59
+ * }
60
+ * }
61
+ *
62
+ * @example
63
+ * {
64
+ * data: {
65
+ * type: "placementGroup",
66
+ * attributes: {
67
+ * name: "Seasonal Collection",
68
+ * slots: [{
69
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
70
+ * alias: "primary",
71
+ * shortDescription: "Seasonal picks"
72
+ * }]
73
+ * }
74
+ * }
75
+ * }
29
76
  */
30
77
  export interface CreatePlacementRequestBody {
31
78
  /** Placement data for creation */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Attributes for creating a main-page placement
2
+ * Attributes for creating a standard placement
3
3
  *
4
4
  * @example
5
5
  * {
@@ -7,7 +7,7 @@
7
7
  * availableSlots: 5
8
8
  * }
9
9
  */
10
- export interface CreateMainPageAttributes {
10
+ export interface CreateStandardAttributes {
11
11
  /** Name of the placement */
12
12
  name: string;
13
13
  /** Number of available slots (minimum 1) */
@@ -0,0 +1,8 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Data for creating a standard placement
4
+ */
5
+ export interface CreateStandardPlacementData {
6
+ /** Standard placement attributes for creation */
7
+ attributes: KardApi.organizations.CreateStandardAttributes;
8
+ }
@@ -0,0 +1,16 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Attributes for an email placement
4
+ */
5
+ export interface EmailPlacementAttributes {
6
+ /** Name of the placement */
7
+ name: string;
8
+ /** ID of the organization this placement belongs to */
9
+ organizationId: string;
10
+ /** Number of available slots */
11
+ availableSlots: number;
12
+ /** Delivery cadence for the email */
13
+ cadence: KardApi.organizations.Cadence;
14
+ /** ID of the content strategy linked to this placement, if any. Retained alongside `relationships.contentStrategy` for backward compatibility. */
15
+ contentStrategyId?: string | undefined;
16
+ }
@@ -1,11 +1,11 @@
1
1
  import type * as KardApi from "../../../../../index.mjs";
2
2
  /**
3
- * Main-page placement resource data
3
+ * Email placement resource data
4
4
  */
5
- export interface MainPagePlacementData {
5
+ export interface EmailPlacementData {
6
6
  /** Unique identifier of the placement (UUID v7) */
7
7
  id: string;
8
- attributes: KardApi.organizations.MainPagePlacementAttributes;
8
+ attributes: KardApi.organizations.EmailPlacementAttributes;
9
9
  /** JSON:API relationships for the placement. Omitted entirely when the placement has no linked resources. */
10
10
  relationships?: KardApi.organizations.PlacementRelationships | undefined;
11
11
  }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Attributes for a group placement. A group is configured like a batch-activation placement but has no refreshInterval. Slot detail is exposed via `relationships.slots` (resource identifiers) and the `batchActivationSlot` entries in `included`; request `?include=slots` (or a deeper path) to get the slot details.
3
+ */
4
+ export interface GroupPlacementAttributes {
5
+ /** Name of the placement */
6
+ name: string;
7
+ /** ID of the organization this placement belongs to */
8
+ organizationId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Group placement resource data
4
+ */
5
+ export interface GroupPlacementData {
6
+ /** Unique identifier of the placement (UUID v7) */
7
+ id: string;
8
+ attributes: KardApi.organizations.GroupPlacementAttributes;
9
+ /** JSON:API relationships for the placement. Always present on a group placement; the `slots` to-many relationship lists the slot resource identifiers. */
10
+ relationships: KardApi.organizations.SlottedPlacementRelationships;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -2,7 +2,7 @@ import type * as KardApi from "../../../../../index.mjs";
2
2
  /**
3
3
  * Discriminated union of every resource type that can appear in the `included` array. The shape of each branch matches the corresponding primary-data resource (same attributes and relationships), keyed on the JSON:API `type` discriminant.
4
4
  */
5
- export type IncludedResource = KardApi.organizations.IncludedResource.ContentStrategy | KardApi.organizations.IncludedResource.BatchActivationSlot | KardApi.organizations.IncludedResource.PlacementMainPage | KardApi.organizations.IncludedResource.PlacementPushNotification;
5
+ export type IncludedResource = KardApi.organizations.IncludedResource.ContentStrategy | KardApi.organizations.IncludedResource.BatchActivationSlot | KardApi.organizations.IncludedResource.Placement | KardApi.organizations.IncludedResource.PlacementPushNotification | KardApi.organizations.IncludedResource.PlacementEmail;
6
6
  export declare namespace IncludedResource {
7
7
  interface ContentStrategy extends KardApi.organizations.ContentStrategyInclusion {
8
8
  type: "contentStrategy";
@@ -10,10 +10,13 @@ export declare namespace IncludedResource {
10
10
  interface BatchActivationSlot extends KardApi.organizations.BatchActivationSlotInclusion {
11
11
  type: "batchActivationSlot";
12
12
  }
13
- interface PlacementMainPage extends KardApi.organizations.MainPagePlacementData {
14
- type: "placementMainPage";
13
+ interface Placement extends KardApi.organizations.PlacementData {
14
+ type: "placement";
15
15
  }
16
16
  interface PlacementPushNotification extends KardApi.organizations.PushNotificationPlacementData {
17
17
  type: "placementPushNotification";
18
18
  }
19
+ interface PlacementEmail extends KardApi.organizations.EmailPlacementData {
20
+ type: "placementEmail";
21
+ }
19
22
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Attributes for a main-page placement
2
+ * Attributes for a standard placement
3
3
  */
4
- export interface MainPagePlacementAttributes {
4
+ export interface PlacementAttributes {
5
5
  /** Name of the placement */
6
6
  name: string;
7
7
  /** ID of the organization this placement belongs to */
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Standard placement resource data
4
+ */
5
+ export interface PlacementData {
6
+ /** Unique identifier of the placement (UUID v7) */
7
+ id: string;
8
+ attributes: KardApi.organizations.PlacementAttributes;
9
+ /** JSON:API relationships for the placement. Omitted entirely when the placement has no linked resources. */
10
+ relationships?: KardApi.organizations.PlacementRelationships | undefined;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -4,7 +4,7 @@ import type * as KardApi from "../../../../../index.mjs";
4
4
  *
5
5
  * @example
6
6
  * {
7
- * type: "placementMainPage",
7
+ * type: "placement",
8
8
  * id: "01961e5a-b74c-7d42-8456-d3a1f2c90e71",
9
9
  * attributes: {
10
10
  * name: "Homepage Banner",
@@ -29,6 +29,22 @@ import type * as KardApi from "../../../../../index.mjs";
29
29
  *
30
30
  * @example
31
31
  * {
32
+ * type: "placementEmail",
33
+ * id: "01961e5a-f37a-7b55-9d6a-2be8d1ac5f78",
34
+ * attributes: {
35
+ * name: "Weekly Deals Email",
36
+ * organizationId: "org-123",
37
+ * availableSlots: 10,
38
+ * cadence: {
39
+ * frequency: KardApi.organizations.CadenceFrequency.Weekly,
40
+ * timeOfDay: "10:00",
41
+ * dayOfWeek: KardApi.organizations.DayOfWeek.Mon
42
+ * }
43
+ * }
44
+ * }
45
+ *
46
+ * @example
47
+ * {
32
48
  * type: "placementBatchActivation",
33
49
  * id: "01961e5a-d94e-7c22-ac3f-f8b5a7e92c45",
34
50
  * attributes: {
@@ -45,16 +61,40 @@ import type * as KardApi from "../../../../../index.mjs";
45
61
  * }
46
62
  * }
47
63
  * }
64
+ *
65
+ * @example
66
+ * {
67
+ * type: "placementGroup",
68
+ * id: "01961e5a-a48b-7e66-8c7b-3cf9e2bd6a89",
69
+ * attributes: {
70
+ * name: "Seasonal Collection",
71
+ * organizationId: "org-123"
72
+ * },
73
+ * relationships: {
74
+ * slots: {
75
+ * data: [{
76
+ * type: "batchActivationSlot",
77
+ * id: "01961e5a-b59c-7f77-9d8c-4d0af3ce7b9a"
78
+ * }]
79
+ * }
80
+ * }
81
+ * }
48
82
  */
49
- export type PlacementFormatUnion = KardApi.organizations.PlacementFormatUnion.PlacementMainPage | KardApi.organizations.PlacementFormatUnion.PlacementPushNotification | KardApi.organizations.PlacementFormatUnion.PlacementBatchActivation;
83
+ export type PlacementFormatUnion = KardApi.organizations.PlacementFormatUnion.Placement | KardApi.organizations.PlacementFormatUnion.PlacementPushNotification | KardApi.organizations.PlacementFormatUnion.PlacementEmail | KardApi.organizations.PlacementFormatUnion.PlacementBatchActivation | KardApi.organizations.PlacementFormatUnion.PlacementGroup;
50
84
  export declare namespace PlacementFormatUnion {
51
- interface PlacementMainPage extends KardApi.organizations.MainPagePlacementData {
52
- type: "placementMainPage";
85
+ interface Placement extends KardApi.organizations.PlacementData {
86
+ type: "placement";
53
87
  }
54
88
  interface PlacementPushNotification extends KardApi.organizations.PushNotificationPlacementData {
55
89
  type: "placementPushNotification";
56
90
  }
91
+ interface PlacementEmail extends KardApi.organizations.EmailPlacementData {
92
+ type: "placementEmail";
93
+ }
57
94
  interface PlacementBatchActivation extends KardApi.organizations.BatchActivationPlacementData {
58
95
  type: "placementBatchActivation";
59
96
  }
97
+ interface PlacementGroup extends KardApi.organizations.GroupPlacementData {
98
+ type: "placementGroup";
99
+ }
60
100
  }
@@ -5,7 +5,7 @@ import type * as KardApi from "../../../../../index.mjs";
5
5
  export interface PlacementListResponse {
6
6
  /** Array of placement resources */
7
7
  data: KardApi.organizations.PlacementFormatUnion[];
8
- /** Related resources requested via the `include` query parameter. Each entry is keyed by its `type` discriminant (`contentStrategy`, `batchActivationSlot`, `placementMainPage`, `placementPushNotification`). */
8
+ /** Related resources requested via the `include` query parameter. Each entry is keyed by its `type` discriminant (`contentStrategy`, `batchActivationSlot`, `placement`, `placementPushNotification`, `placementEmail`). */
9
9
  included?: KardApi.organizations.IncludedResource[] | undefined;
10
10
  links?: KardApi.Links | undefined;
11
11
  /** Pagination metadata */
@@ -5,6 +5,6 @@ import type * as KardApi from "../../../../../index.mjs";
5
5
  export interface PlacementResource {
6
6
  /** Placement resource */
7
7
  data: KardApi.organizations.PlacementFormatUnion;
8
- /** Related resources requested via the `include` query parameter. Each entry is keyed by its `type` discriminant (`contentStrategy`, `batchActivationSlot`, `placementMainPage`, `placementPushNotification`). */
8
+ /** Related resources requested via the `include` query parameter. Each entry is keyed by its `type` discriminant (`contentStrategy`, `batchActivationSlot`, `placement`, `placementPushNotification`, `placementEmail`). */
9
9
  included?: KardApi.organizations.IncludedResource[] | undefined;
10
10
  }
@@ -1,7 +1,9 @@
1
1
  /** Placement type discriminator used as a list filter */
2
2
  export declare const PlacementTypeFilter: {
3
- readonly PlacementMainPage: "placementMainPage";
3
+ readonly Placement: "placement";
4
4
  readonly PlacementPushNotification: "placementPushNotification";
5
+ readonly PlacementEmail: "placementEmail";
5
6
  readonly PlacementBatchActivation: "placementBatchActivation";
7
+ readonly PlacementGroup: "placementGroup";
6
8
  };
7
9
  export type PlacementTypeFilter = (typeof PlacementTypeFilter)[keyof typeof PlacementTypeFilter];
@@ -1,7 +1,9 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  /** Placement type discriminator used as a list filter */
3
3
  export const PlacementTypeFilter = {
4
- PlacementMainPage: "placementMainPage",
4
+ Placement: "placement",
5
5
  PlacementPushNotification: "placementPushNotification",
6
+ PlacementEmail: "placementEmail",
6
7
  PlacementBatchActivation: "placementBatchActivation",
8
+ PlacementGroup: "placementGroup",
7
9
  };
@@ -0,0 +1,8 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Relationship block for a batch-activation or group placement.
4
+ */
5
+ export interface SlottedPlacementRelationships {
6
+ /** Resource identifiers for the slots that make up the placement. Each entry corresponds to a `batchActivationSlot` resource that appears in `included` when the request asks for `slots` (or any deeper path that implies it). */
7
+ slots: KardApi.organizations.ToManyRelationship;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A slot in a batch-activation placement at update time
2
+ * A slot in a batch-activation or group placement at update time
3
3
  */
4
4
  export interface UpdateBatchActivationSlot {
5
5
  /** Existing slot identifier. Echo the value from a prior GET to keep the slot stable; omit to mint a fresh slot. If the placementId changes, the slotId is regenerated regardless of what was echoed. */
@@ -0,0 +1,25 @@
1
+ import type * as KardApi from "../../../../../index.mjs";
2
+ /**
3
+ * Attributes for updating an email placement. All fields are required.
4
+ *
5
+ * @example
6
+ * {
7
+ * name: "Updated Email",
8
+ * availableSlots: 8,
9
+ * cadence: {
10
+ * frequency: KardApi.organizations.CadenceFrequency.Monthly,
11
+ * timeOfDay: "08:00",
12
+ * dayOfMonth: 1
13
+ * }
14
+ * }
15
+ */
16
+ export interface UpdateEmailAttributes {
17
+ /** Name of the placement */
18
+ name: string;
19
+ /** Number of available slots (minimum 1) */
20
+ availableSlots: number;
21
+ /** Delivery cadence for the email */
22
+ cadence: KardApi.organizations.Cadence;
23
+ /** ID of the content strategy to link this placement to. Omit to clear any existing link (PUT requires the full attribute set, so a missing value unlinks the placement). */
24
+ contentStrategyId?: string | undefined;
25
+ }