@kard-financial/sdk 28.2.0 → 29.1.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 (144) 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/transactions/types/TransactionsAttributes.d.ts +2 -0
  55. package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +12 -8
  56. package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +12 -8
  57. package/dist/cjs/api/resources/users/resources/rewards/types/BatchesResponseObject.d.ts +1 -1
  58. package/dist/cjs/api/resources/users/resources/rewards/types/PlacementBatchAttributes.d.ts +2 -2
  59. package/dist/cjs/api/resources/users/resources/rewards/types/PlacementBatchData.d.ts +1 -1
  60. package/dist/cjs/version.d.ts +1 -1
  61. package/dist/cjs/version.js +1 -1
  62. package/dist/esm/BaseClient.mjs +2 -2
  63. package/dist/esm/api/resources/organizations/resources/placements/client/Client.d.mts +51 -4
  64. package/dist/esm/api/resources/organizations/resources/placements/client/Client.mjs +51 -4
  65. package/dist/esm/api/resources/organizations/resources/placements/client/requests/GetPlacementRequest.d.mts +1 -1
  66. package/dist/esm/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.mts +2 -2
  67. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.d.mts +1 -1
  68. package/dist/esm/api/resources/organizations/resources/placements/types/Cadence.d.mts +1 -1
  69. package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.d.mts +1 -1
  70. package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.mjs +1 -1
  71. package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.d.mts +1 -1
  72. package/dist/esm/api/resources/organizations/resources/placements/types/CreateEmailAttributes.d.mts +25 -0
  73. package/dist/esm/api/resources/organizations/resources/placements/types/CreateEmailPlacementData.d.mts +8 -0
  74. package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupAttributes.d.mts +20 -0
  75. package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupPlacementData.d.mts +8 -0
  76. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.mts +9 -3
  77. package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.mts +48 -1
  78. package/dist/{cjs/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.ts → esm/api/resources/organizations/resources/placements/types/CreateStandardAttributes.d.mts} +2 -2
  79. package/dist/esm/api/resources/organizations/resources/placements/types/CreateStandardPlacementData.d.mts +8 -0
  80. package/dist/esm/api/resources/organizations/resources/placements/types/EmailPlacementAttributes.d.mts +16 -0
  81. package/dist/esm/api/resources/organizations/resources/placements/types/{MainPagePlacementData.d.mts → EmailPlacementData.d.mts} +3 -3
  82. package/dist/esm/api/resources/organizations/resources/placements/types/EmailPlacementData.mjs +2 -0
  83. package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.d.mts +9 -0
  84. package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.mjs +2 -0
  85. package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementData.d.mts +11 -0
  86. package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementData.mjs +2 -0
  87. package/dist/esm/api/resources/organizations/resources/placements/types/IncludedResource.d.mts +6 -3
  88. package/dist/{cjs/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.ts → esm/api/resources/organizations/resources/placements/types/PlacementAttributes.d.mts} +2 -2
  89. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementAttributes.mjs +2 -0
  90. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementData.d.mts +11 -0
  91. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementData.mjs +2 -0
  92. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.mts +44 -4
  93. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementListResponse.d.mts +1 -1
  94. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementResource.d.mts +1 -1
  95. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementTypeFilter.d.mts +3 -1
  96. package/dist/esm/api/resources/organizations/resources/placements/types/PlacementTypeFilter.mjs +3 -1
  97. package/dist/esm/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.d.mts +8 -0
  98. package/dist/esm/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.mjs +2 -0
  99. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.d.mts +1 -1
  100. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.d.mts +25 -0
  101. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.mjs +2 -0
  102. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.d.mts +8 -0
  103. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.mjs +2 -0
  104. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.d.mts +21 -0
  105. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.mjs +2 -0
  106. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.d.mts +8 -0
  107. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.mjs +2 -0
  108. package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.mts +9 -3
  109. package/dist/esm/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.d.mts → UpdateStandardAttributes.d.mts} +2 -2
  110. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardAttributes.mjs +2 -0
  111. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.d.mts +8 -0
  112. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.mjs +2 -0
  113. package/dist/esm/api/resources/organizations/resources/placements/types/index.d.mts +19 -7
  114. package/dist/esm/api/resources/organizations/resources/placements/types/index.mjs +19 -7
  115. package/dist/esm/api/resources/transactions/types/TransactionsAttributes.d.mts +2 -0
  116. package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +12 -8
  117. package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +12 -8
  118. package/dist/esm/api/resources/users/resources/rewards/types/BatchesResponseObject.d.mts +1 -1
  119. package/dist/esm/api/resources/users/resources/rewards/types/PlacementBatchAttributes.d.mts +2 -2
  120. package/dist/esm/api/resources/users/resources/rewards/types/PlacementBatchData.d.mts +1 -1
  121. package/dist/esm/version.d.mts +1 -1
  122. package/dist/esm/version.mjs +1 -1
  123. package/package.json +1 -1
  124. package/reference.md +16 -12
  125. package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementRelationships.d.ts +0 -8
  126. package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.ts +0 -8
  127. package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.ts +0 -8
  128. package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementRelationships.d.mts +0 -8
  129. package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.mts +0 -8
  130. package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.mts +0 -8
  131. /package/dist/cjs/api/resources/organizations/resources/placements/types/{BatchActivationPlacementRelationships.js → CreateEmailAttributes.js} +0 -0
  132. /package/dist/cjs/api/resources/organizations/resources/placements/types/{CreateMainPageAttributes.js → CreateEmailPlacementData.js} +0 -0
  133. /package/dist/cjs/api/resources/organizations/resources/placements/types/{CreateMainPagePlacementData.js → CreateGroupAttributes.js} +0 -0
  134. /package/dist/cjs/api/resources/organizations/resources/placements/types/{MainPagePlacementAttributes.js → CreateGroupPlacementData.js} +0 -0
  135. /package/dist/cjs/api/resources/organizations/resources/placements/types/{MainPagePlacementData.js → CreateStandardAttributes.js} +0 -0
  136. /package/dist/cjs/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.js → CreateStandardPlacementData.js} +0 -0
  137. /package/dist/cjs/api/resources/organizations/resources/placements/types/{UpdateMainPagePlacementData.js → EmailPlacementAttributes.js} +0 -0
  138. /package/dist/esm/api/resources/organizations/resources/placements/types/{BatchActivationPlacementRelationships.mjs → CreateEmailAttributes.mjs} +0 -0
  139. /package/dist/esm/api/resources/organizations/resources/placements/types/{CreateMainPageAttributes.mjs → CreateEmailPlacementData.mjs} +0 -0
  140. /package/dist/esm/api/resources/organizations/resources/placements/types/{CreateMainPagePlacementData.mjs → CreateGroupAttributes.mjs} +0 -0
  141. /package/dist/esm/api/resources/organizations/resources/placements/types/{MainPagePlacementAttributes.mjs → CreateGroupPlacementData.mjs} +0 -0
  142. /package/dist/esm/api/resources/organizations/resources/placements/types/{MainPagePlacementData.mjs → CreateStandardAttributes.mjs} +0 -0
  143. /package/dist/esm/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.mjs → CreateStandardPlacementData.mjs} +0 -0
  144. /package/dist/esm/api/resources/organizations/resources/placements/types/{UpdateMainPagePlacementData.mjs → EmailPlacementAttributes.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": "28.2.0",
47
- "User-Agent": "@kard-financial/sdk/28.2.0",
46
+ "X-Fern-SDK-Version": "29.1.0",
47
+ "User-Agent": "@kard-financial/sdk/29.1.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);
@@ -11,7 +11,7 @@ export declare class PlacementsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<PlacementsClient.Options>;
12
12
  constructor(options?: PlacementsClient.Options);
13
13
  /**
14
- * 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).
14
+ * 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).
15
15
  *
16
16
  * @param {string} organizationId - Unique identifier of the organization
17
17
  * @param {KardApi.organizations.CreatePlacementRequestBody} request
@@ -26,7 +26,7 @@ export declare class PlacementsClient {
26
26
  * @example
27
27
  * await client.organizations.placements.create("org-123", {
28
28
  * data: {
29
- * type: "placementMainPage",
29
+ * type: "placement",
30
30
  * attributes: {
31
31
  * name: "Homepage Banner",
32
32
  * availableSlots: 5
@@ -47,6 +47,53 @@ export declare class PlacementsClient {
47
47
  * }
48
48
  * }
49
49
  * })
50
+ *
51
+ * @example
52
+ * await client.organizations.placements.create("org-123", {
53
+ * data: {
54
+ * type: "placementEmail",
55
+ * attributes: {
56
+ * name: "Weekly Deals Email",
57
+ * availableSlots: 10,
58
+ * cadence: {
59
+ * frequency: "WEEKLY",
60
+ * timeOfDay: "10:00",
61
+ * dayOfWeek: "MON"
62
+ * }
63
+ * }
64
+ * }
65
+ * })
66
+ *
67
+ * @example
68
+ * await client.organizations.placements.create("org-123", {
69
+ * data: {
70
+ * type: "placementBatchActivation",
71
+ * attributes: {
72
+ * name: "Weekly Cohort",
73
+ * refreshInterval: "P7D",
74
+ * slots: [{
75
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
76
+ * alias: "primary",
77
+ * shortDescription: "Featured deals refreshed each week"
78
+ * }]
79
+ * }
80
+ * }
81
+ * })
82
+ *
83
+ * @example
84
+ * await client.organizations.placements.create("org-123", {
85
+ * data: {
86
+ * type: "placementGroup",
87
+ * attributes: {
88
+ * name: "Seasonal Collection",
89
+ * slots: [{
90
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
91
+ * alias: "primary",
92
+ * shortDescription: "Seasonal picks"
93
+ * }]
94
+ * }
95
+ * }
96
+ * })
50
97
  */
51
98
  create(organizationId: string, request: KardApi.organizations.CreatePlacementRequestBody, requestOptions?: PlacementsClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.PlacementFormatUnion>;
52
99
  private __create;
@@ -87,7 +134,7 @@ export declare class PlacementsClient {
87
134
  get(organizationId: string, placementId: string, request?: KardApi.organizations.GetPlacementRequest, requestOptions?: PlacementsClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.PlacementResource>;
88
135
  private __get;
89
136
  /**
90
- * 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.
137
+ * 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.
91
138
  *
92
139
  * @param {string} organizationId - Unique identifier of the organization
93
140
  * @param {string} placementId - Unique identifier of the placement (UUID v7)
@@ -103,7 +150,7 @@ export declare class PlacementsClient {
103
150
  * @example
104
151
  * await client.organizations.placements.update("organizationId", "placementId", {
105
152
  * data: {
106
- * type: "placementMainPage",
153
+ * type: "placement",
107
154
  * attributes: {
108
155
  * name: "name",
109
156
  * availableSlots: 1
@@ -56,7 +56,7 @@ class PlacementsClient {
56
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
57
  }
58
58
  /**
59
- * 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).
59
+ * 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).
60
60
  *
61
61
  * @param {string} organizationId - Unique identifier of the organization
62
62
  * @param {KardApi.organizations.CreatePlacementRequestBody} request
@@ -71,7 +71,7 @@ class PlacementsClient {
71
71
  * @example
72
72
  * await client.organizations.placements.create("org-123", {
73
73
  * data: {
74
- * type: "placementMainPage",
74
+ * type: "placement",
75
75
  * attributes: {
76
76
  * name: "Homepage Banner",
77
77
  * availableSlots: 5
@@ -92,6 +92,53 @@ class PlacementsClient {
92
92
  * }
93
93
  * }
94
94
  * })
95
+ *
96
+ * @example
97
+ * await client.organizations.placements.create("org-123", {
98
+ * data: {
99
+ * type: "placementEmail",
100
+ * attributes: {
101
+ * name: "Weekly Deals Email",
102
+ * availableSlots: 10,
103
+ * cadence: {
104
+ * frequency: "WEEKLY",
105
+ * timeOfDay: "10:00",
106
+ * dayOfWeek: "MON"
107
+ * }
108
+ * }
109
+ * }
110
+ * })
111
+ *
112
+ * @example
113
+ * await client.organizations.placements.create("org-123", {
114
+ * data: {
115
+ * type: "placementBatchActivation",
116
+ * attributes: {
117
+ * name: "Weekly Cohort",
118
+ * refreshInterval: "P7D",
119
+ * slots: [{
120
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
121
+ * alias: "primary",
122
+ * shortDescription: "Featured deals refreshed each week"
123
+ * }]
124
+ * }
125
+ * }
126
+ * })
127
+ *
128
+ * @example
129
+ * await client.organizations.placements.create("org-123", {
130
+ * data: {
131
+ * type: "placementGroup",
132
+ * attributes: {
133
+ * name: "Seasonal Collection",
134
+ * slots: [{
135
+ * placementId: "01961e5a-f26f-7e44-ce5f-1ad7c9fb4e67",
136
+ * alias: "primary",
137
+ * shortDescription: "Seasonal picks"
138
+ * }]
139
+ * }
140
+ * }
141
+ * })
95
142
  */
96
143
  create(organizationId, request, requestOptions) {
97
144
  return core.HttpResponsePromise.fromPromise(this.__create(organizationId, request, requestOptions));
@@ -284,7 +331,7 @@ class PlacementsClient {
284
331
  });
285
332
  }
286
333
  /**
287
- * 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.
334
+ * 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.
288
335
  *
289
336
  * @param {string} organizationId - Unique identifier of the organization
290
337
  * @param {string} placementId - Unique identifier of the placement (UUID v7)
@@ -300,7 +347,7 @@ class PlacementsClient {
300
347
  * @example
301
348
  * await client.organizations.placements.update("organizationId", "placementId", {
302
349
  * data: {
303
- * type: "placementMainPage",
350
+ * type: "placement",
304
351
  * attributes: {
305
352
  * name: "name",
306
353
  * 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.js";
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.js";
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";
@@ -2,7 +2,7 @@
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.CadenceFrequency = void 0;
5
- /** How often a push notification placement delivers */
5
+ /** How often a push notification or email placement delivers */
6
6
  exports.CadenceFrequency = {
7
7
  Daily: "DAILY",
8
8
  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.js";
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.js";
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.js";
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.js";
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.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 | 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.js";
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.js";
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.js";
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.js";
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.js";
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,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
+ * 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,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
+ import type * as KardApi from "../../../../../index.js";
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,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 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,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
+ import type * as KardApi from "../../../../../index.js";
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });