@blux.ai/web-sdk 1.2.2 → 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.
Files changed (99) hide show
  1. package/README.md +46 -31
  2. package/dist/package.json +1 -1
  3. package/dist/src/BluxClient.d.ts +35 -22
  4. package/dist/src/BluxClient.js +259 -114
  5. package/dist/src/BluxClient.js.map +1 -1
  6. package/dist/src/apis/APIs.d.ts +408 -115
  7. package/dist/src/apis/APIs.js +53 -2
  8. package/dist/src/apis/APIs.js.map +1 -1
  9. package/dist/src/apis/createCrmEvent.d.ts +4 -0
  10. package/dist/src/apis/createCrmEvent.js +7 -0
  11. package/dist/src/apis/createCrmEvent.js.map +1 -0
  12. package/dist/src/apis/createEvent.d.ts +1 -1
  13. package/dist/src/apis/createEvent.js.map +1 -1
  14. package/dist/src/apis/getItemRecommendations.d.ts +1 -1
  15. package/dist/src/apis/getItemRecommendations.js.map +1 -1
  16. package/dist/src/apis/inappsDispatch.d.ts +5 -0
  17. package/dist/src/apis/inappsDispatch.js +7 -0
  18. package/dist/src/apis/inappsDispatch.js.map +1 -0
  19. package/dist/src/apis/initialize.d.ts +1 -1
  20. package/dist/src/apis/initialize.js.map +1 -1
  21. package/dist/src/apis/signIn.d.ts +1 -1
  22. package/dist/src/apis/signIn.js.map +1 -1
  23. package/dist/src/apis/signOut.d.ts +1 -1
  24. package/dist/src/apis/signOut.js.map +1 -1
  25. package/dist/src/apis/updateCustomUserProperties.d.ts +1 -1
  26. package/dist/src/apis/updateCustomUserProperties.js.map +1 -1
  27. package/dist/src/apis/updateUserProperties.d.ts +1 -1
  28. package/dist/src/apis/updateUserProperties.js.map +1 -1
  29. package/dist/src/constants/BLUX_ATTRIBUTES.d.ts +2 -2
  30. package/dist/src/constants/BLUX_ATTRIBUTES.js +2 -2
  31. package/dist/src/constants/BLUX_ATTRIBUTES.js.map +1 -1
  32. package/dist/src/events/AddCartaddEvent.d.ts +2 -2
  33. package/dist/src/events/AddCartaddEvent.js +4 -4
  34. package/dist/src/events/AddCartaddEvent.js.map +1 -1
  35. package/dist/src/events/AddClickEvent.d.ts +5 -0
  36. package/dist/src/events/AddClickEvent.js +14 -0
  37. package/dist/src/events/AddClickEvent.js.map +1 -0
  38. package/dist/src/events/AddCustomEvent.d.ts +2 -2
  39. package/dist/src/events/AddCustomEvent.js +4 -4
  40. package/dist/src/events/AddCustomEvent.js.map +1 -1
  41. package/dist/src/events/AddInstantImpressionEvent.d.ts +2 -2
  42. package/dist/src/events/AddInstantImpressionEvent.js +4 -5
  43. package/dist/src/events/AddInstantImpressionEvent.js.map +1 -1
  44. package/dist/src/events/AddLikeEvent.d.ts +2 -2
  45. package/dist/src/events/AddLikeEvent.js +4 -3
  46. package/dist/src/events/AddLikeEvent.js.map +1 -1
  47. package/dist/src/events/AddOrderEvent.d.ts +5 -0
  48. package/dist/src/events/AddOrderEvent.js +16 -0
  49. package/dist/src/events/AddOrderEvent.js.map +1 -0
  50. package/dist/src/events/AddPageViewEvent.d.ts +2 -2
  51. package/dist/src/events/AddPageViewEvent.js +3 -3
  52. package/dist/src/events/AddPageViewEvent.js.map +1 -1
  53. package/dist/src/events/AddPageVisitEvent.d.ts +2 -2
  54. package/dist/src/events/AddPageVisitEvent.js +5 -2
  55. package/dist/src/events/AddPageVisitEvent.js.map +1 -1
  56. package/dist/src/events/AddPersistentImpressionEvent.d.ts +2 -2
  57. package/dist/src/events/AddPersistentImpressionEvent.js +4 -5
  58. package/dist/src/events/AddPersistentImpressionEvent.js.map +1 -1
  59. package/dist/src/events/AddProductDetailViewEvent.d.ts +2 -2
  60. package/dist/src/events/AddProductDetailViewEvent.js +4 -7
  61. package/dist/src/events/AddProductDetailViewEvent.js.map +1 -1
  62. package/dist/src/events/AddRateEvent.d.ts +2 -2
  63. package/dist/src/events/AddRateEvent.js +3 -3
  64. package/dist/src/events/AddRateEvent.js.map +1 -1
  65. package/dist/src/events/AddSearchEvent.d.ts +2 -2
  66. package/dist/src/events/AddSearchEvent.js +3 -3
  67. package/dist/src/events/AddSearchEvent.js.map +1 -1
  68. package/dist/src/events/AddSectionViewEvent.d.ts +2 -2
  69. package/dist/src/events/AddSectionViewEvent.js +3 -4
  70. package/dist/src/events/AddSectionViewEvent.js.map +1 -1
  71. package/dist/src/events/Event.d.ts +4 -2
  72. package/dist/src/events/Event.js +3 -1
  73. package/dist/src/events/Event.js.map +1 -1
  74. package/dist/src/events/VisitEvent.d.ts +2 -2
  75. package/dist/src/events/VisitEvent.js +5 -2
  76. package/dist/src/events/VisitEvent.js.map +1 -1
  77. package/dist/src/events/index.d.ts +4 -1
  78. package/dist/src/events/index.js +4 -1
  79. package/dist/src/events/index.js.map +1 -1
  80. package/dist/src/events/types.d.ts +34 -34
  81. package/dist/src/events/types.js.map +1 -1
  82. package/dist/src/recs/ItemRec.js.map +1 -1
  83. package/dist/src/utils/LocalStorage.d.ts +2 -0
  84. package/dist/src/utils/LocalStorage.js +8 -1
  85. package/dist/src/utils/LocalStorage.js.map +1 -1
  86. package/dist/src/utils/Logger.js +0 -1
  87. package/dist/src/utils/Logger.js.map +1 -1
  88. package/dist/src/utils/SessionStorage.js +0 -1
  89. package/dist/src/utils/SessionStorage.js.map +1 -1
  90. package/dist/src/utils/operators.js +0 -1
  91. package/dist/src/utils/operators.js.map +1 -1
  92. package/dist/src/utils/zodSchemas.d.ts +31 -31
  93. package/dist/src/utils/zodSchemas.js +8 -6
  94. package/dist/src/utils/zodSchemas.js.map +1 -1
  95. package/dist/tsconfig.tsbuildinfo +1 -1
  96. package/package.json +1 -1
  97. package/dist/src/events/AddPurchaseEvent.d.ts +0 -5
  98. package/dist/src/events/AddPurchaseEvent.js +0 -15
  99. package/dist/src/events/AddPurchaseEvent.js.map +0 -1
