@kard-financial/sdk 28.1.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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/commons/types/NotificationType.d.ts +2 -0
- package/dist/cjs/api/resources/commons/types/NotificationType.js +2 -0
- package/dist/cjs/api/resources/notifications/types/EmailNotificationPlacementFileAttributes.d.ts +12 -0
- package/dist/cjs/api/resources/notifications/types/EmailNotificationPlacementFileData.d.ts +7 -0
- package/dist/cjs/api/resources/notifications/types/EmailNotificationPlacementFileRelationships.d.ts +5 -0
- package/dist/cjs/api/resources/notifications/types/NotificationDataUnion.d.ts +7 -1
- package/dist/cjs/api/resources/notifications/types/NotificationPayload.d.ts +57 -0
- package/dist/cjs/api/resources/notifications/types/PushNotificationPlacementFileAttributes.d.ts +10 -0
- package/dist/cjs/api/resources/notifications/types/PushNotificationPlacementFileData.d.ts +7 -0
- package/dist/cjs/api/resources/notifications/types/PushNotificationPlacementFileRelationships.d.ts +5 -0
- package/dist/cjs/api/resources/notifications/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/notifications/types/index.js +6 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/Client.d.ts +51 -4
- package/dist/cjs/api/resources/organizations/resources/placements/client/Client.js +51 -4
- package/dist/cjs/api/resources/organizations/resources/placements/client/requests/GetPlacementRequest.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/Cadence.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/CadenceFrequency.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/CadenceFrequency.js +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateEmailAttributes.d.ts +25 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateEmailPlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateEmailPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateGroupAttributes.d.ts +20 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateGroupAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateGroupPlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateGroupPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.ts +9 -3
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.ts +48 -1
- package/dist/{esm/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.mts → cjs/api/resources/organizations/resources/placements/types/CreateStandardAttributes.d.ts} +2 -2
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateStandardAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateStandardPlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateStandardPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/EmailPlacementAttributes.d.ts +16 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/EmailPlacementAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/{MainPagePlacementData.d.ts → EmailPlacementData.d.ts} +3 -3
- package/dist/cjs/api/resources/organizations/resources/placements/types/EmailPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.d.ts +9 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/GroupPlacementData.d.ts +11 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/GroupPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/IncludedResource.d.ts +6 -3
- package/dist/{esm/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.mts → cjs/api/resources/organizations/resources/placements/types/PlacementAttributes.d.ts} +2 -2
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementData.d.ts +11 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.ts +44 -4
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementListResponse.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementResource.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementTypeFilter.d.ts +3 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementTypeFilter.js +3 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.d.ts +25 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.d.ts +21 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.ts +9 -3
- package/dist/cjs/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.d.ts → UpdateStandardAttributes.d.ts} +2 -2
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateStandardAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/index.d.ts +19 -7
- package/dist/cjs/api/resources/organizations/resources/placements/types/index.js +19 -7
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +12 -8
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +12 -8
- package/dist/cjs/api/resources/users/resources/rewards/types/BatchesResponseObject.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/PlacementBatchAttributes.d.ts +2 -2
- package/dist/cjs/api/resources/users/resources/rewards/types/PlacementBatchData.d.ts +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/commons/types/NotificationType.d.mts +2 -0
- package/dist/esm/api/resources/commons/types/NotificationType.mjs +2 -0
- package/dist/esm/api/resources/notifications/types/EmailNotificationPlacementFileAttributes.d.mts +12 -0
- package/dist/esm/api/resources/notifications/types/EmailNotificationPlacementFileData.d.mts +7 -0
- package/dist/esm/api/resources/notifications/types/EmailNotificationPlacementFileRelationships.d.mts +5 -0
- package/dist/esm/api/resources/notifications/types/NotificationDataUnion.d.mts +7 -1
- package/dist/esm/api/resources/notifications/types/NotificationPayload.d.mts +57 -0
- package/dist/esm/api/resources/notifications/types/PushNotificationPlacementFileAttributes.d.mts +10 -0
- package/dist/esm/api/resources/notifications/types/PushNotificationPlacementFileData.d.mts +7 -0
- package/dist/esm/api/resources/notifications/types/PushNotificationPlacementFileRelationships.d.mts +5 -0
- package/dist/esm/api/resources/notifications/types/index.d.mts +6 -0
- package/dist/esm/api/resources/notifications/types/index.mjs +6 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/Client.d.mts +51 -4
- package/dist/esm/api/resources/organizations/resources/placements/client/Client.mjs +51 -4
- package/dist/esm/api/resources/organizations/resources/placements/client/requests/GetPlacementRequest.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.mts +2 -2
- package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementData.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/Cadence.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.mjs +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateBatchActivationSlot.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateEmailAttributes.d.mts +25 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateEmailPlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateEmailPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupAttributes.d.mts +20 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupPlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.mts +9 -3
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.mts +48 -1
- package/dist/{cjs/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.ts → esm/api/resources/organizations/resources/placements/types/CreateStandardAttributes.d.mts} +2 -2
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateStandardAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateStandardPlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateStandardPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/EmailPlacementAttributes.d.mts +16 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/EmailPlacementAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/{MainPagePlacementData.d.mts → EmailPlacementData.d.mts} +3 -3
- package/dist/esm/api/resources/organizations/resources/placements/types/EmailPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.d.mts +9 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementData.d.mts +11 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/GroupPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/IncludedResource.d.mts +6 -3
- package/dist/{cjs/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.ts → esm/api/resources/organizations/resources/placements/types/PlacementAttributes.d.mts} +2 -2
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementData.d.mts +11 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.mts +44 -4
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementListResponse.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementResource.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementTypeFilter.d.mts +3 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementTypeFilter.mjs +3 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/SlottedPlacementRelationships.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateBatchActivationSlot.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.d.mts +25 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateEmailPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.d.mts +21 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateGroupPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.mts +9 -3
- package/dist/esm/api/resources/organizations/resources/placements/types/{UpdateMainPageAttributes.d.mts → UpdateStandardAttributes.d.mts} +2 -2
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateStandardPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/index.d.mts +19 -7
- package/dist/esm/api/resources/organizations/resources/placements/types/index.mjs +19 -7
- package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +12 -8
- package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +12 -8
- package/dist/esm/api/resources/users/resources/rewards/types/BatchesResponseObject.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/PlacementBatchAttributes.d.mts +2 -2
- package/dist/esm/api/resources/users/resources/rewards/types/PlacementBatchData.d.mts +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +16 -12
- package/dist/cjs/api/resources/organizations/resources/placements/types/BatchActivationPlacementRelationships.d.ts +0 -8
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.ts +0 -8
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.ts +0 -8
- package/dist/esm/api/resources/organizations/resources/placements/types/BatchActivationPlacementRelationships.d.mts +0 -8
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.mts +0 -8
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.mts +0 -8
- /package/dist/cjs/api/resources/{organizations/resources/placements/types/BatchActivationPlacementRelationships.js → notifications/types/EmailNotificationPlacementFileAttributes.js} +0 -0
- /package/dist/cjs/api/resources/{organizations/resources/placements/types/CreateMainPageAttributes.js → notifications/types/EmailNotificationPlacementFileData.js} +0 -0
- /package/dist/cjs/api/resources/{organizations/resources/placements/types/CreateMainPagePlacementData.js → notifications/types/EmailNotificationPlacementFileRelationships.js} +0 -0
- /package/dist/cjs/api/resources/{organizations/resources/placements/types/MainPagePlacementAttributes.js → notifications/types/PushNotificationPlacementFileAttributes.js} +0 -0
- /package/dist/cjs/api/resources/{organizations/resources/placements/types/MainPagePlacementData.js → notifications/types/PushNotificationPlacementFileData.js} +0 -0
- /package/dist/cjs/api/resources/{organizations/resources/placements/types/UpdateMainPageAttributes.js → notifications/types/PushNotificationPlacementFileRelationships.js} +0 -0
- /package/dist/cjs/api/resources/organizations/resources/placements/types/{UpdateMainPagePlacementData.js → CreateEmailAttributes.js} +0 -0
- /package/dist/esm/api/resources/{organizations/resources/placements/types/BatchActivationPlacementRelationships.mjs → notifications/types/EmailNotificationPlacementFileAttributes.mjs} +0 -0
- /package/dist/esm/api/resources/{organizations/resources/placements/types/CreateMainPageAttributes.mjs → notifications/types/EmailNotificationPlacementFileData.mjs} +0 -0
- /package/dist/esm/api/resources/{organizations/resources/placements/types/CreateMainPagePlacementData.mjs → notifications/types/EmailNotificationPlacementFileRelationships.mjs} +0 -0
- /package/dist/esm/api/resources/{organizations/resources/placements/types/MainPagePlacementAttributes.mjs → notifications/types/PushNotificationPlacementFileAttributes.mjs} +0 -0
- /package/dist/esm/api/resources/{organizations/resources/placements/types/MainPagePlacementData.mjs → notifications/types/PushNotificationPlacementFileData.mjs} +0 -0
- /package/dist/esm/api/resources/{organizations/resources/placements/types/UpdateMainPageAttributes.mjs → notifications/types/PushNotificationPlacementFileRelationships.mjs} +0 -0
- /package/dist/esm/api/resources/organizations/resources/placements/types/{UpdateMainPagePlacementData.mjs → CreateEmailAttributes.mjs} +0 -0
|
@@ -215,14 +215,18 @@ class RewardsClient {
|
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
|
-
* Retrieve batches for a batch-activation placement. Returns each
|
|
219
|
-
* order with its current offer set, alias, and freshness fields
|
|
220
|
-
* `lastActivatedAt`, `expiresAt`). Applies the same per-user
|
|
221
|
-
* per-slot content-strategy filter as Get Offers By
|
|
222
|
-
* per slot.
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
218
|
+
* Retrieve batches for a batch-activation or group placement. Returns each
|
|
219
|
+
* slot in slot order with its current offer set, alias, and freshness fields
|
|
220
|
+
* (`isActive`, `lastActivatedAt`, `expiresAt`). Applies the same per-user
|
|
221
|
+
* eligibility and per-slot content-strategy filter as Get Offers By
|
|
222
|
+
* Placement, independently per slot. For a batch-activation placement, a
|
|
223
|
+
* slot only flips to `isActive: false` when its refresh interval has elapsed
|
|
224
|
+
* AND its post-eligibility `offers[]` is non-empty; otherwise the slot is
|
|
225
|
+
* still returned and stays active so the partner UI does not promote
|
|
226
|
+
* "refresh" with nothing to show. For a group placement, slots are always
|
|
227
|
+
* active and each slot returns its offers regardless of activation state,
|
|
228
|
+
* hiding only offers that require activation (`requiredInBatch`) and have
|
|
229
|
+
* no activation record.<br/>
|
|
226
230
|
* <b>Required scopes:</b> `rewards:read`
|
|
227
231
|
*
|
|
228
232
|
* @param {KardApi.OrganizationId} organizationId
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as KardApi from "../../../../../index.js";
|
|
2
2
|
/**
|
|
3
|
-
* Ordered list of slots for a batch-activation placement, with freshness fields and per-slot offer sets.
|
|
3
|
+
* Ordered list of slots for a batch-activation or group placement, with freshness fields and per-slot offer sets.
|
|
4
4
|
*/
|
|
5
5
|
export interface BatchesResponseObject {
|
|
6
6
|
data: KardApi.users.PlacementBatchData[];
|
|
@@ -5,13 +5,13 @@ import type * as KardApi from "../../../../../index.js";
|
|
|
5
5
|
export interface PlacementBatchAttributes {
|
|
6
6
|
/** Display name for the slot. Falls back to the slot's customer-defined alias, or — when the alias is absent — the name of the placement referenced by the slot. */
|
|
7
7
|
name: string;
|
|
8
|
-
/** 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. */
|
|
8
|
+
/** 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. Always true for slots of a group placement, which has no activation cycle. */
|
|
9
9
|
isActive: boolean;
|
|
10
10
|
/** Timestamp of the most recent placementSlotAttribution ACTIVATE event for this (user, placement, slot). Absent for cold slots that have never been activated. */
|
|
11
11
|
lastActivatedAt?: string | undefined;
|
|
12
12
|
/** Computed as `lastActivatedAt + placement.refreshInterval`. Absent for cold slots that have never been activated. */
|
|
13
13
|
expiresAt?: string | undefined;
|
|
14
|
-
/** Slot-level UI components. Carries `shortDescription` and `longDescription` (activation copy derived from the parent placement's `refreshInterval`), plus either a `cta` (POST to the slot's activate endpoint) when the slot has no active (non-expired) activation, or a `logoFlare` decoration when it does — `cta` and `logoFlare` are mutually exclusive on a single slot. */
|
|
14
|
+
/** Slot-level UI components. Carries `shortDescription` and `longDescription` (activation copy derived from the parent placement's `refreshInterval`), plus either a `cta` (POST to the slot's activate endpoint) when the slot has no active (non-expired) activation, or a `logoFlare` decoration when it does — `cta` and `logoFlare` are mutually exclusive on a single slot. Omitted for slots of a group placement, which has no activation cycle. */
|
|
15
15
|
components?: KardApi.users.OfferComponents | undefined;
|
|
16
16
|
/** Slot-level visual assets. Currently a single `IMG_VIEW` SVG showing the slot's initials, themed via the `--icon-fill` CSS custom property. */
|
|
17
17
|
assets?: KardApi.users.Asset[] | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as KardApi from "../../../../../index.js";
|
|
2
2
|
/**
|
|
3
|
-
* One slot in a batch-activation placement, with freshness fields and the offers that resolve under the slot's content strategy.
|
|
3
|
+
* One slot in a batch-activation or group placement, with freshness fields and the offers that resolve under the slot's content strategy.
|
|
4
4
|
*/
|
|
5
5
|
export interface PlacementBatchData {
|
|
6
6
|
/** Stable identifier for the slot within the placement */
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "29.0.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -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": "
|
|
10
|
-
"User-Agent": "@kard-financial/sdk/
|
|
9
|
+
"X-Fern-SDK-Version": "29.0.0",
|
|
10
|
+
"User-Agent": "@kard-financial/sdk/29.0.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -6,5 +6,7 @@ export declare const NotificationType: {
|
|
|
6
6
|
readonly Clawback: "clawback";
|
|
7
7
|
readonly AuditUpdate: "auditUpdate";
|
|
8
8
|
readonly FileProcessingResult: "fileProcessingResult";
|
|
9
|
+
readonly PushNotificationPlacementFile: "pushNotificationPlacementFile";
|
|
10
|
+
readonly EmailNotificationPlacementFile: "emailNotificationPlacementFile";
|
|
9
11
|
};
|
|
10
12
|
export type NotificationType = (typeof NotificationType)[keyof typeof NotificationType];
|
|
@@ -7,4 +7,6 @@ export const NotificationType = {
|
|
|
7
7
|
Clawback: "clawback",
|
|
8
8
|
AuditUpdate: "auditUpdate",
|
|
9
9
|
FileProcessingResult: "fileProcessingResult",
|
|
10
|
+
PushNotificationPlacementFile: "pushNotificationPlacementFile",
|
|
11
|
+
EmailNotificationPlacementFile: "emailNotificationPlacementFile",
|
|
10
12
|
};
|
package/dist/esm/api/resources/notifications/types/EmailNotificationPlacementFileAttributes.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface EmailNotificationPlacementFileAttributes {
|
|
2
|
+
/** The display name of the placement */
|
|
3
|
+
name: string;
|
|
4
|
+
/** The issuer organization ID the placement belongs to */
|
|
5
|
+
organizationId: string;
|
|
6
|
+
/** The number of offer slots available in the placement */
|
|
7
|
+
availableSlots: number;
|
|
8
|
+
/** The delivery cadence of the placement (e.g. MONTHLY) */
|
|
9
|
+
cadence: string;
|
|
10
|
+
/** Presigned URL to download the generated placement file (gzipped JSONL) */
|
|
11
|
+
downloadUrl: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as KardApi from "../../../index.mjs";
|
|
2
|
+
export interface EmailNotificationPlacementFileData {
|
|
3
|
+
/** The placement ID, also used as the notification resource ID */
|
|
4
|
+
id: string;
|
|
5
|
+
attributes: KardApi.EmailNotificationPlacementFileAttributes;
|
|
6
|
+
relationships: KardApi.EmailNotificationPlacementFileRelationships;
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as KardApi from "../../../index.mjs";
|
|
2
|
-
export type NotificationDataUnion = KardApi.NotificationDataUnion.EarnedRewardApproved | KardApi.NotificationDataUnion.EarnedRewardSettled | KardApi.NotificationDataUnion.ValidTransaction | KardApi.NotificationDataUnion.FailedTransaction | KardApi.NotificationDataUnion.Clawback | KardApi.NotificationDataUnion.AuditUpdate | KardApi.NotificationDataUnion.FileProcessingResult;
|
|
2
|
+
export type NotificationDataUnion = KardApi.NotificationDataUnion.EarnedRewardApproved | KardApi.NotificationDataUnion.EarnedRewardSettled | KardApi.NotificationDataUnion.ValidTransaction | KardApi.NotificationDataUnion.FailedTransaction | KardApi.NotificationDataUnion.Clawback | KardApi.NotificationDataUnion.AuditUpdate | KardApi.NotificationDataUnion.FileProcessingResult | KardApi.NotificationDataUnion.PushNotificationPlacementFile | KardApi.NotificationDataUnion.EmailNotificationPlacementFile;
|
|
3
3
|
export declare namespace NotificationDataUnion {
|
|
4
4
|
interface EarnedRewardApproved extends KardApi.EarnedRewardApprovedData {
|
|
5
5
|
type: "earnedRewardApproved";
|
|
@@ -22,4 +22,10 @@ export declare namespace NotificationDataUnion {
|
|
|
22
22
|
interface FileProcessingResult extends KardApi.FileResultData {
|
|
23
23
|
type: "fileProcessingResult";
|
|
24
24
|
}
|
|
25
|
+
interface PushNotificationPlacementFile extends KardApi.PushNotificationPlacementFileData {
|
|
26
|
+
type: "pushNotificationPlacementFile";
|
|
27
|
+
}
|
|
28
|
+
interface EmailNotificationPlacementFile extends KardApi.EmailNotificationPlacementFileData {
|
|
29
|
+
type: "emailNotificationPlacementFile";
|
|
30
|
+
}
|
|
25
31
|
}
|
|
@@ -269,6 +269,63 @@ import type * as KardApi from "../../../index.mjs";
|
|
|
269
269
|
* }
|
|
270
270
|
* }
|
|
271
271
|
* }
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* {
|
|
275
|
+
* data: {
|
|
276
|
+
* type: "pushNotificationPlacementFile",
|
|
277
|
+
* id: "669e3823-1688-4d6e-b46e-cf1999d4a25d",
|
|
278
|
+
* attributes: {
|
|
279
|
+
* placementName: "Top gas cashback",
|
|
280
|
+
* availableSlots: 3,
|
|
281
|
+
* cadence: "WEEKLY",
|
|
282
|
+
* downloadUrl: "https://example.com/placements/669e3823-1688-4d6e-b46e-cf1999d4a25d.jsonl.gz"
|
|
283
|
+
* },
|
|
284
|
+
* relationships: {
|
|
285
|
+
* placement: {
|
|
286
|
+
* data: {
|
|
287
|
+
* type: "placement",
|
|
288
|
+
* id: "669e3823-1688-4d6e-b46e-cf1999d4a25d"
|
|
289
|
+
* }
|
|
290
|
+
* },
|
|
291
|
+
* contentStrategy: {
|
|
292
|
+
* data: {
|
|
293
|
+
* type: "contentStrategy",
|
|
294
|
+
* id: "8df56d4f-0dbf-47ab-b081-0c6534dddd34"
|
|
295
|
+
* }
|
|
296
|
+
* }
|
|
297
|
+
* }
|
|
298
|
+
* }
|
|
299
|
+
* }
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* {
|
|
303
|
+
* data: {
|
|
304
|
+
* type: "emailNotificationPlacementFile",
|
|
305
|
+
* id: "0192a1b2-c3d4-7e8f-9012-3456789abc01",
|
|
306
|
+
* attributes: {
|
|
307
|
+
* name: "Monthly Top Cashback Email",
|
|
308
|
+
* organizationId: "00004321",
|
|
309
|
+
* availableSlots: 3,
|
|
310
|
+
* cadence: "MONTHLY",
|
|
311
|
+
* downloadUrl: "https://example.com/placements/0192a1b2-c3d4-7e8f-9012-3456789abc01.jsonl.gz"
|
|
312
|
+
* },
|
|
313
|
+
* relationships: {
|
|
314
|
+
* placement: {
|
|
315
|
+
* data: {
|
|
316
|
+
* type: "placement",
|
|
317
|
+
* id: "0192a1b2-c3d4-7e8f-9012-aaaa5678cccc"
|
|
318
|
+
* }
|
|
319
|
+
* },
|
|
320
|
+
* contentStrategy: {
|
|
321
|
+
* data: {
|
|
322
|
+
* type: "contentStrategy",
|
|
323
|
+
* id: "8df56d4f-0dbf-47ab-b081-0c6534dddd34"
|
|
324
|
+
* }
|
|
325
|
+
* }
|
|
326
|
+
* }
|
|
327
|
+
* }
|
|
328
|
+
* }
|
|
272
329
|
*/
|
|
273
330
|
export interface NotificationPayload {
|
|
274
331
|
data: KardApi.NotificationDataUnion;
|
package/dist/esm/api/resources/notifications/types/PushNotificationPlacementFileAttributes.d.mts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface PushNotificationPlacementFileAttributes {
|
|
2
|
+
/** The display name of the placement */
|
|
3
|
+
placementName: string;
|
|
4
|
+
/** The number of offer slots available in the placement */
|
|
5
|
+
availableSlots: number;
|
|
6
|
+
/** The delivery cadence of the placement (e.g. WEEKLY) */
|
|
7
|
+
cadence: string;
|
|
8
|
+
/** Presigned URL to download the generated placement file (gzipped JSONL) */
|
|
9
|
+
downloadUrl: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as KardApi from "../../../index.mjs";
|
|
2
|
+
export interface PushNotificationPlacementFileData {
|
|
3
|
+
/** The placement ID, also used as the notification resource ID */
|
|
4
|
+
id: string;
|
|
5
|
+
attributes: KardApi.PushNotificationPlacementFileAttributes;
|
|
6
|
+
relationships: KardApi.PushNotificationPlacementFileRelationships;
|
|
7
|
+
}
|
|
@@ -6,6 +6,9 @@ export * from "./EarnedRewardApprovedData.mjs";
|
|
|
6
6
|
export * from "./EarnedRewardRelationships.mjs";
|
|
7
7
|
export * from "./EarnedRewardSettledAttributes.mjs";
|
|
8
8
|
export * from "./EarnedRewardSettledData.mjs";
|
|
9
|
+
export * from "./EmailNotificationPlacementFileAttributes.mjs";
|
|
10
|
+
export * from "./EmailNotificationPlacementFileData.mjs";
|
|
11
|
+
export * from "./EmailNotificationPlacementFileRelationships.mjs";
|
|
9
12
|
export * from "./FailedTransactionAttributes.mjs";
|
|
10
13
|
export * from "./FailedTransactionData.mjs";
|
|
11
14
|
export * from "./FailedTransactionRelationships.mjs";
|
|
@@ -13,6 +16,9 @@ export * from "./FileResultData.mjs";
|
|
|
13
16
|
export * from "./NotificationDataUnion.mjs";
|
|
14
17
|
export * from "./NotificationMetadata.mjs";
|
|
15
18
|
export * from "./NotificationPayload.mjs";
|
|
19
|
+
export * from "./PushNotificationPlacementFileAttributes.mjs";
|
|
20
|
+
export * from "./PushNotificationPlacementFileData.mjs";
|
|
21
|
+
export * from "./PushNotificationPlacementFileRelationships.mjs";
|
|
16
22
|
export * from "./RewardNotificationAttributes.mjs";
|
|
17
23
|
export * from "./TransactionRelationships.mjs";
|
|
18
24
|
export * from "./ValidTransactionAttributes.mjs";
|
|
@@ -6,6 +6,9 @@ export * from "./EarnedRewardApprovedData.mjs";
|
|
|
6
6
|
export * from "./EarnedRewardRelationships.mjs";
|
|
7
7
|
export * from "./EarnedRewardSettledAttributes.mjs";
|
|
8
8
|
export * from "./EarnedRewardSettledData.mjs";
|
|
9
|
+
export * from "./EmailNotificationPlacementFileAttributes.mjs";
|
|
10
|
+
export * from "./EmailNotificationPlacementFileData.mjs";
|
|
11
|
+
export * from "./EmailNotificationPlacementFileRelationships.mjs";
|
|
9
12
|
export * from "./FailedTransactionAttributes.mjs";
|
|
10
13
|
export * from "./FailedTransactionData.mjs";
|
|
11
14
|
export * from "./FailedTransactionRelationships.mjs";
|
|
@@ -13,6 +16,9 @@ export * from "./FileResultData.mjs";
|
|
|
13
16
|
export * from "./NotificationDataUnion.mjs";
|
|
14
17
|
export * from "./NotificationMetadata.mjs";
|
|
15
18
|
export * from "./NotificationPayload.mjs";
|
|
19
|
+
export * from "./PushNotificationPlacementFileAttributes.mjs";
|
|
20
|
+
export * from "./PushNotificationPlacementFileData.mjs";
|
|
21
|
+
export * from "./PushNotificationPlacementFileRelationships.mjs";
|
|
16
22
|
export * from "./RewardNotificationAttributes.mjs";
|
|
17
23
|
export * from "./TransactionRelationships.mjs";
|
|
18
24
|
export * from "./ValidTransactionAttributes.mjs";
|
|
@@ -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 "
|
|
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: "
|
|
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 "
|
|
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: "
|
|
153
|
+
* type: "placement",
|
|
107
154
|
* attributes: {
|
|
108
155
|
* name: "name",
|
|
109
156
|
* availableSlots: 1
|
|
@@ -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 "
|
|
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: "
|
|
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 "
|
|
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: "
|
|
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 (
|
|
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.
|
|
10
|
+
relationships: KardApi.organizations.SlottedPlacementRelationships;
|
|
11
11
|
}
|
|
@@ -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. */
|
package/dist/esm/api/resources/organizations/resources/placements/types/CreateEmailAttributes.d.mts
ADDED
|
@@ -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
|
+
}
|
package/dist/esm/api/resources/organizations/resources/placements/types/CreateGroupAttributes.d.mts
ADDED
|
@@ -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
|
+
}
|