@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.
Files changed (106) hide show
  1. package/decorators/reactionary.decorator.js +1 -1
  2. package/package.json +1 -1
  3. package/schemas/capabilities.schema.js +1 -1
  4. package/schemas/errors/generic.error.js +1 -1
  5. package/schemas/errors/invalid-input.error.js +1 -1
  6. package/schemas/errors/invalid-output.error.js +1 -1
  7. package/schemas/errors/not-found.error.js +1 -1
  8. package/schemas/models/base.model.js +11 -11
  9. package/schemas/models/cart.model.js +1 -1
  10. package/schemas/models/category.model.js +1 -1
  11. package/schemas/models/checkout.model.js +2 -2
  12. package/schemas/models/cost.model.js +1 -1
  13. package/schemas/models/currency.model.js +1 -1
  14. package/schemas/models/identifiers.model.js +16 -16
  15. package/schemas/models/identity.model.js +1 -1
  16. package/schemas/models/inventory.model.js +1 -1
  17. package/schemas/models/order-search.model.js +1 -1
  18. package/schemas/models/order.model.js +1 -1
  19. package/schemas/models/payment.model.js +2 -2
  20. package/schemas/models/price.model.js +3 -3
  21. package/schemas/models/product-recommendations.model.js +5 -4
  22. package/schemas/models/product-search.model.js +2 -2
  23. package/schemas/models/product.model.js +24 -24
  24. package/schemas/models/profile.model.js +1 -1
  25. package/schemas/models/shipping-method.model.js +8 -8
  26. package/schemas/models/store.model.js +1 -1
  27. package/schemas/mutations/analytics/index.js +1 -1
  28. package/schemas/mutations/analytics/product-add-to-cart.mutation.js +1 -1
  29. package/schemas/mutations/analytics/product-details-view.mutation.js +1 -1
  30. package/schemas/mutations/analytics/product-summary-click.mutation.js +1 -1
  31. package/schemas/mutations/analytics/product-summary-view.mutation.js +1 -1
  32. package/schemas/mutations/analytics/purchase.mutation.js +1 -1
  33. package/schemas/mutations/base.mutation.js +1 -1
  34. package/schemas/mutations/cart.mutation.js +1 -1
  35. package/schemas/mutations/checkout.mutation.js +1 -1
  36. package/schemas/mutations/identity.mutation.js +1 -1
  37. package/schemas/mutations/inventory.mutation.js +1 -1
  38. package/schemas/mutations/price.mutation.js +1 -1
  39. package/schemas/mutations/product.mutation.js +1 -1
  40. package/schemas/mutations/profile.mutation.js +3 -3
  41. package/schemas/mutations/search.mutation.js +1 -1
  42. package/schemas/queries/analytics.query.js +1 -1
  43. package/schemas/queries/base.query.js +1 -1
  44. package/schemas/queries/category.query.js +1 -1
  45. package/schemas/queries/product-associations.query.js +2 -2
  46. package/schemas/queries/product-recommendations.query.js +12 -12
  47. package/schemas/queries/product-search.query.js +3 -3
  48. package/schemas/queries/product.query.js +1 -1
  49. package/schemas/queries/store.query.js +1 -1
  50. package/schemas/session.schema.js +6 -6
  51. package/src/cache/cache.interface.d.ts +1 -1
  52. package/src/cache/memory-cache.d.ts +1 -1
  53. package/src/cache/noop-cache.d.ts +1 -1
  54. package/src/cache/redis-cache.d.ts +1 -1
  55. package/src/decorators/reactionary.decorator.d.ts +1 -1
  56. package/src/schemas/capabilities.schema.d.ts +1 -1
  57. package/src/schemas/errors/generic.error.d.ts +1 -1
  58. package/src/schemas/errors/invalid-input.error.d.ts +1 -1
  59. package/src/schemas/errors/invalid-output.error.d.ts +1 -1
  60. package/src/schemas/errors/not-found.error.d.ts +1 -1
  61. package/src/schemas/models/analytics.model.d.ts +1 -1
  62. package/src/schemas/models/base.model.d.ts +1 -1
  63. package/src/schemas/models/cart.model.d.ts +1 -1
  64. package/src/schemas/models/category.model.d.ts +1 -1
  65. package/src/schemas/models/checkout.model.d.ts +1 -1
  66. package/src/schemas/models/cost.model.d.ts +1 -1
  67. package/src/schemas/models/currency.model.d.ts +1 -1
  68. package/src/schemas/models/identifiers.model.d.ts +1 -1
  69. package/src/schemas/models/identity.model.d.ts +1 -1
  70. package/src/schemas/models/inventory.model.d.ts +1 -1
  71. package/src/schemas/models/order-search.model.d.ts +17 -17
  72. package/src/schemas/models/order.model.d.ts +1 -1
  73. package/src/schemas/models/payment.model.d.ts +1 -1
  74. package/src/schemas/models/price.model.d.ts +1 -1
  75. package/src/schemas/models/product-recommendations.model.d.ts +37 -36
  76. package/src/schemas/models/product-search.model.d.ts +1 -1
  77. package/src/schemas/models/product.model.d.ts +1 -1
  78. package/src/schemas/models/profile.model.d.ts +1 -1
  79. package/src/schemas/models/shipping-method.model.d.ts +1 -1
  80. package/src/schemas/models/store.model.d.ts +1 -1
  81. package/src/schemas/mutations/analytics/index.d.ts +63 -63
  82. package/src/schemas/mutations/analytics/product-add-to-cart.mutation.d.ts +10 -10
  83. package/src/schemas/mutations/analytics/product-details-view.mutation.d.ts +3 -3
  84. package/src/schemas/mutations/analytics/product-summary-click.mutation.d.ts +1 -1
  85. package/src/schemas/mutations/analytics/product-summary-view.mutation.d.ts +1 -1
  86. package/src/schemas/mutations/analytics/purchase.mutation.d.ts +34 -34
  87. package/src/schemas/mutations/base.mutation.d.ts +1 -1
  88. package/src/schemas/mutations/cart.mutation.d.ts +1 -1
  89. package/src/schemas/mutations/checkout.mutation.d.ts +1 -1
  90. package/src/schemas/mutations/identity.mutation.d.ts +1 -1
  91. package/src/schemas/mutations/profile.mutation.d.ts +1 -1
  92. package/src/schemas/queries/base.query.d.ts +1 -1
  93. package/src/schemas/queries/category.query.d.ts +1 -1
  94. package/src/schemas/queries/checkout.query.d.ts +1 -1
  95. package/src/schemas/queries/identity.query.d.ts +1 -1
  96. package/src/schemas/queries/inventory.query.d.ts +1 -1
  97. package/src/schemas/queries/order.query.d.ts +1 -1
  98. package/src/schemas/queries/price.query.d.ts +1 -1
  99. package/src/schemas/queries/product-associations.query.d.ts +7 -7
  100. package/src/schemas/queries/product-recommendations.query.d.ts +31 -31
  101. package/src/schemas/queries/product-search.query.d.ts +1 -1
  102. package/src/schemas/queries/product.query.d.ts +1 -1
  103. package/src/schemas/queries/profile.query.d.ts +1 -1
  104. package/src/schemas/queries/store.query.d.ts +1 -1
  105. package/src/schemas/session.schema.d.ts +1 -1
  106. package/src/zod-utils.d.ts +1 -1
