@reactionary/core 0.3.0 → 0.3.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/client/client-builder.js +3 -4
- package/decorators/reactionary.decorator.js +2 -2
- package/initialization.js +7 -1
- package/package.json +1 -1
- package/providers/analytics.provider.js +62 -1
- package/schemas/errors/invalid-input.error.js +1 -1
- package/schemas/errors/invalid-output.error.js +1 -1
- package/schemas/models/order.model.js +1 -1
- package/schemas/mutations/analytics/index.js +21 -0
- package/schemas/mutations/analytics/product-add-to-cart.mutation.js +19 -0
- package/schemas/mutations/analytics/product-details-view.mutation.js +10 -0
- package/schemas/mutations/analytics/product-summary-click.mutation.js +20 -0
- package/schemas/mutations/analytics/product-summary-view.mutation.js +19 -0
- package/schemas/mutations/analytics/purchase.mutation.js +10 -0
- package/schemas/mutations/index.js +1 -1
- package/schemas/session.schema.js +10 -2
- package/src/client/client.d.ts +2 -3
- package/src/initialization.d.ts +1 -1
- package/src/providers/analytics.provider.d.ts +14 -0
- package/src/providers/cart.provider.d.ts +3 -0
- package/src/providers/category.provider.d.ts +1 -0
- package/src/schemas/errors/invalid-input.error.d.ts +1 -1
- package/src/schemas/errors/invalid-output.error.d.ts +1 -1
- package/src/schemas/models/identifiers.model.d.ts +3 -0
- package/src/schemas/models/order.model.d.ts +1 -1
- package/src/schemas/mutations/analytics/index.d.ts +2441 -0
- package/src/schemas/mutations/analytics/product-add-to-cart.mutation.d.ts +32 -0
- package/src/schemas/mutations/analytics/product-details-view.mutation.d.ts +9 -0
- package/src/schemas/mutations/analytics/product-summary-click.mutation.d.ts +33 -0
- package/src/schemas/mutations/analytics/product-summary-view.mutation.d.ts +32 -0
- package/src/schemas/mutations/analytics/purchase.mutation.d.ts +2346 -0
- package/src/schemas/mutations/index.d.ts +1 -1
- package/src/schemas/queries/order-search.query.d.ts +3 -0
- package/src/schemas/session.schema.d.ts +43 -6
- package/src/zod-utils.d.ts +4 -1
- package/schemas/mutations/analytics.mutation.js +0 -20
- package/src/schemas/mutations/analytics.mutation.d.ts +0 -110
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import type { InferType } from '../../../zod-utils.js';
|
|
3
|
+
export declare const AnalyticsMutationProductAddToCartEventSchema: z.ZodObject<{
|
|
4
|
+
event: z.ZodLiteral<"product-cart-add">;
|
|
5
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"search">;
|
|
7
|
+
identifier: z.ZodObject<{
|
|
8
|
+
term: z.ZodString;
|
|
9
|
+
facets: z.ZodArray<z.ZodObject<{
|
|
10
|
+
facet: z.ZodObject<{
|
|
11
|
+
key: z.ZodString;
|
|
12
|
+
}, z.z.core.$loose>;
|
|
13
|
+
key: z.ZodString;
|
|
14
|
+
}, z.z.core.$strip>>;
|
|
15
|
+
filters: z.ZodArray<z.ZodString>;
|
|
16
|
+
paginationOptions: z.ZodObject<{
|
|
17
|
+
pageNumber: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
}, z.z.core.$loose>;
|
|
20
|
+
categoryFilter: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
facet: z.ZodObject<{
|
|
22
|
+
key: z.ZodString;
|
|
23
|
+
}, z.z.core.$loose>;
|
|
24
|
+
key: z.ZodString;
|
|
25
|
+
}, z.z.core.$strip>>;
|
|
26
|
+
}, z.z.core.$loose>;
|
|
27
|
+
}, z.z.core.$strip>], "type">>;
|
|
28
|
+
product: z.ZodObject<{
|
|
29
|
+
key: z.ZodString;
|
|
30
|
+
}, z.z.core.$loose>;
|
|
31
|
+
}, z.z.core.$loose>;
|
|
32
|
+
export type AnalyticsMutationProductAddToCartEvent = InferType<typeof AnalyticsMutationProductAddToCartEventSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import type { InferType } from '../../../zod-utils.js';
|
|
3
|
+
export declare const AnalyticsMutationProductDetailsViewEventSchema: z.ZodObject<{
|
|
4
|
+
event: z.ZodLiteral<"product-details-view">;
|
|
5
|
+
product: z.ZodObject<{
|
|
6
|
+
key: z.ZodString;
|
|
7
|
+
}, z.z.core.$loose>;
|
|
8
|
+
}, z.z.core.$loose>;
|
|
9
|
+
export type AnalyticsMutationProductDetailsViewEvent = InferType<typeof AnalyticsMutationProductDetailsViewEventSchema>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { InferType } from '../../../zod-utils.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const AnalyticsMutationProductSummaryClickEventSchema: z.ZodObject<{
|
|
4
|
+
event: z.ZodLiteral<"product-summary-click">;
|
|
5
|
+
product: z.ZodObject<{
|
|
6
|
+
key: z.ZodString;
|
|
7
|
+
}, z.core.$loose>;
|
|
8
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<"search">;
|
|
10
|
+
identifier: z.ZodObject<{
|
|
11
|
+
term: z.ZodString;
|
|
12
|
+
facets: z.ZodArray<z.ZodObject<{
|
|
13
|
+
facet: z.ZodObject<{
|
|
14
|
+
key: z.ZodString;
|
|
15
|
+
}, z.core.$loose>;
|
|
16
|
+
key: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
filters: z.ZodArray<z.ZodString>;
|
|
19
|
+
paginationOptions: z.ZodObject<{
|
|
20
|
+
pageNumber: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
}, z.core.$loose>;
|
|
23
|
+
categoryFilter: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
facet: z.ZodObject<{
|
|
25
|
+
key: z.ZodString;
|
|
26
|
+
}, z.core.$loose>;
|
|
27
|
+
key: z.ZodString;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
}, z.core.$loose>;
|
|
30
|
+
}, z.core.$strip>], "type">>;
|
|
31
|
+
position: z.ZodNumber;
|
|
32
|
+
}, z.core.$loose>;
|
|
33
|
+
export type AnalyticsMutationProductSummaryClickEvent = InferType<typeof AnalyticsMutationProductSummaryClickEventSchema>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { InferType } from '../../../zod-utils.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const AnalyticsMutationProductSummaryViewEventSchema: z.ZodObject<{
|
|
4
|
+
event: z.ZodLiteral<"product-summary-view">;
|
|
5
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"search">;
|
|
7
|
+
identifier: z.ZodObject<{
|
|
8
|
+
term: z.ZodString;
|
|
9
|
+
facets: z.ZodArray<z.ZodObject<{
|
|
10
|
+
facet: z.ZodObject<{
|
|
11
|
+
key: z.ZodString;
|
|
12
|
+
}, z.core.$loose>;
|
|
13
|
+
key: z.ZodString;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
filters: z.ZodArray<z.ZodString>;
|
|
16
|
+
paginationOptions: z.ZodObject<{
|
|
17
|
+
pageNumber: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
}, z.core.$loose>;
|
|
20
|
+
categoryFilter: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
facet: z.ZodObject<{
|
|
22
|
+
key: z.ZodString;
|
|
23
|
+
}, z.core.$loose>;
|
|
24
|
+
key: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$loose>;
|
|
27
|
+
}, z.core.$strip>], "type">>;
|
|
28
|
+
products: z.ZodArray<z.ZodObject<{
|
|
29
|
+
key: z.ZodString;
|
|
30
|
+
}, z.core.$loose>>;
|
|
31
|
+
}, z.core.$loose>;
|
|
32
|
+
export type AnalyticsMutationProductSummaryViewEvent = InferType<typeof AnalyticsMutationProductSummaryViewEventSchema>;
|