@reactionary/core 0.10.54 → 0.10.56
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 +1 -1
- package/schemas/models/product-search.model.js +3 -0
- package/schemas/models/product.model.js +3 -0
- package/schemas/models/shipping-method.model.js +9 -1
- package/src/schemas/models/product-associations.model.d.ts +6 -0
- package/src/schemas/models/product-recommendations.model.d.ts +6 -0
- package/src/schemas/models/product-search.model.d.ts +9 -0
- package/src/schemas/models/product.model.d.ts +6 -0
- package/src/schemas/models/shipping-method.model.d.ts +12 -0
package/package.json
CHANGED
|
@@ -7,6 +7,9 @@ const ProductSearchResultItemComplianceDataSchema = z.looseObject({
|
|
|
7
7
|
weee_symbol: z.boolean().default(false).meta({ description: "Indicates whether the WEEE symbol can be shown on the product" }),
|
|
8
8
|
energy_class: z.string().optional().meta({ description: "The energy class of the product, as required by EU regulations. A,B,C,D,E,F,G, etc" }),
|
|
9
9
|
garan_duration: z.number().optional().meta({ description: "The duration of the guarantee in months as by the EU Garan scheme. Only set if above 24." }),
|
|
10
|
+
energy_class_range: z.string().optional().meta({ description: 'The scale the energy class belongs to, e.g. "A-G", "A++-G" or "A+++-D". Needed to render the EU class arrow, because the same class letter is drawn differently on different scales.' }),
|
|
11
|
+
eprel_registration_number: z.string().optional().meta({ description: "The EPREL registration number of the product model (digits only, up to 19). Together with eprel_product_group it identifies the official EU energy label and class arrow." }),
|
|
12
|
+
eprel_product_group: z.string().optional().meta({ description: 'The EPREL product group URL code the model is registered under, e.g. "spaceheaters" or "localspaceheaters".' }),
|
|
10
13
|
is_organic: z.boolean().optional().meta({ description: "Indicates whether the product is organic" }),
|
|
11
14
|
organic_certification_type: z.string().optional().meta({ description: "The type of organic certification, e.g., EU_ORGANIC_LEAF, GOTS, ECOCERT." })
|
|
12
15
|
});
|
|
@@ -6,6 +6,9 @@ const ProductComplianceDataSchema = z.looseObject({
|
|
|
6
6
|
weee_symbol: z.boolean().default(false).meta({ description: "Indicates whether the WEEE symbol can be shown on the product" }),
|
|
7
7
|
energy_class: z.string().optional().meta({ description: "The energy class of the product, as required by EU regulations. A,B,C,D,E,F,G, etc" }),
|
|
8
8
|
garan_duration: z.number().optional().meta({ description: "The duration of the guarantee in months as by the EU Garan scheme. Only set if above 24." }),
|
|
9
|
+
energy_class_range: z.string().optional().meta({ description: 'The scale the energy class belongs to, e.g. "A-G", "A++-G" or "A+++-D". Needed to render the EU class arrow, because the same class letter is drawn differently on different scales.' }),
|
|
10
|
+
eprel_registration_number: z.string().optional().meta({ description: "The EPREL registration number of the product model (digits only, up to 19). Together with eprel_product_group it identifies the official EU energy label and class arrow." }),
|
|
11
|
+
eprel_product_group: z.string().optional().meta({ description: 'The EPREL product group URL code the model is registered under, e.g. "spaceheaters" or "localspaceheaters".' }),
|
|
9
12
|
safety_warnings: z.string().optional().meta({ description: "Any safety warnings associated with the product as required by EU regulations." }),
|
|
10
13
|
composition: z.string().optional().meta({ description: "The composition of the product as required by EU regulations." }),
|
|
11
14
|
additional_disclosures: z.string().optional().meta({ description: "Any additional disclosures associated with the product as required by EU regulations." }),
|
|
@@ -8,6 +8,13 @@ const ShippingProtocolDataSchema = z.looseObject({
|
|
|
8
8
|
key: z.string().meta({ description: 'The protocol-specific key, e.g. "timeSlotId".' }),
|
|
9
9
|
value: z.union([z.string(), z.record(z.string(), z.json())]).meta({ description: "The protocol-specific value: either a plain string, or a JSON-serializable object for richer structures." })
|
|
10
10
|
});
|
|
11
|
+
const SHIPPING_PROTOCOL_DATA_KEYS = {
|
|
12
|
+
/**
|
|
13
|
+
* The identifier (Store.identifier.key) of the brand's own store an
|
|
14
|
+
* in-store pickup (BOPIS) shipping method is fulfilled from.
|
|
15
|
+
*/
|
|
16
|
+
pickupStore: "pickup_store"
|
|
17
|
+
};
|
|
11
18
|
const PickupPointSchema = z.looseObject({
|
|
12
19
|
identifier: z.object({
|
|
13
20
|
key: z.string()
|
|
@@ -29,7 +36,7 @@ const ShippingMethodSchema = z.looseObject({
|
|
|
29
36
|
deliveryTime: z.string(),
|
|
30
37
|
carrier: z.string().optional(),
|
|
31
38
|
fulfillmentType: ShippingFulfillmentTypeSchema.optional().meta({ description: `How this shipping method fulfills the order: "delivery" for shipment to an address (including third-party carrier service points selected via the shipping instruction's pickupPoint), "pickup" for collection at one of the brand's own stores (BOPIS). When absent, "delivery" can be assumed.` }),
|
|
32
|
-
protocolData: z.array(ShippingProtocolDataSchema).optional().meta({ description:
|
|
39
|
+
protocolData: z.array(ShippingProtocolDataSchema).optional().meta({ description: `Additional provider-populated, protocol-specific data for this shipping method, e.g. available pickup time slots. Conventional keys (see SHIPPING_PROTOCOL_DATA_KEYS) include "pickup_store": the identifier of the brand's own store a pickup method is fulfilled from.` })
|
|
33
40
|
});
|
|
34
41
|
const ShippingInstructionSchema = BaseModelSchema.extend({
|
|
35
42
|
shippingMethod: ShippingMethodIdentifierSchema,
|
|
@@ -41,6 +48,7 @@ const ShippingInstructionSchema = BaseModelSchema.extend({
|
|
|
41
48
|
});
|
|
42
49
|
export {
|
|
43
50
|
PickupPointSchema,
|
|
51
|
+
SHIPPING_PROTOCOL_DATA_KEYS,
|
|
44
52
|
ShippingFulfillmentTypeSchema,
|
|
45
53
|
ShippingInstructionSchema,
|
|
46
54
|
ShippingMethodSchema,
|
|
@@ -30,6 +30,9 @@ export declare const ProductAssociationProductSearchResultItemSchema: z.ZodObjec
|
|
|
30
30
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
31
31
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
32
32
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
34
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
35
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
33
36
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
34
37
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
35
38
|
}, z.core.$loose>>;
|
|
@@ -85,6 +88,9 @@ export declare const ProductAssociationSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
85
88
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
86
89
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
87
90
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
92
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
93
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
88
94
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
89
95
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
90
96
|
}, z.core.$loose>>;
|
|
@@ -33,6 +33,9 @@ export declare const ProductRecommendationProductSearchResultItemSchema: z.ZodOb
|
|
|
33
33
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
34
34
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
35
35
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
37
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
38
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
36
39
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
37
40
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
38
41
|
}, z.core.$loose>>;
|
|
@@ -90,6 +93,9 @@ export declare const ProductRecommendationSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
90
93
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
91
94
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
92
95
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
97
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
98
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
93
99
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
94
100
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
95
101
|
}, z.core.$loose>>;
|
|
@@ -5,6 +5,9 @@ export declare const ProductSearchResultItemComplianceDataSchema: z.ZodObject<{
|
|
|
5
5
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
6
6
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
7
7
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
9
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
10
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
8
11
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
9
12
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
10
13
|
}, z.core.$loose>;
|
|
@@ -45,6 +48,9 @@ export declare const ProductSearchResultItemSchema: z.ZodObject<{
|
|
|
45
48
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
46
49
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
47
50
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
52
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
53
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
48
54
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
49
55
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
50
56
|
}, z.core.$loose>>;
|
|
@@ -119,6 +125,9 @@ export declare const ProductSearchResultSchema: z.ZodObject<{
|
|
|
119
125
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
120
126
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
121
127
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
129
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
130
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
122
131
|
is_organic: z.ZodOptional<z.ZodBoolean>;
|
|
123
132
|
organic_certification_type: z.ZodOptional<z.ZodString>;
|
|
124
133
|
}, z.core.$loose>>;
|
|
@@ -9,6 +9,9 @@ export declare const ProductComplianceDataSchema: z.ZodObject<{
|
|
|
9
9
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
10
10
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
11
11
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
13
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
14
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
12
15
|
safety_warnings: z.ZodOptional<z.ZodString>;
|
|
13
16
|
composition: z.ZodOptional<z.ZodString>;
|
|
14
17
|
additional_disclosures: z.ZodOptional<z.ZodString>;
|
|
@@ -234,6 +237,9 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
234
237
|
weee_symbol: z.ZodDefault<z.ZodBoolean>;
|
|
235
238
|
energy_class: z.ZodOptional<z.ZodString>;
|
|
236
239
|
garan_duration: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
energy_class_range: z.ZodOptional<z.ZodString>;
|
|
241
|
+
eprel_registration_number: z.ZodOptional<z.ZodString>;
|
|
242
|
+
eprel_product_group: z.ZodOptional<z.ZodString>;
|
|
237
243
|
safety_warnings: z.ZodOptional<z.ZodString>;
|
|
238
244
|
composition: z.ZodOptional<z.ZodString>;
|
|
239
245
|
additional_disclosures: z.ZodOptional<z.ZodString>;
|
|
@@ -19,6 +19,18 @@ export declare const ShippingProtocolDataSchema: z.ZodObject<{
|
|
|
19
19
|
key: z.ZodString;
|
|
20
20
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
21
21
|
}, z.core.$loose>;
|
|
22
|
+
/**
|
|
23
|
+
* Conventional, cross-provider keys for shipping protocol data entries.
|
|
24
|
+
* Providers emit these keys when the concept applies, so clients can consume
|
|
25
|
+
* them without provider-specific knowledge.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SHIPPING_PROTOCOL_DATA_KEYS: {
|
|
28
|
+
/**
|
|
29
|
+
* The identifier (Store.identifier.key) of the brand's own store an
|
|
30
|
+
* in-store pickup (BOPIS) shipping method is fulfilled from.
|
|
31
|
+
*/
|
|
32
|
+
readonly pickupStore: "pickup_store";
|
|
33
|
+
};
|
|
22
34
|
export declare const PickupPointSchema: z.ZodObject<{
|
|
23
35
|
identifier: z.ZodObject<{
|
|
24
36
|
key: z.ZodString;
|