@@ -1,4 +1,4 @@
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 ProfileMutationUpdateSchema: z.ZodObject<{
4
4
  identifier: z.ZodObject<{
@@ -1,4 +1,4 @@
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 BaseQuerySchema: z.ZodObject<{}, z.core.$loose>;
4
4
  export type BaseQuery = InferType<typeof BaseQuerySchema>;
@@ -1,4 +1,4 @@
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 CategoryQueryByIdSchema: z.ZodObject<{
4
4
  id: z.ZodObject<{
@@ -1,4 +1,4 @@
1
- import type { z } from 'zod';
1
+ import type * as z from 'zod';
2
2
  import type { InferType } from '../../zod-utils.js';
3
3
  export declare const CheckoutQueryByIdSchema: z.ZodObject<{
4
4
  identifier: z.ZodObject<{
@@ -1,4 +1,4 @@
1
- import type { z } from 'zod';
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,4 +1,4 @@
1
- import type { z } from 'zod';
1
+ import type * as z from 'zod';
2
2
  import type { InferType } from '../../zod-utils.js';
3
3
  export declare const InventoryQueryBySKUSchema: z.ZodObject<{
4
4
  variant: z.ZodObject<{
@@ -1,4 +1,4 @@
1
- import type { z } from 'zod';
1
+ import type * as z from 'zod';
2
2
  import type { InferType } from '../../zod-utils.js';
3
3
  export declare const OrderQueryByIdSchema: z.ZodObject<{
4
4
  order: z.ZodObject<{
@@ -1,4 +1,4 @@
1
- import type { z } from 'zod';
1
+ import type * as z from 'zod';
2
2
  import type { InferType } from '../../zod-utils.js';
3
3
  export declare const ListPriceQuerySchema: z.ZodObject<{
4
4
  variant: z.ZodObject<{
@@ -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.z.core.$loose>;
5
+ }, z.core.$loose>;
6
6
  numberOfAccessories: z.ZodNumber;
7
- }, z.z.core.$loose>;
7
+ }, z.core.$loose>;
8
8
  export declare const ProductAssociationsGetSparepartsQuerySchema: z.ZodObject<{
9
9
  forProductVariant: z.ZodObject<{
10
10
  sku: z.ZodString;
11
- }, z.z.core.$loose>;
12
- }, z.z.core.$loose>;
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.z.core.$loose>;
17
- }, z.z.core.$loose>;
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.z.core.$loose>;
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.z.core.$loose>>>;
13
+ }, z.core.$loose>>>;
14
14
  sourceCategory: z.ZodOptional<z.ZodObject<{
15
15
  key: z.ZodString;
16
- }, z.z.core.$loose>>;
17
- }, z.z.core.$loose>;
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.z.core.$loose>;
24
- }, z.z.core.$loose>;
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.z.core.$loose>;
30
+ }, z.core.$loose>;
31
31
  algorithm: z.ZodLiteral<"frequentlyBoughtTogether">;
32
- }, z.z.core.$loose>;
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.z.core.$loose>;
38
+ }, z.core.$loose>;
39
39
  algorithm: z.ZodLiteral<"similar">;
40
- }, z.z.core.$loose>;
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.z.core.$loose>;
46
+ }, z.core.$loose>;
47
47
  algorithm: z.ZodLiteral<"related">;
