From 65d35993fe4f8785489b2af1da4a94940055ecf3 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Apr 2026 14:41:57 +0000 Subject: [PATCH 1/2] Add deleteAction field to trackInAppConsume to support inAppDelete events Adds the optional deleteAction field to InAppEventRequestParams and the event validation schemas, enabling trackInAppConsume to generate inAppDelete events as supported by the Iterable API. Closes #486 https://claude.ai/code/session_01EfM59ab8asztsqmsPB7FKV --- README.md | 5 +++-- src/events/events.schema.ts | 1 + src/events/inapp/events.schema.ts | 1 + src/events/inapp/types.ts | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6adb437..e9f4c9fa 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ Iterable's API, see the [API Overview](https://support.iterable.com/hc/articles/ Notes: -- The SDK does not track `inAppDelete` events. +- The SDK supports generating `inAppDelete` events by passing `deleteAction` to `trackInAppConsume`. - :rotating_light: Due to a limitation in WebKit (which affects iOS web browsers, like Safari), in-app messages displayed in an iOS web browser browser can't @@ -859,7 +859,7 @@ See also: ## `trackInAppConsume` -Deletes an in-app message from the server by calling [`POST /api/events/trackInAppConsume`](https://support.iterable.com/hc/articles/204780579#post-api-events-inappconsume). +Deletes an in-app message from the server by calling [`POST /api/events/trackInAppConsume`](https://support.iterable.com/hc/articles/204780579#post-api-events-inappconsume). Pass `deleteAction` to generate an `inAppDelete` event. ```ts const trackInAppConsume = ( @@ -1408,6 +1408,7 @@ interface InAppEventRequestParams { location?: string; }; closeAction?: string; + deleteAction?: string; deviceInfo: { appPackageName: string; }; diff --git a/src/events/events.schema.ts b/src/events/events.schema.ts index b515525d..70e5b8e1 100644 --- a/src/events/events.schema.ts +++ b/src/events/events.schema.ts @@ -18,6 +18,7 @@ export const eventRequestSchema = object().shape({ location: string() }), closeAction: string(), + deleteAction: string(), deviceInfo: object() .shape({ deviceId: string().required(), diff --git a/src/events/inapp/events.schema.ts b/src/events/inapp/events.schema.ts index 24fd49b1..dc517b0c 100644 --- a/src/events/inapp/events.schema.ts +++ b/src/events/inapp/events.schema.ts @@ -9,6 +9,7 @@ export const eventRequestSchema = object().shape({ location: string() }), closeAction: string(), + deleteAction: string(), deviceInfo: object() .shape({ deviceId: string().required(), diff --git a/src/events/inapp/types.ts b/src/events/inapp/types.ts index 676eef7d..6753b709 100644 --- a/src/events/inapp/types.ts +++ b/src/events/inapp/types.ts @@ -15,6 +15,7 @@ export interface InAppEventRequestParams { location?: string; }; closeAction?: string; + deleteAction?: string; deviceInfo: { appPackageName: string; // customer-defined name }; From 64595ca6db5dff0973ee2ddb7c6ba114efa4b381 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Apr 2026 14:46:38 +0000 Subject: [PATCH 2/2] Add package-lock.json to .gitignore This project uses yarn; package-lock.json is generated by npm and should not be tracked. https://claude.ai/code/session_01EfM59ab8asztsqmsPB7FKV --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 33fde1a2..514f2514 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ log results browserstack.json .DS_Store +package-lock.json stats.json .idea .cursor \ No newline at end of file