@chordcommerce/analytics 1.6.0 → 1.8.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 +30 -0
- package/dist/client/index.d.ts +19 -12
- package/dist/client/index.js +171 -50
- package/dist/types/client.d.ts +9 -31
- package/dist/types/formatters.d.ts +114 -0
- package/dist/types/formatters.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/input.d.ts +201 -28
- package/dist/validators/objects.d.ts +30 -27
- package/dist/validators/objects.js +12 -9
- package/dist/validators/tracking-plan-map.d.ts +226 -9
- package/dist/validators/tracking-plan.d.ts +361 -28
- package/dist/validators/tracking-plan.js +61 -12
- package/package.json +1 -1
|
@@ -346,18 +346,15 @@ export const productAddedToWishlistSchema = z.record(z.any()).and(z.object({
|
|
|
346
346
|
wishlist_id: z.string().optional(),
|
|
347
347
|
wishlist_name: z.string().optional(),
|
|
348
348
|
}));
|
|
349
|
-
export const
|
|
349
|
+
export const productClickedProductSchema = z.record(z.any()).and(z.object({
|
|
350
350
|
affiliation: z.string().optional(),
|
|
351
351
|
brand: z.string().optional(),
|
|
352
352
|
bundle: z.boolean().optional(),
|
|
353
|
-
cart_id: z.string().optional(),
|
|
354
353
|
category: z.string().optional(),
|
|
355
354
|
coupon: z.string().optional(),
|
|
356
|
-
currency: z.string().optional(),
|
|
357
355
|
description: z.string().optional(),
|
|
358
356
|
image_url: z.string().optional(),
|
|
359
357
|
line_item_id: z.string().optional(),
|
|
360
|
-
list: z.string().optional(),
|
|
361
358
|
name: z.string(),
|
|
362
359
|
option_values: z.array(z.string()).optional(),
|
|
363
360
|
position: z.number().optional(),
|
|
@@ -506,28 +503,24 @@ export const productSharedSchema = z.record(z.any()).and(z.object({
|
|
|
506
503
|
url: z.string().optional(),
|
|
507
504
|
variant: z.string().optional(),
|
|
508
505
|
}));
|
|
509
|
-
export const
|
|
506
|
+
export const productViewedProductSchema = z.record(z.any()).and(z.object({
|
|
510
507
|
affiliation: z.string().optional(),
|
|
511
508
|
brand: z.string().optional(),
|
|
512
509
|
bundle: z.boolean().optional(),
|
|
513
|
-
cart_id: z.string().optional(),
|
|
514
510
|
category: z.string().optional(),
|
|
515
511
|
coupon: z.string().optional(),
|
|
516
|
-
currency: z.string().optional(),
|
|
517
512
|
description: z.string().optional(),
|
|
518
513
|
image_url: z.string().optional(),
|
|
519
514
|
line_item_id: z.string().optional(),
|
|
520
|
-
list: z.string().optional(),
|
|
521
515
|
name: z.string(),
|
|
522
516
|
option_values: z.array(z.string()).optional(),
|
|
523
517
|
position: z.number().optional(),
|
|
524
|
-
price: z.number(),
|
|
518
|
+
price: z.number().optional(),
|
|
525
519
|
product_id: z.string(),
|
|
526
520
|
quantity: z.number().optional(),
|
|
527
|
-
sku: z.string(),
|
|
521
|
+
sku: z.string().optional(),
|
|
528
522
|
slug: z.string().optional(),
|
|
529
523
|
url: z.string().optional(),
|
|
530
|
-
value: z.number().optional(),
|
|
531
524
|
variant: z.string().optional(),
|
|
532
525
|
}));
|
|
533
526
|
export const productsSearchedSchema = z.record(z.any()).and(z.object({
|
|
@@ -641,12 +634,14 @@ export const fluffyProductSchema = z.record(z.any()).and(z.object({
|
|
|
641
634
|
}));
|
|
642
635
|
export const signedInSchema = z.record(z.any()).and(z.object({
|
|
643
636
|
email: z.string().optional(),
|
|
637
|
+
method: z.string().optional(),
|
|
644
638
|
}));
|
|
645
639
|
export const signedOutSchema = z.record(z.any()).and(z.object({
|
|
646
640
|
email: z.string().optional(),
|
|
647
641
|
}));
|
|
648
642
|
export const signedUpSchema = z.record(z.any()).and(z.object({
|
|
649
643
|
email: z.string().optional(),
|
|
644
|
+
method: z.string().optional(),
|
|
650
645
|
}));
|
|
651
646
|
export const stockRequestCreatedSchema = z.record(z.any()).and(z.object({
|
|
652
647
|
affiliation: z.string().optional(),
|
|
@@ -1182,18 +1177,46 @@ export const productAddedSchema = z.record(z.any()).and(z.object({
|
|
|
1182
1177
|
value: z.number(),
|
|
1183
1178
|
variant: z.string().optional(),
|
|
1184
1179
|
}));
|
|
1180
|
+
export const productClickedSchema = z.record(z.any()).and(z.object({
|
|
1181
|
+
affiliation: z.string().optional(),
|
|
1182
|
+
brand: z.string().optional(),
|
|
1183
|
+
bundle: z.boolean().optional(),
|
|
1184
|
+
cart_id: z.string().optional(),
|
|
1185
|
+
category: z.string().optional(),
|
|
1186
|
+
coupon: z.string().optional(),
|
|
1187
|
+
currency: z.string().optional(),
|
|
1188
|
+
description: z.string().optional(),
|
|
1189
|
+
image_url: z.string().optional(),
|
|
1190
|
+
item_list_id: z.string().optional(),
|
|
1191
|
+
item_list_name: z.string().optional(),
|
|
1192
|
+
line_item_id: z.string().optional(),
|
|
1193
|
+
name: z.string(),
|
|
1194
|
+
option_values: z.array(z.string()).optional(),
|
|
1195
|
+
position: z.number().optional(),
|
|
1196
|
+
price: z.number().optional(),
|
|
1197
|
+
product_id: z.string(),
|
|
1198
|
+
products: z.array(productClickedProductSchema).optional(),
|
|
1199
|
+
quantity: z.number().optional(),
|
|
1200
|
+
sku: z.string().optional(),
|
|
1201
|
+
slug: z.string().optional(),
|
|
1202
|
+
url: z.string().optional(),
|
|
1203
|
+
variant: z.string().optional(),
|
|
1204
|
+
}));
|
|
1185
1205
|
export const productListFilteredSchema = z.record(z.any()).and(z.object({
|
|
1186
1206
|
category: z.string().optional(),
|
|
1187
1207
|
filters: z.array(filterSchema).optional(),
|
|
1208
|
+
item_list_id: z.string().optional(),
|
|
1209
|
+
item_list_name: z.string().optional(),
|
|
1188
1210
|
list_id: z.string().optional(),
|
|
1189
1211
|
products: z.array(productListFilteredProductSchema).optional(),
|
|
1190
1212
|
sorts: z.array(sortSchema).optional(),
|
|
1191
1213
|
}));
|
|
1192
1214
|
export const productListViewedSchema = z.record(z.any()).and(z.object({
|
|
1193
1215
|
category: z.string().optional(),
|
|
1216
|
+
item_list_id: z.string().optional(),
|
|
1217
|
+
item_list_name: z.string().optional(),
|
|
1194
1218
|
list_id: z.string().optional(),
|
|
1195
1219
|
products: z.array(productListViewedProductSchema),
|
|
1196
|
-
value: z.number(),
|
|
1197
1220
|
}));
|
|
1198
1221
|
export const productRemovedSchema = z.record(z.any()).and(z.object({
|
|
1199
1222
|
actionable_date: z.string().optional(),
|
|
@@ -1226,6 +1249,32 @@ export const productRemovedSchema = z.record(z.any()).and(z.object({
|
|
|
1226
1249
|
value: z.number().optional(),
|
|
1227
1250
|
variant: z.string().optional(),
|
|
1228
1251
|
}));
|
|
1252
|
+
export const productViewedSchema = z.record(z.any()).and(z.object({
|
|
1253
|
+
affiliation: z.string().optional(),
|
|
1254
|
+
brand: z.string().optional(),
|
|
1255
|
+
bundle: z.boolean().optional(),
|
|
1256
|
+
cart_id: z.string().optional(),
|
|
1257
|
+
category: z.string().optional(),
|
|
1258
|
+
coupon: z.string().optional(),
|
|
1259
|
+
currency: z.string().optional(),
|
|
1260
|
+
description: z.string().optional(),
|
|
1261
|
+
image_url: z.string().optional(),
|
|
1262
|
+
item_list_id: z.string().optional(),
|
|
1263
|
+
item_list_name: z.string().optional(),
|
|
1264
|
+
line_item_id: z.string().optional(),
|
|
1265
|
+
name: z.string(),
|
|
1266
|
+
option_values: z.array(z.string()).optional(),
|
|
1267
|
+
position: z.number().optional(),
|
|
1268
|
+
price: z.number(),
|
|
1269
|
+
product_id: z.string(),
|
|
1270
|
+
products: z.array(productViewedProductSchema).optional(),
|
|
1271
|
+
quantity: z.number().optional(),
|
|
1272
|
+
sku: z.string(),
|
|
1273
|
+
slug: z.string().optional(),
|
|
1274
|
+
url: z.string().optional(),
|
|
1275
|
+
value: z.number().optional(),
|
|
1276
|
+
variant: z.string().optional(),
|
|
1277
|
+
}));
|
|
1229
1278
|
export const shipmentDeliveredShipmentSchema = z.record(z.any()).and(z.object({
|
|
1230
1279
|
additional_tax_total: z.number().optional(),
|
|
1231
1280
|
address: purpleAddressSchema.optional(),
|
package/package.json
CHANGED