@reactionary/core 0.3.14 → 0.3.16

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.3.14",
3
+ "version": "0.3.16",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
@@ -12,6 +12,7 @@ export * from "./product-search.provider.js";
12
12
  export * from "./product-recommendations.provider.js";
13
13
  export * from "./product-associations.provider.js";
14
14
  export * from "./product-reviews.provider.js";
15
+ export * from "./product-list.provider.js";
15
16
  export * from "./store.provider.js";
16
17
  export * from "./order.provider.js";
17
18
  export * from "./order-search.provider.js";
@@ -0,0 +1,10 @@
1
+ import {} from "../schemas/queries/product-list.query.js";
2
+ import { BaseProvider } from "./base.provider.js";
3
+ class ProductListProvider extends BaseProvider {
4
+ getResourceName() {
5
+ return "product-lists";
6
+ }
7
+ }
8
+ export {
9
+ ProductListProvider
10
+ };
@@ -5,6 +5,7 @@ const CapabilitiesSchema = z.looseObject({
5
5
  productAssociations: z.boolean(),
6
6
  productRecommendations: z.boolean(),
7
7
  productReviews: z.boolean(),
8
+ productList: z.boolean(),
8
9
  analytics: z.boolean(),
9
10
  identity: z.boolean(),
10
11
  cart: z.boolean(),
@@ -2,6 +2,7 @@ import * as z from "zod";
2
2
  import { PaginationOptionsSchema } from "./base.model.js";
3
3
  const OrderStatusSchema = z.enum(["AwaitingPayment", "ReleasedToFulfillment", "Shipped", "Cancelled"]).meta({ description: "The current status of the order." });
4
4
  const OrderInventoryStatusSchema = z.enum(["NotAllocated", "Allocated", "Backordered", "Preordered"]).meta({ description: "The inventory release status of the order." });
5
+ const ProductListTypeSchema = z.enum(["favorite", "wish", "requisition", "shopping"]).meta({ description: 'The type of product list, e.g., "wish" or "favorite".' });
5
6
  const FacetIdentifierSchema = z.looseObject({
6
7
  key: z.string()
7
8
  });
@@ -115,6 +116,22 @@ const OrderSearchIdentifierSchema = z.looseObject({
115
116
  filters: z.array(z.string()).meta({ description: "Additional filters applied to the search results." }),
116
117
  paginationOptions: PaginationOptionsSchema.describe("Pagination options for the search results.")
117
118
  });
119
+ const ProductListSearchIdentifierSchema = z.looseObject({
120
+ listType: ProductListTypeSchema.meta({ description: 'The type of product list, e.g., "wishlist" or "favorites".' }),
121
+ paginationOptions: PaginationOptionsSchema.describe("Pagination options for the search results.")
122
+ });
123
+ const ProductListIdentifierSchema = z.looseObject({
124
+ listType: ProductListTypeSchema.meta({ description: 'The type of product list, e.g., "wish" or "favorite".' }),
125
+ key: z.string().meta({ description: "The unique identifier for the product list." })
126
+ });
127
+ const ProductListItemSearchIdentifierSchema = z.looseObject({
128
+ list: ProductListIdentifierSchema.describe("The identifier for the product list to query. The provider should return the items in the list that match this identifier. For example, if the identifier is a customer ID, the provider should return the items in the customer's wishlist. If the identifier is a session ID, the provider should return the items in the customer's current shopping cart. If the identifier is a product ID, the provider should return the items in the product's related products list."),
129
+ paginationOptions: PaginationOptionsSchema.describe("Pagination options for the search results.")
130
+ });
131
+ const ProductListItemIdentifierSchema = z.looseObject({
132
+ key: z.string().meta({ description: "The unique identifier for the product list item." }),
133
+ list: ProductListIdentifierSchema
134
+ });
118
135
  export {
119
136
  AddressIdentifierSchema,
120
137
  CartIdentifierSchema,
@@ -140,6 +157,11 @@ export {
140
157
  ProductAttributeIdentifierSchema,
141
158
  ProductAttributeValueIdentifierSchema,
142
159
  ProductIdentifierSchema,
160
+ ProductListIdentifierSchema,
161
+ ProductListItemIdentifierSchema,
162
+ ProductListItemSearchIdentifierSchema,
163
+ ProductListSearchIdentifierSchema,
164
+ ProductListTypeSchema,
143
165
  ProductOptionIdentifierSchema,
144
166
  ProductOptionValueIdentifierSchema,
145
167
  ProductRatingIdentifierSchema,
@@ -20,3 +20,5 @@ export * from "./checkout.model.js";
20
20
  export * from "./payment.model.js";
21
21
  export * from "./order-search.model.js";
22
22
  export * from "./product-recommendations.model.js";
23
+ export * from "./product-associations.model.js";
24
+ export * from "./product-list.model.js";
@@ -2,24 +2,24 @@ import * as z from "zod";
2
2
  import { ProductIdentifierSchema, ProductAssociationsIdentifierSchema, ProductVariantIdentifierSchema } from "./identifiers.model.js";
3
3
  import { ProductSearchResultItemSchema } from "./product-search.model.js";
4
4
  import { BaseModelSchema } from "./base.model.js";
5
- const BaseProductAssociationsSchema = BaseModelSchema.extend({
5
+ const BaseProductAssociationSchema = BaseModelSchema.extend({
6
6
  associationIdentifier: ProductAssociationsIdentifierSchema.meta({ description: "The identifier for the product recommendation, which includes a key and an algorithm and any other vendor specific/instance specific data " })
7
7
  });
8
- const ProductAssociationsIdOnlySchema = BaseProductAssociationsSchema.extend({
8
+ const ProductAssociationIdOnlySchema = BaseProductAssociationSchema.extend({
9
9
  associationReturnType: z.literal("idOnly").meta({ description: "The type of recommendation return" }),
10
10
  product: ProductIdentifierSchema.meta({ description: "The identifier for the recommended product." })
11
11
  });
12
- const ProductAssociationsProductSearchResultItemSchema = BaseProductAssociationsSchema.extend({
12
+ const ProductAssociationProductSearchResultItemSchema = BaseProductAssociationSchema.extend({
13
13
  associationReturnType: z.literal("productSearchResultItem").meta({ description: "The type of recommendation return" }),
14
14
  product: ProductSearchResultItemSchema.meta({ description: "The recommended product, including its identifier, name, slug, and variants. This can be used to display the recommended product directly on the frontend without needing to make an additional request to fetch the product details." })
15
15
  });
16
- const ProductAssociationsSchema = z.discriminatedUnion("associationReturnType", [
17
- ProductAssociationsIdOnlySchema,
18
- ProductAssociationsProductSearchResultItemSchema
16
+ const ProductAssociationSchema = z.discriminatedUnion("associationReturnType", [
17
+ ProductAssociationIdOnlySchema,
18
+ ProductAssociationProductSearchResultItemSchema
19
19
  ]);
20
20
  export {
21
- BaseProductAssociationsSchema,
22
- ProductAssociationsIdOnlySchema,
23
- ProductAssociationsProductSearchResultItemSchema,
24
- ProductAssociationsSchema
21
+ BaseProductAssociationSchema,
22
+ ProductAssociationIdOnlySchema,
23
+ ProductAssociationProductSearchResultItemSchema,
24
+ ProductAssociationSchema
25
25
  };
@@ -0,0 +1,33 @@
1
+ import * as z from "zod";
2
+ import { ProductListIdentifierSchema, ProductListItemIdentifierSchema, ProductListItemSearchIdentifierSchema, ProductListSearchIdentifierSchema, ProductListTypeSchema, ProductVariantIdentifierSchema } from "./identifiers.model.js";
3
+ import { BaseModelSchema, createPaginatedResponseSchema, ImageSchema } from "./base.model.js";
4
+ const ProductListSchema = BaseModelSchema.extend({
5
+ identifier: ProductListIdentifierSchema.meta({ description: "The unique identifier for the product list." }),
6
+ type: ProductListTypeSchema.meta({ description: 'The type of product list, e.g., "wish" or "favorite".' }),
7
+ name: z.string().meta({ description: "The name of the product list." }),
8
+ description: z.string().optional().meta({ description: "A description of the product list. A longer text providing more details about the list." }),
9
+ image: ImageSchema.optional().meta({ description: "Icon or image associated with list " }),
10
+ published: z.boolean().default(true).meta({ description: "Whether the wish list is published and visible to others. Semantics may vary. " }),
11
+ publishDate: z.string().optional().meta({ description: "The date at which a list is published for others to see. Sematics may vary" })
12
+ });
13
+ const ProductListItemSchema = BaseModelSchema.extend({
14
+ identifier: ProductListItemIdentifierSchema.meta({ description: "The unique identifier for the product list item." }),
15
+ variant: ProductVariantIdentifierSchema.meta({ description: "The identifier for the product variant that is included in the list." }),
16
+ quantity: z.number().positive({
17
+ error: "Quantity must be a positive number."
18
+ }).meta({ description: "The quantity of the product variant that is included in the list." }),
19
+ notes: z.string().optional().meta({ description: "Additional notes or comments about the product variant in the list." }),
20
+ order: z.number().default(1).meta({ description: "The order of the item in the list. This can be used to sort the items in the list." })
21
+ });
22
+ const ProductListPaginatedResultsSchema = createPaginatedResponseSchema(ProductListSchema).extend({
23
+ identifier: ProductListSearchIdentifierSchema.meta({ description: "The search parameters applied to retrive this subset of the items in the list." })
24
+ });
25
+ const ProductListItemPaginatedResultsSchema = createPaginatedResponseSchema(ProductListItemSchema).extend({
26
+ identifier: ProductListItemSearchIdentifierSchema.meta({ description: "The search parameters applied to retrive this subset of the items in the list." })
27
+ });
28
+ export {
29
+ ProductListItemPaginatedResultsSchema,
30
+ ProductListItemSchema,
31
+ ProductListPaginatedResultsSchema,
32
+ ProductListSchema
33
+ };
@@ -4,7 +4,7 @@ export * from "./cart.mutation.js";
4
4
  export * from "./identity.mutation.js";
5
5
  export * from "./inventory.mutation.js";
6
6
  export * from "./price.mutation.js";
7
- export * from "./product.mutation.js";
7
+ export * from "./product-list.mutation.js";
8
8
  export * from "./product-reviews.mutation.js";
9
9
  export * from "./profile.mutation.js";
10
10
  export * from "./search.mutation.js";
@@ -0,0 +1,44 @@
1
+ import * as z from "zod";
2
+ import { ImageSchema } from "../models/base.model.js";
3
+ import { ProductListIdentifierSchema, ProductListItemIdentifierSchema } from "../models/identifiers.model.js";
4
+ import { ProductListItemSchema, ProductListSchema } from "../models/product-list.model.js";
5
+ import { BaseMutationSchema } from "./base.mutation.js";
6
+ const ProductListCreateSchema = ProductListSchema.omit({ identifier: true });
7
+ const ProductListMutationCreateSchema = BaseMutationSchema.extend({
8
+ list: ProductListCreateSchema.describe("The details of the product list to create, including its name, description, type, and any associated image.")
9
+ });
10
+ const ProductListMutationDeleteSchema = BaseMutationSchema.extend({
11
+ list: ProductListIdentifierSchema.meta({ description: "The identifier for the product list to delete." })
12
+ });
13
+ const ProductListMutationUpdateSchema = BaseMutationSchema.extend({
14
+ list: ProductListIdentifierSchema.meta({ description: "The identifier for the product list to update." }),
15
+ name: z.string().optional().meta({ description: "The name of the product list." }),
16
+ description: z.string().optional().meta({ description: "A description of the product list. A longer text providing more details about the list." }),
17
+ image: ImageSchema.optional().describe("Icon or image associated with list "),
18
+ published: z.boolean().optional().meta({ description: "Whether the wish list is published and visible to others. Semantics may vary. " }),
19
+ publishDate: z.string().optional().meta({ description: "The date at which a list is published for others to see. Sematics may vary" })
20
+ });
21
+ const ProductListItemCreateSchema = ProductListItemSchema.omit({ identifier: true });
22
+ const ProductListItemMutationCreateSchema = BaseMutationSchema.extend({
23
+ list: ProductListIdentifierSchema.describe("The identifier for the product list to add an item to."),
24
+ listItem: ProductListItemCreateSchema.describe("The details of the item to add to the list, including the product variant identifier, quantity, and any notes about the item.")
25
+ });
26
+ const ProductListItemMutationDeleteSchema = BaseMutationSchema.extend({
27
+ listItem: ProductListItemIdentifierSchema.describe("The identifier for the product list item to remove. The list items identifier contains a reference to the list itself")
28
+ });
29
+ const ProductListItemMutationUpdateSchema = BaseMutationSchema.extend({
30
+ listItem: ProductListItemIdentifierSchema.describe("The identifier for the product list item to update. The list items identifier contains a reference to the list itself"),
31
+ quantity: z.number().positive().optional().meta({ description: "The updated quantity of the product variant that is included in the list." }),
32
+ notes: z.string().optional().meta({ description: "Updated additional notes or comments about the product variant in the list." }),
33
+ order: z.number().optional().meta({ description: "The updated order of the item in the list. This can be used to sort the items in the list." })
34
+ });
35
+ export {
36
+ ProductListCreateSchema,
37
+ ProductListItemCreateSchema,
38
+ ProductListItemMutationCreateSchema,
39
+ ProductListItemMutationDeleteSchema,
40
+ ProductListItemMutationUpdateSchema,
41
+ ProductListMutationCreateSchema,
42
+ ProductListMutationDeleteSchema,
43
+ ProductListMutationUpdateSchema
44
+ };
@@ -15,3 +15,4 @@ export * from "./checkout.query.js";
15
15
  export * from "./order-search.query.js";
16
16
  export * from "./product-recommendations.query.js";
17
17
  export * from "./product-associations.query.js";
18
+ export * from "./product-list.query.js";
@@ -3,14 +3,16 @@ import { BaseQuerySchema } from "./base.query.js";
3
3
  import { ProductIdentifierSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
4
4
  import { CartItemSchema } from "../models/cart.model.js";
5
5
  const ProductAssociationsGetAccessoriesQuerySchema = BaseQuerySchema.extend({
6
- forProductVariant: ProductVariantIdentifierSchema.describe("The product variant identifier for which to get accessory recommendations. The provider should return recommendations that are relevant to this product, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences."),
6
+ forProduct: ProductIdentifierSchema.describe("The product identifier for which to get accessory recommendations. The provider should return recommendations that are relevant to this product, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences."),
7
7
  numberOfAccessories: z.number().min(1).max(12).meta({ description: "The number of accessory recommendations requested. The provider may return fewer than this number, but should not return more." })
8
8
  });
9
9
  const ProductAssociationsGetSparepartsQuerySchema = BaseQuerySchema.extend({
10
- forProductVariant: ProductVariantIdentifierSchema.describe("The product variant identifier for which to get similar item recommendations. The provider should return recommendations that are relevant to this product, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences.")
10
+ forProduct: ProductIdentifierSchema.describe("The product identifier for which to get similar item recommendations. The provider should return recommendations that are relevant to this product, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences."),
11
+ numberOfSpareparts: z.number().min(1).max(12).meta({ description: "The number of spare part recommendations requested. The provider may return fewer than this number, but should not return more." })
11
12
  });
12
13
  const ProductAssociationsGetReplacementsQuerySchema = BaseQuerySchema.extend({
13
- forProductVariant: ProductVariantIdentifierSchema.describe("The product variant identifier for which to get replacement recommendations. The provider should return recommendations that are relevant to this product, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences.")
14
+ forProduct: ProductIdentifierSchema.describe("The product identifier for which to get replacement recommendations. The provider should return recommendations that are relevant to this product, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences."),
15
+ numberOfReplacements: z.number().min(1).max(12).meta({ description: "The number of replacement recommendations requested. The provider may return fewer than this number, but should not return more." })
14
16
  });
15
17
  export {
16
18
  ProductAssociationsGetAccessoriesQuerySchema,
@@ -0,0 +1,16 @@
1
+ import { ProductListIdentifierSchema, ProductListItemSearchIdentifierSchema, ProductListSearchIdentifierSchema } from "../models/identifiers.model.js";
2
+ import { BaseQuerySchema } from "./base.query.js";
3
+ const ProductListQueryByIdSchema = BaseQuerySchema.extend({
4
+ identifier: ProductListIdentifierSchema.describe("The unique identifier for the product list to retrieve. For example, this could be the identifier for a specific wishlist or shopping cart.")
5
+ });
6
+ const ProductListQuerySchema = BaseQuerySchema.extend({
7
+ search: ProductListSearchIdentifierSchema.describe("The identifier for the product list to query. The provider should return the items in the list that match this identifier. For example, if the identifier is a customer ID, the provider should return the items in the customer's wishlist. If the identifier is a session ID, the provider should return the items in the customer's current shopping cart. If the identifier is a product ID, the provider should return the items in the product's related products list.")
8
+ });
9
+ const ProductListItemQuerySchema = BaseQuerySchema.extend({
10
+ search: ProductListItemSearchIdentifierSchema.describe("The identifier for the product list to query. The provider should return the items in the list that match this identifier. For example, if the identifier is a customer ID, the provider should return the items in the customer's wishlist. If the identifier is a session ID, the provider should return the items in the customer's current shopping cart. If the identifier is a product ID, the provider should return the items in the product's related products list.")
11
+ });
12
+ export {
13
+ ProductListItemQuerySchema,
14
+ ProductListQueryByIdSchema,
15
+ ProductListQuerySchema
16
+ };
@@ -6,7 +6,7 @@ import type { PriceProvider } from "../providers/price.provider.js";
6
6
  import type { InventoryProvider } from "../providers/inventory.provider.js";
7
7
  import type { Cache } from "../cache/cache.interface.js";
8
8
  import type { CategoryProvider } from "../providers/category.provider.js";
9
- import type { AnalyticsProvider, CheckoutProvider, OrderProvider, ProfileProvider, StoreProvider } from "../providers/index.js";
9
+ import type { AnalyticsProvider, CheckoutProvider, OrderProvider, ProductListProvider, ProfileProvider, StoreProvider } from "../providers/index.js";
10
10
  import type { OrderSearchProvider } from "../providers/order-search.provider.js";
11
11
  import type { ProductRecommendationsProvider } from "../providers/product-recommendations.provider.js";
12
12
  import type { ProductAssociationsProvider } from "../providers/product-associations.provider.js";
@@ -17,6 +17,7 @@ export interface Client {
17
17
  productRecommendations: ProductRecommendationsProvider;
18
18
  productAssociations: ProductAssociationsProvider;
19
19
  productReviews: ProductReviewsProvider;
20
+ productList: ProductListProvider;
20
21
  identity: IdentityProvider;
21
22
  cache: Cache;
22
23
  cart: CartProvider;
@@ -12,6 +12,7 @@ export * from './product-search.provider.js';
12
12
  export * from './product-recommendations.provider.js';
13
13
  export * from './product-associations.provider.js';
14
14
  export * from './product-reviews.provider.js';
15
+ export * from './product-list.provider.js';
15
16
  export * from './store.provider.js';
16
17
  export * from './order.provider.js';
17
18
  export * from './order-search.provider.js';
@@ -1,6 +1,7 @@
1
- import type { ProductVariantIdentifier } from "../schemas/index.js";
2
1
  import type { ProductAssociationsGetAccessoriesQuery, ProductAssociationsGetSparepartsQuery, ProductAssociationsGetReplacementsQuery } from "../schemas/queries/product-associations.query.js";
3
2
  import { BaseProvider } from "./base.provider.js";
3
+ import type { Result } from '../schemas/result.js';
4
+ import type { ProductAssociation } from '../schemas/models/product-associations.model.js';
4
5
  /**
5
6
  * The product association provider is responsible for providing evidence based associations between products, such as
6
7
  * accessories, spareparts, and replacements. These associations are typically used to provide recommendations to customers on the product detail page, but can also be used in other contexts such as the cart or post-purchase, but
@@ -16,20 +17,26 @@ export declare abstract class ProductAssociationsProvider extends BaseProvider {
16
17
  *
17
18
  * Usecase:
18
19
  * - PDP: Accessories for this product
20
+ *
21
+ * TODO: This should be a PaginatedResult
19
22
  */
20
- abstract getAccessories(query: ProductAssociationsGetAccessoriesQuery): Promise<ProductVariantIdentifier[]>;
23
+ abstract getAccessories(query: ProductAssociationsGetAccessoriesQuery): Promise<Result<ProductAssociation[]>>;
21
24
  /**
22
25
  * Returns a list of product identifiers which are spareparts to the given product.
23
26
  * Spareparts are products which are necessary for the use of the main product, but are not typically purchased alongside it. Examples of spareparts include:
24
27
  *
25
28
  * Usecase:
26
- * - PDP: Accessories for this product
29
+ * - PDP: Spareparts for this product
30
+ *
31
+ * TODO: This should be a PaginatedResult
27
32
  */
28
- abstract getSpareparts(query: ProductAssociationsGetSparepartsQuery): Promise<ProductVariantIdentifier[]>;
33
+ abstract getSpareparts(query: ProductAssociationsGetSparepartsQuery): Promise<Result<ProductAssociation[]>>;
29
34
  /**
30
35
  * This product is replaced by these equivalent or newer products
36
+ *
37
+ * TODO: This should be a PaginatedResult
31
38
  * @param query
32
39
  */
33
- abstract getReplacements(query: ProductAssociationsGetReplacementsQuery): Promise<ProductVariantIdentifier[]>;
40
+ abstract getReplacements(query: ProductAssociationsGetReplacementsQuery): Promise<Result<ProductAssociation[]>>;
34
41
  getResourceName(): string;
35
42
  }
@@ -0,0 +1,70 @@
1
+ import type { ProductList, ProductListItem, ProductListItemPaginatedResult, ProductListPaginatedResult } from "../schemas/models/product-list.model.js";
2
+ import type { ProductListItemMutationCreate, ProductListItemMutationDelete, ProductListItemMutationUpdate, ProductListMutationCreate, ProductListMutationDelete, ProductListMutationUpdate } from "../schemas/mutations/product-list.mutation.js";
3
+ import type { ProductListQuery, ProductListQueryById } from "../schemas/queries/product-list.query.js";
4
+ import { type ProductListItemsQuery } from "../schemas/queries/product-list.query.js";
5
+ import type { Result } from "../schemas/result.js";
6
+ import { BaseProvider } from "./base.provider.js";
7
+ /**
8
+ * The product list provider is a general purpose provider for creating various types of product lists, such as favorite lists, projects, wishlists, requisitionlists, etc
9
+ * It supports having multiples of each list, so that users can have multiple wishlists for example. The lists are identified by a key, which is passed in the query for the various methods.
10
+ * The provider also supports having different types of lists, which can be used to differentiate between wishlists, favorite lists, etc.
11
+ * The type is also passed in the query for the various methods.
12
+ *
13
+ * Some systems might only support single entries of each type, but the general case is to support multiples.
14
+ */
15
+ export declare abstract class ProductListProvider extends BaseProvider {
16
+ protected getResourceName(): string;
17
+ /**
18
+ * Usecase: in the frontend you want to fetch a specific list, for example a specific wishlist, to show the details of the list, such as the name, description, image, etc.
19
+ * you might have stored the identifier from an earlier session or looked it up previously.
20
+ * @param payload
21
+ */
22
+ abstract getById(payload: ProductListQueryById): Promise<Result<ProductList>>;
23
+ /**
24
+ * Usecase: in the frontend you want to see if the customer already has a favorite list or wishlist, to which the product can be added.
25
+ * In complex scenarios you might want to fetch a list of wishlists, and allow customer to pick which one to add the product-variant to.
26
+ *
27
+ * @param query
28
+ */
29
+ abstract queryLists(query: ProductListQuery): Promise<Result<ProductListPaginatedResult>>;
30
+ /**
31
+ * Usecase: in the frontend, if customer has clicked the "add to favorites list", and you have used the queryLists to find out there is no
32
+ * preexistiing list, you can use this method to create a new favorite list.
33
+ *
34
+ * Usecase: in frontend, if customer has chosing "add to favorites list", and you allow multiple lists, you can use this method to create a new favorite list,
35
+ * which the customer can then add the product to.
36
+ * @param mutation
37
+ */
38
+ abstract addList(mutation: ProductListMutationCreate): Promise<Result<ProductList>>;
39
+ /**
40
+ *
41
+ * Usecase: update name of list, or other metadata related to the list, such as "this is my summer wishlist", or "this is my favorite list for cameras".
42
+ * @param mutation
43
+ */
44
+ abstract updateList(mutation: ProductListMutationUpdate): Promise<Result<ProductList>>;
45
+ /**
46
+ * Usecase: customer wants to delete a list, such as "delete my summer wishlist", including all the product list items
47
+ * @param mutation
48
+ */
49
+ abstract deleteList(mutation: ProductListMutationDelete): Promise<Result<void>>;
50
+ /**
51
+ * Usecase: in the frontend you want to show a list of the products in the customers wishlist.
52
+ * @param query
53
+ */
54
+ abstract queryListItems(query: ProductListItemsQuery): Promise<Result<ProductListItemPaginatedResult>>;
55
+ /**
56
+ * Usecase: Add a new product-variant to a list
57
+ * @param mutation
58
+ */
59
+ abstract addItem(mutation: ProductListItemMutationCreate): Promise<Result<ProductListItem>>;
60
+ /**
61
+ * Usecase: Remove a product-variant from a list.
62
+ * @param mutation
63
+ */
64
+ abstract deleteItem(mutation: ProductListItemMutationDelete): Promise<Result<void>>;
65
+ /**
66
+ * Usecase: Update the quantity of a product-variant in a list.
67
+ * @param mutation
68
+ */
69
+ abstract updateItem(mutation: ProductListItemMutationUpdate): Promise<Result<ProductListItem>>;
70
+ }
@@ -7,6 +7,7 @@ export declare const CapabilitiesSchema: z.ZodObject<{
7
7
  productAssociations: z.ZodBoolean;
8
8
  productRecommendations: z.ZodBoolean;
9
9
  productReviews: z.ZodBoolean;
10
+ productList: z.ZodBoolean;
10
11
  analytics: z.ZodBoolean;
11
12
  identity: z.ZodBoolean;
12
13
  cart: z.ZodBoolean;
@@ -12,6 +12,12 @@ export declare const OrderInventoryStatusSchema: z.ZodEnum<{
12
12
  Backordered: "Backordered";
13
13
  Preordered: "Preordered";
14
14
  }>;
15
+ export declare const ProductListTypeSchema: z.ZodEnum<{
16
+ favorite: "favorite";
17
+ wish: "wish";
18
+ requisition: "requisition";
19
+ shopping: "shopping";
20
+ }>;
15
21
  export declare const FacetIdentifierSchema: z.ZodObject<{
16
22
  key: z.ZodString;
17
23
  }, z.core.$loose>;
@@ -166,6 +172,54 @@ export declare const OrderSearchIdentifierSchema: z.ZodObject<{
166
172
  pageSize: z.ZodDefault<z.ZodNumber>;
167
173
  }, z.core.$loose>;
168
174
  }, z.core.$loose>;
175
+ export declare const ProductListSearchIdentifierSchema: z.ZodObject<{
176
+ listType: z.ZodEnum<{
177
+ favorite: "favorite";
178
+ wish: "wish";
179
+ requisition: "requisition";
180
+ shopping: "shopping";
181
+ }>;
182
+ paginationOptions: z.ZodObject<{
183
+ pageNumber: z.ZodDefault<z.ZodNumber>;
184
+ pageSize: z.ZodDefault<z.ZodNumber>;
185
+ }, z.core.$loose>;
186
+ }, z.core.$loose>;
187
+ export declare const ProductListIdentifierSchema: z.ZodObject<{
188
+ listType: z.ZodEnum<{
189
+ favorite: "favorite";
190
+ wish: "wish";
191
+ requisition: "requisition";
192
+ shopping: "shopping";
193
+ }>;
194
+ key: z.ZodString;
195
+ }, z.core.$loose>;
196
+ export declare const ProductListItemSearchIdentifierSchema: z.ZodObject<{
197
+ list: z.ZodObject<{
198
+ listType: z.ZodEnum<{
199
+ favorite: "favorite";
200
+ wish: "wish";
201
+ requisition: "requisition";
202
+ shopping: "shopping";
203
+ }>;
204
+ key: z.ZodString;
205
+ }, z.core.$loose>;
206
+ paginationOptions: z.ZodObject<{
207
+ pageNumber: z.ZodDefault<z.ZodNumber>;
208
+ pageSize: z.ZodDefault<z.ZodNumber>;
209
+ }, z.core.$loose>;
210
+ }, z.core.$loose>;
211
+ export declare const ProductListItemIdentifierSchema: z.ZodObject<{
212
+ key: z.ZodString;
213
+ list: z.ZodObject<{
214
+ listType: z.ZodEnum<{
215
+ favorite: "favorite";
216
+ wish: "wish";
217
+ requisition: "requisition";
218
+ shopping: "shopping";
219
+ }>;
220
+ key: z.ZodString;
221
+ }, z.core.$loose>;
222
+ }, z.core.$loose>;
169
223
  export type OrderSearchIdentifier = InferType<typeof OrderSearchIdentifierSchema>;
170
224
  export type ProductIdentifier = InferType<typeof ProductIdentifierSchema>;
171
225
  export type ProductVariantIdentifier = InferType<typeof ProductVariantIdentifierSchema>;
@@ -198,4 +252,9 @@ export type ProductRecommendationIdentifier = InferType<typeof ProductRecommenda
198
252
  export type ProductAssociationsIdentifier = InferType<typeof ProductAssociationsIdentifierSchema>;
199
253
  export type ProductRatingIdentifier = InferType<typeof ProductRatingIdentifierSchema>;
200
254
  export type ProductReviewIdentifier = InferType<typeof ProductReviewIdentifierSchema>;
201
- export type IdentifierType = ProductIdentifier | ProductVariantIdentifier | SearchIdentifier | FacetIdentifier | FacetValueIdentifier | CartIdentifier | CartItemIdentifier | PriceIdentifier | CategoryIdentifier | WebStoreIdentifier | InventoryIdentifier | ProductRecommendationIdentifier | FulfillmentCenterIdentifier | IdentityIdentifier | ShippingMethodIdentifier | PaymentMethodIdentifier | AddressIdentifier | PaymentInstructionIdentifier | OrderIdentifier | OrderItemIdentifier | CheckoutIdentifier | CheckoutItemIdentifier | StoreIdentifier | ProductOptionIdentifier | ProductOptionValueIdentifier | PickupPointIdentifier | ProductAttributeIdentifier | ProductAttributeValueIdentifier | ProductRatingIdentifier | ProductReviewIdentifier;
255
+ export type ProductListIdentifier = InferType<typeof ProductListIdentifierSchema>;
256
+ export type ProductListItemIdentifier = InferType<typeof ProductListItemIdentifierSchema>;
257
+ export type ProductListSearchIdentifier = InferType<typeof ProductListSearchIdentifierSchema>;
258
+ export type ProductListItemSearchIdentifier = InferType<typeof ProductListItemSearchIdentifierSchema>;
259
+ export type ProductListType = InferType<typeof ProductListTypeSchema>;
260
+ export type IdentifierType = ProductIdentifier | ProductVariantIdentifier | SearchIdentifier | FacetIdentifier | FacetValueIdentifier | CartIdentifier | CartItemIdentifier | PriceIdentifier | CategoryIdentifier | WebStoreIdentifier | InventoryIdentifier | ProductRecommendationIdentifier | FulfillmentCenterIdentifier | IdentityIdentifier | ShippingMethodIdentifier | PaymentMethodIdentifier | AddressIdentifier | PaymentInstructionIdentifier | OrderIdentifier | OrderItemIdentifier | CheckoutIdentifier | CheckoutItemIdentifier | StoreIdentifier | ProductOptionIdentifier | ProductOptionValueIdentifier | PickupPointIdentifier | ProductAttributeIdentifier | ProductAttributeValueIdentifier | ProductRatingIdentifier | ProductReviewIdentifier | ProductAssociationsIdentifier | ProductListIdentifier | ProductListItemIdentifier | ProductListSearchIdentifier;
@@ -20,3 +20,5 @@ export * from './checkout.model.js';
20
20
  export * from './payment.model.js';
21
21
  export * from './order-search.model.js';
22
22
  export * from './product-recommendations.model.js';
23
+ export * from './product-associations.model.js';
24
+ export * from './product-list.model.js';
@@ -1,11 +1,11 @@
1
1
  import * as z from "zod";
2
2
  import type { InferType } from "../../zod-utils.js";
3
- export declare const BaseProductAssociationsSchema: z.ZodObject<{
3
+ export declare const BaseProductAssociationSchema: z.ZodObject<{
4
4
  associationIdentifier: z.ZodObject<{
5
5
  key: z.ZodString;
6
6
  }, z.core.$loose>;
7
7
  }, z.core.$loose>;
8
- export declare const ProductAssociationsIdOnlySchema: z.ZodObject<{
8
+ export declare const ProductAssociationIdOnlySchema: z.ZodObject<{
9
9
  associationIdentifier: z.ZodObject<{
10
10
  key: z.ZodString;
11
11
  }, z.core.$loose>;
@@ -14,7 +14,7 @@ export declare const ProductAssociationsIdOnlySchema: z.ZodObject<{
14
14
  key: z.ZodString;
15
15
  }, z.core.$loose>;
16
16
  }, z.core.$loose>;
17
- export declare const ProductAssociationsProductSearchResultItemSchema: z.ZodObject<{
17
+ export declare const ProductAssociationProductSearchResultItemSchema: z.ZodObject<{
18
18
  associationIdentifier: z.ZodObject<{
19
19
  key: z.ZodString;
20
20
  }, z.core.$loose>;
@@ -53,7 +53,7 @@ export declare const ProductAssociationsProductSearchResultItemSchema: z.ZodObje
53
53
  }, z.core.$loose>>;
54
54
  }, z.core.$loose>;
55
55
  }, z.core.$loose>;
56
- export declare const ProductAssociationsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
56
+ export declare const ProductAssociationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
57
57
  associationIdentifier: z.ZodObject<{
58
58
  key: z.ZodString;
59
59
  }, z.core.$loose>;
@@ -100,6 +100,6 @@ export declare const ProductAssociationsSchema: z.ZodDiscriminatedUnion<[z.ZodOb
100
100
  }, z.core.$loose>>;
101
101
  }, z.core.$loose>;
102
102
  }, z.core.$loose>], "associationReturnType">;
103
- export type ProductAssociationsIdOnly = InferType<typeof ProductAssociationsIdOnlySchema>;
104
- export type ProductAssociationsSearchItem = InferType<typeof ProductAssociationsProductSearchResultItemSchema>;
105
- export type ProductAssociations = InferType<typeof ProductAssociationsSchema>;
103
+ export type ProductAssociationIdOnly = InferType<typeof ProductAssociationIdOnlySchema>;
104
+ export type ProductAssociationSearchItem = InferType<typeof ProductAssociationProductSearchResultItemSchema>;
105
+ export type ProductAssociation = InferType<typeof ProductAssociationSchema>;
@@ -0,0 +1,139 @@
1
+ import * as z from "zod";
2
+ import type { InferType } from "../../zod-utils.js";
3
+ export declare const ProductListSchema: z.ZodObject<{
4
+ identifier: z.ZodObject<{
5
+ listType: z.ZodEnum<{
6
+ favorite: "favorite";
7
+ wish: "wish";
8
+ requisition: "requisition";
9
+ shopping: "shopping";
10
+ }>;
11
+ key: z.ZodString;
12
+ }, z.core.$loose>;
13
+ type: z.ZodEnum<{
14
+ favorite: "favorite";
15
+ wish: "wish";
16
+ requisition: "requisition";
17
+ shopping: "shopping";
18
+ }>;
19
+ name: z.ZodString;
20
+ description: z.ZodOptional<z.ZodString>;
21
+ image: z.ZodOptional<z.ZodObject<{
22
+ sourceUrl: z.ZodDefault<z.ZodString>;
23
+ altText: z.ZodDefault<z.ZodString>;
24
+ width: z.ZodOptional<z.ZodNumber>;
25
+ height: z.ZodOptional<z.ZodNumber>;
26
+ }, z.core.$loose>>;
27
+ published: z.ZodDefault<z.ZodBoolean>;
28
+ publishDate: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$loose>;
30
+ export declare const ProductListItemSchema: z.ZodObject<{
31
+ identifier: z.ZodObject<{
32
+ key: z.ZodString;
33
+ list: z.ZodObject<{
34
+ listType: z.ZodEnum<{
35
+ favorite: "favorite";
36
+ wish: "wish";
37
+ requisition: "requisition";
38
+ shopping: "shopping";
39
+ }>;
40
+ key: z.ZodString;
41
+ }, z.core.$loose>;
42
+ }, z.core.$loose>;
43
+ variant: z.ZodObject<{
44
+ sku: z.ZodString;
45
+ }, z.core.$loose>;
46
+ quantity: z.ZodNumber;
47
+ notes: z.ZodOptional<z.ZodString>;
48
+ order: z.ZodDefault<z.ZodNumber>;
49
+ }, z.core.$loose>;
50
+ export declare const ProductListPaginatedResultsSchema: z.ZodObject<{
51
+ pageNumber: z.ZodNumber;
52
+ pageSize: z.ZodNumber;
53
+ totalCount: z.ZodNumber;
54
+ totalPages: z.ZodNumber;
55
+ items: z.ZodArray<z.ZodObject<{
56
+ identifier: z.ZodObject<{
57
+ listType: z.ZodEnum<{
58
+ favorite: "favorite";
59
+ wish: "wish";
60
+ requisition: "requisition";
61
+ shopping: "shopping";
62
+ }>;
63
+ key: z.ZodString;
64
+ }, z.core.$loose>;
65
+ type: z.ZodEnum<{
66
+ favorite: "favorite";
67
+ wish: "wish";
68
+ requisition: "requisition";
69
+ shopping: "shopping";
70
+ }>;
71
+ name: z.ZodString;
72
+ description: z.ZodOptional<z.ZodString>;
73
+ image: z.ZodOptional<z.ZodObject<{
74
+ sourceUrl: z.ZodDefault<z.ZodString>;
75
+ altText: z.ZodDefault<z.ZodString>;
76
+ width: z.ZodOptional<z.ZodNumber>;
77
+ height: z.ZodOptional<z.ZodNumber>;
78
+ }, z.core.$loose>>;
79
+ published: z.ZodDefault<z.ZodBoolean>;
80
+ publishDate: z.ZodOptional<z.ZodString>;
81
+ }, z.core.$loose>>;
82
+ identifier: z.ZodObject<{
83
+ listType: z.ZodEnum<{
84
+ favorite: "favorite";
85
+ wish: "wish";
86
+ requisition: "requisition";
87
+ shopping: "shopping";
88
+ }>;
89
+ paginationOptions: z.ZodObject<{
90
+ pageNumber: z.ZodDefault<z.ZodNumber>;
91
+ pageSize: z.ZodDefault<z.ZodNumber>;
92
+ }, z.core.$loose>;
93
+ }, z.core.$loose>;
94
+ }, z.core.$strip>;
95
+ export declare const ProductListItemPaginatedResultsSchema: z.ZodObject<{
96
+ pageNumber: z.ZodNumber;
97
+ pageSize: z.ZodNumber;
98
+ totalCount: z.ZodNumber;
99
+ totalPages: z.ZodNumber;
100
+ items: z.ZodArray<z.ZodObject<{
101
+ identifier: z.ZodObject<{
102
+ key: z.ZodString;
103
+ list: z.ZodObject<{
104
+ listType: z.ZodEnum<{
105
+ favorite: "favorite";
106
+ wish: "wish";
107
+ requisition: "requisition";
108
+ shopping: "shopping";
109
+ }>;
110
+ key: z.ZodString;
111
+ }, z.core.$loose>;
112
+ }, z.core.$loose>;
113
+ variant: z.ZodObject<{
114
+ sku: z.ZodString;
115
+ }, z.core.$loose>;
116
+ quantity: z.ZodNumber;
117
+ notes: z.ZodOptional<z.ZodString>;
118
+ order: z.ZodDefault<z.ZodNumber>;
119
+ }, z.core.$loose>>;
120
+ identifier: z.ZodObject<{
121
+ list: z.ZodObject<{
122
+ listType: z.ZodEnum<{
123
+ favorite: "favorite";
124
+ wish: "wish";
125
+ requisition: "requisition";
126
+ shopping: "shopping";
127
+ }>;
128
+ key: z.ZodString;
129
+ }, z.core.$loose>;
130
+ paginationOptions: z.ZodObject<{
131
+ pageNumber: z.ZodDefault<z.ZodNumber>;
132
+ pageSize: z.ZodDefault<z.ZodNumber>;
133
+ }, z.core.$loose>;
134
+ }, z.core.$loose>;
135
+ }, z.core.$strip>;
136
+ export type ProductList = InferType<typeof ProductListSchema>;
137
+ export type ProductListItem = InferType<typeof ProductListItemSchema>;
138
+ export type ProductListPaginatedResult = InferType<typeof ProductListPaginatedResultsSchema>;
139
+ export type ProductListItemPaginatedResult = InferType<typeof ProductListItemPaginatedResultsSchema>;
@@ -4,7 +4,7 @@ export * from './cart.mutation.js';
4
4
  export * from './identity.mutation.js';
5
5
  export * from './inventory.mutation.js';
6
6
  export * from './price.mutation.js';
7
- export * from './product.mutation.js';
7
+ export * from './product-list.mutation.js';
8
8
  export * from './product-reviews.mutation.js';
9
9
  export * from './profile.mutation.js';
10
10
  export * from './search.mutation.js';
@@ -0,0 +1,138 @@
1
+ import * as z from 'zod';
2
+ import type { InferType } from '../../zod-utils.js';
3
+ export declare const ProductListCreateSchema: z.ZodObject<{
4
+ description: z.ZodOptional<z.ZodString>;
5
+ type: z.ZodEnum<{
6
+ favorite: "favorite";
7
+ wish: "wish";
8
+ requisition: "requisition";
9
+ shopping: "shopping";
10
+ }>;
11
+ name: z.ZodString;
12
+ published: z.ZodDefault<z.ZodBoolean>;
13
+ image: z.ZodOptional<z.ZodObject<{
14
+ sourceUrl: z.ZodDefault<z.ZodString>;
15
+ altText: z.ZodDefault<z.ZodString>;
16
+ width: z.ZodOptional<z.ZodNumber>;
17
+ height: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$loose>>;
19
+ publishDate: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$loose>;
21
+ export declare const ProductListMutationCreateSchema: z.ZodObject<{
22
+ list: z.ZodObject<{
23
+ description: z.ZodOptional<z.ZodString>;
24
+ type: z.ZodEnum<{
25
+ favorite: "favorite";
26
+ wish: "wish";
27
+ requisition: "requisition";
28
+ shopping: "shopping";
29
+ }>;
30
+ name: z.ZodString;
31
+ published: z.ZodDefault<z.ZodBoolean>;
32
+ image: z.ZodOptional<z.ZodObject<{
33
+ sourceUrl: z.ZodDefault<z.ZodString>;
34
+ altText: z.ZodDefault<z.ZodString>;
35
+ width: z.ZodOptional<z.ZodNumber>;
36
+ height: z.ZodOptional<z.ZodNumber>;
37
+ }, z.core.$loose>>;
38
+ publishDate: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$loose>;
40
+ }, z.core.$loose>;
41
+ export declare const ProductListMutationDeleteSchema: z.ZodObject<{
42
+ list: z.ZodObject<{
43
+ listType: z.ZodEnum<{
44
+ favorite: "favorite";
45
+ wish: "wish";
46
+ requisition: "requisition";
47
+ shopping: "shopping";
48
+ }>;
49
+ key: z.ZodString;
50
+ }, z.core.$loose>;
51
+ }, z.core.$loose>;
52
+ export declare const ProductListMutationUpdateSchema: z.ZodObject<{
53
+ list: z.ZodObject<{
54
+ listType: z.ZodEnum<{
55
+ favorite: "favorite";
56
+ wish: "wish";
57
+ requisition: "requisition";
58
+ shopping: "shopping";
59
+ }>;
60
+ key: z.ZodString;
61
+ }, z.core.$loose>;
62
+ name: z.ZodOptional<z.ZodString>;
63
+ description: z.ZodOptional<z.ZodString>;
64
+ image: z.ZodOptional<z.ZodObject<{
65
+ sourceUrl: z.ZodDefault<z.ZodString>;
66
+ altText: z.ZodDefault<z.ZodString>;
67
+ width: z.ZodOptional<z.ZodNumber>;
68
+ height: z.ZodOptional<z.ZodNumber>;
69
+ }, z.core.$loose>>;
70
+ published: z.ZodOptional<z.ZodBoolean>;
71
+ publishDate: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$loose>;
73
+ export declare const ProductListItemCreateSchema: z.ZodObject<{
74
+ variant: z.ZodObject<{
75
+ sku: z.ZodString;
76
+ }, z.core.$loose>;
77
+ quantity: z.ZodNumber;
78
+ notes: z.ZodOptional<z.ZodString>;
79
+ order: z.ZodDefault<z.ZodNumber>;
80
+ }, z.core.$loose>;
81
+ export declare const ProductListItemMutationCreateSchema: z.ZodObject<{
82
+ list: z.ZodObject<{
83
+ listType: z.ZodEnum<{
84
+ favorite: "favorite";
85
+ wish: "wish";
86
+ requisition: "requisition";
87
+ shopping: "shopping";
88
+ }>;
89
+ key: z.ZodString;
90
+ }, z.core.$loose>;
91
+ listItem: z.ZodObject<{
92
+ variant: z.ZodObject<{
93
+ sku: z.ZodString;
94
+ }, z.core.$loose>;
95
+ quantity: z.ZodNumber;
96
+ notes: z.ZodOptional<z.ZodString>;
97
+ order: z.ZodDefault<z.ZodNumber>;
98
+ }, z.core.$loose>;
99
+ }, z.core.$loose>;
100
+ export declare const ProductListItemMutationDeleteSchema: z.ZodObject<{
101
+ listItem: z.ZodObject<{
102
+ key: z.ZodString;
103
+ list: z.ZodObject<{
104
+ listType: z.ZodEnum<{
105
+ favorite: "favorite";
106
+ wish: "wish";
107
+ requisition: "requisition";
108
+ shopping: "shopping";
109
+ }>;
110
+ key: z.ZodString;
111
+ }, z.core.$loose>;
112
+ }, z.core.$loose>;
113
+ }, z.core.$loose>;
114
+ export declare const ProductListItemMutationUpdateSchema: z.ZodObject<{
115
+ listItem: z.ZodObject<{
116
+ key: z.ZodString;
117
+ list: z.ZodObject<{
118
+ listType: z.ZodEnum<{
119
+ favorite: "favorite";
120
+ wish: "wish";
121
+ requisition: "requisition";
122
+ shopping: "shopping";
123
+ }>;
124
+ key: z.ZodString;
125
+ }, z.core.$loose>;
126
+ }, z.core.$loose>;
127
+ quantity: z.ZodOptional<z.ZodNumber>;
128
+ notes: z.ZodOptional<z.ZodString>;
129
+ order: z.ZodOptional<z.ZodNumber>;
130
+ }, z.core.$loose>;
131
+ export type ProductListItemCreate = InferType<typeof ProductListItemCreateSchema>;
132
+ export type ProductListItemMutationCreate = InferType<typeof ProductListItemMutationCreateSchema>;
133
+ export type ProductListItemMutationDelete = InferType<typeof ProductListItemMutationDeleteSchema>;
134
+ export type ProductListItemMutationUpdate = InferType<typeof ProductListItemMutationUpdateSchema>;
135
+ export type ProductListCreate = InferType<typeof ProductListCreateSchema>;
136
+ export type ProductListMutationCreate = InferType<typeof ProductListMutationCreateSchema>;
137
+ export type ProductListMutationUpdate = InferType<typeof ProductListMutationUpdateSchema>;
138
+ export type ProductListMutationDelete = InferType<typeof ProductListMutationDeleteSchema>;
@@ -15,3 +15,4 @@ export * from './checkout.query.js';
15
15
  export * from './order-search.query.js';
16
16
  export * from './product-recommendations.query.js';
17
17
  export * from './product-associations.query.js';
18
+ export * from './product-list.query.js';
@@ -1,19 +1,21 @@
1
1
  import * as z from "zod";
2
2
  export declare const ProductAssociationsGetAccessoriesQuerySchema: z.ZodObject<{
3
- forProductVariant: z.ZodObject<{
4
- sku: z.ZodString;
3
+ forProduct: z.ZodObject<{
4
+ key: z.ZodString;
5
5
  }, z.core.$loose>;
6
6
  numberOfAccessories: z.ZodNumber;
7
7
  }, z.core.$loose>;
8
8
  export declare const ProductAssociationsGetSparepartsQuerySchema: z.ZodObject<{
9
- forProductVariant: z.ZodObject<{
10
- sku: z.ZodString;
9
+ forProduct: z.ZodObject<{
10
+ key: z.ZodString;
11
11
  }, z.core.$loose>;
12
+ numberOfSpareparts: z.ZodNumber;
12
13
  }, z.core.$loose>;
13
14
  export declare const ProductAssociationsGetReplacementsQuerySchema: z.ZodObject<{
14
- forProductVariant: z.ZodObject<{
15
- sku: z.ZodString;
15
+ forProduct: z.ZodObject<{
16
+ key: z.ZodString;
16
17
  }, z.core.$loose>;
18
+ numberOfReplacements: z.ZodNumber;
17
19
  }, z.core.$loose>;
18
20
  export type ProductAssociationsGetAccessoriesQuery = z.infer<typeof ProductAssociationsGetAccessoriesQuerySchema>;
19
21
  export type ProductAssociationsGetSparepartsQuery = z.infer<typeof ProductAssociationsGetSparepartsQuerySchema>;
@@ -0,0 +1,46 @@
1
+ import type { InferType } from "../../zod-utils.js";
2
+ export declare const ProductListQueryByIdSchema: import("zod").ZodObject<{
3
+ identifier: import("zod").ZodObject<{
4
+ listType: import("zod").ZodEnum<{
5
+ favorite: "favorite";
6
+ wish: "wish";
7
+ requisition: "requisition";
8
+ shopping: "shopping";
9
+ }>;
10
+ key: import("zod").ZodString;
11
+ }, import("zod/v4/core").$loose>;
12
+ }, import("zod/v4/core").$loose>;
13
+ export declare const ProductListQuerySchema: import("zod").ZodObject<{
14
+ search: import("zod").ZodObject<{
15
+ listType: import("zod").ZodEnum<{
16
+ favorite: "favorite";
17
+ wish: "wish";
18
+ requisition: "requisition";
19
+ shopping: "shopping";
20
+ }>;
21
+ paginationOptions: import("zod").ZodObject<{
22
+ pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
23
+ pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
24
+ }, import("zod/v4/core").$loose>;
25
+ }, import("zod/v4/core").$loose>;
26
+ }, import("zod/v4/core").$loose>;
27
+ export declare const ProductListItemQuerySchema: import("zod").ZodObject<{
28
+ search: import("zod").ZodObject<{
29
+ list: import("zod").ZodObject<{
30
+ listType: import("zod").ZodEnum<{
31
+ favorite: "favorite";
32
+ wish: "wish";
33
+ requisition: "requisition";
34
+ shopping: "shopping";
35
+ }>;
36
+ key: import("zod").ZodString;
37
+ }, import("zod/v4/core").$loose>;
38
+ paginationOptions: import("zod").ZodObject<{
39
+ pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
40
+ pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
41
+ }, import("zod/v4/core").$loose>;
42
+ }, import("zod/v4/core").$loose>;
43
+ }, import("zod/v4/core").$loose>;
44
+ export type ProductListQueryById = InferType<typeof ProductListQueryByIdSchema>;
45
+ export type ProductListQuery = InferType<typeof ProductListQuerySchema>;
46
+ export type ProductListItemsQuery = InferType<typeof ProductListItemQuerySchema>;