@reactionary/core 0.11.2 → 0.12.1
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/analytics/context.js +173 -0
- package/analytics/dispatcher.js +201 -0
- package/analytics/index.js +6 -0
- package/analytics/legacy-adapter.js +48 -0
- package/analytics/origins.js +64 -0
- package/analytics/recording-subscriber.js +26 -0
- package/analytics/refs.js +14 -0
- package/capabilities/analytics.capability.js +265 -84
- package/capabilities/analytics.provider.js +13 -0
- package/capabilities/index.js +1 -0
- package/client/client-builder.js +45 -16
- package/index.js +1 -0
- package/package.json +1 -1
- package/schemas/models/analytics/consent.model.js +10 -0
- package/schemas/models/analytics/dispatch.model.js +15 -0
- package/schemas/models/analytics/envelope.model.js +38 -0
- package/schemas/models/analytics/event-parts.model.js +47 -0
- package/schemas/models/analytics/event.model.js +255 -0
- package/schemas/models/analytics/index.js +6 -0
- package/schemas/models/analytics/origin.model.js +113 -0
- package/schemas/models/analytics.model.js +0 -2
- package/schemas/models/index.js +1 -0
- package/schemas/mutations/analytics/events/account.mutation.js +66 -0
- package/schemas/mutations/analytics/events/base.mutation.js +10 -0
- package/schemas/mutations/analytics/events/browse.mutation.js +53 -0
- package/schemas/mutations/analytics/events/commerce.mutation.js +79 -0
- package/schemas/mutations/analytics/events/index.js +85 -0
- package/schemas/mutations/analytics/index.js +1 -0
- package/schemas/session.schema.js +3 -1
- package/src/analytics/context.d.ts +85 -0
- package/src/analytics/dispatcher.d.ts +71 -0
- package/src/analytics/index.d.ts +6 -0
- package/src/analytics/legacy-adapter.d.ts +10 -0
- package/src/analytics/origins.d.ts +25 -0
- package/src/analytics/recording-subscriber.d.ts +18 -0
- package/src/analytics/refs.d.ts +8 -0
- package/src/capabilities/analytics.capability.d.ts +64 -17
- package/src/capabilities/analytics.provider.d.ts +24 -0
- package/src/capabilities/index.d.ts +1 -0
- package/src/client/client-builder.d.ts +25 -2
- package/src/index.d.ts +1 -0
- package/src/schemas/capabilities.schema.d.ts +8 -1
- package/src/schemas/models/analytics/consent.model.d.ts +13 -0
- package/src/schemas/models/analytics/dispatch.model.d.ts +29 -0
- package/src/schemas/models/analytics/envelope.model.d.ts +565 -0
- package/src/schemas/models/analytics/event-parts.model.d.ts +248 -0
- package/src/schemas/models/analytics/event.model.d.ts +83182 -0
- package/src/schemas/models/analytics/index.d.ts +6 -0
- package/src/schemas/models/analytics/origin.model.d.ts +275 -0
- package/src/schemas/models/analytics.model.d.ts +1 -2
- package/src/schemas/models/index.d.ts +1 -0
- package/src/schemas/mutations/analytics/events/account.mutation.d.ts +1939 -0
- package/src/schemas/mutations/analytics/events/base.mutation.d.ts +121 -0
- package/src/schemas/mutations/analytics/events/browse.mutation.d.ts +1832 -0
- package/src/schemas/mutations/analytics/events/commerce.mutation.d.ts +30188 -0
- package/src/schemas/mutations/analytics/events/index.d.ts +33928 -0
- package/src/schemas/mutations/analytics/index.d.ts +1 -0
- package/src/schemas/mutations/checkout.mutation.d.ts +4 -4
- package/src/schemas/mutations/product-list.mutation.d.ts +2 -2
- package/src/schemas/session.schema.d.ts +8 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import type { InferType } from '../../../../zod-utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Fields every analytics helper accepts next to its required arguments.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AnalyticsEventMutationBaseSchema: z.ZodObject<{
|
|
7
|
+
origin: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8
|
+
type: z.ZodLiteral<"search">;
|
|
9
|
+
identifier: z.ZodObject<{
|
|
10
|
+
term: z.ZodString;
|
|
11
|
+
facets: z.ZodArray<z.ZodObject<{
|
|
12
|
+
facet: z.ZodObject<{
|
|
13
|
+
key: z.ZodString;
|
|
14
|
+
}, z.core.$loose>;
|
|
15
|
+
key: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
filters: z.ZodArray<z.ZodString>;
|
|
18
|
+
paginationOptions: z.ZodObject<{
|
|
19
|
+
pageNumber: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
}, z.core.$loose>;
|
|
22
|
+
categoryFilter: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
facet: z.ZodObject<{
|
|
24
|
+
key: z.ZodString;
|
|
25
|
+
}, z.core.$loose>;
|
|
26
|
+
key: z.ZodString;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
taxIdentifier: z.ZodString;
|
|
30
|
+
}, z.core.$loose>>;
|
|
31
|
+
}, z.core.$loose>;
|
|
32
|
+
position: z.ZodInt;
|
|
33
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"autocomplete">;
|
|
35
|
+
term: z.ZodString;
|
|
36
|
+
position: z.ZodInt;
|
|
37
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"category">;
|
|
39
|
+
categoryId: z.ZodObject<{
|
|
40
|
+
key: z.ZodString;
|
|
41
|
+
}, z.core.$loose>;
|
|
42
|
+
filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
43
|
+
facet: z.ZodObject<{
|
|
44
|
+
key: z.ZodString;
|
|
45
|
+
}, z.core.$loose>;
|
|
46
|
+
key: z.ZodString;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
position: z.ZodInt;
|
|
49
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<"list">;
|
|
51
|
+
recommendationId: z.ZodOptional<z.ZodObject<{
|
|
52
|
+
key: z.ZodString;
|
|
53
|
+
algorithm: z.ZodString;
|
|
54
|
+
}, z.core.$loose>>;
|
|
55
|
+
carouselName: z.ZodString;
|
|
56
|
+
position: z.ZodInt;
|
|
57
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"associations">;
|
|
59
|
+
productId: z.ZodObject<{
|
|
60
|
+
key: z.ZodString;
|
|
61
|
+
}, z.core.$loose>;
|
|
62
|
+
kind: z.ZodEnum<{
|
|
63
|
+
related: "related";
|
|
64
|
+
"cross-sell": "cross-sell";
|
|
65
|
+
upsell: "upsell";
|
|
66
|
+
accessories: "accessories";
|
|
67
|
+
}>;
|
|
68
|
+
position: z.ZodInt;
|
|
69
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
70
|
+
type: z.ZodLiteral<"product-list">;
|
|
71
|
+
listId: z.ZodObject<{
|
|
72
|
+
listType: z.ZodEnum<{
|
|
73
|
+
favorite: "favorite";
|
|
74
|
+
wish: "wish";
|
|
75
|
+
requisition: "requisition";
|
|
76
|
+
shopping: "shopping";
|
|
77
|
+
}>;
|
|
78
|
+
key: z.ZodString;
|
|
79
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
userId: z.ZodString;
|
|
81
|
+
}, z.core.$loose>>;
|
|
82
|
+
}, z.core.$loose>;
|
|
83
|
+
position: z.ZodInt;
|
|
84
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
85
|
+
type: z.ZodLiteral<"promotion">;
|
|
86
|
+
promotionId: z.ZodObject<{
|
|
87
|
+
key: z.ZodString;
|
|
88
|
+
}, z.core.$loose>;
|
|
89
|
+
slot: z.ZodString;
|
|
90
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"content">;
|
|
92
|
+
contentId: z.ZodString;
|
|
93
|
+
slot: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"cart">;
|
|
96
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
97
|
+
upsell: "upsell";
|
|
98
|
+
page: "page";
|
|
99
|
+
"mini-cart": "mini-cart";
|
|
100
|
+
}>>;
|
|
101
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
102
|
+
type: z.ZodLiteral<"order">;
|
|
103
|
+
orderId: z.ZodObject<{
|
|
104
|
+
key: z.ZodString;
|
|
105
|
+
}, z.core.$loose>;
|
|
106
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"quick-order">;
|
|
108
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
"sku-entry": "sku-entry";
|
|
110
|
+
csv: "csv";
|
|
111
|
+
scan: "scan";
|
|
112
|
+
}>>;
|
|
113
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"pdp">;
|
|
115
|
+
readonly upstream: z.ZodOptional<z.ZodType<import("../../../models/analytics/origin.model.js").Origin>>;
|
|
116
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
117
|
+
type: z.ZodLiteral<"direct">;
|
|
118
|
+
}, z.core.$loose>], "type">>;
|
|
119
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
120
|
+
}, z.core.$loose>;
|
|
121
|
+
export type AnalyticsEventMutationBase = InferType<typeof AnalyticsEventMutationBaseSchema>;
|