@reactionary/core 0.10.56 → 0.10.57
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/package.json
CHANGED
|
@@ -23,6 +23,7 @@ const ProductSearchResultItemSchema = BaseModelSchema.extend({
|
|
|
23
23
|
name: z.string(),
|
|
24
24
|
slug: z.string(),
|
|
25
25
|
complianceData: ProductSearchResultItemComplianceDataSchema.optional().meta({ description: "Compliance data for the product as required by EU regulations." }),
|
|
26
|
+
canAddToCartDirectly: z.boolean().default(false).meta({ description: "Whether the storefront may render an add-to-cart button for this product directly on a PLP. When false, the customer must always visit the PDP first, e.g. for regulatory reasons or as a business decision. Set by the indexer where the search provider supports it; otherwise providers default it to true only when the product has exactly one variant." }),
|
|
26
27
|
variants: z.array(ProductSearchResultItemVariantSchema).meta({ description: "A list of variants associated with the product in the search results. If exactly one is present, you can use add-to-cart directly from PLP. If none are present, you must direct to PDP. If mulitple are present, and no options are set, you must direct to PDP. If multiple are present, and they have options, you can render swatches on PLP and allow customer to flip between variants." })
|
|
27
28
|
});
|
|
28
29
|
const ProductSearchResultFacetValueSchema = z.looseObject({
|
|
@@ -36,6 +36,7 @@ export declare const ProductAssociationProductSearchResultItemSchema: z.ZodObjec
|
|
|
36
36
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
37
37
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
38
38
|
}, z.core.$loose>>;
|
|
39
|
+
canAddToCartDirectly: z.ZodDefault<z.ZodBoolean>;
|
|
39
40
|
variants: z.ZodArray<z.ZodObject<{
|
|
40
41
|
variant: z.ZodObject<{
|
|
41
42
|
sku: z.ZodString;
|
|
@@ -94,6 +95,7 @@ export declare const ProductAssociationSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
94
95
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
95
96
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
96
97
|
}, z.core.$loose>>;
|
|
98
|
+
canAddToCartDirectly: z.ZodDefault<z.ZodBoolean>;
|
|
97
99
|
variants: z.ZodArray<z.ZodObject<{
|
|
98
100
|
variant: z.ZodObject<{
|
|
99
101
|
sku: z.ZodString;
|
|
@@ -39,6 +39,7 @@ export declare const ProductRecommendationProductSearchResultItemSchema: z.ZodOb
|
|
|
39
39
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
40
40
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
41
41
|
}, z.core.$loose>>;
|
|
42
|
+
canAddToCartDirectly: z.ZodDefault<z.ZodBoolean>;
|
|
42
43
|
variants: z.ZodArray<z.ZodObject<{
|
|
43
44
|
variant: z.ZodObject<{
|
|
44
45
|
sku: z.ZodString;
|
|
@@ -99,6 +100,7 @@ export declare const ProductRecommendationSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
99
100
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
100
101
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
101
102
|
}, z.core.$loose>>;
|
|
103
|
+
canAddToCartDirectly: z.ZodDefault<z.ZodBoolean>;
|
|
102
104
|
variants: z.ZodArray<z.ZodObject<{
|
|
103
105
|
variant: z.ZodObject<{
|
|
104
106
|
sku: z.ZodString;
|
|
@@ -54,6 +54,7 @@ export declare const ProductSearchResultItemSchema: z.ZodObject<{
|
|
|
54
54
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
55
55
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
56
56
|
}, z.core.$loose>>;
|
|
57
|
+
canAddToCartDirectly: z.ZodDefault<z.ZodBoolean>;
|
|
57
58
|
variants: z.ZodArray<z.ZodObject<{
|
|
58
59
|
variant: z.ZodObject<{
|
|
59
60
|
sku: z.ZodString;
|
|
@@ -131,6 +132,7 @@ export declare const ProductSearchResultSchema: z.ZodObject<{
|
|
|
131
132
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
132
133
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
133
134
|
}, z.core.$loose>>;
|
|
135
|
+
canAddToCartDirectly: z.ZodDefault<z.ZodBoolean>;
|
|
134
136
|
variants: z.ZodArray<z.ZodObject<{
|
|
135
137
|
variant: z.ZodObject<{
|
|
136
138
|
sku: z.ZodString;
|