@reactionary/core 0.3.8 → 0.3.10
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/decorators/reactionary.decorator.js +1 -1
- package/package.json +1 -1
- package/schemas/capabilities.schema.js +1 -1
- package/schemas/errors/generic.error.js +1 -1
- package/schemas/errors/invalid-input.error.js +1 -1
- package/schemas/errors/invalid-output.error.js +1 -1
- package/schemas/errors/not-found.error.js +1 -1
- package/schemas/models/base.model.js +11 -11
- package/schemas/models/cart.model.js +1 -1
- package/schemas/models/category.model.js +1 -1
- package/schemas/models/checkout.model.js +2 -2
- package/schemas/models/cost.model.js +1 -1
- package/schemas/models/currency.model.js +1 -1
- package/schemas/models/identifiers.model.js +16 -16
- package/schemas/models/identity.model.js +1 -1
- package/schemas/models/inventory.model.js +1 -1
- package/schemas/models/order-search.model.js +1 -1
- package/schemas/models/order.model.js +1 -1
- package/schemas/models/payment.model.js +2 -2
- package/schemas/models/price.model.js +3 -3
- package/schemas/models/product-recommendations.model.js +5 -4
- package/schemas/models/product-search.model.js +2 -2
- package/schemas/models/product.model.js +24 -24
- package/schemas/models/profile.model.js +1 -1
- package/schemas/models/shipping-method.model.js +8 -8
- package/schemas/models/store.model.js +1 -1
- package/schemas/mutations/analytics/index.js +1 -1
- package/schemas/mutations/analytics/product-add-to-cart.mutation.js +1 -1
- package/schemas/mutations/analytics/product-details-view.mutation.js +1 -1
- package/schemas/mutations/analytics/product-summary-click.mutation.js +1 -1
- package/schemas/mutations/analytics/product-summary-view.mutation.js +1 -1
- package/schemas/mutations/analytics/purchase.mutation.js +1 -1
- package/schemas/mutations/base.mutation.js +1 -1
- package/schemas/mutations/cart.mutation.js +1 -1
- package/schemas/mutations/checkout.mutation.js +1 -1
- package/schemas/mutations/identity.mutation.js +1 -1
- package/schemas/mutations/inventory.mutation.js +1 -1
- package/schemas/mutations/price.mutation.js +1 -1
- package/schemas/mutations/product.mutation.js +1 -1
- package/schemas/mutations/profile.mutation.js +3 -3
- package/schemas/mutations/search.mutation.js +1 -1
- package/schemas/queries/analytics.query.js +1 -1
- package/schemas/queries/base.query.js +1 -1
- package/schemas/queries/category.query.js +1 -1
- package/schemas/queries/product-associations.query.js +2 -2
- package/schemas/queries/product-recommendations.query.js +12 -12
- package/schemas/queries/product-search.query.js +3 -3
- package/schemas/queries/product.query.js +1 -1
- package/schemas/queries/store.query.js +1 -1
- package/schemas/session.schema.js +6 -6
- package/src/cache/cache.interface.d.ts +1 -1
- package/src/cache/memory-cache.d.ts +1 -1
- package/src/cache/noop-cache.d.ts +1 -1
- package/src/cache/redis-cache.d.ts +1 -1
- package/src/decorators/reactionary.decorator.d.ts +1 -1
- package/src/schemas/capabilities.schema.d.ts +1 -1
- package/src/schemas/errors/generic.error.d.ts +1 -1
- 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/errors/not-found.error.d.ts +1 -1
- package/src/schemas/models/analytics.model.d.ts +1 -1
- package/src/schemas/models/base.model.d.ts +1 -1
- package/src/schemas/models/cart.model.d.ts +1 -1
- package/src/schemas/models/category.model.d.ts +1 -1
- package/src/schemas/models/checkout.model.d.ts +1 -1
- package/src/schemas/models/cost.model.d.ts +1 -1
- package/src/schemas/models/currency.model.d.ts +1 -1
- package/src/schemas/models/identifiers.model.d.ts +1 -1
- package/src/schemas/models/identity.model.d.ts +1 -1
- package/src/schemas/models/inventory.model.d.ts +1 -1
- package/src/schemas/models/order-search.model.d.ts +17 -17
- package/src/schemas/models/order.model.d.ts +1 -1
- package/src/schemas/models/payment.model.d.ts +1 -1
- package/src/schemas/models/price.model.d.ts +1 -1
- package/src/schemas/models/product-recommendations.model.d.ts +37 -36
- package/src/schemas/models/product-search.model.d.ts +1 -1
- package/src/schemas/models/product.model.d.ts +1 -1
- package/src/schemas/models/profile.model.d.ts +1 -1
- package/src/schemas/models/shipping-method.model.d.ts +1 -1
- package/src/schemas/models/store.model.d.ts +1 -1
- package/src/schemas/mutations/analytics/index.d.ts +63 -63
- package/src/schemas/mutations/analytics/product-add-to-cart.mutation.d.ts +10 -10
- package/src/schemas/mutations/analytics/product-details-view.mutation.d.ts +3 -3
- package/src/schemas/mutations/analytics/product-summary-click.mutation.d.ts +1 -1
- package/src/schemas/mutations/analytics/product-summary-view.mutation.d.ts +1 -1
- package/src/schemas/mutations/analytics/purchase.mutation.d.ts +34 -34
- package/src/schemas/mutations/base.mutation.d.ts +1 -1
- package/src/schemas/mutations/cart.mutation.d.ts +1 -1
- package/src/schemas/mutations/checkout.mutation.d.ts +1 -1
- package/src/schemas/mutations/identity.mutation.d.ts +1 -1
- package/src/schemas/mutations/profile.mutation.d.ts +1 -1
- package/src/schemas/queries/base.query.d.ts +1 -1
- package/src/schemas/queries/category.query.d.ts +1 -1
- package/src/schemas/queries/checkout.query.d.ts +1 -1
- package/src/schemas/queries/identity.query.d.ts +1 -1
- package/src/schemas/queries/inventory.query.d.ts +1 -1
- package/src/schemas/queries/order.query.d.ts +1 -1
- package/src/schemas/queries/price.query.d.ts +1 -1
- package/src/schemas/queries/product-associations.query.d.ts +7 -7
- package/src/schemas/queries/product-recommendations.query.d.ts +31 -31
- package/src/schemas/queries/product-search.query.d.ts +1 -1
- package/src/schemas/queries/product.query.d.ts +1 -1
- package/src/schemas/queries/profile.query.d.ts +1 -1
- package/src/schemas/queries/store.query.d.ts +1 -1
- package/src/schemas/session.schema.d.ts +1 -1
- package/src/zod-utils.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type * as z from 'zod';
|
|
2
2
|
import type { InferType } from '../../zod-utils.js';
|
|
3
3
|
export declare const IdentityQuerySelfSchema: z.ZodObject<{}, z.core.$loose>;
|
|
4
4
|
export type IdentityQuerySelf = InferType<typeof IdentityQuerySelfSchema>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import z from "zod";
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
export declare const ProductAssociationsGetAccessoriesQuerySchema: z.ZodObject<{
|
|
3
3
|
forProductVariant: z.ZodObject<{
|
|
4
4
|
sku: z.ZodString;
|
|
5
|
-
}, z.
|
|
5
|
+
}, z.core.$loose>;
|
|
6
6
|
numberOfAccessories: z.ZodNumber;
|
|
7
|
-
}, z.
|
|
7
|
+
}, z.core.$loose>;
|
|
8
8
|
export declare const ProductAssociationsGetSparepartsQuerySchema: z.ZodObject<{
|
|
9
9
|
forProductVariant: z.ZodObject<{
|
|
10
10
|
sku: z.ZodString;
|
|
11
|
-
}, z.
|
|
12
|
-
}, z.
|
|
11
|
+
}, z.core.$loose>;
|
|
12
|
+
}, z.core.$loose>;
|
|
13
13
|
export declare const ProductAssociationsGetReplacementsQuerySchema: z.ZodObject<{
|
|
14
14
|
forProductVariant: z.ZodObject<{
|
|
15
15
|
sku: z.ZodString;
|
|
16
|
-
}, z.
|
|
17
|
-
}, z.
|
|
16
|
+
}, z.core.$loose>;
|
|
17
|
+
}, z.core.$loose>;
|
|
18
18
|
export type ProductAssociationsGetAccessoriesQuery = z.infer<typeof ProductAssociationsGetAccessoriesQuerySchema>;
|
|
19
19
|
export type ProductAssociationsGetSparepartsQuery = z.infer<typeof ProductAssociationsGetSparepartsQuerySchema>;
|
|
20
20
|
export type ProductAssociationsGetReplacementsQuery = z.infer<typeof ProductAssociationsGetReplacementsQuerySchema>;
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
import z from "zod";
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
import type { InferType } from "../../zod-utils.js";
|
|
3
3
|
export declare const ProductRecommendationBaseQuerySchema: z.ZodObject<{
|
|
4
4
|
numberOfRecommendations: z.ZodNumber;
|
|
5
5
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
-
}, z.
|
|
6
|
+
}, z.core.$loose>;
|
|
7
7
|
export declare const ProductRecommendationsByCollectionQuerySchema: z.ZodObject<{
|
|
8
8
|
numberOfRecommendations: z.ZodNumber;
|
|
9
9
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
10
|
collectionName: z.ZodString;
|
|
11
11
|
sourceProduct: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
12
|
key: z.ZodString;
|
|
13
|
-
}, z.
|
|
13
|
+
}, z.core.$loose>>>;
|
|
14
14
|
sourceCategory: z.ZodOptional<z.ZodObject<{
|
|
15
15
|
key: z.ZodString;
|
|
16
|
-
}, z.
|
|
17
|
-
}, z.
|
|
16
|
+
}, z.core.$loose>>;
|
|
17
|
+
}, z.core.$loose>;
|
|
18
18
|
export declare const ProductRecommendationProductBasedBaseQuerySchema: z.ZodObject<{
|
|
19
19
|
numberOfRecommendations: z.ZodNumber;
|
|
20
20
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
21
|
sourceProduct: z.ZodObject<{
|
|
22
22
|
key: z.ZodString;
|
|
23
|
-
}, z.
|
|
24
|
-
}, z.
|
|
23
|
+
}, z.core.$loose>;
|
|
24
|
+
}, z.core.$loose>;
|
|
25
25
|
export declare const ProductRecommendationAlgorithmFrequentlyBoughtTogetherQuerySchema: z.ZodObject<{
|
|
26
26
|
numberOfRecommendations: z.ZodNumber;
|
|
27
27
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
28
|
sourceProduct: z.ZodObject<{
|
|
29
29
|
key: z.ZodString;
|
|
30
|
-
}, z.
|
|
30
|
+
}, z.core.$loose>;
|
|
31
31
|
algorithm: z.ZodLiteral<"frequentlyBoughtTogether">;
|
|
32
|
-
}, z.
|
|
32
|
+
}, z.core.$loose>;
|
|
33
33
|
export declare const ProductRecommendationAlgorithmSimilarProductsQuerySchema: z.ZodObject<{
|
|
34
34
|
numberOfRecommendations: z.ZodNumber;
|
|
35
35
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
36
|
sourceProduct: z.ZodObject<{
|
|
37
37
|
key: z.ZodString;
|
|
38
|
-
}, z.
|
|
38
|
+
}, z.core.$loose>;
|
|
39
39
|
algorithm: z.ZodLiteral<"similar">;
|
|
40
|
-
}, z.
|
|
40
|
+
}, z.core.$loose>;
|
|
41
41
|
export declare const ProductRecommendationAlgorithmRelatedProductsQuerySchema: z.ZodObject<{
|
|
42
42
|
numberOfRecommendations: z.ZodNumber;
|
|
43
43
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
44
|
sourceProduct: z.ZodObject<{
|
|
45
45
|
key: z.ZodString;
|
|
46
|
-
}, z.
|
|
46
|
+
}, z.core.$loose>;
|
|
47
47
|
algorithm: z.ZodLiteral<"related">;
|
|
48
|
-
}, z.
|
|
48
|
+
}, z.core.$loose>;
|
|
49
49
|
export declare const ProductRecommendationAlgorithmTrendingInCategoryQuerySchema: z.ZodObject<{
|
|
50
50
|
numberOfRecommendations: z.ZodNumber;
|
|
51
51
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
52
|
algorithm: z.ZodLiteral<"trendingInCategory">;
|
|
53
53
|
sourceCategory: z.ZodObject<{
|
|
54
54
|
key: z.ZodString;
|
|
55
|
-
}, z.
|
|
56
|
-
}, z.
|
|
55
|
+
}, z.core.$loose>;
|
|
56
|
+
}, z.core.$loose>;
|
|
57
57
|
export declare const ProductRecommendationAlgorithmPopuplarProductsQuerySchema: z.ZodObject<{
|
|
58
58
|
numberOfRecommendations: z.ZodNumber;
|
|
59
59
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
60
|
algorithm: z.ZodLiteral<"popular">;
|
|
61
|
-
}, z.
|
|
61
|
+
}, z.core.$loose>;
|
|
62
62
|
export declare const ProductRecommendationAlgorithmTopPicksProductsQuerySchema: z.ZodObject<{
|
|
63
63
|
numberOfRecommendations: z.ZodNumber;
|
|
64
64
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
65
|
algorithm: z.ZodLiteral<"topPicks">;
|
|
66
|
-
}, z.
|
|
66
|
+
}, z.core.$loose>;
|
|
67
67
|
export declare const ProductRecommendationAlgorithmAlsoViewedProductsQuerySchema: z.ZodObject<{
|
|
68
68
|
numberOfRecommendations: z.ZodNumber;
|
|
69
69
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
70
70
|
sourceProduct: z.ZodObject<{
|
|
71
71
|
key: z.ZodString;
|
|
72
|
-
}, z.
|
|
72
|
+
}, z.core.$loose>;
|
|
73
73
|
algorithm: z.ZodLiteral<"alsoViewed">;
|
|
74
|
-
}, z.
|
|
74
|
+
}, z.core.$loose>;
|
|
75
75
|
export declare const ProductRecommendationsQuerySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
76
76
|
numberOfRecommendations: z.ZodNumber;
|
|
77
77
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
78
78
|
sourceProduct: z.ZodObject<{
|
|
79
79
|
key: z.ZodString;
|
|
80
|
-
}, z.
|
|
80
|
+
}, z.core.$loose>;
|
|
81
81
|
algorithm: z.ZodLiteral<"frequentlyBoughtTogether">;
|
|
82
|
-
}, z.
|
|
82
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
83
83
|
numberOfRecommendations: z.ZodNumber;
|
|
84
84
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
85
|
algorithm: z.ZodLiteral<"trendingInCategory">;
|
|
86
86
|
sourceCategory: z.ZodObject<{
|
|
87
87
|
key: z.ZodString;
|
|
88
|
-
}, z.
|
|
89
|
-
}, z.
|
|
88
|
+
}, z.core.$loose>;
|
|
89
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
90
90
|
numberOfRecommendations: z.ZodNumber;
|
|
91
91
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
92
|
sourceProduct: z.ZodObject<{
|
|
93
93
|
key: z.ZodString;
|
|
94
|
-
}, z.
|
|
94
|
+
}, z.core.$loose>;
|
|
95
95
|
algorithm: z.ZodLiteral<"similar">;
|
|
96
|
-
}, z.
|
|
96
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
97
97
|
numberOfRecommendations: z.ZodNumber;
|
|
98
98
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
99
99
|
sourceProduct: z.ZodObject<{
|
|
100
100
|
key: z.ZodString;
|
|
101
|
-
}, z.
|
|
101
|
+
}, z.core.$loose>;
|
|
102
102
|
algorithm: z.ZodLiteral<"related">;
|
|
103
|
-
}, z.
|
|
103
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
104
104
|
numberOfRecommendations: z.ZodNumber;
|
|
105
105
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
106
|
algorithm: z.ZodLiteral<"popular">;
|
|
107
|
-
}, z.
|
|
107
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
108
108
|
numberOfRecommendations: z.ZodNumber;
|
|
109
109
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
110
|
algorithm: z.ZodLiteral<"topPicks">;
|
|
111
|
-
}, z.
|
|
111
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
112
112
|
numberOfRecommendations: z.ZodNumber;
|
|
113
113
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
114
|
sourceProduct: z.ZodObject<{
|
|
115
115
|
key: z.ZodString;
|
|
116
|
-
}, z.
|
|
116
|
+
}, z.core.$loose>;
|
|
117
117
|
algorithm: z.ZodLiteral<"alsoViewed">;
|
|
118
|
-
}, z.
|
|
118
|
+
}, z.core.$loose>], "algorithm">;
|
|
119
119
|
export type ProductRecommendationsQuery = InferType<typeof ProductRecommendationsQuerySchema>;
|
|
120
120
|
export type ProductRecommendationsByCollectionQuery = InferType<typeof ProductRecommendationsByCollectionQuerySchema>;
|
|
121
121
|
export type ProductRecommendationAlgorithmTopPicksProductsQuery = InferType<typeof ProductRecommendationAlgorithmTopPicksProductsQuerySchema>;
|
package/src/zod-utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type z from "zod";
|
|
1
|
+
import type * as z from "zod";
|
|
2
2
|
export type StripIndexSignature<T> = T extends (infer U)[] ? StripIndexSignature<U>[] : T extends readonly (infer U)[] ? readonly StripIndexSignature<U>[] : T extends Set<infer U> ? Set<StripIndexSignature<U>> : T extends Map<infer K, infer V> ? Map<StripIndexSignature<K>, StripIndexSignature<V>> : T extends Promise<infer U> ? Promise<StripIndexSignature<U>> : T extends object ? {
|
|
3
3
|
[K in keyof T as K extends string ? string extends K ? never : K : K]: StripIndexSignature<T[K]>;
|
|
4
4
|
} : T;
|