@reactionary/core 0.1.3 → 0.1.5

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactionary/core",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
@@ -33,7 +33,8 @@ class ProductProvider extends BaseProvider {
33
33
  parentCategories: [],
34
34
  published: false,
35
35
  sharedAttributes: [],
36
- slug: ""
36
+ slug: "",
37
+ variants: []
37
38
  };
38
39
  return product;
39
40
  }
@@ -48,7 +48,8 @@ const ProductSchema = BaseModelSchema.extend({
48
48
  published: z.boolean().describe("Indicates whether the product is published and visible to customers"),
49
49
  sharedAttributes: z.array(ProductAttributeSchema).describe("A list of technical attributes associated with the product"),
50
50
  options: z.array(ProductOptionSchema).describe("A list of options available for the product, such as size or color. Can be empty if product is single-sku"),
51
- mainVariant: ProductVariantSchema.describe("The primary SKU for the product")
51
+ mainVariant: ProductVariantSchema.describe("The primary SKU for the product"),
52
+ variants: z.array(ProductVariantSchema).default([]).describe("A list of all SKUs for the product. Can be empty or omitted if product is single-sku")
52
53
  }).describe("A product is a wrapper around sellable items. It contains all the shared information for a set of SKUs. All products have at least one SKU, but can potentially have hundreds.");
53
54
  export {
54
55
  ProductAttributeSchema,
@@ -172,6 +172,37 @@ export declare const ProductSchema: z.ZodObject<{
172
172
  }, z.core.$loose>;
173
173
  }, z.core.$loose>>;
174
174
  }, z.core.$loose>;
175
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
176
+ identifier: z.ZodObject<{
177
+ sku: z.ZodString;
178
+ }, z.core.$loose>;
179
+ name: z.ZodString;
180
+ images: z.ZodArray<z.ZodObject<{
181
+ sourceUrl: z.ZodDefault<z.ZodString>;
182
+ altText: z.ZodDefault<z.ZodString>;
183
+ width: z.ZodOptional<z.ZodNumber>;
184
+ height: z.ZodOptional<z.ZodNumber>;
185
+ }, z.core.$loose>>;
186
+ ean: z.ZodString;
187
+ gtin: z.ZodString;
188
+ upc: z.ZodString;
189
+ barcode: z.ZodString;
190
+ options: z.ZodArray<z.ZodObject<{
191
+ identifier: z.ZodObject<{
192
+ key: z.ZodString;
193
+ }, z.core.$loose>;
194
+ name: z.ZodString;
195
+ value: z.ZodObject<{
196
+ identifier: z.ZodObject<{
197
+ option: z.ZodObject<{
198
+ key: z.ZodString;
199
+ }, z.core.$loose>;
200
+ key: z.ZodString;
201
+ }, z.core.$loose>;
202
+ label: z.ZodString;
203
+ }, z.core.$loose>;
204
+ }, z.core.$loose>>;
205
+ }, z.core.$loose>>>;
175
206
  }, z.core.$loose>;
176
207
  export type ProductVariant = InferType<typeof ProductVariantSchema>;
177
208
  export type Product = InferType<typeof ProductSchema>;