@@ -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",
@@ -15,7 +15,7 @@ export declare enum DevicePlatform {
15
15
  export declare namespace APIs {
16
16
  namespace bluxUsersInitialize {
17
17
  const name = "bluxUsersInitialize";
18
- const path: string;
18
+ const path = "/applications/{application_id}/blux-users/initialize";
19
19
  const method = HttpMethod.POST;
20
20
  const bodySchema: z.ZodObject<{
21
21
  device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
@@ -70,7 +70,7 @@ export declare namespace APIs {
70
70
  }
71
71
  namespace bluxUsersSignIn {
72
72
  const name = "bluxUsersSignIn";
73
- const path: string;
73
+ const path = "/applications/{application_id}/blux-users/{blux_user_id}/sign-in";
74
74
  const method = HttpMethod.PUT;
75
75
  const bodySchema: z.ZodObject<{
76
76
  user_id: z.ZodString;
@@ -100,7 +100,7 @@ export declare namespace APIs {
100
100
  }
101
101
  namespace bluxUsersSignOut {
102
102
  const name = "bluxUsersSignOut";
103
- const path: string;
103
+ const path = "/applications/{application_id}/blux-users/{blux_user_id}/sign-out";
104
104
  const method = HttpMethod.PUT;
105
105
  const bodySchema: z.ZodObject<{
106
106
  device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
@@ -127,7 +127,7 @@ export declare namespace APIs {
127
127
  }
128
128
  namespace bluxUsersCollectEvents {
129
129
  const name = "bluxUsersCollectEvents";
130
- const path: string;
130
+ const path = "/applications/{application_id}/blux-users/{blux_user_id}/collect-events";
131
131
  const method = HttpMethod.POST;
132
132
  const pathSchema: z.ZodObject<{
133
133
  application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
@@ -161,71 +161,71 @@ 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>;
172
172
  paid_amount: z.ZodOptional<z.ZodNumber>;
173
- trackings: z.ZodOptional<z.ZodArray<z.ZodObject<{
173
+ tracking: z.ZodOptional<z.ZodObject<{
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;
182
- }>, "many">>;
181
+ id: string;
182
+ }>>;
183
183
  }, "strip", z.ZodTypeAny, {
184
- item_id?: string | undefined;
185
- recommendation_id?: string | undefined;
186
- prev_page?: string | undefined;
184
+ section?: string | undefined;
187
185
  prev_section?: string | undefined;
188
- trackings?: {
189
- id: string;
190
- type: string;
191
- }[] | undefined;
192
- rating?: number | undefined;
186
+ recommendation_id?: string | undefined;
193
187
  price?: number | undefined;
194
188
  order_id?: string | undefined;
189
+ rating?: number | undefined;
190
+ prev_page?: string | undefined;
195
191
  page?: string | undefined;
196
- section?: string | undefined;
197
192
  position?: number | undefined;
198
- search_query?: string | 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;
201
+ tracking?: {
202
+ type: string;
203
+ id: string;
204
+ } | undefined;
205
205
  }, {
206
- item_id?: string | undefined;
207
- recommendation_id?: string | undefined;
208
- prev_page?: string | undefined;
206
+ section?: string | undefined;
209
207
  prev_section?: string | undefined;
210
- trackings?: {
211
- id: string;
212
- type: string;
213
- }[] | undefined;
214
- rating?: number | undefined;
208
+ recommendation_id?: string | undefined;
215
209
  price?: number | undefined;
216
210
  order_id?: string | undefined;
211
+ rating?: number | undefined;
212
+ prev_page?: string | undefined;
217
213
  page?: string | undefined;
218
- section?: string | undefined;
219
214
  position?: number | undefined;
220
- search_query?: string | 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
- 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.ZodUndefined]>>>;
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<{
230
230
  url: z.ZodOptional<z.ZodString>;
231
231
  ref: z.ZodOptional<z.ZodString>;
@@ -240,143 +240,143 @@ export declare namespace APIs {
240
240
  }, "strip", z.ZodTypeAny, {
241
241
  event_type: string;
242
242
  captured_at: Date;
243
- internal_event_properties?: {
244
- url?: string | undefined;
245
- ref?: string | undefined;
246
- } | undefined;
243
+ item_id?: string | undefined;
244
+ device_id?: import("bson-objectid").default | undefined;
245
+ event_value?: string | undefined;
247
246
  event_properties?: {
248
- item_id?: string | undefined;
249
- recommendation_id?: string | undefined;
250
- prev_page?: string | undefined;
247
+ section?: string | undefined;
251
248
  prev_section?: string | undefined;
252
- trackings?: {
253
- id: string;
254
- type: string;
255
- }[] | undefined;
256
- rating?: number | undefined;
249
+ recommendation_id?: string | undefined;
257
250
  price?: number | undefined;
258
251
  order_id?: string | undefined;
252
+ rating?: number | undefined;
253
+ prev_page?: string | undefined;
259
254
  page?: string | undefined;
260
- section?: string | undefined;
261
255
  position?: number | undefined;
262
- search_query?: string | undefined;
256
+ item_id?: string | undefined;
263
257
  items?: {
264
- id: string;
265
258
  price: number;
259
+ id: string;
266
260
  }[] | undefined;
261
+ search_query?: string | undefined;
267
262
  order_amount?: number | undefined;
268
263
  paid_amount?: number | undefined;
264
+ tracking?: {
265
+ type: string;
266
+ id: string;
267
+ } | undefined;
269
268
  } | 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
- }, {
275
- event_type: string;
276
- captured_at: string;
269
+ custom_event_properties?: Record<string, string | number | boolean | string[] | Date | {}[] | {} | undefined> | undefined;
277
270
  internal_event_properties?: {
278
271
  url?: string | undefined;
279
272
  ref?: string | undefined;
280
273
  } | undefined;
274
+ }, {
275
+ event_type: string;
276
+ captured_at: string;
277
+ item_id?: string | undefined;
278
+ device_id?: string | undefined;
279
+ event_value?: string | undefined;
281
280
  event_properties?: {
282
- item_id?: string | undefined;
283
- recommendation_id?: string | undefined;
284
- prev_page?: string | undefined;
281
+ section?: string | undefined;
285
282
  prev_section?: string | undefined;
286
- trackings?: {
287
- id: string;
288
- type: string;
289
- }[] | undefined;
290
- rating?: number | undefined;
283
+ recommendation_id?: string | undefined;
291
284
  price?: number | undefined;
292
285
  order_id?: string | undefined;
286
+ rating?: number | undefined;
287
+ prev_page?: string | undefined;
293
288
  page?: string | undefined;
294
- section?: string | undefined;
295
289
  position?: number | undefined;
296
- search_query?: string | undefined;
290
+ item_id?: string | undefined;
297
291
  items?: {
298
- id: string;
299
292
  price: number;
293
+ id: string;
300
294
  }[] | undefined;
295
+ search_query?: string | undefined;
301
296
  order_amount?: number | undefined;
302
297
  paid_amount?: number | undefined;
298
+ tracking?: {
299
+ type: string;
300
+ id: string;
301
+ } | undefined;
302
+ } | undefined;
303
+ custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
304
+ internal_event_properties?: {
305
+ url?: string | undefined;
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
- internal_event_properties?: {
314
- url?: string | undefined;
315
- ref?: string | undefined;
316
- } | undefined;
313
+ item_id?: string | undefined;
314
+ device_id?: import("bson-objectid").default | undefined;
315
+ event_value?: string | undefined;
317
316
  event_properties?: {
318
- item_id?: string | undefined;
319
- recommendation_id?: string | undefined;
320
- prev_page?: string | undefined;
317
+ section?: string | undefined;
321
318
  prev_section?: string | undefined;
322
- trackings?: {
323
- id: string;
324
- type: string;
325
- }[] | undefined;
326
- rating?: number | undefined;
319
+ recommendation_id?: string | undefined;
327
320
  price?: number | undefined;
328
321
  order_id?: string | undefined;
322
+ rating?: number | undefined;
323
+ prev_page?: string | undefined;
329
324
  page?: string | undefined;
330
- section?: string | undefined;
331
325
  position?: number | undefined;
332
- search_query?: string | undefined;
326
+ item_id?: string | undefined;
333
327
  items?: {
334
- id: string;
335
328
  price: number;
329
+ id: string;
336
330
  }[] | undefined;
331
+ search_query?: string | undefined;
337
332
  order_amount?: number | undefined;
338
333
  paid_amount?: number | undefined;
334
+ tracking?: {
335
+ type: string;
336
+ id: string;
337
+ } | undefined;
338
+ } | undefined;
339
+ custom_event_properties?: Record<string, string | number | boolean | string[] | Date | {}[] | {} | undefined> | undefined;
340
+ internal_event_properties?: {
341
+ url?: string | undefined;
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
- internal_event_properties?: {
350
- url?: string | undefined;
351
- ref?: string | undefined;
352
- } | undefined;
349
+ item_id?: string | undefined;
350
+ device_id?: string | undefined;
351
+ event_value?: string | undefined;
353
352
  event_properties?: {
354
- item_id?: string | undefined;
355
- recommendation_id?: string | undefined;
356
- prev_page?: string | undefined;
353
+ section?: string | undefined;
357
354
  prev_section?: string | undefined;
358
- trackings?: {
359
- id: string;
360
- type: string;
361
- }[] | undefined;
362
- rating?: number | undefined;
355
+ recommendation_id?: string | undefined;
363
356
  price?: number | undefined;
364
357
  order_id?: string | undefined;
358
+ rating?: number | undefined;
359
+ prev_page?: string | undefined;
365
360
  page?: string | undefined;
366
- section?: string | undefined;
367
361
  position?: number | undefined;
368
- search_query?: string | undefined;
362
+ item_id?: string | undefined;
369
363
  items?: {
370
- id: string;
371
364
  price: number;
365
+ id: string;
372
366
  }[] | undefined;
367
+ search_query?: string | undefined;
373
368
  order_amount?: number | undefined;
374
369
  paid_amount?: number | undefined;
370
+ tracking?: {
371
+ type: string;
372
+ id: string;
373
+ } | undefined;
374
+ } | undefined;
375
+ custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
376
+ internal_event_properties?: {
377
+ url?: string | undefined;
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>>;
@@ -384,7 +384,7 @@ export declare namespace APIs {
384
384
  }
385
385
  namespace bluxUsersUpdateUserProperties {
386
386
  const name = "bluxUsersUpdateUserProperties";
387
- const path: string;
387
+ const path = "/applications/{application_id}/blux-users/{blux_user_id}/update-user-properties";
388
388
  const method = HttpMethod.PUT;
389
389
  const bodySchema: z.ZodObject<{
390
390
  properties: z.ZodObject<{
@@ -446,14 +446,14 @@ export declare namespace APIs {
446
446
  }
447
447
  namespace bluxUsersUpdateCustomUserProperties {
448
448
  const name = "bluxUsersUpdateCustomUserProperties";
449
- const path: string;
449
+ const path = "/applications/{application_id}/blux-users/{blux_user_id}/update-custom-user-properties";
450
450
  const method = HttpMethod.PUT;
451
451
  const bodySchema: z.ZodObject<{
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.ZodNull, z.ZodUndefined]>>;
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 | Date | string[] | {}[] | null | undefined>;
454
+ properties: Record<string, string | number | boolean | string[] | Date | {}[] | {} | null | undefined>;
455
455
  }, {
456
- properties: Record<string, string | number | boolean | string[] | {}[] | null | undefined>;
456
+ properties: Record<string, string | number | boolean | string[] | {}[] | {} | null | undefined>;
457
457
  }>;
458
458
  type Body = Serialize<z.input<typeof bodySchema>>;
459
459
  const pathSchema: z.ZodObject<{
@@ -473,7 +473,7 @@ export declare namespace APIs {
473
473
  }
474
474
  namespace bluxUsersGetItemRecommendationsV2 {
475
475
  const name = "bluxUsersGetItemRecommendationsV2";
476
- const path: string;
476
+ const path = "/v2/applications/{application_id}/blux-users/{blux_user_id}/item-recommendations";
477
477
  const method = HttpMethod.POST;
478
478
  const bodySchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
479
479
  application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
@@ -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 {};