@inappstory/react-sdk 1.16.7 → 1.16.9
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/index.esm.mjs +349 -141
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/types/events.d.ts +2 -0
- package/dist/types/in-app-messaging/inAppMessaging.d.ts +21 -1
- package/dist/types/storyManager.d.ts +4 -2
- package/package.json +1 -1
- package/plugins/banners/index.esm.mjs +1 -1
- package/plugins/banners/index.umd.js +1 -1
- package/plugins/banners/types/events.d.ts +26 -0
- package/plugins/banners/types/iasBannerPreview.d.ts +6 -0
package/dist/types/events.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface StoryReaderEvent {
|
|
|
18
18
|
filter: Record<string, unknown>;
|
|
19
19
|
/** User-generated payload (e.g., UGC data) */
|
|
20
20
|
ugcPayload: Record<string, unknown>;
|
|
21
|
+
/** Custom attributes from the story payload */
|
|
22
|
+
extraFields?: Record<string, string>;
|
|
21
23
|
/** Number of items in the default list */
|
|
22
24
|
defaultListLength: number;
|
|
23
25
|
/** Number of items in the favorites list */
|
|
@@ -90,6 +90,10 @@ export type IamEvents = {
|
|
|
90
90
|
* The message that was closed
|
|
91
91
|
*/
|
|
92
92
|
message: IamMessage;
|
|
93
|
+
/**
|
|
94
|
+
* Custom attributes from the message payload
|
|
95
|
+
*/
|
|
96
|
+
extraFields?: Record<string, string>;
|
|
93
97
|
};
|
|
94
98
|
|
|
95
99
|
/**
|
|
@@ -114,6 +118,11 @@ export type IamEvents = {
|
|
|
114
118
|
* Additional data associated with the event
|
|
115
119
|
*/
|
|
116
120
|
data: Record<string, any>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Custom attributes from the message payload
|
|
124
|
+
*/
|
|
125
|
+
extraFields?: Record<string, string>;
|
|
117
126
|
};
|
|
118
127
|
|
|
119
128
|
/**
|
|
@@ -143,6 +152,11 @@ export type IamEvents = {
|
|
|
143
152
|
* ID of the HTML element that was clicked
|
|
144
153
|
*/
|
|
145
154
|
elementId: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Custom attributes from the message payload
|
|
158
|
+
*/
|
|
159
|
+
extraFields?: Record<string, string>;
|
|
146
160
|
};
|
|
147
161
|
};
|
|
148
162
|
|
|
@@ -190,6 +204,7 @@ export interface InAppMessaging {
|
|
|
190
204
|
* @param options - Optional display configuration
|
|
191
205
|
* @param options.showOnlyIfLoaded - If true, only shows messages that were preloaded
|
|
192
206
|
* @param options.signal - Abort signal to cancel the operation
|
|
207
|
+
* @param options.targeting - If true, the message will be displayed targeting the user
|
|
193
208
|
* @param options.appearance - Client appearance overrides when opening the message
|
|
194
209
|
* @param options.appearance.zIndex - Custom z-index for the message container
|
|
195
210
|
* @param options.appearance.toast - Toast-specific overrides (when message type is Toast)
|
|
@@ -203,7 +218,12 @@ export interface InAppMessaging {
|
|
|
203
218
|
*/
|
|
204
219
|
showMessageById(
|
|
205
220
|
messageId: number | string,
|
|
206
|
-
options?: {
|
|
221
|
+
options?: {
|
|
222
|
+
showOnlyIfLoaded?: boolean;
|
|
223
|
+
signal?: AbortSignal;
|
|
224
|
+
targeting?: boolean;
|
|
225
|
+
appearance?: IamClientAppearanceOptions;
|
|
226
|
+
}
|
|
207
227
|
): Promise<IamMessage>;
|
|
208
228
|
|
|
209
229
|
/**
|
|
@@ -315,15 +315,17 @@ export declare class StoryManager {
|
|
|
315
315
|
* Displays a specific story.
|
|
316
316
|
* @param id The story ID
|
|
317
317
|
* @param options.signal Abort signal to cancel the operation
|
|
318
|
+
* @param options.targeting Enable targeting for story fetch
|
|
318
319
|
*/
|
|
319
|
-
showStory(id: number | string, options?: { signal?: AbortSignal }): Promise<void>;
|
|
320
|
+
showStory(id: number | string, options?: { signal?: AbortSignal; targeting?: boolean }): Promise<void>;
|
|
320
321
|
|
|
321
322
|
/**
|
|
322
323
|
* Displays a story only once.
|
|
323
324
|
* @param id The story ID
|
|
324
325
|
* @param options.signal Abort signal to cancel the operation
|
|
326
|
+
* @param options.targeting Enable targeting for story fetch
|
|
325
327
|
*/
|
|
326
|
-
showStoryOnce(id: number | string, options?: { signal?: AbortSignal }): Promise<void>;
|
|
328
|
+
showStoryOnce(id: number | string, options?: { signal?: AbortSignal; targeting?: boolean }): Promise<void>;
|
|
327
329
|
|
|
328
330
|
/**
|
|
329
331
|
* Opens a game by its instance ID.
|