@labdigital/commercetools-mock 2.66.0 → 3.0.0-beta.0
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/README.md +31 -8
- package/dist/abstract-BKFcva6S.mjs +1044 -0
- package/dist/abstract-BKFcva6S.mjs.map +1 -0
- package/dist/config-BcNSzPZz.d.mts +1718 -0
- package/dist/index.d.mts +50 -1633
- package/dist/index.mjs +3769 -2653
- package/dist/index.mjs.map +1 -1
- package/dist/storage/sqlite.d.mts +59 -0
- package/dist/storage/sqlite.mjs +234 -0
- package/dist/storage/sqlite.mjs.map +1 -0
- package/package.json +26 -29
- package/src/ctMock.ts +125 -136
- package/src/helpers.ts +14 -6
- package/src/index.ts +5 -0
- package/src/lib/masking.ts +4 -5
- package/src/lib/product-review-statistics.test.ts +257 -294
- package/src/lib/review-statistics.ts +17 -4
- package/src/oauth/helpers.ts +7 -4
- package/src/oauth/server.test.ts +102 -62
- package/src/oauth/server.ts +215 -213
- package/src/oauth/store.ts +20 -6
- package/src/orderSearch.ts +3 -3
- package/src/product-projection-search.ts +38 -20
- package/src/product-search-availability.test.ts +31 -52
- package/src/product-search.ts +19 -10
- package/src/projectAPI.ts +6 -22
- package/src/repositories/abstract.ts +182 -48
- package/src/repositories/as-associate.test.ts +19 -19
- package/src/repositories/associate-role.ts +12 -23
- package/src/repositories/attribute-group.test.ts +23 -23
- package/src/repositories/attribute-group.ts +6 -4
- package/src/repositories/business-unit.test.ts +63 -57
- package/src/repositories/business-unit.ts +107 -55
- package/src/repositories/cart/actions.ts +96 -65
- package/src/repositories/cart/helpers.ts +15 -11
- package/src/repositories/cart/index.test.ts +136 -30
- package/src/repositories/cart/index.ts +76 -59
- package/src/repositories/cart-discount/actions.ts +12 -44
- package/src/repositories/cart-discount/index.ts +20 -8
- package/src/repositories/category/actions.ts +27 -27
- package/src/repositories/category/index.test.ts +13 -9
- package/src/repositories/category/index.ts +40 -23
- package/src/repositories/channel.test.ts +53 -51
- package/src/repositories/channel.ts +12 -22
- package/src/repositories/custom-object.ts +34 -25
- package/src/repositories/customer/actions.ts +47 -25
- package/src/repositories/customer/index.test.ts +11 -11
- package/src/repositories/customer/index.ts +65 -35
- package/src/repositories/customer-group.test.ts +44 -42
- package/src/repositories/customer-group.ts +12 -22
- package/src/repositories/discount-code/actions.ts +3 -19
- package/src/repositories/discount-code/index.ts +9 -4
- package/src/repositories/discount-group/index.ts +8 -3
- package/src/repositories/extension.test.ts +27 -27
- package/src/repositories/extension.ts +10 -5
- package/src/repositories/helpers.ts +126 -47
- package/src/repositories/inventory-entry/actions.ts +3 -24
- package/src/repositories/inventory-entry/index.ts +19 -11
- package/src/repositories/my-customer.ts +13 -12
- package/src/repositories/my-order.ts +5 -2
- package/src/repositories/order/actions.ts +84 -56
- package/src/repositories/order/index.test.ts +36 -31
- package/src/repositories/order/index.ts +83 -49
- package/src/repositories/order-edit.ts +8 -3
- package/src/repositories/payment/actions.ts +64 -44
- package/src/repositories/payment/helpers.ts +3 -3
- package/src/repositories/payment/index.ts +28 -12
- package/src/repositories/product/actions.ts +133 -98
- package/src/repositories/product/helpers.ts +29 -16
- package/src/repositories/product/index.ts +42 -25
- package/src/repositories/product-discount.ts +6 -4
- package/src/repositories/product-projection.ts +41 -21
- package/src/repositories/product-selection.ts +8 -15
- package/src/repositories/product-tailoring.ts +22 -3
- package/src/repositories/product-type.ts +45 -4
- package/src/repositories/project.ts +57 -13
- package/src/repositories/quote/actions.ts +5 -28
- package/src/repositories/quote/index.ts +29 -6
- package/src/repositories/quote-request/actions.ts +5 -28
- package/src/repositories/quote-request/index.test.ts +3 -3
- package/src/repositories/quote-request/index.ts +31 -11
- package/src/repositories/quote-staged/actions.ts +5 -28
- package/src/repositories/quote-staged/index.ts +22 -8
- package/src/repositories/recurrence-policy/index.ts +6 -4
- package/src/repositories/recurring-order/actions.ts +7 -32
- package/src/repositories/recurring-order/index.ts +8 -6
- package/src/repositories/review.test.ts +147 -142
- package/src/repositories/review.ts +31 -37
- package/src/repositories/shipping-method/actions.ts +11 -28
- package/src/repositories/shipping-method/index.ts +26 -15
- package/src/repositories/shopping-list/actions.ts +21 -31
- package/src/repositories/shopping-list/index.ts +44 -22
- package/src/repositories/standalone-price.ts +6 -4
- package/src/repositories/state.ts +15 -9
- package/src/repositories/store.ts +21 -32
- package/src/repositories/subscription.test.ts +22 -22
- package/src/repositories/subscription.ts +8 -3
- package/src/repositories/tax-category/index.ts +8 -3
- package/src/repositories/type/actions.ts +21 -3
- package/src/repositories/type/index.ts +5 -3
- package/src/repositories/zone.test.ts +112 -77
- package/src/repositories/zone.ts +5 -3
- package/src/schemas/generated/associate-role.ts +13 -0
- package/src/schemas/generated/attribute-group.ts +12 -0
- package/src/schemas/generated/business-unit.ts +38 -0
- package/src/schemas/generated/cart-discount.ts +33 -0
- package/src/schemas/generated/cart.ts +61 -0
- package/src/schemas/generated/category.ts +25 -0
- package/src/schemas/generated/channel.ts +21 -0
- package/src/schemas/generated/common.ts +1372 -0
- package/src/schemas/generated/custom-object.ts +11 -0
- package/src/schemas/generated/customer-group.ts +11 -0
- package/src/schemas/generated/customer.ts +47 -0
- package/src/schemas/generated/discount-code.ts +25 -0
- package/src/schemas/generated/discount-group.ts +13 -0
- package/src/schemas/generated/extension.ts +15 -0
- package/src/schemas/generated/index.ts +42 -0
- package/src/schemas/generated/inventory-entry.ts +20 -0
- package/src/schemas/generated/my-quote-request.ts +10 -0
- package/src/schemas/generated/order-edit.ts +18 -0
- package/src/schemas/generated/order-from-cart.ts +25 -0
- package/src/schemas/generated/payment.ts +30 -0
- package/src/schemas/generated/product-discount.ts +20 -0
- package/src/schemas/generated/product-selection.ts +18 -0
- package/src/schemas/generated/product-tailoring.ts +26 -0
- package/src/schemas/generated/product-type.ts +12 -0
- package/src/schemas/generated/product.ts +37 -0
- package/src/schemas/generated/quote-request.ts +19 -0
- package/src/schemas/generated/quote.ts +18 -0
- package/src/schemas/generated/recurrence-policy.ts +15 -0
- package/src/schemas/generated/recurring-order.ts +19 -0
- package/src/schemas/generated/review.ts +24 -0
- package/src/schemas/generated/shipping-method.ts +24 -0
- package/src/schemas/generated/shopping-list.ts +28 -0
- package/src/schemas/generated/staged-quote.ts +18 -0
- package/src/schemas/generated/standalone-price.ts +32 -0
- package/src/schemas/generated/state.ts +20 -0
- package/src/schemas/generated/store.ts +23 -0
- package/src/schemas/generated/subscription.ts +20 -0
- package/src/schemas/generated/tax-category.ts +12 -0
- package/src/schemas/generated/type.ts +17 -0
- package/src/schemas/generated/zone.ts +12 -0
- package/src/schemas/update-request.ts +3 -5
- package/src/server.ts +32 -4
- package/src/services/abstract.ts +207 -101
- package/src/services/as-associate-cart.test.ts +28 -36
- package/src/services/as-associate-cart.ts +15 -12
- package/src/services/as-associate-order.test.ts +33 -40
- package/src/services/as-associate-order.ts +15 -12
- package/src/services/as-associate-quote-request.ts +15 -12
- package/src/services/as-associate-shopping-list.test.ts +25 -35
- package/src/services/as-associate-shopping-list.ts +15 -12
- package/src/services/as-associate.test.ts +21 -15
- package/src/services/as-associate.ts +23 -22
- package/src/services/associate-roles.test.ts +16 -22
- package/src/services/associate-roles.ts +2 -2
- package/src/services/attribute-group.test.ts +40 -44
- package/src/services/attribute-group.ts +2 -2
- package/src/services/business-units.test.ts +227 -163
- package/src/services/business-units.ts +2 -2
- package/src/services/cart-discount.test.ts +253 -187
- package/src/services/cart-discount.ts +2 -2
- package/src/services/cart.test.ts +833 -832
- package/src/services/cart.ts +31 -12
- package/src/services/category.test.ts +208 -130
- package/src/services/category.ts +2 -2
- package/src/services/channel.test.ts +39 -44
- package/src/services/channel.ts +2 -2
- package/src/services/custom-object.test.ts +103 -79
- package/src/services/custom-object.ts +106 -38
- package/src/services/customer-group.test.ts +39 -44
- package/src/services/customer-group.ts +2 -2
- package/src/services/customer.test.ts +357 -292
- package/src/services/customer.ts +70 -23
- package/src/services/discount-code.test.ts +57 -68
- package/src/services/discount-code.ts +2 -2
- package/src/services/discount-group.test.ts +111 -134
- package/src/services/discount-group.ts +2 -2
- package/src/services/draft-validation.test.ts +255 -0
- package/src/services/extension.test.ts +39 -44
- package/src/services/extension.ts +2 -2
- package/src/services/inventory-entry.test.ts +106 -87
- package/src/services/inventory-entry.ts +2 -2
- package/src/services/my-business-unit.test.ts +82 -112
- package/src/services/my-business-unit.ts +25 -19
- package/src/services/my-cart.test.ts +46 -41
- package/src/services/my-cart.ts +32 -28
- package/src/services/my-customer.test.ts +153 -88
- package/src/services/my-customer.ts +130 -61
- package/src/services/my-order.ts +15 -12
- package/src/services/my-payment.test.ts +30 -24
- package/src/services/my-payment.ts +2 -2
- package/src/services/my-shopping-list.ts +2 -2
- package/src/services/order.test.ts +332 -276
- package/src/services/order.ts +45 -27
- package/src/services/payment.test.ts +31 -29
- package/src/services/payment.ts +2 -2
- package/src/services/product-discount.test.ts +39 -46
- package/src/services/product-discount.ts +2 -2
- package/src/services/product-projection.test.ts +176 -166
- package/src/services/product-projection.ts +31 -15
- package/src/services/product-selection.test.ts +17 -9
- package/src/services/product-selection.ts +2 -2
- package/src/services/product-type.test.ts +80 -21
- package/src/services/product-type.ts +2 -2
- package/src/services/product.test.ts +569 -534
- package/src/services/product.ts +14 -7
- package/src/services/project.test.ts +22 -12
- package/src/services/project.ts +28 -13
- package/src/services/quote-request.test.ts +36 -39
- package/src/services/quote-request.ts +2 -2
- package/src/services/quote-staged.ts +2 -2
- package/src/services/quote.ts +2 -2
- package/src/services/recurrence-policy.test.ts +114 -139
- package/src/services/recurrence-policy.ts +2 -2
- package/src/services/recurring-order.test.ts +149 -194
- package/src/services/recurring-order.ts +2 -2
- package/src/services/reviews.test.ts +127 -106
- package/src/services/reviews.ts +2 -2
- package/src/services/shipping-method.test.ts +96 -125
- package/src/services/shipping-method.ts +24 -12
- package/src/services/shopping-list.test.ts +183 -141
- package/src/services/shopping-list.ts +2 -2
- package/src/services/standalone-price.test.ts +60 -46
- package/src/services/standalone-price.ts +2 -2
- package/src/services/state.test.ts +20 -25
- package/src/services/state.ts +2 -2
- package/src/services/store.test.ts +26 -45
- package/src/services/store.ts +2 -2
- package/src/services/subscription.test.ts +39 -44
- package/src/services/subscription.ts +2 -2
- package/src/services/tax-category.test.ts +33 -36
- package/src/services/tax-category.ts +2 -2
- package/src/services/type.test.ts +45 -44
- package/src/services/type.ts +2 -2
- package/src/services/zone.test.ts +40 -44
- package/src/services/zone.ts +2 -2
- package/src/shipping.ts +41 -11
- package/src/storage/abstract.ts +248 -17
- package/src/storage/in-memory.ts +147 -290
- package/src/storage/sqlite.ts +429 -0
- package/src/storage/storage-map.ts +75 -0
- package/src/storage/storage.test-helpers.ts +97 -0
- package/src/storage/storage.test.ts +802 -0
- package/src/testing/associate-role.ts +28 -0
- package/src/testing/attribute-group.ts +27 -0
- package/src/testing/business-unit.ts +9 -8
- package/src/testing/cart-discount.ts +34 -0
- package/src/testing/cart.ts +20 -0
- package/src/testing/category.ts +25 -0
- package/src/testing/channel.ts +23 -0
- package/src/testing/custom-object.ts +27 -0
- package/src/testing/customer-group.ts +26 -0
- package/src/testing/customer.ts +36 -33
- package/src/testing/discount-code.ts +29 -0
- package/src/testing/discount-group.ts +27 -0
- package/src/testing/extension.ts +32 -0
- package/src/testing/index.ts +33 -0
- package/src/testing/inventory-entry.ts +26 -0
- package/src/testing/order.ts +27 -0
- package/src/testing/payment.ts +23 -0
- package/src/testing/product-discount.ts +33 -0
- package/src/testing/product-selection.ts +28 -0
- package/src/testing/product-type.ts +27 -0
- package/src/testing/product.ts +38 -0
- package/src/testing/quote-request.ts +29 -0
- package/src/testing/recurrence-policy.ts +33 -0
- package/src/testing/recurring-order.ts +32 -0
- package/src/testing/review.ts +24 -0
- package/src/testing/shipping-method.ts +31 -0
- package/src/testing/shopping-list.ts +25 -0
- package/src/testing/standalone-price.ts +31 -0
- package/src/testing/state.ts +21 -0
- package/src/testing/store.ts +26 -0
- package/src/testing/subscription.ts +38 -0
- package/src/testing/tax-category.ts +27 -0
- package/src/testing/type.ts +9 -6
- package/src/testing/zone.ts +22 -0
- package/src/validate.test.ts +122 -0
- package/src/validate.ts +78 -7
- package/src/.env +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
6
|
+
export const CustomObjectDraftSchema = z.object({
|
|
7
|
+
container: z.string(),
|
|
8
|
+
key: z.string(),
|
|
9
|
+
value: z.unknown(),
|
|
10
|
+
version: z.number().int().optional(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { CustomFieldsDraftSchema } from "./common.ts";
|
|
6
|
+
|
|
7
|
+
export const CustomerGroupDraftSchema = z.object({
|
|
8
|
+
key: z.string().optional(),
|
|
9
|
+
groupName: z.string(),
|
|
10
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
AuthenticationModeSchema,
|
|
7
|
+
BaseAddressSchema,
|
|
8
|
+
CartResourceIdentifierSchema,
|
|
9
|
+
CustomerGroupAssignmentDraftSchema,
|
|
10
|
+
CustomerGroupResourceIdentifierSchema,
|
|
11
|
+
CustomFieldsDraftSchema,
|
|
12
|
+
LocaleSchema,
|
|
13
|
+
StoreResourceIdentifierSchema,
|
|
14
|
+
} from "./common.ts";
|
|
15
|
+
|
|
16
|
+
export const CustomerDraftSchema = z.object({
|
|
17
|
+
key: z.string().optional(),
|
|
18
|
+
customerNumber: z.string().optional(),
|
|
19
|
+
externalId: z.string().optional(),
|
|
20
|
+
email: z.string(),
|
|
21
|
+
password: z.string().optional(),
|
|
22
|
+
firstName: z.string().optional(),
|
|
23
|
+
lastName: z.string().optional(),
|
|
24
|
+
middleName: z.string().optional(),
|
|
25
|
+
title: z.string().optional(),
|
|
26
|
+
anonymousCartId: z.string().optional(),
|
|
27
|
+
anonymousCart: CartResourceIdentifierSchema.optional(),
|
|
28
|
+
anonymousId: z.string().optional(),
|
|
29
|
+
dateOfBirth: z.string().optional(),
|
|
30
|
+
companyName: z.string().optional(),
|
|
31
|
+
vatId: z.string().optional(),
|
|
32
|
+
addresses: z.array(BaseAddressSchema).optional(),
|
|
33
|
+
defaultShippingAddress: z.number().int().optional(),
|
|
34
|
+
shippingAddresses: z.array(z.number().int()).optional(),
|
|
35
|
+
defaultBillingAddress: z.number().int().optional(),
|
|
36
|
+
billingAddresses: z.array(z.number().int()).optional(),
|
|
37
|
+
isEmailVerified: z.boolean().optional(),
|
|
38
|
+
customerGroup: CustomerGroupResourceIdentifierSchema.optional(),
|
|
39
|
+
customerGroupAssignments: z
|
|
40
|
+
.array(CustomerGroupAssignmentDraftSchema)
|
|
41
|
+
.optional(),
|
|
42
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
43
|
+
locale: LocaleSchema.optional(),
|
|
44
|
+
salutation: z.string().optional(),
|
|
45
|
+
stores: z.array(StoreResourceIdentifierSchema).optional(),
|
|
46
|
+
authenticationMode: AuthenticationModeSchema.optional(),
|
|
47
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CartDiscountResourceIdentifierSchema,
|
|
7
|
+
CustomFieldsDraftSchema,
|
|
8
|
+
LocalizedStringSchema,
|
|
9
|
+
} from "./common.ts";
|
|
10
|
+
|
|
11
|
+
export const DiscountCodeDraftSchema = z.object({
|
|
12
|
+
key: z.string().optional(),
|
|
13
|
+
name: LocalizedStringSchema.optional(),
|
|
14
|
+
description: LocalizedStringSchema.optional(),
|
|
15
|
+
code: z.string(),
|
|
16
|
+
cartDiscounts: z.array(CartDiscountResourceIdentifierSchema),
|
|
17
|
+
cartPredicate: z.string().optional(),
|
|
18
|
+
isActive: z.boolean().optional(),
|
|
19
|
+
maxApplications: z.number().int().optional(),
|
|
20
|
+
maxApplicationsPerCustomer: z.number().int().optional(),
|
|
21
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
22
|
+
groups: z.array(z.string()).optional(),
|
|
23
|
+
validFrom: z.string().optional(),
|
|
24
|
+
validUntil: z.string().optional(),
|
|
25
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { LocalizedStringSchema } from "./common.ts";
|
|
6
|
+
|
|
7
|
+
export const DiscountGroupDraftSchema = z.object({
|
|
8
|
+
name: LocalizedStringSchema.optional(),
|
|
9
|
+
key: z.string(),
|
|
10
|
+
description: LocalizedStringSchema.optional(),
|
|
11
|
+
sortOrder: z.string(),
|
|
12
|
+
isActive: z.boolean().optional(),
|
|
13
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
ExtensionDestinationSchema,
|
|
7
|
+
ExtensionTriggerSchema,
|
|
8
|
+
} from "./common.ts";
|
|
9
|
+
|
|
10
|
+
export const ExtensionDraftSchema = z.object({
|
|
11
|
+
key: z.string().optional(),
|
|
12
|
+
destination: ExtensionDestinationSchema,
|
|
13
|
+
triggers: z.array(ExtensionTriggerSchema),
|
|
14
|
+
timeoutInMs: z.number().int().optional(),
|
|
15
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
export * from "./associate-role.ts";
|
|
5
|
+
export * from "./attribute-group.ts";
|
|
6
|
+
export * from "./business-unit.ts";
|
|
7
|
+
export * from "./cart.ts";
|
|
8
|
+
export * from "./cart-discount.ts";
|
|
9
|
+
export * from "./category.ts";
|
|
10
|
+
export * from "./channel.ts";
|
|
11
|
+
export * from "./common.ts";
|
|
12
|
+
export * from "./custom-object.ts";
|
|
13
|
+
export * from "./customer.ts";
|
|
14
|
+
export * from "./customer-group.ts";
|
|
15
|
+
export * from "./discount-code.ts";
|
|
16
|
+
export * from "./discount-group.ts";
|
|
17
|
+
export * from "./extension.ts";
|
|
18
|
+
export * from "./inventory-entry.ts";
|
|
19
|
+
export * from "./my-quote-request.ts";
|
|
20
|
+
export * from "./order-edit.ts";
|
|
21
|
+
export * from "./order-from-cart.ts";
|
|
22
|
+
export * from "./payment.ts";
|
|
23
|
+
export * from "./product.ts";
|
|
24
|
+
export * from "./product-discount.ts";
|
|
25
|
+
export * from "./product-selection.ts";
|
|
26
|
+
export * from "./product-tailoring.ts";
|
|
27
|
+
export * from "./product-type.ts";
|
|
28
|
+
export * from "./quote.ts";
|
|
29
|
+
export * from "./quote-request.ts";
|
|
30
|
+
export * from "./recurrence-policy.ts";
|
|
31
|
+
export * from "./recurring-order.ts";
|
|
32
|
+
export * from "./review.ts";
|
|
33
|
+
export * from "./shipping-method.ts";
|
|
34
|
+
export * from "./shopping-list.ts";
|
|
35
|
+
export * from "./staged-quote.ts";
|
|
36
|
+
export * from "./standalone-price.ts";
|
|
37
|
+
export * from "./state.ts";
|
|
38
|
+
export * from "./store.ts";
|
|
39
|
+
export * from "./subscription.ts";
|
|
40
|
+
export * from "./tax-category.ts";
|
|
41
|
+
export * from "./type.ts";
|
|
42
|
+
export * from "./zone.ts";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
ChannelResourceIdentifierSchema,
|
|
7
|
+
CustomFieldsDraftSchema,
|
|
8
|
+
} from "./common.ts";
|
|
9
|
+
|
|
10
|
+
export const InventoryEntryDraftSchema = z.object({
|
|
11
|
+
sku: z.string(),
|
|
12
|
+
key: z.string().optional(),
|
|
13
|
+
supplyChannel: ChannelResourceIdentifierSchema.optional(),
|
|
14
|
+
quantityOnStock: z.number().int(),
|
|
15
|
+
minCartQuantity: z.number().int().optional(),
|
|
16
|
+
maxCartQuantity: z.number().int().optional(),
|
|
17
|
+
restockableInDays: z.number().int().optional(),
|
|
18
|
+
expectedDelivery: z.string().optional(),
|
|
19
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
20
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
6
|
+
export const MyQuoteRequestDraftSchema = z.object({
|
|
7
|
+
cartId: z.string(),
|
|
8
|
+
cartVersion: z.number().int(),
|
|
9
|
+
comment: z.string().optional(),
|
|
10
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CustomFieldsDraftSchema,
|
|
7
|
+
OrderReferenceSchema,
|
|
8
|
+
StagedOrderUpdateActionSchema,
|
|
9
|
+
} from "./common.ts";
|
|
10
|
+
|
|
11
|
+
export const OrderEditDraftSchema = z.object({
|
|
12
|
+
key: z.string().optional(),
|
|
13
|
+
resource: OrderReferenceSchema,
|
|
14
|
+
stagedActions: z.array(StagedOrderUpdateActionSchema).optional(),
|
|
15
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
16
|
+
comment: z.string().optional(),
|
|
17
|
+
dryRun: z.boolean().optional(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CartResourceIdentifierSchema,
|
|
7
|
+
CustomFieldsDraftSchema,
|
|
8
|
+
OrderStateSchema,
|
|
9
|
+
PaymentStateSchema,
|
|
10
|
+
ShipmentStateSchema,
|
|
11
|
+
StateResourceIdentifierSchema,
|
|
12
|
+
} from "./common.ts";
|
|
13
|
+
|
|
14
|
+
export const OrderFromCartDraftSchema = z.object({
|
|
15
|
+
id: z.string().optional(),
|
|
16
|
+
cart: CartResourceIdentifierSchema.optional(),
|
|
17
|
+
version: z.number().int(),
|
|
18
|
+
orderNumber: z.string().optional(),
|
|
19
|
+
purchaseOrderNumber: z.string().optional(),
|
|
20
|
+
paymentState: PaymentStateSchema.optional(),
|
|
21
|
+
shipmentState: ShipmentStateSchema.optional(),
|
|
22
|
+
orderState: OrderStateSchema.optional(),
|
|
23
|
+
state: StateResourceIdentifierSchema.optional(),
|
|
24
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
25
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CustomerResourceIdentifierSchema,
|
|
7
|
+
CustomFieldsDraftSchema,
|
|
8
|
+
MoneySchema,
|
|
9
|
+
PaymentMethodInfoDraftSchema,
|
|
10
|
+
PaymentStatusDraftSchema,
|
|
11
|
+
TransactionDraftSchema,
|
|
12
|
+
} from "./common.ts";
|
|
13
|
+
|
|
14
|
+
export const PaymentDraftSchema = z.object({
|
|
15
|
+
customer: CustomerResourceIdentifierSchema.optional(),
|
|
16
|
+
anonymousId: z.string().optional(),
|
|
17
|
+
externalId: z.string().optional(),
|
|
18
|
+
interfaceId: z.string().optional(),
|
|
19
|
+
amountPlanned: MoneySchema,
|
|
20
|
+
amountAuthorized: MoneySchema.optional(),
|
|
21
|
+
authorizedUntil: z.string().optional(),
|
|
22
|
+
amountPaid: MoneySchema.optional(),
|
|
23
|
+
amountRefunded: MoneySchema.optional(),
|
|
24
|
+
paymentMethodInfo: PaymentMethodInfoDraftSchema.optional(),
|
|
25
|
+
paymentStatus: PaymentStatusDraftSchema.optional(),
|
|
26
|
+
transactions: z.array(TransactionDraftSchema).optional(),
|
|
27
|
+
interfaceInteractions: z.array(CustomFieldsDraftSchema).optional(),
|
|
28
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
29
|
+
key: z.string().optional(),
|
|
30
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
LocalizedStringSchema,
|
|
7
|
+
ProductDiscountValueDraftSchema,
|
|
8
|
+
} from "./common.ts";
|
|
9
|
+
|
|
10
|
+
export const ProductDiscountDraftSchema = z.object({
|
|
11
|
+
name: LocalizedStringSchema,
|
|
12
|
+
key: z.string().optional(),
|
|
13
|
+
description: LocalizedStringSchema.optional(),
|
|
14
|
+
value: ProductDiscountValueDraftSchema,
|
|
15
|
+
predicate: z.string(),
|
|
16
|
+
sortOrder: z.string(),
|
|
17
|
+
isActive: z.boolean(),
|
|
18
|
+
validFrom: z.string().optional(),
|
|
19
|
+
validUntil: z.string().optional(),
|
|
20
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CustomFieldsDraftSchema,
|
|
7
|
+
LocalizedStringSchema,
|
|
8
|
+
ProductSelectionModeSchema,
|
|
9
|
+
ProductSelectionTypeEnumSchema,
|
|
10
|
+
} from "./common.ts";
|
|
11
|
+
|
|
12
|
+
export const ProductSelectionDraftSchema = z.object({
|
|
13
|
+
key: z.string().optional(),
|
|
14
|
+
name: LocalizedStringSchema,
|
|
15
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
16
|
+
type: ProductSelectionTypeEnumSchema.optional(),
|
|
17
|
+
mode: ProductSelectionModeSchema.optional(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
LocalizedStringSchema,
|
|
7
|
+
ProductResourceIdentifierSchema,
|
|
8
|
+
ProductTailoringAttributeSchema,
|
|
9
|
+
ProductVariantTailoringDraftSchema,
|
|
10
|
+
StoreResourceIdentifierSchema,
|
|
11
|
+
} from "./common.ts";
|
|
12
|
+
|
|
13
|
+
export const ProductTailoringDraftSchema = z.object({
|
|
14
|
+
key: z.string().optional(),
|
|
15
|
+
store: StoreResourceIdentifierSchema,
|
|
16
|
+
product: ProductResourceIdentifierSchema,
|
|
17
|
+
name: LocalizedStringSchema.optional(),
|
|
18
|
+
description: LocalizedStringSchema.optional(),
|
|
19
|
+
metaTitle: LocalizedStringSchema.optional(),
|
|
20
|
+
metaDescription: LocalizedStringSchema.optional(),
|
|
21
|
+
metaKeywords: LocalizedStringSchema.optional(),
|
|
22
|
+
slug: LocalizedStringSchema.optional(),
|
|
23
|
+
publish: z.boolean().optional(),
|
|
24
|
+
variants: z.array(ProductVariantTailoringDraftSchema).optional(),
|
|
25
|
+
attributes: z.array(ProductTailoringAttributeSchema).optional(),
|
|
26
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { AttributeDefinitionDraftSchema } from "./common.ts";
|
|
6
|
+
|
|
7
|
+
export const ProductTypeDraftSchema = z.object({
|
|
8
|
+
key: z.string().optional(),
|
|
9
|
+
name: z.string(),
|
|
10
|
+
description: z.string(),
|
|
11
|
+
attributes: z.array(AttributeDefinitionDraftSchema).optional(),
|
|
12
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
AttributeSchema,
|
|
7
|
+
CategoryOrderHintsSchema,
|
|
8
|
+
CategoryResourceIdentifierSchema,
|
|
9
|
+
LocalizedStringSchema,
|
|
10
|
+
ProductPriceModeEnumSchema,
|
|
11
|
+
ProductTypeResourceIdentifierSchema,
|
|
12
|
+
ProductVariantDraftSchema,
|
|
13
|
+
SearchKeywordsSchema,
|
|
14
|
+
StateResourceIdentifierSchema,
|
|
15
|
+
TaxCategoryResourceIdentifierSchema,
|
|
16
|
+
} from "./common.ts";
|
|
17
|
+
|
|
18
|
+
export const ProductDraftSchema = z.object({
|
|
19
|
+
productType: ProductTypeResourceIdentifierSchema,
|
|
20
|
+
name: LocalizedStringSchema,
|
|
21
|
+
slug: LocalizedStringSchema,
|
|
22
|
+
key: z.string().optional(),
|
|
23
|
+
description: LocalizedStringSchema.optional(),
|
|
24
|
+
categories: z.array(CategoryResourceIdentifierSchema).optional(),
|
|
25
|
+
categoryOrderHints: CategoryOrderHintsSchema.optional(),
|
|
26
|
+
metaTitle: LocalizedStringSchema.optional(),
|
|
27
|
+
metaDescription: LocalizedStringSchema.optional(),
|
|
28
|
+
metaKeywords: LocalizedStringSchema.optional(),
|
|
29
|
+
masterVariant: ProductVariantDraftSchema.optional(),
|
|
30
|
+
variants: z.array(ProductVariantDraftSchema).optional(),
|
|
31
|
+
taxCategory: TaxCategoryResourceIdentifierSchema.optional(),
|
|
32
|
+
searchKeywords: SearchKeywordsSchema.optional(),
|
|
33
|
+
state: StateResourceIdentifierSchema.optional(),
|
|
34
|
+
publish: z.boolean().optional(),
|
|
35
|
+
priceMode: ProductPriceModeEnumSchema.optional(),
|
|
36
|
+
attributes: z.array(AttributeSchema).optional(),
|
|
37
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CartResourceIdentifierSchema,
|
|
7
|
+
CustomFieldsDraftSchema,
|
|
8
|
+
StateReferenceSchema,
|
|
9
|
+
} from "./common.ts";
|
|
10
|
+
|
|
11
|
+
export const QuoteRequestDraftSchema = z.object({
|
|
12
|
+
cart: CartResourceIdentifierSchema,
|
|
13
|
+
cartVersion: z.number().int(),
|
|
14
|
+
key: z.string().optional(),
|
|
15
|
+
comment: z.string().optional(),
|
|
16
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
17
|
+
state: StateReferenceSchema.optional(),
|
|
18
|
+
purchaseOrderNumber: z.string().optional(),
|
|
19
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CustomFieldsDraftSchema,
|
|
7
|
+
StagedQuoteResourceIdentifierSchema,
|
|
8
|
+
StateReferenceSchema,
|
|
9
|
+
} from "./common.ts";
|
|
10
|
+
|
|
11
|
+
export const QuoteDraftSchema = z.object({
|
|
12
|
+
key: z.string().optional(),
|
|
13
|
+
stagedQuote: StagedQuoteResourceIdentifierSchema,
|
|
14
|
+
stagedQuoteVersion: z.number().int(),
|
|
15
|
+
stagedQuoteStateToSent: z.boolean().optional(),
|
|
16
|
+
state: StateReferenceSchema.optional(),
|
|
17
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
LocalizedStringSchema,
|
|
7
|
+
RecurrencePolicyScheduleDraftSchema,
|
|
8
|
+
} from "./common.ts";
|
|
9
|
+
|
|
10
|
+
export const RecurrencePolicyDraftSchema = z.object({
|
|
11
|
+
key: z.string(),
|
|
12
|
+
name: LocalizedStringSchema.optional(),
|
|
13
|
+
description: LocalizedStringSchema.optional(),
|
|
14
|
+
schedule: RecurrencePolicyScheduleDraftSchema,
|
|
15
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CartResourceIdentifierSchema,
|
|
7
|
+
CustomFieldsDraftSchema,
|
|
8
|
+
StateResourceIdentifierSchema,
|
|
9
|
+
} from "./common.ts";
|
|
10
|
+
|
|
11
|
+
export const RecurringOrderDraftSchema = z.object({
|
|
12
|
+
key: z.string().optional(),
|
|
13
|
+
cart: CartResourceIdentifierSchema,
|
|
14
|
+
cartVersion: z.number().int(),
|
|
15
|
+
startsAt: z.string().optional(),
|
|
16
|
+
expiresAt: z.string().optional(),
|
|
17
|
+
state: StateResourceIdentifierSchema.optional(),
|
|
18
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
19
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CustomerResourceIdentifierSchema,
|
|
7
|
+
CustomFieldsDraftSchema,
|
|
8
|
+
LocaleSchema,
|
|
9
|
+
StateResourceIdentifierSchema,
|
|
10
|
+
} from "./common.ts";
|
|
11
|
+
|
|
12
|
+
export const ReviewDraftSchema = z.object({
|
|
13
|
+
key: z.string().optional(),
|
|
14
|
+
uniquenessValue: z.string().optional(),
|
|
15
|
+
locale: LocaleSchema.optional(),
|
|
16
|
+
authorName: z.string().optional(),
|
|
17
|
+
title: z.string().optional(),
|
|
18
|
+
text: z.string().optional(),
|
|
19
|
+
target: z.unknown().optional(),
|
|
20
|
+
state: StateResourceIdentifierSchema.optional(),
|
|
21
|
+
rating: z.number().int().optional(),
|
|
22
|
+
customer: CustomerResourceIdentifierSchema.optional(),
|
|
23
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
24
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CustomFieldsDraftSchema,
|
|
7
|
+
LocalizedStringSchema,
|
|
8
|
+
TaxCategoryResourceIdentifierSchema,
|
|
9
|
+
ZoneRateDraftSchema,
|
|
10
|
+
} from "./common.ts";
|
|
11
|
+
|
|
12
|
+
export const ShippingMethodDraftSchema = z.object({
|
|
13
|
+
key: z.string().optional(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
localizedName: LocalizedStringSchema.optional(),
|
|
16
|
+
description: z.string().optional(),
|
|
17
|
+
localizedDescription: LocalizedStringSchema.optional(),
|
|
18
|
+
taxCategory: TaxCategoryResourceIdentifierSchema,
|
|
19
|
+
zoneRates: z.array(ZoneRateDraftSchema),
|
|
20
|
+
active: z.boolean().optional(),
|
|
21
|
+
isDefault: z.boolean(),
|
|
22
|
+
predicate: z.string().optional(),
|
|
23
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
24
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
BusinessUnitResourceIdentifierSchema,
|
|
7
|
+
CustomerResourceIdentifierSchema,
|
|
8
|
+
CustomFieldsDraftSchema,
|
|
9
|
+
LocalizedStringSchema,
|
|
10
|
+
ShoppingListLineItemDraftSchema,
|
|
11
|
+
StoreResourceIdentifierSchema,
|
|
12
|
+
TextLineItemDraftSchema,
|
|
13
|
+
} from "./common.ts";
|
|
14
|
+
|
|
15
|
+
export const ShoppingListDraftSchema = z.object({
|
|
16
|
+
name: LocalizedStringSchema,
|
|
17
|
+
slug: LocalizedStringSchema.optional(),
|
|
18
|
+
customer: CustomerResourceIdentifierSchema.optional(),
|
|
19
|
+
key: z.string().optional(),
|
|
20
|
+
description: LocalizedStringSchema.optional(),
|
|
21
|
+
anonymousId: z.string().optional(),
|
|
22
|
+
deleteDaysAfterLastModification: z.number().int().optional(),
|
|
23
|
+
lineItems: z.array(ShoppingListLineItemDraftSchema).optional(),
|
|
24
|
+
textLineItems: z.array(TextLineItemDraftSchema).optional(),
|
|
25
|
+
store: StoreResourceIdentifierSchema.optional(),
|
|
26
|
+
businessUnit: BusinessUnitResourceIdentifierSchema.optional(),
|
|
27
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
28
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
CustomFieldsDraftSchema,
|
|
7
|
+
QuoteRequestResourceIdentifierSchema,
|
|
8
|
+
StateReferenceSchema,
|
|
9
|
+
} from "./common.ts";
|
|
10
|
+
|
|
11
|
+
export const StagedQuoteDraftSchema = z.object({
|
|
12
|
+
quoteRequest: QuoteRequestResourceIdentifierSchema,
|
|
13
|
+
quoteRequestVersion: z.number().int(),
|
|
14
|
+
quoteRequestStateToAccepted: z.boolean().optional(),
|
|
15
|
+
key: z.string().optional(),
|
|
16
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
17
|
+
state: StateReferenceSchema.optional(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
ChannelResourceIdentifierSchema,
|
|
7
|
+
CountryCodeSchema,
|
|
8
|
+
CustomerGroupResourceIdentifierSchema,
|
|
9
|
+
CustomFieldsDraftSchema,
|
|
10
|
+
DiscountedPriceDraftSchema,
|
|
11
|
+
MoneySchema,
|
|
12
|
+
PriceTierDraftSchema,
|
|
13
|
+
RecurrencePolicyResourceIdentifierSchema,
|
|
14
|
+
StagedPriceDraftSchema,
|
|
15
|
+
} from "./common.ts";
|
|
16
|
+
|
|
17
|
+
export const StandalonePriceDraftSchema = z.object({
|
|
18
|
+
key: z.string().optional(),
|
|
19
|
+
sku: z.string(),
|
|
20
|
+
value: MoneySchema,
|
|
21
|
+
country: CountryCodeSchema.optional(),
|
|
22
|
+
customerGroup: CustomerGroupResourceIdentifierSchema.optional(),
|
|
23
|
+
channel: ChannelResourceIdentifierSchema.optional(),
|
|
24
|
+
validFrom: z.string().optional(),
|
|
25
|
+
validUntil: z.string().optional(),
|
|
26
|
+
tiers: z.array(PriceTierDraftSchema).optional(),
|
|
27
|
+
discounted: DiscountedPriceDraftSchema.optional(),
|
|
28
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
29
|
+
recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.optional(),
|
|
30
|
+
staged: StagedPriceDraftSchema.optional(),
|
|
31
|
+
active: z.boolean().optional(),
|
|
32
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
LocalizedStringSchema,
|
|
7
|
+
StateResourceIdentifierSchema,
|
|
8
|
+
StateRoleEnumSchema,
|
|
9
|
+
StateTypeEnumSchema,
|
|
10
|
+
} from "./common.ts";
|
|
11
|
+
|
|
12
|
+
export const StateDraftSchema = z.object({
|
|
13
|
+
key: z.string(),
|
|
14
|
+
type: StateTypeEnumSchema,
|
|
15
|
+
name: LocalizedStringSchema.optional(),
|
|
16
|
+
description: LocalizedStringSchema.optional(),
|
|
17
|
+
initial: z.boolean().optional(),
|
|
18
|
+
roles: z.array(StateRoleEnumSchema).optional(),
|
|
19
|
+
transitions: z.array(StateResourceIdentifierSchema).optional(),
|
|
20
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate-schemas.ts
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
ChannelResourceIdentifierSchema,
|
|
7
|
+
CustomFieldsDraftSchema,
|
|
8
|
+
LocaleSchema,
|
|
9
|
+
LocalizedStringSchema,
|
|
10
|
+
ProductSelectionSettingDraftSchema,
|
|
11
|
+
StoreCountrySchema,
|
|
12
|
+
} from "./common.ts";
|
|
13
|
+
|
|
14
|
+
export const StoreDraftSchema = z.object({
|
|
15
|
+
key: z.string(),
|
|
16
|
+
name: LocalizedStringSchema.optional(),
|
|
17
|
+
languages: z.array(LocaleSchema).optional(),
|
|
18
|
+
countries: z.array(StoreCountrySchema).optional(),
|
|
19
|
+
distributionChannels: z.array(ChannelResourceIdentifierSchema).optional(),
|
|
20
|
+
supplyChannels: z.array(ChannelResourceIdentifierSchema).optional(),
|
|
21
|
+
productSelections: z.array(ProductSelectionSettingDraftSchema).optional(),
|
|
22
|
+
custom: CustomFieldsDraftSchema.optional(),
|
|
23
|
+
});
|