@blux.ai/web-sdk 1.3.0 → 2.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/README.md +46 -31
- package/dist/package.json +1 -1
- package/dist/src/BluxClient.d.ts +25 -15
- package/dist/src/BluxClient.js +150 -49
- package/dist/src/BluxClient.js.map +1 -1
- package/dist/src/apis/APIs.d.ts +385 -92
- package/dist/src/apis/APIs.js +51 -0
- package/dist/src/apis/APIs.js.map +1 -1
- package/dist/src/apis/createCrmEvent.d.ts +4 -0
- package/dist/src/apis/createCrmEvent.js +7 -0
- package/dist/src/apis/createCrmEvent.js.map +1 -0
- package/dist/src/apis/createEvent.d.ts +1 -1
- package/dist/src/apis/createEvent.js.map +1 -1
- package/dist/src/apis/getItemRecommendations.d.ts +1 -1
- package/dist/src/apis/getItemRecommendations.js.map +1 -1
- package/dist/src/apis/inappsDispatch.d.ts +5 -0
- package/dist/src/apis/inappsDispatch.js +7 -0
- package/dist/src/apis/inappsDispatch.js.map +1 -0
- package/dist/src/apis/initialize.d.ts +1 -1
- package/dist/src/apis/initialize.js.map +1 -1
- package/dist/src/apis/signIn.d.ts +1 -1
- package/dist/src/apis/signIn.js.map +1 -1
- package/dist/src/apis/signOut.d.ts +1 -1
- package/dist/src/apis/signOut.js.map +1 -1
- package/dist/src/apis/updateCustomUserProperties.d.ts +1 -1
- package/dist/src/apis/updateCustomUserProperties.js.map +1 -1
- package/dist/src/apis/updateUserProperties.d.ts +1 -1
- package/dist/src/apis/updateUserProperties.js.map +1 -1
- package/dist/src/events/AddCartaddEvent.d.ts +2 -2
- package/dist/src/events/AddCartaddEvent.js +3 -3
- package/dist/src/events/AddCartaddEvent.js.map +1 -1
- package/dist/src/events/AddClickEvent.d.ts +2 -2
- package/dist/src/events/AddClickEvent.js +3 -3
- package/dist/src/events/AddClickEvent.js.map +1 -1
- package/dist/src/events/AddCustomEvent.d.ts +2 -2
- package/dist/src/events/AddCustomEvent.js +4 -4
- package/dist/src/events/AddCustomEvent.js.map +1 -1
- package/dist/src/events/AddInstantImpressionEvent.d.ts +2 -2
- package/dist/src/events/AddInstantImpressionEvent.js +3 -3
- package/dist/src/events/AddInstantImpressionEvent.js.map +1 -1
- package/dist/src/events/AddLikeEvent.d.ts +2 -2
- package/dist/src/events/AddLikeEvent.js +3 -3
- package/dist/src/events/AddLikeEvent.js.map +1 -1
- package/dist/src/events/AddOrderEvent.d.ts +5 -0
- package/dist/src/events/AddOrderEvent.js +16 -0
- package/dist/src/events/AddOrderEvent.js.map +1 -0
- package/dist/src/events/AddPageViewEvent.d.ts +2 -2
- package/dist/src/events/AddPageViewEvent.js +2 -2
- package/dist/src/events/AddPageViewEvent.js.map +1 -1
- package/dist/src/events/AddPageVisitEvent.d.ts +2 -2
- package/dist/src/events/AddPageVisitEvent.js +2 -2
- package/dist/src/events/AddPageVisitEvent.js.map +1 -1
- package/dist/src/events/AddPersistentImpressionEvent.d.ts +2 -2
- package/dist/src/events/AddPersistentImpressionEvent.js +3 -3
- package/dist/src/events/AddPersistentImpressionEvent.js.map +1 -1
- package/dist/src/events/AddProductDetailViewEvent.d.ts +2 -2
- package/dist/src/events/AddProductDetailViewEvent.js +3 -3
- package/dist/src/events/AddProductDetailViewEvent.js.map +1 -1
- package/dist/src/events/AddRateEvent.d.ts +2 -2
- package/dist/src/events/AddRateEvent.js +3 -3
- package/dist/src/events/AddRateEvent.js.map +1 -1
- package/dist/src/events/AddSearchEvent.d.ts +2 -2
- package/dist/src/events/AddSearchEvent.js +3 -3
- package/dist/src/events/AddSearchEvent.js.map +1 -1
- package/dist/src/events/AddSectionViewEvent.d.ts +2 -2
- package/dist/src/events/AddSectionViewEvent.js +2 -2
- package/dist/src/events/AddSectionViewEvent.js.map +1 -1
- package/dist/src/events/Event.d.ts +1 -0
- package/dist/src/events/Event.js +1 -0
- package/dist/src/events/Event.js.map +1 -1
- package/dist/src/events/VisitEvent.d.ts +2 -2
- package/dist/src/events/VisitEvent.js +2 -2
- package/dist/src/events/VisitEvent.js.map +1 -1
- package/dist/src/events/index.d.ts +1 -1
- package/dist/src/events/index.js +1 -1
- package/dist/src/events/index.js.map +1 -1
- package/dist/src/events/types.d.ts +26 -15
- package/dist/src/events/types.js.map +1 -1
- package/dist/src/recs/ItemRec.js.map +1 -1
- package/dist/src/utils/LocalStorage.d.ts +2 -0
- package/dist/src/utils/LocalStorage.js +8 -1
- package/dist/src/utils/LocalStorage.js.map +1 -1
- package/dist/src/utils/Logger.js +0 -1
- package/dist/src/utils/Logger.js.map +1 -1
- package/dist/src/utils/SessionStorage.js +0 -1
- package/dist/src/utils/SessionStorage.js.map +1 -1
- package/dist/src/utils/operators.js +0 -1
- package/dist/src/utils/operators.js.map +1 -1
- package/dist/src/utils/zodSchemas.d.ts +27 -27
- package/dist/src/utils/zodSchemas.js +2 -2
- package/dist/src/utils/zodSchemas.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/events/AddPurchaseEvent.d.ts +0 -5
- package/dist/src/events/AddPurchaseEvent.js +0 -16
- package/dist/src/events/AddPurchaseEvent.js.map +0 -1
package/dist/src/apis/APIs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { RecResponse } from "../utils/zodSchemas";
|
|
3
2
|
import type { Serialize } from "../utils/Base";
|
|
3
|
+
import type { RecResponse } from "../utils/zodSchemas";
|
|
4
4
|
declare enum HttpMethod {
|
|
5
5
|
GET = "get",
|
|
6
6
|
POST = "post",
|
|
@@ -161,11 +161,11 @@ export declare namespace APIs {
|
|
|
161
161
|
id: z.ZodString;
|
|
162
162
|
price: z.ZodNumber;
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
|
-
id: string;
|
|
165
164
|
price: number;
|
|
166
|
-
}, {
|
|
167
165
|
id: string;
|
|
166
|
+
}, {
|
|
168
167
|
price: number;
|
|
168
|
+
id: string;
|
|
169
169
|
}>, "many">>;
|
|
170
170
|
search_query: z.ZodOptional<z.ZodString>;
|
|
171
171
|
order_amount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -174,56 +174,56 @@ export declare namespace APIs {
|
|
|
174
174
|
id: z.ZodString;
|
|
175
175
|
type: z.ZodString;
|
|
176
176
|
}, "strip", z.ZodTypeAny, {
|
|
177
|
-
id: string;
|
|
178
177
|
type: string;
|
|
179
|
-
}, {
|
|
180
178
|
id: string;
|
|
179
|
+
}, {
|
|
181
180
|
type: string;
|
|
181
|
+
id: string;
|
|
182
182
|
}>>;
|
|
183
183
|
}, "strip", z.ZodTypeAny, {
|
|
184
|
-
tracking?: {
|
|
185
|
-
id: string;
|
|
186
|
-
type: string;
|
|
187
|
-
} | undefined;
|
|
188
|
-
item_id?: string | undefined;
|
|
189
|
-
rating?: number | undefined;
|
|
190
|
-
price?: number | undefined;
|
|
191
|
-
order_id?: string | undefined;
|
|
192
|
-
page?: string | undefined;
|
|
193
184
|
section?: string | undefined;
|
|
194
|
-
position?: number | undefined;
|
|
195
|
-
search_query?: string | undefined;
|
|
196
185
|
prev_section?: string | undefined;
|
|
197
186
|
recommendation_id?: string | undefined;
|
|
187
|
+
price?: number | undefined;
|
|
188
|
+
order_id?: string | undefined;
|
|
189
|
+
rating?: number | undefined;
|
|
198
190
|
prev_page?: string | undefined;
|
|
191
|
+
page?: string | undefined;
|
|
192
|
+
position?: number | undefined;
|
|
193
|
+
item_id?: string | undefined;
|
|
199
194
|
items?: {
|
|
200
|
-
id: string;
|
|
201
195
|
price: number;
|
|
196
|
+
id: string;
|
|
202
197
|
}[] | undefined;
|
|
198
|
+
search_query?: string | undefined;
|
|
203
199
|
order_amount?: number | undefined;
|
|
204
200
|
paid_amount?: number | undefined;
|
|
205
|
-
}, {
|
|
206
201
|
tracking?: {
|
|
207
|
-
id: string;
|
|
208
202
|
type: string;
|
|
203
|
+
id: string;
|
|
209
204
|
} | undefined;
|
|
210
|
-
|
|
211
|
-
rating?: number | undefined;
|
|
212
|
-
price?: number | undefined;
|
|
213
|
-
order_id?: string | undefined;
|
|
214
|
-
page?: string | undefined;
|
|
205
|
+
}, {
|
|
215
206
|
section?: string | undefined;
|
|
216
|
-
position?: number | undefined;
|
|
217
|
-
search_query?: string | undefined;
|
|
218
207
|
prev_section?: string | undefined;
|
|
219
208
|
recommendation_id?: string | undefined;
|
|
209
|
+
price?: number | undefined;
|
|
210
|
+
order_id?: string | undefined;
|
|
211
|
+
rating?: number | undefined;
|
|
220
212
|
prev_page?: string | undefined;
|
|
213
|
+
page?: string | undefined;
|
|
214
|
+
position?: number | undefined;
|
|
215
|
+
item_id?: string | undefined;
|
|
221
216
|
items?: {
|
|
222
|
-
id: string;
|
|
223
217
|
price: number;
|
|
218
|
+
id: string;
|
|
224
219
|
}[] | undefined;
|
|
220
|
+
search_query?: string | undefined;
|
|
225
221
|
order_amount?: number | undefined;
|
|
226
222
|
paid_amount?: number | undefined;
|
|
223
|
+
tracking?: {
|
|
224
|
+
type: string;
|
|
225
|
+
id: string;
|
|
226
|
+
} | undefined;
|
|
227
227
|
}>>;
|
|
228
228
|
custom_event_properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>>>;
|
|
229
229
|
internal_event_properties: z.ZodOptional<z.ZodObject<{
|
|
@@ -240,143 +240,143 @@ export declare namespace APIs {
|
|
|
240
240
|
}, "strip", z.ZodTypeAny, {
|
|
241
241
|
event_type: string;
|
|
242
242
|
captured_at: Date;
|
|
243
|
+
item_id?: string | undefined;
|
|
244
|
+
device_id?: import("bson-objectid").default | undefined;
|
|
245
|
+
event_value?: string | undefined;
|
|
243
246
|
event_properties?: {
|
|
244
|
-
tracking?: {
|
|
245
|
-
id: string;
|
|
246
|
-
type: string;
|
|
247
|
-
} | undefined;
|
|
248
|
-
item_id?: string | undefined;
|
|
249
|
-
rating?: number | undefined;
|
|
250
|
-
price?: number | undefined;
|
|
251
|
-
order_id?: string | undefined;
|
|
252
|
-
page?: string | undefined;
|
|
253
247
|
section?: string | undefined;
|
|
254
|
-
position?: number | undefined;
|
|
255
|
-
search_query?: string | undefined;
|
|
256
248
|
prev_section?: string | undefined;
|
|
257
249
|
recommendation_id?: string | undefined;
|
|
250
|
+
price?: number | undefined;
|
|
251
|
+
order_id?: string | undefined;
|
|
252
|
+
rating?: number | undefined;
|
|
258
253
|
prev_page?: string | undefined;
|
|
254
|
+
page?: string | undefined;
|
|
255
|
+
position?: number | undefined;
|
|
256
|
+
item_id?: string | undefined;
|
|
259
257
|
items?: {
|
|
260
|
-
id: string;
|
|
261
258
|
price: number;
|
|
259
|
+
id: string;
|
|
262
260
|
}[] | undefined;
|
|
261
|
+
search_query?: string | undefined;
|
|
263
262
|
order_amount?: number | undefined;
|
|
264
263
|
paid_amount?: number | undefined;
|
|
264
|
+
tracking?: {
|
|
265
|
+
type: string;
|
|
266
|
+
id: string;
|
|
267
|
+
} | undefined;
|
|
265
268
|
} | undefined;
|
|
269
|
+
custom_event_properties?: Record<string, string | number | boolean | string[] | Date | {}[] | {} | undefined> | undefined;
|
|
266
270
|
internal_event_properties?: {
|
|
267
271
|
url?: string | undefined;
|
|
268
272
|
ref?: string | undefined;
|
|
269
273
|
} | undefined;
|
|
270
|
-
custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
|
|
271
|
-
item_id?: string | undefined;
|
|
272
|
-
device_id?: import("bson-objectid").default | undefined;
|
|
273
|
-
event_value?: string | undefined;
|
|
274
274
|
}, {
|
|
275
275
|
event_type: string;
|
|
276
276
|
captured_at: string;
|
|
277
|
+
item_id?: string | undefined;
|
|
278
|
+
device_id?: string | undefined;
|
|
279
|
+
event_value?: string | undefined;
|
|
277
280
|
event_properties?: {
|
|
278
|
-
tracking?: {
|
|
279
|
-
id: string;
|
|
280
|
-
type: string;
|
|
281
|
-
} | undefined;
|
|
282
|
-
item_id?: string | undefined;
|
|
283
|
-
rating?: number | undefined;
|
|
284
|
-
price?: number | undefined;
|
|
285
|
-
order_id?: string | undefined;
|
|
286
|
-
page?: string | undefined;
|
|
287
281
|
section?: string | undefined;
|
|
288
|
-
position?: number | undefined;
|
|
289
|
-
search_query?: string | undefined;
|
|
290
282
|
prev_section?: string | undefined;
|
|
291
283
|
recommendation_id?: string | undefined;
|
|
284
|
+
price?: number | undefined;
|
|
285
|
+
order_id?: string | undefined;
|
|
286
|
+
rating?: number | undefined;
|
|
292
287
|
prev_page?: string | undefined;
|
|
288
|
+
page?: string | undefined;
|
|
289
|
+
position?: number | undefined;
|
|
290
|
+
item_id?: string | undefined;
|
|
293
291
|
items?: {
|
|
294
|
-
id: string;
|
|
295
292
|
price: number;
|
|
293
|
+
id: string;
|
|
296
294
|
}[] | undefined;
|
|
295
|
+
search_query?: string | undefined;
|
|
297
296
|
order_amount?: number | undefined;
|
|
298
297
|
paid_amount?: number | undefined;
|
|
298
|
+
tracking?: {
|
|
299
|
+
type: string;
|
|
300
|
+
id: string;
|
|
301
|
+
} | undefined;
|
|
299
302
|
} | undefined;
|
|
303
|
+
custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
|
|
300
304
|
internal_event_properties?: {
|
|
301
305
|
url?: string | undefined;
|
|
302
306
|
ref?: string | undefined;
|
|
303
307
|
} | undefined;
|
|
304
|
-
custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
|
|
305
|
-
item_id?: string | undefined;
|
|
306
|
-
device_id?: string | undefined;
|
|
307
|
-
event_value?: string | undefined;
|
|
308
308
|
}>, "many">;
|
|
309
309
|
}, "strip", z.ZodTypeAny, {
|
|
310
310
|
events: {
|
|
311
311
|
event_type: string;
|
|
312
312
|
captured_at: Date;
|
|
313
|
+
item_id?: string | undefined;
|
|
314
|
+
device_id?: import("bson-objectid").default | undefined;
|
|
315
|
+
event_value?: string | undefined;
|
|
313
316
|
event_properties?: {
|
|
314
|
-
tracking?: {
|
|
315
|
-
id: string;
|
|
316
|
-
type: string;
|
|
317
|
-
} | undefined;
|
|
318
|
-
item_id?: string | undefined;
|
|
319
|
-
rating?: number | undefined;
|
|
320
|
-
price?: number | undefined;
|
|
321
|
-
order_id?: string | undefined;
|
|
322
|
-
page?: string | undefined;
|
|
323
317
|
section?: string | undefined;
|
|
324
|
-
position?: number | undefined;
|
|
325
|
-
search_query?: string | undefined;
|
|
326
318
|
prev_section?: string | undefined;
|
|
327
319
|
recommendation_id?: string | undefined;
|
|
320
|
+
price?: number | undefined;
|
|
321
|
+
order_id?: string | undefined;
|
|
322
|
+
rating?: number | undefined;
|
|
328
323
|
prev_page?: string | undefined;
|
|
324
|
+
page?: string | undefined;
|
|
325
|
+
position?: number | undefined;
|
|
326
|
+
item_id?: string | undefined;
|
|
329
327
|
items?: {
|
|
330
|
-
id: string;
|
|
331
328
|
price: number;
|
|
329
|
+
id: string;
|
|
332
330
|
}[] | undefined;
|
|
331
|
+
search_query?: string | undefined;
|
|
333
332
|
order_amount?: number | undefined;
|
|
334
333
|
paid_amount?: number | undefined;
|
|
334
|
+
tracking?: {
|
|
335
|
+
type: string;
|
|
336
|
+
id: string;
|
|
337
|
+
} | undefined;
|
|
335
338
|
} | undefined;
|
|
339
|
+
custom_event_properties?: Record<string, string | number | boolean | string[] | Date | {}[] | {} | undefined> | undefined;
|
|
336
340
|
internal_event_properties?: {
|
|
337
341
|
url?: string | undefined;
|
|
338
342
|
ref?: string | undefined;
|
|
339
343
|
} | undefined;
|
|
340
|
-
custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
|
|
341
|
-
item_id?: string | undefined;
|
|
342
|
-
device_id?: import("bson-objectid").default | undefined;
|
|
343
|
-
event_value?: string | undefined;
|
|
344
344
|
}[];
|
|
345
345
|
}, {
|
|
346
346
|
events: {
|
|
347
347
|
event_type: string;
|
|
348
348
|
captured_at: string;
|
|
349
|
+
item_id?: string | undefined;
|
|
350
|
+
device_id?: string | undefined;
|
|
351
|
+
event_value?: string | undefined;
|
|
349
352
|
event_properties?: {
|
|
350
|
-
tracking?: {
|
|
351
|
-
id: string;
|
|
352
|
-
type: string;
|
|
353
|
-
} | undefined;
|
|
354
|
-
item_id?: string | undefined;
|
|
355
|
-
rating?: number | undefined;
|
|
356
|
-
price?: number | undefined;
|
|
357
|
-
order_id?: string | undefined;
|
|
358
|
-
page?: string | undefined;
|
|
359
353
|
section?: string | undefined;
|
|
360
|
-
position?: number | undefined;
|
|
361
|
-
search_query?: string | undefined;
|
|
362
354
|
prev_section?: string | undefined;
|
|
363
355
|
recommendation_id?: string | undefined;
|
|
356
|
+
price?: number | undefined;
|
|
357
|
+
order_id?: string | undefined;
|
|
358
|
+
rating?: number | undefined;
|
|
364
359
|
prev_page?: string | undefined;
|
|
360
|
+
page?: string | undefined;
|
|
361
|
+
position?: number | undefined;
|
|
362
|
+
item_id?: string | undefined;
|
|
365
363
|
items?: {
|
|
366
|
-
id: string;
|
|
367
364
|
price: number;
|
|
365
|
+
id: string;
|
|
368
366
|
}[] | undefined;
|
|
367
|
+
search_query?: string | undefined;
|
|
369
368
|
order_amount?: number | undefined;
|
|
370
369
|
paid_amount?: number | undefined;
|
|
370
|
+
tracking?: {
|
|
371
|
+
type: string;
|
|
372
|
+
id: string;
|
|
373
|
+
} | undefined;
|
|
371
374
|
} | undefined;
|
|
375
|
+
custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
|
|
372
376
|
internal_event_properties?: {
|
|
373
377
|
url?: string | undefined;
|
|
374
378
|
ref?: string | undefined;
|
|
375
379
|
} | undefined;
|
|
376
|
-
custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
|
|
377
|
-
item_id?: string | undefined;
|
|
378
|
-
device_id?: string | undefined;
|
|
379
|
-
event_value?: string | undefined;
|
|
380
380
|
}[];
|
|
381
381
|
}>;
|
|
382
382
|
type Body = Serialize<z.input<typeof bodySchema>>;
|
|
@@ -451,7 +451,7 @@ export declare namespace APIs {
|
|
|
451
451
|
const bodySchema: z.ZodObject<{
|
|
452
452
|
properties: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodNull, z.ZodUndefined]>>;
|
|
453
453
|
}, "strip", z.ZodTypeAny, {
|
|
454
|
-
properties: Record<string, string | number | boolean |
|
|
454
|
+
properties: Record<string, string | number | boolean | string[] | Date | {}[] | {} | null | undefined>;
|
|
455
455
|
}, {
|
|
456
456
|
properties: Record<string, string | number | boolean | string[] | {}[] | {} | null | undefined>;
|
|
457
457
|
}>;
|
|
@@ -525,5 +525,298 @@ export declare namespace APIs {
|
|
|
525
525
|
type PathParam = Serialize<z.input<typeof pathSchema>>;
|
|
526
526
|
type ResponseData = RecResponse;
|
|
527
527
|
}
|
|
528
|
+
namespace crmEventsCreate {
|
|
529
|
+
const name = "crmEventsCreate";
|
|
530
|
+
const path = "/applications/{application_id}/crm-events";
|
|
531
|
+
const method = HttpMethod.POST;
|
|
532
|
+
const bodySchema: z.ZodObject<{
|
|
533
|
+
notification_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
|
|
534
|
+
crm_event_type: z.ZodUnion<[z.ZodLiteral<"push_opened">, z.ZodLiteral<"button_clicked">, z.ZodLiteral<"landing_clicked">, z.ZodLiteral<"inapp_opened">]>;
|
|
535
|
+
captured_at: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>;
|
|
536
|
+
item_id: z.ZodOptional<z.ZodString>;
|
|
537
|
+
}, "strip", z.ZodTypeAny, {
|
|
538
|
+
captured_at: Date;
|
|
539
|
+
notification_id: import("bson-objectid").default;
|
|
540
|
+
crm_event_type: "push_opened" | "button_clicked" | "landing_clicked" | "inapp_opened";
|
|
541
|
+
item_id?: string | undefined;
|
|
542
|
+
}, {
|
|
543
|
+
captured_at: string;
|
|
544
|
+
notification_id: string;
|
|
545
|
+
crm_event_type: "push_opened" | "button_clicked" | "landing_clicked" | "inapp_opened";
|
|
546
|
+
item_id?: string | undefined;
|
|
547
|
+
}>;
|
|
548
|
+
type Body = Serialize<z.input<typeof bodySchema>>;
|
|
549
|
+
const pathSchema: z.ZodObject<{
|
|
550
|
+
application_id: z.ZodString;
|
|
551
|
+
}, "strip", z.ZodTypeAny, {
|
|
552
|
+
application_id: string;
|
|
553
|
+
}, {
|
|
554
|
+
application_id: string;
|
|
555
|
+
}>;
|
|
556
|
+
type PathParam = Serialize<z.input<typeof pathSchema>>;
|
|
557
|
+
type ResponseData = boolean;
|
|
558
|
+
}
|
|
559
|
+
namespace inappsDispatcher {
|
|
560
|
+
const name = "inappsDispatcher";
|
|
561
|
+
const path = "/applications/{application_id}/inapps/dispatch";
|
|
562
|
+
const method = HttpMethod.POST;
|
|
563
|
+
const pathSchema: z.ZodObject<{
|
|
564
|
+
application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
|
|
565
|
+
}, "strip", z.ZodTypeAny, {
|
|
566
|
+
application_id: import("bson-objectid").default;
|
|
567
|
+
}, {
|
|
568
|
+
application_id: string;
|
|
569
|
+
}>;
|
|
570
|
+
type PathParam = Serialize<z.input<typeof pathSchema>>;
|
|
571
|
+
const bodySchema: z.ZodObject<{
|
|
572
|
+
blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
|
|
573
|
+
device_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
|
|
574
|
+
platform: z.ZodUnion<[z.ZodLiteral<DevicePlatform.android>, z.ZodLiteral<DevicePlatform.ios>, z.ZodLiteral<DevicePlatform.browser>]>;
|
|
575
|
+
events: z.ZodArray<z.ZodObject<{
|
|
576
|
+
device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
|
|
577
|
+
event_type: z.ZodString;
|
|
578
|
+
event_properties: z.ZodOptional<z.ZodObject<{
|
|
579
|
+
section: z.ZodOptional<z.ZodString>;
|
|
580
|
+
prev_section: z.ZodOptional<z.ZodString>;
|
|
581
|
+
recommendation_id: z.ZodOptional<z.ZodString>;
|
|
582
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
583
|
+
order_id: z.ZodOptional<z.ZodString>;
|
|
584
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
585
|
+
prev_page: z.ZodOptional<z.ZodString>;
|
|
586
|
+
page: z.ZodOptional<z.ZodString>;
|
|
587
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
588
|
+
item_id: z.ZodOptional<z.ZodString>;
|
|
589
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
590
|
+
id: z.ZodString;
|
|
591
|
+
price: z.ZodNumber;
|
|
592
|
+
}, "strip", z.ZodTypeAny, {
|
|
593
|
+
price: number;
|
|
594
|
+
id: string;
|
|
595
|
+
}, {
|
|
596
|
+
price: number;
|
|
597
|
+
id: string;
|
|
598
|
+
}>, "many">>;
|
|
599
|
+
search_query: z.ZodOptional<z.ZodString>;
|
|
600
|
+
order_amount: z.ZodOptional<z.ZodNumber>;
|
|
601
|
+
paid_amount: z.ZodOptional<z.ZodNumber>;
|
|
602
|
+
tracking: z.ZodOptional<z.ZodObject<{
|
|
603
|
+
id: z.ZodString;
|
|
604
|
+
type: z.ZodString;
|
|
605
|
+
}, "strip", z.ZodTypeAny, {
|
|
606
|
+
type: string;
|
|
607
|
+
id: string;
|
|
608
|
+
}, {
|
|
609
|
+
type: string;
|
|
610
|
+
id: string;
|
|
611
|
+
}>>;
|
|
612
|
+
}, "strip", z.ZodTypeAny, {
|
|
613
|
+
section?: string | undefined;
|
|
614
|
+
prev_section?: string | undefined;
|
|
615
|
+
recommendation_id?: string | undefined;
|
|
616
|
+
price?: number | undefined;
|
|
617
|
+
order_id?: string | undefined;
|
|
618
|
+
rating?: number | undefined;
|
|
619
|
+
prev_page?: string | undefined;
|
|
620
|
+
page?: string | undefined;
|
|
621
|
+
position?: number | undefined;
|
|
622
|
+
item_id?: string | undefined;
|
|
623
|
+
items?: {
|
|
624
|
+
price: number;
|
|
625
|
+
id: string;
|
|
626
|
+
}[] | undefined;
|
|
627
|
+
search_query?: string | undefined;
|
|
628
|
+
order_amount?: number | undefined;
|
|
629
|
+
paid_amount?: number | undefined;
|
|
630
|
+
tracking?: {
|
|
631
|
+
type: string;
|
|
632
|
+
id: string;
|
|
633
|
+
} | undefined;
|
|
634
|
+
}, {
|
|
635
|
+
section?: string | undefined;
|
|
636
|
+
prev_section?: string | undefined;
|
|
637
|
+
recommendation_id?: string | undefined;
|
|
638
|
+
price?: number | undefined;
|
|
639
|
+
order_id?: string | undefined;
|
|
640
|
+
rating?: number | undefined;
|
|
641
|
+
prev_page?: string | undefined;
|
|
642
|
+
page?: string | undefined;
|
|
643
|
+
position?: number | undefined;
|
|
644
|
+
item_id?: string | undefined;
|
|
645
|
+
items?: {
|
|
646
|
+
price: number;
|
|
647
|
+
id: string;
|
|
648
|
+
}[] | undefined;
|
|
649
|
+
search_query?: string | undefined;
|
|
650
|
+
order_amount?: number | undefined;
|
|
651
|
+
paid_amount?: number | undefined;
|
|
652
|
+
tracking?: {
|
|
653
|
+
type: string;
|
|
654
|
+
id: string;
|
|
655
|
+
} | undefined;
|
|
656
|
+
}>>;
|
|
657
|
+
custom_event_properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>>>;
|
|
658
|
+
internal_event_properties: z.ZodOptional<z.ZodObject<{
|
|
659
|
+
url: z.ZodOptional<z.ZodString>;
|
|
660
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
661
|
+
}, "strip", z.ZodTypeAny, {
|
|
662
|
+
url?: string | undefined;
|
|
663
|
+
ref?: string | undefined;
|
|
664
|
+
}, {
|
|
665
|
+
url?: string | undefined;
|
|
666
|
+
ref?: string | undefined;
|
|
667
|
+
}>>;
|
|
668
|
+
captured_at: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>;
|
|
669
|
+
}, "strip", z.ZodTypeAny, {
|
|
670
|
+
event_type: string;
|
|
671
|
+
captured_at: Date;
|
|
672
|
+
device_id?: import("bson-objectid").default | undefined;
|
|
673
|
+
event_properties?: {
|
|
674
|
+
section?: string | undefined;
|
|
675
|
+
prev_section?: string | undefined;
|
|
676
|
+
recommendation_id?: string | undefined;
|
|
677
|
+
price?: number | undefined;
|
|
678
|
+
order_id?: string | undefined;
|
|
679
|
+
rating?: number | undefined;
|
|
680
|
+
prev_page?: string | undefined;
|
|
681
|
+
page?: string | undefined;
|
|
682
|
+
position?: number | undefined;
|
|
683
|
+
item_id?: string | undefined;
|
|
684
|
+
items?: {
|
|
685
|
+
price: number;
|
|
686
|
+
id: string;
|
|
687
|
+
}[] | undefined;
|
|
688
|
+
search_query?: string | undefined;
|
|
689
|
+
order_amount?: number | undefined;
|
|
690
|
+
paid_amount?: number | undefined;
|
|
691
|
+
tracking?: {
|
|
692
|
+
type: string;
|
|
693
|
+
id: string;
|
|
694
|
+
} | undefined;
|
|
695
|
+
} | undefined;
|
|
696
|
+
custom_event_properties?: Record<string, string | number | boolean | string[] | Date | {}[] | {} | undefined> | undefined;
|
|
697
|
+
internal_event_properties?: {
|
|
698
|
+
url?: string | undefined;
|
|
699
|
+
ref?: string | undefined;
|
|
700
|
+
} | undefined;
|
|
701
|
+
}, {
|
|
702
|
+
event_type: string;
|
|
703
|
+
captured_at: string;
|
|
704
|
+
device_id?: string | undefined;
|
|
705
|
+
event_properties?: {
|
|
706
|
+
section?: string | undefined;
|
|
707
|
+
prev_section?: string | undefined;
|
|
708
|
+
recommendation_id?: string | undefined;
|
|
709
|
+
price?: number | undefined;
|
|
710
|
+
order_id?: string | undefined;
|
|
711
|
+
rating?: number | undefined;
|
|
712
|
+
prev_page?: string | undefined;
|
|
713
|
+
page?: string | undefined;
|
|
714
|
+
position?: number | undefined;
|
|
715
|
+
item_id?: string | undefined;
|
|
716
|
+
items?: {
|
|
717
|
+
price: number;
|
|
718
|
+
id: string;
|
|
719
|
+
}[] | undefined;
|
|
720
|
+
search_query?: string | undefined;
|
|
721
|
+
order_amount?: number | undefined;
|
|
722
|
+
paid_amount?: number | undefined;
|
|
723
|
+
tracking?: {
|
|
724
|
+
type: string;
|
|
725
|
+
id: string;
|
|
726
|
+
} | undefined;
|
|
727
|
+
} | undefined;
|
|
728
|
+
custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
|
|
729
|
+
internal_event_properties?: {
|
|
730
|
+
url?: string | undefined;
|
|
731
|
+
ref?: string | undefined;
|
|
732
|
+
} | undefined;
|
|
733
|
+
}>, "many">;
|
|
734
|
+
}, "strip", z.ZodTypeAny, {
|
|
735
|
+
blux_user_id: import("bson-objectid").default;
|
|
736
|
+
device_id: import("bson-objectid").default;
|
|
737
|
+
platform: DevicePlatform;
|
|
738
|
+
events: {
|
|
739
|
+
event_type: string;
|
|
740
|
+
captured_at: Date;
|
|
741
|
+
device_id?: import("bson-objectid").default | undefined;
|
|
742
|
+
event_properties?: {
|
|
743
|
+
section?: string | undefined;
|
|
744
|
+
prev_section?: string | undefined;
|
|
745
|
+
recommendation_id?: string | undefined;
|
|
746
|
+
price?: number | undefined;
|
|
747
|
+
order_id?: string | undefined;
|
|
748
|
+
rating?: number | undefined;
|
|
749
|
+
prev_page?: string | undefined;
|
|
750
|
+
page?: string | undefined;
|
|
751
|
+
position?: number | undefined;
|
|
752
|
+
item_id?: string | undefined;
|
|
753
|
+
items?: {
|
|
754
|
+
price: number;
|
|
755
|
+
id: string;
|
|
756
|
+
}[] | undefined;
|
|
757
|
+
search_query?: string | undefined;
|
|
758
|
+
order_amount?: number | undefined;
|
|
759
|
+
paid_amount?: number | undefined;
|
|
760
|
+
tracking?: {
|
|
761
|
+
type: string;
|
|
762
|
+
id: string;
|
|
763
|
+
} | undefined;
|
|
764
|
+
} | undefined;
|
|
765
|
+
custom_event_properties?: Record<string, string | number | boolean | string[] | Date | {}[] | {} | undefined> | undefined;
|
|
766
|
+
internal_event_properties?: {
|
|
767
|
+
url?: string | undefined;
|
|
768
|
+
ref?: string | undefined;
|
|
769
|
+
} | undefined;
|
|
770
|
+
}[];
|
|
771
|
+
}, {
|
|
772
|
+
blux_user_id: string;
|
|
773
|
+
device_id: string;
|
|
774
|
+
platform: DevicePlatform;
|
|
775
|
+
events: {
|
|
776
|
+
event_type: string;
|
|
777
|
+
captured_at: string;
|
|
778
|
+
device_id?: string | undefined;
|
|
779
|
+
event_properties?: {
|
|
780
|
+
section?: string | undefined;
|
|
781
|
+
prev_section?: string | undefined;
|
|
782
|
+
recommendation_id?: string | undefined;
|
|
783
|
+
price?: number | undefined;
|
|
784
|
+
order_id?: string | undefined;
|
|
785
|
+
rating?: number | undefined;
|
|
786
|
+
prev_page?: string | undefined;
|
|
787
|
+
page?: string | undefined;
|
|
788
|
+
position?: number | undefined;
|
|
789
|
+
item_id?: string | undefined;
|
|
790
|
+
items?: {
|
|
791
|
+
price: number;
|
|
792
|
+
id: string;
|
|
793
|
+
}[] | undefined;
|
|
794
|
+
search_query?: string | undefined;
|
|
795
|
+
order_amount?: number | undefined;
|
|
796
|
+
paid_amount?: number | undefined;
|
|
797
|
+
tracking?: {
|
|
798
|
+
type: string;
|
|
799
|
+
id: string;
|
|
800
|
+
} | undefined;
|
|
801
|
+
} | undefined;
|
|
802
|
+
custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
|
|
803
|
+
internal_event_properties?: {
|
|
804
|
+
url?: string | undefined;
|
|
805
|
+
ref?: string | undefined;
|
|
806
|
+
} | undefined;
|
|
807
|
+
}[];
|
|
808
|
+
}>;
|
|
809
|
+
type Body = Serialize<z.input<typeof bodySchema>>;
|
|
810
|
+
type ResponseData = ({
|
|
811
|
+
notificationId: string;
|
|
812
|
+
inappId: string;
|
|
813
|
+
htmlString: string;
|
|
814
|
+
baseUrl: string;
|
|
815
|
+
} & {
|
|
816
|
+
shouldDisplay: true;
|
|
817
|
+
}) | {
|
|
818
|
+
shouldDisplay: false;
|
|
819
|
+
};
|
|
820
|
+
}
|
|
528
821
|
}
|
|
529
822
|
export {};
|
package/dist/src/apis/APIs.js
CHANGED
|
@@ -138,5 +138,56 @@ export var APIs;
|
|
|
138
138
|
blux_user_id: objectIdSchema,
|
|
139
139
|
});
|
|
140
140
|
})(bluxUsersGetItemRecommendationsV2 = APIs.bluxUsersGetItemRecommendationsV2 || (APIs.bluxUsersGetItemRecommendationsV2 = {}));
|
|
141
|
+
let crmEventsCreate;
|
|
142
|
+
(function (crmEventsCreate) {
|
|
143
|
+
crmEventsCreate.name = "crmEventsCreate";
|
|
144
|
+
crmEventsCreate.path = `${applicationsRoot}/crm-events`;
|
|
145
|
+
crmEventsCreate.method = HttpMethod.POST;
|
|
146
|
+
crmEventsCreate.bodySchema = z.object({
|
|
147
|
+
notification_id: objectIdSchema,
|
|
148
|
+
crm_event_type: z.union([
|
|
149
|
+
z.literal("push_opened"),
|
|
150
|
+
z.literal("button_clicked"),
|
|
151
|
+
z.literal("landing_clicked"),
|
|
152
|
+
z.literal("inapp_opened"),
|
|
153
|
+
]),
|
|
154
|
+
captured_at: dateSchema,
|
|
155
|
+
item_id: z.string().optional(),
|
|
156
|
+
});
|
|
157
|
+
crmEventsCreate.pathSchema = z.object({
|
|
158
|
+
application_id: z.string(),
|
|
159
|
+
});
|
|
160
|
+
})(crmEventsCreate = APIs.crmEventsCreate || (APIs.crmEventsCreate = {}));
|
|
161
|
+
let inappsDispatcher;
|
|
162
|
+
(function (inappsDispatcher) {
|
|
163
|
+
inappsDispatcher.name = "inappsDispatcher";
|
|
164
|
+
inappsDispatcher.path = `${applicationsRoot}/inapps/dispatch`;
|
|
165
|
+
inappsDispatcher.method = HttpMethod.POST;
|
|
166
|
+
inappsDispatcher.pathSchema = z.object({
|
|
167
|
+
application_id: objectIdSchema,
|
|
168
|
+
});
|
|
169
|
+
inappsDispatcher.bodySchema = z.object({
|
|
170
|
+
blux_user_id: objectIdSchema,
|
|
171
|
+
device_id: objectIdSchema,
|
|
172
|
+
platform: z.union([
|
|
173
|
+
z.literal(DevicePlatform.android),
|
|
174
|
+
z.literal(DevicePlatform.ios),
|
|
175
|
+
z.literal(DevicePlatform.browser),
|
|
176
|
+
]),
|
|
177
|
+
events: z.array(z.object({
|
|
178
|
+
device_id: objectIdSchema.optional(),
|
|
179
|
+
event_type: z.string(),
|
|
180
|
+
event_properties: eventPropertiesSchema.optional(),
|
|
181
|
+
custom_event_properties: customPropertiesSchema.optional(),
|
|
182
|
+
internal_event_properties: z
|
|
183
|
+
.object({
|
|
184
|
+
url: z.string().optional(),
|
|
185
|
+
ref: z.string().optional(),
|
|
186
|
+
})
|
|
187
|
+
.optional(),
|
|
188
|
+
captured_at: dateSchema,
|
|
189
|
+
})),
|
|
190
|
+
});
|
|
191
|
+
})(inappsDispatcher = APIs.inappsDispatcher || (APIs.inappsDispatcher = {}));
|
|
141
192
|
})(APIs || (APIs = {}));
|
|
142
193
|
//# sourceMappingURL=APIs.js.map
|