@reactionary/core 0.6.8 → 0.6.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 (30) hide show
  1. package/package.json +1 -1
  2. package/schemas/models/cart.model.js +19 -6
  3. package/schemas/models/identifiers.model.js +19 -10
  4. package/schemas/models/order.model.js +2 -1
  5. package/schemas/mutations/cart.mutation.js +14 -4
  6. package/schemas/mutations/product-list.mutation.js +3 -2
  7. package/schemas/queries/cart.query.js +6 -2
  8. package/schemas/queries/price.query.js +3 -2
  9. package/src/capabilities/cart.capability.d.ts +26 -3
  10. package/src/factories/cart.factory.d.ts +9 -3
  11. package/src/factories/product-list.factory.d.ts +5 -4
  12. package/src/schemas/models/cart.model.d.ts +62 -2
  13. package/src/schemas/models/identifiers.model.d.ts +49 -9
  14. package/src/schemas/models/order-search.model.d.ts +3 -0
  15. package/src/schemas/models/order.model.d.ts +3 -0
  16. package/src/schemas/models/product-list.model.d.ts +18 -0
  17. package/src/schemas/models/product-search.model.d.ts +3 -0
  18. package/src/schemas/mutations/analytics/index.d.ts +12 -0
  19. package/src/schemas/mutations/analytics/product-add-to-cart.mutation.d.ts +3 -0
  20. package/src/schemas/mutations/analytics/product-summary-click.mutation.d.ts +3 -0
  21. package/src/schemas/mutations/analytics/product-summary-view.mutation.d.ts +3 -0
  22. package/src/schemas/mutations/analytics/purchase.mutation.d.ts +3 -0
  23. package/src/schemas/mutations/cart.mutation.d.ts +17 -3
  24. package/src/schemas/mutations/checkout.mutation.d.ts +5 -2
  25. package/src/schemas/mutations/product-list.mutation.d.ts +18 -0
  26. package/src/schemas/queries/cart.query.d.ts +12 -0
  27. package/src/schemas/queries/order-search.query.d.ts +3 -0
  28. package/src/schemas/queries/price.query.d.ts +3 -0
  29. package/src/schemas/queries/product-list.query.d.ts +9 -0
  30. package/src/schemas/queries/product-search.query.d.ts +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactionary/core",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./src/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