48
- }, z.z.core.$loose>;
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.z.core.$loose>;
56
- }, z.z.core.$loose>;
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.z.core.$loose>;
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.z.core.$loose>;
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.z.core.$loose>;
72
+ }, z.core.$loose>;
73
73
  algorithm: z.ZodLiteral<"alsoViewed">;
74
- }, z.z.core.$loose>;
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.z.core.$loose>;
80
+ }, z.core.$loose>;
81
81
  algorithm: z.ZodLiteral<"frequentlyBoughtTogether">;
82
- }, z.z.core.$loose>, z.ZodObject<{
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.z.core.$loose>;
89
- }, z.z.core.$loose>, z.ZodObject<{
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.z.core.$loose>;
94
+ }, z.core.$loose>;
95
95
  algorithm: z.ZodLiteral<"similar">;
96
- }, z.z.core.$loose>, z.ZodObject<{
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.z.core.$loose>;
101
+ }, z.core.$loose>;
102
102
  algorithm: z.ZodLiteral<"related">;
103
- }, z.z.core.$loose>, z.ZodObject<{
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.z.core.$loose>, z.ZodObject<{
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.z.core.$loose>, z.ZodObject<{
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.z.core.$loose>;
116
+ }, z.core.$loose>;
117
117
  algorithm: z.ZodLiteral<"alsoViewed">;
118
- }, z.z.core.$loose>], "algorithm">;
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>;
@@ -1,4 +1,4 @@
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 ProductSearchQueryByTermSchema: z.ZodObject<{
4
4
  search: z.ZodObject<{
@@ -1,4 +1,4 @@
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 ProductQueryBySlugSchema: z.ZodObject<{
4
4
  slug: z.ZodString;
@@ -1,4 +1,4 @@
1
- import type { z } from 'zod';
1
+ import type * as z from 'zod';
2
2
  import type { InferType } from '../../zod-utils.js';
3
3
  export declare const ProfileQueryByIdSchema: z.ZodObject<{
4
4
  identifier: z.ZodObject<{
@@ -1,4 +1,4 @@
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 StoreQueryByProximitySchema: z.ZodObject<{
4
4
  longitude: z.ZodNumber;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /**
3
3
  * The language and locale context for the current request.
4
4
  */
@@ -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;