- import { CartIdentifierSchema, CartItemIdentifierSchema, IdentityIdentifierSchema, ProductIdentifierSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
3
- import { BaseModelSchema } from "./base.model.js";
2
+ import { CartIdentifierSchema, CartItemIdentifierSchema, CartSearchIdentifierSchema, CompanyIdentifierSchema, IdentityIdentifierSchema, ProductIdentifierSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
3
+ import { BaseModelSchema, createPaginatedResponseSchema } from "./base.model.js";
4
4
  import { CostBreakDownSchema, ItemCostBreakdownSchema } from "./cost.model.js";
5
5
  import { PromotionSchema } from "./price.model.js";
6
6
  const CartItemSchema = z.looseObject({
@@ -10,16 +10,29 @@ const CartItemSchema = z.looseObject({
10
10
  quantity: z.number().default(0),
11
11
  price: ItemCostBreakdownSchema.default(() => ItemCostBreakdownSchema.parse({}))
12
12
  });
13
- const CartSchema = BaseModelSchema.extend({
13
+ const BaseCartSchema = BaseModelSchema.extend({
14
14
  identifier: CartIdentifierSchema.default(() => CartIdentifierSchema.parse({})),
15
- userId: IdentityIdentifierSchema.default(() => IdentityIdentifierSchema.parse({})),
15
+ user: IdentityIdentifierSchema.default(() => IdentityIdentifierSchema.parse({})),
16
+ company: CompanyIdentifierSchema.optional(),
17
+ name: z.string().default("")
18
+ });
19
+ const CartSchema = BaseCartSchema.extend({
16
20
  items: z.array(CartItemSchema).default(() => []),
17
21
  price: CostBreakDownSchema.default(() => CostBreakDownSchema.parse({})),
18
22
  appliedPromotions: z.array(PromotionSchema).default(() => []),
19
- name: z.string().default(""),
20
23
  description: z.string().default("")
21
24
  });
25
+ const CartSearchResultItemSchema = BaseCartSchema.extend({
26
+ numItems: z.number().default(0),
27
+ lastModifiedDate: z.string().default("")
28
+ });
29
+ const CartPaginatedSearchResultSchema = createPaginatedResponseSchema(CartSearchResultItemSchema).extend({
30
+ identifier: CartSearchIdentifierSchema
31
+ });
22
32
  export {
33
+ BaseCartSchema,
23
34
  CartItemSchema,
24
- CartSchema
35
+ CartPaginatedSearchResultSchema,
36
+ CartSchema,
37
+ CartSearchResultItemSchema
25
38
  };
@@ -102,12 +102,19 @@ const ProductRatingIdentifierSchema = z.looseObject({
102
102
  const ProductReviewIdentifierSchema = z.looseObject({
103
103
  key: z.string().meta({ description: "The unique identifier for the product review." })
104
104
  });
105
+ const CompanyIdentifierSchema = z.looseObject({
106
+ /**
107
+ * VAT identifier, used for tax-calculation purposes
108
+ */
109
+ taxIdentifier: z.string().meta({ description: "The unique identifier for the company. Could technically also be the DUNS identifier" })
110
+ });
105
111
  const ProductSearchIdentifierSchema = z.looseObject({
106
112
  term: z.string().meta({ description: "The search term used to find products." }),
107
113
  facets: z.array(FacetValueIdentifierSchema).meta({ description: "The facets applied to filter the search results." }),
108
114
  filters: z.array(z.string()).meta({ description: "Additional filters applied to the search results." }),
109
115
  paginationOptions: PaginationOptionsSchema.meta({ description: "Pagination options for the search results." }),
110
- categoryFilter: FacetValueIdentifierSchema.optional().meta({ description: "An optional category filter applied to the search results." })
116
+ categoryFilter: FacetValueIdentifierSchema.optional().meta({ description: "An optional category filter applied to the search results." }),
117
+ company: CompanyIdentifierSchema.optional().meta({ description: "The identifier for the company to search products within. This can be used to filter products by specific companies, which can be useful for B2B use cases." })
111
118
  });
112
119
  const OrderSearchIdentifierSchema = z.looseObject({
113
120
  term: z.string().meta({ description: "The search term used to find orders. Not all providers may support term-based search for orders." }),
@@ -117,15 +124,18 @@ const OrderSearchIdentifierSchema = z.looseObject({
117
124
  startDate: z.string().optional().meta({ description: "An optional start date to filter orders from a specific date onwards. ISO8601" }),
118
125
  endDate: z.string().optional().meta({ description: "An optional end date to filter orders up to a specific date. ISO8601" }),
119
126
  filters: z.array(z.string()).meta({ description: "Additional filters applied to the search results." }),
120
- paginationOptions: PaginationOptionsSchema.meta({ description: "Pagination options for the search results." })
127
+ paginationOptions: PaginationOptionsSchema.meta({ description: "Pagination options for the search results." }),
128
+ company: CompanyIdentifierSchema.optional().meta({ description: "The identifier for the company to search orders within. This can be used to filter orders by specific companies, which can be useful for B2B use cases." })
121
129
  });
122
130
  const ProductListSearchIdentifierSchema = z.looseObject({
123
131
  listType: ProductListTypeSchema.meta({ description: 'The type of product list, e.g., "wishlist" or "favorites".' }),
124
- paginationOptions: PaginationOptionsSchema.meta({ description: "Pagination options for the search results." })
132
+ paginationOptions: PaginationOptionsSchema.meta({ description: "Pagination options for the search results." }),
133
+ company: CompanyIdentifierSchema.optional().meta({ description: "The identifier for the company to search product lists within. This can be used to filter product lists by specific companies, which can be useful for B2B use cases." })
125
134
  });
126
135
  const ProductListIdentifierSchema = z.looseObject({
127
136
  listType: ProductListTypeSchema.meta({ description: 'The type of product list, e.g., "wish" or "favorite".' }),
128
- key: z.string().meta({ description: "The unique identifier for the product list." })
137
+ key: z.string().meta({ description: "The unique identifier for the product list." }),
138
+ user: IdentityIdentifierSchema.optional().meta({ description: "The identifier for the owner of the list. This can be used to filter product lists by specific users, which can be useful for B2B use cases." })
129
139
  });
130
140
  const ProductListItemSearchIdentifierSchema = z.looseObject({
131
141
  list: ProductListIdentifierSchema.meta({ description: "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." }),
@@ -138,12 +148,6 @@ const ProductListItemIdentifierSchema = z.looseObject({
138
148
  const PromotionIdentifierSchema = z.looseObject({
139
149
  key: z.string().meta({ description: "The unique identifier for the promotion." })
140
150
  });
141
- const CompanyIdentifierSchema = z.looseObject({
142
- /**
143
- * VAT identifier, used for tax-calculation purposes
144
- */
145
- taxIdentifier: z.string().meta({ description: "The unique identifier for the company. Could technically also be the DUNS identifier" })
146
- });
147
151
  const CompanyRegistrationRequestIdentifierSchema = z.looseObject({
148
152
  key: z.string().meta({ description: "The unique identifier for the company registration request." })
149
153
  });
@@ -170,10 +174,15 @@ const EmployeeSearchIdentifierSchema = z.looseObject({
170
174
  role: EmployeeRoleSchema.optional().meta({ description: "The role of the employee to search for." }),
171
175
  paginationOptions: PaginationOptionsSchema.meta({ description: "Pagination options for the search results." })
172
176
  });
177
+ const CartSearchIdentifierSchema = z.looseObject({
178
+ company: CompanyIdentifierSchema.optional().meta({ description: "The identifier for the company to search carts within. This can be used to filter carts by specific companies, which can be useful for B2B use cases." }),
179
+ paginationOptions: PaginationOptionsSchema.meta({ description: "Pagination options for the search results." })
180
+ });
173
181
  export {
174
182
  AddressIdentifierSchema,
175
183
  CartIdentifierSchema,
176
184
  CartItemIdentifierSchema,
185
+ CartSearchIdentifierSchema,
177
186
  CategoryIdentifierSchema,
178
187
  CheckoutIdentifierSchema,
179
188
  CheckoutItemIdentifierSchema,
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
- import { CartIdentifierSchema, IdentityIdentifierSchema, OrderIdentifierSchema, OrderInventoryStatusSchema, OrderItemIdentifierSchema, OrderStatusSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
2
+ import { CartIdentifierSchema, CompanyIdentifierSchema, IdentityIdentifierSchema, OrderIdentifierSchema, OrderInventoryStatusSchema, OrderItemIdentifierSchema, OrderStatusSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
3
3
  import { BaseModelSchema } from "./base.model.js";
4
4
  import { AddressSchema } from "./profile.model.js";
5
5
  import { ShippingMethodSchema } from "./shipping-method.model.js";
@@ -15,6 +15,7 @@ const OrderItemSchema = z.looseObject({
15
15
  const OrderSchema = BaseModelSchema.extend({
16
16
  identifier: OrderIdentifierSchema,
17
17
  userId: IdentityIdentifierSchema,
18
+ company: CompanyIdentifierSchema.optional(),
18
19
  items: z.array(OrderItemSchema),
19
20
  price: CostBreakDownSchema,
20
21
  name: z.string().optional(),
@@ -1,13 +1,13 @@
1
1
  import * as z from "zod";
2
2
  import { BaseMutationSchema } from "./base.mutation.js";
3
- import { CartIdentifierSchema, CartItemIdentifierSchema, PaymentMethodIdentifierSchema, ShippingMethodIdentifierSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
3
+ import { CartIdentifierSchema, CartItemIdentifierSchema, PaymentMethodIdentifierSchema, ShippingMethodIdentifierSchema, ProductVariantIdentifierSchema, CompanyIdentifierSchema } from "../models/identifiers.model.js";
4
4
  import { AddressSchema } from "../models/profile.model.js";
5
5
  import { CurrencySchema } from "../models/currency.model.js";
6
6
  import { MonetaryAmountSchema } from "../models/price.model.js";
7
7
  const CartMutationItemAddSchema = BaseMutationSchema.extend({
8
- cart: CartIdentifierSchema.optional(),
8
+ cart: CartIdentifierSchema,
9
9
  variant: ProductVariantIdentifierSchema,
10
- quantity: z.number()
10
+ quantity: z.number().min(1).default(1).meta({ description: "The quantity of the item to add to the cart. Must be at least 1." })
11
11
  });
12
12
  const CartMutationItemRemoveSchema = BaseMutationSchema.extend({
13
13
  cart: CartIdentifierSchema,
@@ -16,7 +16,7 @@ const CartMutationItemRemoveSchema = BaseMutationSchema.extend({
16
16
  const CartMutationItemQuantityChangeSchema = BaseMutationSchema.extend({
17
17
  cart: CartIdentifierSchema,
18
18
  item: CartItemIdentifierSchema,
19
- quantity: z.number()
19
+ quantity: z.number().min(1).meta({ description: "The new quantity for the cart item. Must be at least 1. If you want to remove the item from the cart, use the CartMutationItemRemove mutation instead." })
20
20
  });
21
21
  const CartMutationDeleteCartSchema = BaseMutationSchema.extend({
22
22
  cart: CartIdentifierSchema
@@ -55,17 +55,27 @@ const CartMutationChangeCurrencySchema = BaseMutationSchema.extend({
55
55
  cart: CartIdentifierSchema.required(),
56
56
  newCurrency: CurrencySchema.describe("The new currency to set for the cart.")
57
57
  });
58
+ const CartMutationCreateCartSchema = BaseMutationSchema.extend({
59
+ company: CompanyIdentifierSchema.optional().meta({ description: "The company identifier for the new cart. This can be used to associate the cart with a specific company, which can be useful for B2B use cases." }),
60
+ name: z.string().optional().meta({ description: "The name for the new cart. This can be used to give the cart a human readable name that can be displayed in the UI." })
61
+ });
62
+ const CartMutationRenameCartSchema = BaseMutationSchema.extend({
63
+ cart: CartIdentifierSchema.required(),
64
+ newName: z.string().meta({ description: "The new name for the cart." })
65
+ });
58
66
  export {
59
67
  CartMutationAddPaymentMethodSchema,
60
68
  CartMutationApplyCouponSchema,
61
69
  CartMutationChangeCurrencySchema,
62
70
  CartMutationCheckoutSchema,
71
+ CartMutationCreateCartSchema,
63
72
  CartMutationDeleteCartSchema,
64
73
  CartMutationItemAddSchema,
65
74
  CartMutationItemQuantityChangeSchema,
66
75
  CartMutationItemRemoveSchema,
67
76
  CartMutationRemoveCouponSchema,
68
77
  CartMutationRemovePaymentMethodSchema,
78
+ CartMutationRenameCartSchema,
69
79
  CartMutationSetBillingAddressSchema,
70
80
  CartMutationSetShippingInfoSchema
71
81
  };
@@ -1,11 +1,12 @@
1
1
  import * as z from "zod";
2
2
  import { ImageSchema } from "../models/base.model.js";
3
- import { ProductListIdentifierSchema, ProductListItemIdentifierSchema } from "../models/identifiers.model.js";
3
+ import { CompanyIdentifierSchema, ProductListIdentifierSchema, ProductListItemIdentifierSchema } from "../models/identifiers.model.js";
4
4
  import { ProductListItemSchema, ProductListSchema } from "../models/product-list.model.js";
5
5
  import { BaseMutationSchema } from "./base.mutation.js";
6
6
  const ProductListCreateSchema = ProductListSchema.omit({ identifier: true });
7
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.")
8
+ list: ProductListCreateSchema.describe("The details of the product list to create, including its name, description, type, and any associated image."),
9
+ company: CompanyIdentifierSchema.optional().describe("The identifier for the company to create the product list within. This can be used to associate the list with a specific company, which can be useful for B2B use cases. If not provided, the list will be created in a default or global context.")
9
10
  });
10
11
  const ProductListMutationDeleteSchema = BaseMutationSchema.extend({
11
12
  list: ProductListIdentifierSchema.meta({ description: "The identifier for the product list to delete." })
@@ -1,8 +1,12 @@
1
1
  import { BaseQuerySchema } from "./base.query.js";
2
- import { CartIdentifierSchema } from "../models/identifiers.model.js";
2
+ import { CartIdentifierSchema, CartSearchIdentifierSchema } from "../models/identifiers.model.js";
3
3
  const CartQueryByIdSchema = BaseQuerySchema.extend({
4
4
  cart: CartIdentifierSchema
5
5
  });
6
+ const CartQueryListSchema = BaseQuerySchema.extend({
7
+ search: CartSearchIdentifierSchema
8
+ });
6
9
  export {
7
- CartQueryByIdSchema
10
+ CartQueryByIdSchema,
11
+ CartQueryListSchema
8
12
  };
@@ -1,10 +1,11 @@
1
1
  import { BaseQuerySchema } from "./base.query.js";
2
- import { ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
2
+ import { CompanyIdentifierSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
3
3
  const ListPriceQuerySchema = BaseQuerySchema.extend({
4
4
  variant: ProductVariantIdentifierSchema
5
5
  });
6
6
  const CustomerPriceQuerySchema = BaseQuerySchema.extend({
7
- variant: ProductVariantIdentifierSchema
7
+ variant: ProductVariantIdentifierSchema,
8
+ company: CompanyIdentifierSchema.optional()
8
9
  });
9
10
  export {
10
11
  CustomerPriceQuerySchema,
@@ -1,8 +1,8 @@
1
1
  import type { NotFoundError } from "../schemas/index.js";
2
- import type { Cart } from "../schemas/models/cart.model.js";
2
+ import type { Cart, CartPaginatedSearchResult } from "../schemas/models/cart.model.js";
3
3
  import type { CartIdentifier } from "../schemas/models/identifiers.model.js";
4
- import type { CartMutationApplyCoupon, CartMutationChangeCurrency, CartMutationDeleteCart, CartMutationItemAdd, CartMutationItemQuantityChange, CartMutationItemRemove, CartMutationRemoveCoupon } from "../schemas/mutations/cart.mutation.js";
5
- import type { CartQueryById } from "../schemas/queries/cart.query.js";
4
+ import type { CartMutationApplyCoupon, CartMutationChangeCurrency, CartMutationCreateCart, CartMutationDeleteCart, CartMutationItemAdd, CartMutationItemQuantityChange, CartMutationItemRemove, CartMutationRemoveCoupon, CartMutationRenameCart } from "../schemas/mutations/cart.mutation.js";
5
+ import type { CartQueryById, CartQueryList } from "../schemas/queries/cart.query.js";
6
6
  import type { Result } from "../schemas/result.js";
7
7
  import { BaseCapability } from "./base.capability.js";
8
8
  /**
@@ -22,6 +22,8 @@ export declare abstract class CartCapability<TCart extends Cart = Cart, TCartIde
22
22
  *
23
23
  * Usecase: Most common usecase during site load, or after login. You want to get the active cart for the user, so you can display it in the minicart.
24
24
  * @param session
25
+ *
26
+ * @deprecated This method is deprecated, because it assumes that there is only one active cart per user. This might not be the case in the future, when we support multiple carts per user. Use the listCarts method instead, and get the active cart from the list.
25
27
  */
26
28
  abstract getActiveCartId(): Promise<Result<TCartIdentifier, NotFoundError>>;
27
29
  /**
@@ -52,6 +54,22 @@ export declare abstract class CartCapability<TCart extends Cart = Cart, TCartIde
52
54
  * @param session
53
55
  */
54
56
  abstract changeQuantity(payload: CartMutationItemQuantityChange): Promise<Result<TCart>>;
57
+ /**
58
+ * Usecase:
59
+ * Get all carts for the user. This is needed if you want to support multiple carts per user, and show a cart switcher in the UI, or something like that. If you only support one cart per user, this can just return the active cart.
60
+ *
61
+ * @param payload
62
+ */
63
+ abstract listCarts(payload: CartQueryList): Promise<Result<CartPaginatedSearchResult>>;
64
+ /**
65
+ * Usecase:
66
+ * User is adding something to cart, but no cart exists yet. You want to create a new cart and add the item to it in one step, instead of having to call createCart first, and then add.
67
+ *
68
+ * Usecase:
69
+ * You might want to create a new cart, so you have mulitple carts open
70
+ * @param payload
71
+ */
72
+ abstract createCart(payload: CartMutationCreateCart): Promise<Result<TCart>>;
55
73
  /**
56
74
  * Deletes the entire cart.
57
75
  *
@@ -60,6 +78,11 @@ export declare abstract class CartCapability<TCart extends Cart = Cart, TCartIde
60
78
  * @param session
61
79
  */
62
80
  abstract deleteCart(payload: CartMutationDeleteCart): Promise<Result<void>>;
81
+ /**
82
+ * Usecase:
83
+ * User wants to rename the cart after creation, to make it easier to identify in a list of multiple carts.
84
+ */
85
+ abstract renameCart(payload: CartMutationRenameCart): Promise<Result<TCart>>;
63
86
  /**
64
87
  * Applies a coupon code to the cart. Returns the updated and recalculated cart.
65
88
  *
@@ -1,18 +1,24 @@
1
1
  import type * as z from 'zod';
2
- import type { CartSchema } from '../schemas/models/cart.model.js';
2
+ import type { CartPaginatedSearchResultSchema, CartSchema } from '../schemas/models/cart.model.js';
3
3
  import type { CartIdentifierSchema } from '../schemas/models/identifiers.model.js';
4
4
  import type { RequestContext } from '../schemas/session.schema.js';
5
+ import type { CartQueryList } from '../schemas/queries/cart.query.js';
5
6
  export type AnyCartSchema = z.ZodType<z.output<typeof CartSchema>>;
6
7
  export type AnyCartIdentifierSchema = z.ZodType<z.output<typeof CartIdentifierSchema>>;
7
- export interface CartFactory<TCartSchema extends AnyCartSchema = AnyCartSchema, TCartIdentifierSchema extends AnyCartIdentifierSchema = AnyCartIdentifierSchema> {
8
+ export type AnyCartPaginatedSearchResult = z.ZodType<z.output<typeof CartPaginatedSearchResultSchema>>;
9
+ export interface CartFactory<TCartSchema extends AnyCartSchema = AnyCartSchema, TCartIdentifierSchema extends AnyCartIdentifierSchema = AnyCartIdentifierSchema, TCartPaginatedSearchResult extends AnyCartPaginatedSearchResult = AnyCartPaginatedSearchResult> {
8
10
  cartSchema: TCartSchema;
9
11
  cartIdentifierSchema: TCartIdentifierSchema;
12
+ cartPaginatedSearchResultSchema: TCartPaginatedSearchResult;
10
13
  parseCart(context: RequestContext, data: unknown): z.output<TCartSchema>;
11
14
  parseCartIdentifier(context: RequestContext, data: unknown): z.output<TCartIdentifierSchema>;
15
+ parseCartPaginatedSearchResult(context: RequestContext, data: unknown, query: CartQueryList): z.output<TCartPaginatedSearchResult>;
12
16
  }
13
17
  export type CartFactoryCartOutput<TFactory extends CartFactory> = ReturnType<TFactory['parseCart']>;
14
18
  export type CartFactoryIdentifierOutput<TFactory extends CartFactory> = ReturnType<TFactory['parseCartIdentifier']>;
15
- export type CartFactoryWithOutput<TFactory extends CartFactory> = Omit<TFactory, 'parseCart' | 'parseCartIdentifier'> & {
19
+ export type CartFactoryPaginatedSearchResultOutput<TFactory extends CartFactory> = ReturnType<TFactory['parseCartPaginatedSearchResult']>;
20
+ export type CartFactoryWithOutput<TFactory extends CartFactory> = Omit<TFactory, 'parseCart' | 'parseCartIdentifier' | 'parseCartPaginatedSearchResult'> & {
16
21
  parseCart(context: RequestContext, data: unknown): CartFactoryCartOutput<TFactory>;
17
22
  parseCartIdentifier(context: RequestContext, data: unknown): CartFactoryIdentifierOutput<TFactory>;
23
+ parseCartPaginatedSearchResult(context: RequestContext, data: unknown, query: CartQueryList): CartFactoryPaginatedSearchResultOutput<TFactory>;
18
24
  };
@@ -1,6 +1,7 @@
1
1
  import type * as z from 'zod';
2
2
  import type { ProductListItemPaginatedResultsSchema, ProductListItemSchema, ProductListPaginatedResultsSchema, ProductListSchema } from '../schemas/models/product-list.model.js';
3
3
  import type { RequestContext } from '../schemas/session.schema.js';
4
+ import type { ProductListItemsQuery, ProductListQuery } from '../schemas/queries/product-list.query.js';
4
5
  export type AnyProductListSchema = z.ZodType<z.output<typeof ProductListSchema>>;
5
6
  export type AnyProductListItemSchema = z.ZodType<z.output<typeof ProductListItemSchema>>;
6
7
  export type AnyProductListPaginatedSchema = z.ZodType<z.output<typeof ProductListPaginatedResultsSchema>>;
@@ -12,8 +13,8 @@ export interface ProductListFactory<TProductListSchema extends AnyProductListSch
12
13
  productListItemPaginatedSchema: TProductListItemPaginatedSchema;
13
14
  parseProductList(context: RequestContext, data: unknown): z.output<TProductListSchema>;
14
15
  parseProductListItem(context: RequestContext, data: unknown): z.output<TProductListItemSchema>;
15
- parseProductListPaginatedResult(context: RequestContext, data: unknown): z.output<TProductListPaginatedSchema>;
16
- parseProductListItemPaginatedResult(context: RequestContext, data: unknown): z.output<TProductListItemPaginatedSchema>;
16
+ parseProductListPaginatedResult(context: RequestContext, data: unknown, query: ProductListQuery): z.output<TProductListPaginatedSchema>;
17
+ parseProductListItemPaginatedResult(context: RequestContext, data: unknown, query: ProductListItemsQuery): z.output<TProductListItemPaginatedSchema>;
17
18
  }
18
19
  export type ProductListFactoryListOutput<TFactory extends ProductListFactory> = ReturnType<TFactory['parseProductList']>;
19
20
  export type ProductListFactoryItemOutput<TFactory extends ProductListFactory> = ReturnType<TFactory['parseProductListItem']>;
@@ -22,6 +23,6 @@ export type ProductListFactoryItemPaginatedOutput<TFactory extends ProductListFa
22
23
  export type ProductListFactoryWithOutput<TFactory extends ProductListFactory> = Omit<TFactory, 'parseProductList' | 'parseProductListItem' | 'parseProductListPaginatedResult' | 'parseProductListItemPaginatedResult'> & {
23
24
  parseProductList(context: RequestContext, data: unknown): ProductListFactoryListOutput<TFactory>;
24
25
  parseProductListItem(context: RequestContext, data: unknown): ProductListFactoryItemOutput<TFactory>;
25
- parseProductListPaginatedResult(context: RequestContext, data: unknown): ProductListFactoryListPaginatedOutput<TFactory>;
26
- parseProductListItemPaginatedResult(context: RequestContext, data: unknown): ProductListFactoryItemPaginatedOutput<TFactory>;
26
+ parseProductListPaginatedResult(context: RequestContext, data: unknown, query: ProductListQuery): ProductListFactoryListPaginatedOutput<TFactory>;
27
+ parseProductListItemPaginatedResult(context: RequestContext, data: unknown, query: ProductListItemsQuery): ProductListFactoryItemPaginatedOutput<TFactory>;
27
28
  };
@@ -758,13 +758,29 @@ export declare const CartItemSchema: z.ZodObject<{
758
758
  }, z.core.$loose>>;
759
759
  }, z.core.$loose>>;
760
760
  }, z.core.$loose>;
761
+ export declare const BaseCartSchema: z.ZodObject<{
762
+ identifier: z.ZodDefault<z.ZodObject<{
763
+ key: z.ZodString;
764
+ }, z.core.$loose>>;
765
+ user: z.ZodDefault<z.ZodObject<{
766
+ userId: z.ZodString;
767
+ }, z.core.$loose>>;
768
+ company: z.ZodOptional<z.ZodObject<{
769
+ taxIdentifier: z.ZodString;
770
+ }, z.core.$loose>>;
771
+ name: z.ZodDefault<z.ZodString>;
772
+ }, z.core.$loose>;
761
773
  export declare const CartSchema: z.ZodObject<{
762
774
  identifier: z.ZodDefault<z.ZodObject<{
763
775
  key: z.ZodString;
764
776
  }, z.core.$loose>>;
765
- userId: z.ZodDefault<z.ZodObject<{
777
+ user: z.ZodDefault<z.ZodObject<{
766
778
  userId: z.ZodString;
767
779
  }, z.core.$loose>>;
780
+ company: z.ZodOptional<z.ZodObject<{
781
+ taxIdentifier: z.ZodString;
782
+ }, z.core.$loose>>;
783
+ name: z.ZodDefault<z.ZodString>;
768
784
  items: z.ZodDefault<z.ZodArray<z.ZodObject<{
769
785
  identifier: z.ZodDefault<z.ZodObject<{
770
786
  key: z.ZodString;
@@ -2833,8 +2849,52 @@ export declare const CartSchema: z.ZodObject<{
2833
2849
  }>;
2834
2850
  }, z.core.$loose>>;
2835
2851
  }, z.core.$loose>>>;
2836
- name: z.ZodDefault<z.ZodString>;
2837
2852
  description: z.ZodDefault<z.ZodString>;
2838
2853
  }, z.core.$loose>;
2854
+ export declare const CartSearchResultItemSchema: z.ZodObject<{
2855
+ identifier: z.ZodDefault<z.ZodObject<{
2856
+ key: z.ZodString;
2857
+ }, z.core.$loose>>;
2858
+ user: z.ZodDefault<z.ZodObject<{
2859
+ userId: z.ZodString;
2860
+ }, z.core.$loose>>;
2861
+ company: z.ZodOptional<z.ZodObject<{
2862
+ taxIdentifier: z.ZodString;
2863
+ }, z.core.$loose>>;
2864
+ name: z.ZodDefault<z.ZodString>;
2865
+ numItems: z.ZodDefault<z.ZodNumber>;
2866
+ lastModifiedDate: z.ZodDefault<z.ZodString>;
2867
+ }, z.core.$loose>;
2868
+ export declare const CartPaginatedSearchResultSchema: z.ZodObject<{
2869
+ pageNumber: z.ZodNumber;
2870
+ pageSize: z.ZodNumber;
2871
+ totalCount: z.ZodNumber;
2872
+ totalPages: z.ZodNumber;
2873
+ items: z.ZodArray<z.ZodObject<{
2874
+ identifier: z.ZodDefault<z.ZodObject<{
2875
+ key: z.ZodString;
2876
+ }, z.core.$loose>>;
2877
+ user: z.ZodDefault<z.ZodObject<{
2878
+ userId: z.ZodString;
2879
+ }, z.core.$loose>>;
2880
+ company: z.ZodOptional<z.ZodObject<{
2881
+ taxIdentifier: z.ZodString;
2882
+ }, z.core.$loose>>;
2883
+ name: z.ZodDefault<z.ZodString>;
2884
+ numItems: z.ZodDefault<z.ZodNumber>;
2885
+ lastModifiedDate: z.ZodDefault<z.ZodString>;
2886
+ }, z.core.$loose>>;
2887
+ identifier: z.ZodObject<{
2888
+ company: z.ZodOptional<z.ZodObject<{
2889
+ taxIdentifier: z.ZodString;
2890
+ }, z.core.$loose>>;
2891
+ paginationOptions: z.ZodObject<{
2892
+ pageNumber: z.ZodDefault<z.ZodNumber>;
2893
+ pageSize: z.ZodDefault<z.ZodNumber>;
2894
+ }, z.core.$loose>;
2895
+ }, z.core.$loose>;
2896
+ }, z.core.$strip>;
2839
2897
  export type CartItem = InferType<typeof CartItemSchema>;
2840
2898
  export type Cart = InferType<typeof CartSchema>;
2899
+ export type CartSearchResultItem = InferType<typeof CartSearchResultItemSchema>;
2900
+ export type CartPaginatedSearchResult = InferType<typeof CartPaginatedSearchResultSchema>;
@@ -151,6 +151,15 @@ export declare const ProductRatingIdentifierSchema: z.ZodObject<{
151
151
  export declare const ProductReviewIdentifierSchema: z.ZodObject<{
152
152
  key: z.ZodString;
153
153
  }, z.core.$loose>;
154
+ /**
155
+ * The structural top level legal entity
156
+ */
157
+ export declare const CompanyIdentifierSchema: z.ZodObject<{
158
+ /**
159
+ * VAT identifier, used for tax-calculation purposes
160
+ */
161
+ taxIdentifier: z.ZodString;
162
+ }, z.core.$loose>;
154
163
  export declare const ProductSearchIdentifierSchema: z.ZodObject<{
155
164
  term: z.ZodString;
156
165
  facets: z.ZodArray<z.ZodObject<{
@@ -170,6 +179,12 @@ export declare const ProductSearchIdentifierSchema: z.ZodObject<{
170
179
  }, z.core.$loose>;
171
180
  key: z.ZodString;
172
181
  }, z.core.$strip>>;
182
+ company: z.ZodOptional<z.ZodObject<{
183
+ /**
184
+ * VAT identifier, used for tax-calculation purposes
185
+ */
186
+ taxIdentifier: z.ZodString;
187
+ }, z.core.$loose>>;
173
188
  }, z.core.$loose>;
174
189
  /**
175
190
  * Bar
@@ -193,6 +208,12 @@ export declare const OrderSearchIdentifierSchema: z.ZodObject<{
193
208
  pageNumber: z.ZodDefault<z.ZodNumber>;
194
209
  pageSize: z.ZodDefault<z.ZodNumber>;
195
210
  }, z.core.$loose>;
211
+ company: z.ZodOptional<z.ZodObject<{
212
+ /**
213
+ * VAT identifier, used for tax-calculation purposes
214
+ */
215
+ taxIdentifier: z.ZodString;
216
+ }, z.core.$loose>>;
196
217
  }, z.core.$loose>;
197
218
  export declare const ProductListSearchIdentifierSchema: z.ZodObject<{
198
219
  listType: z.ZodEnum<{
@@ -205,6 +226,12 @@ export declare const ProductListSearchIdentifierSchema: z.ZodObject<{
205
226
  pageNumber: z.ZodDefault<z.ZodNumber>;
206
227
  pageSize: z.ZodDefault<z.ZodNumber>;
207
228
  }, z.core.$loose>;
229
+ company: z.ZodOptional<z.ZodObject<{
230
+ /**
231
+ * VAT identifier, used for tax-calculation purposes
232
+ */
233
+ taxIdentifier: z.ZodString;
234
+ }, z.core.$loose>>;
208
235
  }, z.core.$loose>;
209
236
  export declare const ProductListIdentifierSchema: z.ZodObject<{
210
237
  listType: z.ZodEnum<{
@@ -214,6 +241,9 @@ export declare const ProductListIdentifierSchema: z.ZodObject<{
214
241
  shopping: "shopping";
215
242
  }>;
216
243
  key: z.ZodString;
244
+ user: z.ZodOptional<z.ZodObject<{
245
+ userId: z.ZodString;
246
+ }, z.core.$loose>>;
217
247
  }, z.core.$loose>;
218
248
  export declare const ProductListItemSearchIdentifierSchema: z.ZodObject<{
219
249
  list: z.ZodObject<{
@@ -224,6 +254,9 @@ export declare const ProductListItemSearchIdentifierSchema: z.ZodObject<{
224
254
  shopping: "shopping";
225
255
  }>;
226
256
  key: z.ZodString;
257
+ user: z.ZodOptional<z.ZodObject<{
258
+ userId: z.ZodString;
259
+ }, z.core.$loose>>;
227
260
  }, z.core.$loose>;
228
261
  paginationOptions: z.ZodObject<{
229
262
  pageNumber: z.ZodDefault<z.ZodNumber>;
@@ -240,20 +273,14 @@ export declare const ProductListItemIdentifierSchema: z.ZodObject<{
240
273
  shopping: "shopping";
241
274
  }>;
242
275
  key: z.ZodString;
276
+ user: z.ZodOptional<z.ZodObject<{
277
+ userId: z.ZodString;
278
+ }, z.core.$loose>>;
243
279
  }, z.core.$loose>;
244
280
  }, z.core.$loose>;
245
281
  export declare const PromotionIdentifierSchema: z.ZodObject<{
246
282
  key: z.ZodString;
247
283
  }, z.core.$loose>;
248
- /**
249
- * The structural top level legal entity
250
- */
251
- export declare const CompanyIdentifierSchema: z.ZodObject<{
252
- /**
253
- * VAT identifier, used for tax-calculation purposes
254
- */
255
- taxIdentifier: z.ZodString;
256
- }, z.core.$loose>;
257
284
  export declare const CompanyRegistrationRequestIdentifierSchema: z.ZodObject<{
258
285
  key: z.ZodString;
259
286
  }, z.core.$loose>;
@@ -310,6 +337,19 @@ export declare const EmployeeSearchIdentifierSchema: z.ZodObject<{
310
337
  pageSize: z.ZodDefault<z.ZodNumber>;
311
338
  }, z.core.$loose>;
312
339
  }, z.core.$loose>;
340
+ export declare const CartSearchIdentifierSchema: z.ZodObject<{
341
+ company: z.ZodOptional<z.ZodObject<{
342
+ /**
343
+ * VAT identifier, used for tax-calculation purposes
344
+ */
345
+ taxIdentifier: z.ZodString;
346
+ }, z.core.$loose>>;
347
+ paginationOptions: z.ZodObject<{
348
+ pageNumber: z.ZodDefault<z.ZodNumber>;
349
+ pageSize: z.ZodDefault<z.ZodNumber>;
350
+ }, z.core.$loose>;
351
+ }, z.core.$loose>;
352
+ export type CartSearchIdentifier = InferType<typeof CartSearchIdentifierSchema>;
313
353
  export type OrderSearchIdentifier = InferType<typeof OrderSearchIdentifierSchema>;
314
354
  export type ProductIdentifier = InferType<typeof ProductIdentifierSchema>;
315
355
  export type ProductVariantIdentifier = InferType<typeof ProductVariantIdentifierSchema>;
@@ -466,6 +466,9 @@ export declare const OrderSearchResultSchema: z.ZodObject<{
466
466
  pageNumber: z.ZodDefault<z.ZodNumber>;
467
467
  pageSize: z.ZodDefault<z.ZodNumber>;
468
468
  }, z.core.$loose>;
469
+ company: z.ZodOptional<z.ZodObject<{
470
+ taxIdentifier: z.ZodString;
471
+ }, z.core.$loose>>;
469
472
  }, z.core.$loose>;
470
473
  }, z.core.$strip>;
471
474
  export type OrderSearchResult = InferType<typeof OrderSearchResultSchema>;
@@ -769,6 +769,9 @@ export declare const OrderSchema: z.ZodObject<{
769
769
  userId: z.ZodObject<{
770
770
  userId: z.ZodString;
771
771
  }, z.core.$loose>;
772
+ company: z.ZodOptional<z.ZodObject<{
773
+ taxIdentifier: z.ZodString;
774
+ }, z.core.$loose>>;
772
775
  items: z.ZodArray<z.ZodObject<{
773
776
  identifier: z.ZodObject<{
774
777
  key: z.ZodString;
@@ -9,6 +9,9 @@ export declare const ProductListSchema: z.ZodObject<{
9
9
  shopping: "shopping";
10
10
  }>;
11
11
  key: z.ZodString;
12
+ user: z.ZodOptional<z.ZodObject<{
13
+ userId: z.ZodString;
14
+ }, z.core.$loose>>;
12
15
  }, z.core.$loose>;
13
16
  type: z.ZodEnum<{
14
17
  favorite: "favorite";
@@ -38,6 +41,9 @@ export declare const ProductListItemSchema: z.ZodObject<{
38
41
  shopping: "shopping";
39
42
  }>;
40
43
  key: z.ZodString;
44
+ user: z.ZodOptional<z.ZodObject<{
45
+ userId: z.ZodString;
46
+ }, z.core.$loose>>;
41
47
  }, z.core.$loose>;
42
48
  }, z.core.$loose>;
43
49
  variant: z.ZodObject<{
@@ -61,6 +67,9 @@ export declare const ProductListPaginatedResultsSchema: z.ZodObject<{
61
67
  shopping: "shopping";
62
68
  }>;
63
69
  key: z.ZodString;
70
+ user: z.ZodOptional<z.ZodObject<{
71
+ userId: z.ZodString;
72
+ }, z.core.$loose>>;
64
73
  }, z.core.$loose>;
65
74
  type: z.ZodEnum<{
66
75
  favorite: "favorite";
@@ -90,6 +99,9 @@ export declare const ProductListPaginatedResultsSchema: z.ZodObject<{
90
99
  pageNumber: z.ZodDefault<z.ZodNumber>;
91
100
  pageSize: z.ZodDefault<z.ZodNumber>;
92
101
  }, z.core.$loose>;
102
+ company: z.ZodOptional<z.ZodObject<{
103
+ taxIdentifier: z.ZodString;
104
+ }, z.core.$loose>>;
93
105
  }, z.core.$loose>;
94
106
  }, z.core.$strip>;
95
107
  export declare const ProductListItemPaginatedResultsSchema: z.ZodObject<{
@@ -108,6 +120,9 @@ export declare const ProductListItemPaginatedResultsSchema: z.ZodObject<{
108
120
  shopping: "shopping";
109
121
  }>;
110
122
  key: z.ZodString;
123
+ user: z.ZodOptional<z.ZodObject<{
124
+ userId: z.ZodString;
125
+ }, z.core.$loose>>;
111
126
  }, z.core.$loose>;
112
127
  }, z.core.$loose>;
113
128
  variant: z.ZodObject<{
@@ -126,6 +141,9 @@ export declare const ProductListItemPaginatedResultsSchema: z.ZodObject<{
126
141
  shopping: "shopping";
127
142
  }>;
128
143
  key: z.ZodString;
144
+ user: z.ZodOptional<z.ZodObject<{
145
+ userId: z.ZodString;
146
+ }, z.core.$loose>>;
129
147
  }, z.core.$loose>;
130
148
  paginationOptions: z.ZodObject<{
131
149
  pageNumber: z.ZodDefault<z.ZodNumber>;
@@ -144,6 +144,9 @@ export declare const ProductSearchResultSchema: z.ZodObject<{
144
144
  }, z.core.$loose>;
145
145
  key: z.ZodString;
146
146
  }, z.core.$strip>>;
147
+ company: z.ZodOptional<z.ZodObject<{
148
+ taxIdentifier: z.ZodString;
149
+ }, z.core.$loose>>;
147
150
  }, z.core.$loose>;
148
151
  facets: z.ZodArray<z.ZodObject<{
149
152
  identifier: z.ZodObject<{
@@ -23,6 +23,9 @@ export declare const AnalyticsMutationSchema: z.ZodDiscriminatedUnion<[z.ZodObje
23
23
  }, z.core.$loose>;
24
24
  key: z.ZodString;
25
25
  }, z.core.$strip>>;
26
+ company: z.ZodOptional<z.ZodObject<{
27
+ taxIdentifier: z.ZodString;
28
+ }, z.core.$loose>>;
26
29
  }, z.core.$loose>;
27
30
  }, z.core.$strip>], "type">>;
28
31
  products: z.ZodArray<z.ZodObject<{
@@ -54,6 +57,9 @@ export declare const AnalyticsMutationSchema: z.ZodDiscriminatedUnion<[z.ZodObje
54
57
  }, z.core.$loose>;
55
58
  key: z.ZodString;
56
59
  }, z.core.$strip>>;
60
+ company: z.ZodOptional<z.ZodObject<{
61
+ taxIdentifier: z.ZodString;
62
+ }, z.core.$loose>>;
57
63
  }, z.core.$loose>;
58
64
  }, z.core.$strip>], "type">>;
59
65
  position: z.ZodNumber;
@@ -85,6 +91,9 @@ export declare const AnalyticsMutationSchema: z.ZodDiscriminatedUnion<[z.ZodObje
85
91
  }, z.core.$loose>;
86
92
  key: z.ZodString;
87
93
  }, z.core.$strip>>;
94
+ company: z.ZodOptional<z.ZodObject<{
95
+ taxIdentifier: z.ZodString;
96
+ }, z.core.$loose>>;
88
97
  }, z.core.$loose>;
89
98
  }, z.core.$strip>], "type">>;
90
99
  product: z.ZodObject<{
@@ -99,6 +108,9 @@ export declare const AnalyticsMutationSchema: z.ZodDiscriminatedUnion<[z.ZodObje
99
108
  userId: z.ZodObject<{
100
109
  userId: z.ZodString;
101
110
  }, z.core.$loose>;
111
+ company: z.ZodOptional<z.ZodObject<{
112
+ taxIdentifier: z.ZodString;
113
+ }, z.core.$loose>>;
102
114
  items: z.ZodArray<z.ZodObject<{
103
115
  identifier: z.ZodObject<{
104
116
  key: z.ZodString;
@@ -23,6 +23,9 @@ export declare const AnalyticsMutationProductAddToCartEventSchema: z.ZodObject<{
23
23
  }, z.core.$loose>;
24
24
  key: z.ZodString;
25
25
  }, z.core.$strip>>;
26
+ company: z.ZodOptional<z.ZodObject<{
27
+ taxIdentifier: z.ZodString;
28
+ }, z.core.$loose>>;
26
29
  }, z.core.$loose>;
27
30
  }, z.core.$strip>], "type">>;
28
31
  product: z.ZodObject<{
@@ -26,6 +26,9 @@ export declare const AnalyticsMutationProductSummaryClickEventSchema: z.ZodObjec
26
26
  }, z.core.$loose>;
27
27
  key: z.ZodString;
28
28
  }, z.core.$strip>>;
29
+ company: z.ZodOptional<z.ZodObject<{
30
+ taxIdentifier: z.ZodString;
31
+ }, z.core.$loose>>;
29
32
  }, z.core.$loose>;
30
33
  }, z.core.$strip>], "type">>;
31
34
  position: z.ZodNumber;
@@ -23,6 +23,9 @@ export declare const AnalyticsMutationProductSummaryViewEventSchema: z.ZodObject
23
23
  }, z.core.$loose>;
24
24
  key: z.ZodString;
25
25
  }, z.core.$strip>>;
26
+ company: z.ZodOptional<z.ZodObject<{
27
+ taxIdentifier: z.ZodString;
28
+ }, z.core.$loose>>;
26
29
  }, z.core.$loose>;
27
30
  }, z.core.$strip>], "type">>;
28
31
  products: z.ZodArray<z.ZodObject<{
@@ -9,6 +9,9 @@ export declare const AnalyticsMutationPurchaseEventSchema: z.ZodObject<{
9
9
  userId: z.ZodObject<{
10
10
  userId: z.ZodString;
11
11
  }, z.core.$loose>;
12
+ company: z.ZodOptional<z.ZodObject<{
13
+ taxIdentifier: z.ZodString;
14
+ }, z.core.$loose>>;
12
15
  items: z.ZodArray<z.ZodObject<{
13
16
  identifier: z.ZodObject<{
14
17
  key: z.ZodString;
@@ -1,13 +1,13 @@
1
1
  import * as z from 'zod';
2
2
  import type { InferType } from '../../zod-utils.js';
3
3
  export declare const CartMutationItemAddSchema: z.ZodObject<{
4
- cart: z.ZodOptional<z.ZodObject<{
4
+ cart: z.ZodObject<{
5
5
  key: z.ZodString;
6
- }, z.core.$loose>>;
6
+ }, z.core.$loose>;
7
7
  variant: z.ZodObject<{
8
8
  sku: z.ZodString;
9
9
  }, z.core.$loose>;
10
- quantity: z.ZodNumber;
10
+ quantity: z.ZodDefault<z.ZodNumber>;
11
11
  }, z.core.$loose>;
12
12
  export declare const CartMutationItemRemoveSchema: z.ZodObject<{
13
13
  cart: z.ZodObject<{
@@ -478,6 +478,18 @@ export declare const CartMutationChangeCurrencySchema: z.ZodObject<{
478
478
  ZWL: "ZWL";
479
479
  }>;
480
480
  }, z.core.$loose>;
481
+ export declare const CartMutationCreateCartSchema: z.ZodObject<{
482
+ company: z.ZodOptional<z.ZodObject<{
483
+ taxIdentifier: z.ZodString;
484
+ }, z.core.$loose>>;
485
+ name: z.ZodOptional<z.ZodString>;
486
+ }, z.core.$loose>;
487
+ export declare const CartMutationRenameCartSchema: z.ZodObject<{
488
+ cart: z.ZodObject<{
489
+ key: z.ZodNonOptional<z.ZodString>;
490
+ }, z.core.$loose>;
491
+ newName: z.ZodString;
492
+ }, z.core.$loose>;
481
493
  export type CartMutationChangeCurrency = InferType<typeof CartMutationChangeCurrencySchema>;
482
494
  export type CartMutationAddPaymentMethod = InferType<typeof CartMutationAddPaymentMethodSchema>;
483
495
  export type CartMutationRemovePaymentMethod = InferType<typeof CartMutationRemovePaymentMethodSchema>;
@@ -490,3 +502,5 @@ export type CartMutationSetShippingInfo = InferType<typeof CartMutationSetShippi
490
502
  export type CartMutationSetBillingAddress = InferType<typeof CartMutationSetBillingAddressSchema>;
491
503
  export type CartMutationApplyCoupon = InferType<typeof CartMutationApplyCouponSchema>;
492
504
  export type CartMutationRemoveCoupon = InferType<typeof CartMutationRemoveCouponSchema>;
505
+ export type CartMutationCreateCart = InferType<typeof CartMutationCreateCartSchema>;
506
+ export type CartMutationRenameCart = InferType<typeof CartMutationRenameCartSchema>;
@@ -5,9 +5,13 @@ export declare const CheckoutMutationInitiateCheckoutSchema: z.ZodObject<{
5
5
  identifier: z.ZodDefault<z.ZodObject<{
6
6
  key: z.ZodString;
7
7
  }, z.core.$loose>>;
8
- userId: z.ZodDefault<z.ZodObject<{
8
+ user: z.ZodDefault<z.ZodObject<{
9
9
  userId: z.ZodString;
10
10
  }, z.core.$loose>>;
11
+ company: z.ZodOptional<z.ZodObject<{
12
+ taxIdentifier: z.ZodString;
13
+ }, z.core.$loose>>;
14
+ name: z.ZodDefault<z.ZodString>;
11
15
  items: z.ZodDefault<z.ZodArray<z.ZodObject<{
12
16
  identifier: z.ZodDefault<z.ZodObject<{
13
17
  key: z.ZodString;
@@ -2076,7 +2080,6 @@ export declare const CheckoutMutationInitiateCheckoutSchema: z.ZodObject<{
2076
2080
  }>;
2077
2081
  }, z.core.$loose>>;
2078
2082
  }, z.core.$loose>>>;
2079
- name: z.ZodDefault<z.ZodString>;
2080
2083
  description: z.ZodDefault<z.ZodString>;
2081
2084
  }, z.core.$loose>;
2082
2085
  billingAddress: z.ZodOptional<z.ZodObject<{
@@ -37,6 +37,9 @@ export declare const ProductListMutationCreateSchema: z.ZodObject<{
37
37
  }, z.core.$loose>>;
38
38
  publishDate: z.ZodOptional<z.ZodString>;
39
39
  }, z.core.$loose>;
40
+ company: z.ZodOptional<z.ZodObject<{
41
+ taxIdentifier: z.ZodString;
42
+ }, z.core.$loose>>;
40
43
  }, z.core.$loose>;
41
44
  export declare const ProductListMutationDeleteSchema: z.ZodObject<{
42
45
  list: z.ZodObject<{
@@ -47,6 +50,9 @@ export declare const ProductListMutationDeleteSchema: z.ZodObject<{
47
50
  shopping: "shopping";
48
51
  }>;
49
52
  key: z.ZodString;
53
+ user: z.ZodOptional<z.ZodObject<{
54
+ userId: z.ZodString;
55
+ }, z.core.$loose>>;
50
56
  }, z.core.$loose>;
51
57
  }, z.core.$loose>;
52
58
  export declare const ProductListMutationUpdateSchema: z.ZodObject<{
@@ -58,6 +64,9 @@ export declare const ProductListMutationUpdateSchema: z.ZodObject<{
58
64
  shopping: "shopping";
59
65
  }>;
60
66
  key: z.ZodString;
67
+ user: z.ZodOptional<z.ZodObject<{
68
+ userId: z.ZodString;
69
+ }, z.core.$loose>>;
61
70
  }, z.core.$loose>;
62
71
  name: z.ZodOptional<z.ZodString>;
63
72
  description: z.ZodOptional<z.ZodString>;
@@ -87,6 +96,9 @@ export declare const ProductListItemMutationCreateSchema: z.ZodObject<{
87
96
  shopping: "shopping";
88
97
  }>;
89
98
  key: z.ZodString;
99
+ user: z.ZodOptional<z.ZodObject<{
100
+ userId: z.ZodString;
101
+ }, z.core.$loose>>;
90
102
  }, z.core.$loose>;
91
103
  listItem: z.ZodObject<{
92
104
  variant: z.ZodObject<{
@@ -108,6 +120,9 @@ export declare const ProductListItemMutationDeleteSchema: z.ZodObject<{
108
120
  shopping: "shopping";
109
121
  }>;
110
122
  key: z.ZodString;
123
+ user: z.ZodOptional<z.ZodObject<{
124
+ userId: z.ZodString;
125
+ }, z.core.$loose>>;
111
126
  }, z.core.$loose>;
112
127
  }, z.core.$loose>;
113
128
  }, z.core.$loose>;
@@ -122,6 +137,9 @@ export declare const ProductListItemMutationUpdateSchema: z.ZodObject<{
122
137
  shopping: "shopping";
123
138
  }>;
124
139
  key: z.ZodString;
140
+ user: z.ZodOptional<z.ZodObject<{
141
+ userId: z.ZodString;
142
+ }, z.core.$loose>>;
125
143
  }, z.core.$loose>;
126
144
  }, z.core.$loose>;
127
145
  quantity: z.ZodOptional<z.ZodNumber>;
@@ -5,3 +5,15 @@ export declare const CartQueryByIdSchema: import("zod").ZodObject<{
5
5
  }, import("zod/v4/core").$loose>;
6
6
  }, import("zod/v4/core").$loose>;
7
7
  export type CartQueryById = InferType<typeof CartQueryByIdSchema>;
8
+ export declare const CartQueryListSchema: import("zod").ZodObject<{
9
+ search: import("zod").ZodObject<{
10
+ company: import("zod").ZodOptional<import("zod").ZodObject<{
11
+ taxIdentifier: import("zod").ZodString;
12
+ }, import("zod/v4/core").$loose>>;
13
+ paginationOptions: import("zod").ZodObject<{
14
+ pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
15
+ pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
16
+ }, import("zod/v4/core").$loose>;
17
+ }, import("zod/v4/core").$loose>;
18
+ }, import("zod/v4/core").$loose>;
19
+ export type CartQueryList = InferType<typeof CartQueryListSchema>;
@@ -22,6 +22,9 @@ export declare const OrderSearchQueryByTermSchema: import("zod").ZodObject<{
22
22
  pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
23
23
  pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
24
24
  }, import("zod/v4/core").$loose>;
25
+ company: import("zod").ZodOptional<import("zod").ZodObject<{
26
+ taxIdentifier: import("zod").ZodString;
27
+ }, import("zod/v4/core").$loose>>;
25
28
  }, import("zod/v4/core").$loose>;
26
29
  }, import("zod/v4/core").$loose>;
27
30
  export type OrderSearchQueryByTerm = InferType<typeof OrderSearchQueryByTermSchema>;
@@ -9,6 +9,9 @@ export declare const CustomerPriceQuerySchema: z.ZodObject<{
9
9
  variant: z.ZodObject<{
10
10
  sku: z.ZodString;
11
11
  }, z.core.$loose>;
12
+ company: z.ZodOptional<z.ZodObject<{
13
+ taxIdentifier: z.ZodString;
14
+ }, z.core.$loose>>;
12
15
  }, z.core.$loose>;
13
16
  export type ListPriceQuery = InferType<typeof ListPriceQuerySchema>;
14
17
  export type CustomerPriceQuery = InferType<typeof CustomerPriceQuerySchema>;
@@ -8,6 +8,9 @@ export declare const ProductListQueryByIdSchema: import("zod").ZodObject<{
8
8
  shopping: "shopping";
9
9
  }>;
10
10
  key: import("zod").ZodString;
11
+ user: import("zod").ZodOptional<import("zod").ZodObject<{
12
+ userId: import("zod").ZodString;
13
+ }, import("zod/v4/core").$loose>>;
11
14
  }, import("zod/v4/core").$loose>;
12
15
  }, import("zod/v4/core").$loose>;
13
16
  export declare const ProductListQuerySchema: import("zod").ZodObject<{
@@ -22,6 +25,9 @@ export declare const ProductListQuerySchema: import("zod").ZodObject<{
22
25
  pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
23
26
  pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
24
27
  }, import("zod/v4/core").$loose>;
28
+ company: import("zod").ZodOptional<import("zod").ZodObject<{
29
+ taxIdentifier: import("zod").ZodString;
30
+ }, import("zod/v4/core").$loose>>;
25
31
  }, import("zod/v4/core").$loose>;
26
32
  }, import("zod/v4/core").$loose>;
27
33
  export declare const ProductListItemQuerySchema: import("zod").ZodObject<{
@@ -34,6 +40,9 @@ export declare const ProductListItemQuerySchema: import("zod").ZodObject<{
34
40
  shopping: "shopping";
35
41
  }>;
36
42
  key: import("zod").ZodString;
43
+ user: import("zod").ZodOptional<import("zod").ZodObject<{
44
+ userId: import("zod").ZodString;
45
+ }, import("zod/v4/core").$loose>>;
37
46
  }, import("zod/v4/core").$loose>;
38
47
  paginationOptions: import("zod").ZodObject<{
39
48
  pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
@@ -20,6 +20,9 @@ export declare const ProductSearchQueryByTermSchema: z.ZodObject<{
20
20
  }, z.core.$loose>;
21
21
  key: z.ZodString;
22
22
  }, z.core.$strip>>;
23
+ company: z.ZodOptional<z.ZodObject<{
24
+ taxIdentifier: z.ZodString;
25
+ }, z.core.$loose>>;
23
26
  }, z.core.$loose>;
24
27
  }, z.core.$loose>;
25
28
  export declare const ProductSearchQueryCreateNavigationFilterSchema: z.ZodObject<{