@labdigital/commercetools-mock 3.0.0-beta.0 → 3.0.0-beta.2
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/dist/index.mjs +551 -551
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/schemas/generated/associate-role.ts +4 -4
- package/src/schemas/generated/attribute-group.ts +2 -2
- package/src/schemas/generated/business-unit.ts +14 -14
- package/src/schemas/generated/cart-discount.ts +13 -13
- package/src/schemas/generated/cart.ts +30 -30
- package/src/schemas/generated/category.ts +10 -10
- package/src/schemas/generated/channel.ts +6 -6
- package/src/schemas/generated/common.ts +270 -272
- package/src/schemas/generated/custom-object.ts +1 -1
- package/src/schemas/generated/customer-group.ts +2 -2
- package/src/schemas/generated/customer.ts +27 -27
- package/src/schemas/generated/discount-code.ts +11 -11
- package/src/schemas/generated/discount-group.ts +3 -3
- package/src/schemas/generated/extension.ts +2 -2
- package/src/schemas/generated/inventory-entry.ts +7 -7
- package/src/schemas/generated/my-quote-request.ts +1 -1
- package/src/schemas/generated/order-edit.ts +5 -5
- package/src/schemas/generated/order-from-cart.ts +9 -9
- package/src/schemas/generated/payment.ts +14 -14
- package/src/schemas/generated/product-discount.ts +4 -4
- package/src/schemas/generated/product-selection.ts +4 -4
- package/src/schemas/generated/product-tailoring.ts +10 -10
- package/src/schemas/generated/product-type.ts +2 -2
- package/src/schemas/generated/product.ts +15 -15
- package/src/schemas/generated/quote-request.ts +5 -5
- package/src/schemas/generated/quote.ts +4 -4
- package/src/schemas/generated/recurrence-policy.ts +2 -2
- package/src/schemas/generated/recurring-order.ts +5 -5
- package/src/schemas/generated/review.ts +11 -11
- package/src/schemas/generated/shipping-method.ts +7 -7
- package/src/schemas/generated/shopping-list.ts +11 -11
- package/src/schemas/generated/staged-quote.ts +4 -4
- package/src/schemas/generated/standalone-price.ts +12 -12
- package/src/schemas/generated/state.ts +5 -5
- package/src/schemas/generated/store.ts +7 -7
- package/src/schemas/generated/subscription.ts +5 -5
- package/src/schemas/generated/tax-category.ts +3 -3
- package/src/schemas/generated/type.ts +2 -2
- package/src/schemas/generated/zone.ts +3 -3
- package/src/server.ts +6 -4
|
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { CustomFieldsDraftSchema } from "./common.ts";
|
|
6
6
|
|
|
7
7
|
export const CustomerGroupDraftSchema = z.object({
|
|
8
|
-
key: z.string().
|
|
8
|
+
key: z.string().nullish(),
|
|
9
9
|
groupName: z.string(),
|
|
10
|
-
custom: CustomFieldsDraftSchema.
|
|
10
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
11
11
|
});
|
|
@@ -14,34 +14,34 @@ import {
|
|
|
14
14
|
} from "./common.ts";
|
|
15
15
|
|
|
16
16
|
export const CustomerDraftSchema = z.object({
|
|
17
|
-
key: z.string().
|
|
18
|
-
customerNumber: z.string().
|
|
19
|
-
externalId: z.string().
|
|
17
|
+
key: z.string().nullish(),
|
|
18
|
+
customerNumber: z.string().nullish(),
|
|
19
|
+
externalId: z.string().nullish(),
|
|
20
20
|
email: z.string(),
|
|
21
|
-
password: z.string().
|
|
22
|
-
firstName: z.string().
|
|
23
|
-
lastName: z.string().
|
|
24
|
-
middleName: z.string().
|
|
25
|
-
title: z.string().
|
|
26
|
-
anonymousCartId: z.string().
|
|
27
|
-
anonymousCart: CartResourceIdentifierSchema.
|
|
28
|
-
anonymousId: z.string().
|
|
29
|
-
dateOfBirth: z.string().
|
|
30
|
-
companyName: z.string().
|
|
31
|
-
vatId: z.string().
|
|
32
|
-
addresses: z.array(BaseAddressSchema).
|
|
33
|
-
defaultShippingAddress: z.number().int().
|
|
34
|
-
shippingAddresses: z.array(z.number().int()).
|
|
35
|
-
defaultBillingAddress: z.number().int().
|
|
36
|
-
billingAddresses: z.array(z.number().int()).
|
|
37
|
-
isEmailVerified: z.boolean().
|
|
38
|
-
customerGroup: CustomerGroupResourceIdentifierSchema.
|
|
21
|
+
password: z.string().nullish(),
|
|
22
|
+
firstName: z.string().nullish(),
|
|
23
|
+
lastName: z.string().nullish(),
|
|
24
|
+
middleName: z.string().nullish(),
|
|
25
|
+
title: z.string().nullish(),
|
|
26
|
+
anonymousCartId: z.string().nullish(),
|
|
27
|
+
anonymousCart: CartResourceIdentifierSchema.nullish(),
|
|
28
|
+
anonymousId: z.string().nullish(),
|
|
29
|
+
dateOfBirth: z.string().nullish(),
|
|
30
|
+
companyName: z.string().nullish(),
|
|
31
|
+
vatId: z.string().nullish(),
|
|
32
|
+
addresses: z.array(BaseAddressSchema).nullish(),
|
|
33
|
+
defaultShippingAddress: z.number().int().nullish(),
|
|
34
|
+
shippingAddresses: z.array(z.number().int()).nullish(),
|
|
35
|
+
defaultBillingAddress: z.number().int().nullish(),
|
|
36
|
+
billingAddresses: z.array(z.number().int()).nullish(),
|
|
37
|
+
isEmailVerified: z.boolean().nullish(),
|
|
38
|
+
customerGroup: CustomerGroupResourceIdentifierSchema.nullish(),
|
|
39
39
|
customerGroupAssignments: z
|
|
40
40
|
.array(CustomerGroupAssignmentDraftSchema)
|
|
41
|
-
.
|
|
42
|
-
custom: CustomFieldsDraftSchema.
|
|
43
|
-
locale: LocaleSchema.
|
|
44
|
-
salutation: z.string().
|
|
45
|
-
stores: z.array(StoreResourceIdentifierSchema).
|
|
46
|
-
authenticationMode: AuthenticationModeSchema.
|
|
41
|
+
.nullish(),
|
|
42
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
43
|
+
locale: LocaleSchema.nullish(),
|
|
44
|
+
salutation: z.string().nullish(),
|
|
45
|
+
stores: z.array(StoreResourceIdentifierSchema).nullish(),
|
|
46
|
+
authenticationMode: AuthenticationModeSchema.nullish(),
|
|
47
47
|
});
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
} from "./common.ts";
|
|
10
10
|
|
|
11
11
|
export const DiscountCodeDraftSchema = z.object({
|
|
12
|
-
key: z.string().
|
|
13
|
-
name: LocalizedStringSchema.
|
|
14
|
-
description: LocalizedStringSchema.
|
|
12
|
+
key: z.string().nullish(),
|
|
13
|
+
name: LocalizedStringSchema.nullish(),
|
|
14
|
+
description: LocalizedStringSchema.nullish(),
|
|
15
15
|
code: z.string(),
|
|
16
16
|
cartDiscounts: z.array(CartDiscountResourceIdentifierSchema),
|
|
17
|
-
cartPredicate: z.string().
|
|
18
|
-
isActive: z.boolean().
|
|
19
|
-
maxApplications: z.number().int().
|
|
20
|
-
maxApplicationsPerCustomer: z.number().int().
|
|
21
|
-
custom: CustomFieldsDraftSchema.
|
|
22
|
-
groups: z.array(z.string()).
|
|
23
|
-
validFrom: z.string().
|
|
24
|
-
validUntil: z.string().
|
|
17
|
+
cartPredicate: z.string().nullish(),
|
|
18
|
+
isActive: z.boolean().nullish(),
|
|
19
|
+
maxApplications: z.number().int().nullish(),
|
|
20
|
+
maxApplicationsPerCustomer: z.number().int().nullish(),
|
|
21
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
22
|
+
groups: z.array(z.string()).nullish(),
|
|
23
|
+
validFrom: z.string().nullish(),
|
|
24
|
+
validUntil: z.string().nullish(),
|
|
25
25
|
});
|
|
@@ -5,9 +5,9 @@ import { z } from "zod";
|
|
|
5
5
|
import { LocalizedStringSchema } from "./common.ts";
|
|
6
6
|
|
|
7
7
|
export const DiscountGroupDraftSchema = z.object({
|
|
8
|
-
name: LocalizedStringSchema.
|
|
8
|
+
name: LocalizedStringSchema.nullish(),
|
|
9
9
|
key: z.string(),
|
|
10
|
-
description: LocalizedStringSchema.
|
|
10
|
+
description: LocalizedStringSchema.nullish(),
|
|
11
11
|
sortOrder: z.string(),
|
|
12
|
-
isActive: z.boolean().
|
|
12
|
+
isActive: z.boolean().nullish(),
|
|
13
13
|
});
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
} from "./common.ts";
|
|
9
9
|
|
|
10
10
|
export const ExtensionDraftSchema = z.object({
|
|
11
|
-
key: z.string().
|
|
11
|
+
key: z.string().nullish(),
|
|
12
12
|
destination: ExtensionDestinationSchema,
|
|
13
13
|
triggers: z.array(ExtensionTriggerSchema),
|
|
14
|
-
timeoutInMs: z.number().int().
|
|
14
|
+
timeoutInMs: z.number().int().nullish(),
|
|
15
15
|
});
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
|
|
10
10
|
export const InventoryEntryDraftSchema = z.object({
|
|
11
11
|
sku: z.string(),
|
|
12
|
-
key: z.string().
|
|
13
|
-
supplyChannel: ChannelResourceIdentifierSchema.
|
|
12
|
+
key: z.string().nullish(),
|
|
13
|
+
supplyChannel: ChannelResourceIdentifierSchema.nullish(),
|
|
14
14
|
quantityOnStock: z.number().int(),
|
|
15
|
-
minCartQuantity: z.number().int().
|
|
16
|
-
maxCartQuantity: z.number().int().
|
|
17
|
-
restockableInDays: z.number().int().
|
|
18
|
-
expectedDelivery: z.string().
|
|
19
|
-
custom: CustomFieldsDraftSchema.
|
|
15
|
+
minCartQuantity: z.number().int().nullish(),
|
|
16
|
+
maxCartQuantity: z.number().int().nullish(),
|
|
17
|
+
restockableInDays: z.number().int().nullish(),
|
|
18
|
+
expectedDelivery: z.string().nullish(),
|
|
19
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
20
20
|
});
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./common.ts";
|
|
10
10
|
|
|
11
11
|
export const OrderEditDraftSchema = z.object({
|
|
12
|
-
key: z.string().
|
|
12
|
+
key: z.string().nullish(),
|
|
13
13
|
resource: OrderReferenceSchema,
|
|
14
|
-
stagedActions: z.array(StagedOrderUpdateActionSchema).
|
|
15
|
-
custom: CustomFieldsDraftSchema.
|
|
16
|
-
comment: z.string().
|
|
17
|
-
dryRun: z.boolean().
|
|
14
|
+
stagedActions: z.array(StagedOrderUpdateActionSchema).nullish(),
|
|
15
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
16
|
+
comment: z.string().nullish(),
|
|
17
|
+
dryRun: z.boolean().nullish(),
|
|
18
18
|
});
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
} from "./common.ts";
|
|
13
13
|
|
|
14
14
|
export const OrderFromCartDraftSchema = z.object({
|
|
15
|
-
id: z.string().
|
|
16
|
-
cart: CartResourceIdentifierSchema.
|
|
15
|
+
id: z.string().nullish(),
|
|
16
|
+
cart: CartResourceIdentifierSchema.nullish(),
|
|
17
17
|
version: z.number().int(),
|
|
18
|
-
orderNumber: z.string().
|
|
19
|
-
purchaseOrderNumber: z.string().
|
|
20
|
-
paymentState: PaymentStateSchema.
|
|
21
|
-
shipmentState: ShipmentStateSchema.
|
|
22
|
-
orderState: OrderStateSchema.
|
|
23
|
-
state: StateResourceIdentifierSchema.
|
|
24
|
-
custom: CustomFieldsDraftSchema.
|
|
18
|
+
orderNumber: z.string().nullish(),
|
|
19
|
+
purchaseOrderNumber: z.string().nullish(),
|
|
20
|
+
paymentState: PaymentStateSchema.nullish(),
|
|
21
|
+
shipmentState: ShipmentStateSchema.nullish(),
|
|
22
|
+
orderState: OrderStateSchema.nullish(),
|
|
23
|
+
state: StateResourceIdentifierSchema.nullish(),
|
|
24
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
25
25
|
});
|
|
@@ -12,19 +12,19 @@ import {
|
|
|
12
12
|
} from "./common.ts";
|
|
13
13
|
|
|
14
14
|
export const PaymentDraftSchema = z.object({
|
|
15
|
-
customer: CustomerResourceIdentifierSchema.
|
|
16
|
-
anonymousId: z.string().
|
|
17
|
-
externalId: z.string().
|
|
18
|
-
interfaceId: z.string().
|
|
15
|
+
customer: CustomerResourceIdentifierSchema.nullish(),
|
|
16
|
+
anonymousId: z.string().nullish(),
|
|
17
|
+
externalId: z.string().nullish(),
|
|
18
|
+
interfaceId: z.string().nullish(),
|
|
19
19
|
amountPlanned: MoneySchema,
|
|
20
|
-
amountAuthorized: MoneySchema.
|
|
21
|
-
authorizedUntil: z.string().
|
|
22
|
-
amountPaid: MoneySchema.
|
|
23
|
-
amountRefunded: MoneySchema.
|
|
24
|
-
paymentMethodInfo: PaymentMethodInfoDraftSchema.
|
|
25
|
-
paymentStatus: PaymentStatusDraftSchema.
|
|
26
|
-
transactions: z.array(TransactionDraftSchema).
|
|
27
|
-
interfaceInteractions: z.array(CustomFieldsDraftSchema).
|
|
28
|
-
custom: CustomFieldsDraftSchema.
|
|
29
|
-
key: z.string().
|
|
20
|
+
amountAuthorized: MoneySchema.nullish(),
|
|
21
|
+
authorizedUntil: z.string().nullish(),
|
|
22
|
+
amountPaid: MoneySchema.nullish(),
|
|
23
|
+
amountRefunded: MoneySchema.nullish(),
|
|
24
|
+
paymentMethodInfo: PaymentMethodInfoDraftSchema.nullish(),
|
|
25
|
+
paymentStatus: PaymentStatusDraftSchema.nullish(),
|
|
26
|
+
transactions: z.array(TransactionDraftSchema).nullish(),
|
|
27
|
+
interfaceInteractions: z.array(CustomFieldsDraftSchema).nullish(),
|
|
28
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
29
|
+
key: z.string().nullish(),
|
|
30
30
|
});
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
|
|
10
10
|
export const ProductDiscountDraftSchema = z.object({
|
|
11
11
|
name: LocalizedStringSchema,
|
|
12
|
-
key: z.string().
|
|
13
|
-
description: LocalizedStringSchema.
|
|
12
|
+
key: z.string().nullish(),
|
|
13
|
+
description: LocalizedStringSchema.nullish(),
|
|
14
14
|
value: ProductDiscountValueDraftSchema,
|
|
15
15
|
predicate: z.string(),
|
|
16
16
|
sortOrder: z.string(),
|
|
17
17
|
isActive: z.boolean(),
|
|
18
|
-
validFrom: z.string().
|
|
19
|
-
validUntil: z.string().
|
|
18
|
+
validFrom: z.string().nullish(),
|
|
19
|
+
validUntil: z.string().nullish(),
|
|
20
20
|
});
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
} from "./common.ts";
|
|
11
11
|
|
|
12
12
|
export const ProductSelectionDraftSchema = z.object({
|
|
13
|
-
key: z.string().
|
|
13
|
+
key: z.string().nullish(),
|
|
14
14
|
name: LocalizedStringSchema,
|
|
15
|
-
custom: CustomFieldsDraftSchema.
|
|
16
|
-
type: ProductSelectionTypeEnumSchema.
|
|
17
|
-
mode: ProductSelectionModeSchema.
|
|
15
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
16
|
+
type: ProductSelectionTypeEnumSchema.nullish(),
|
|
17
|
+
mode: ProductSelectionModeSchema.nullish(),
|
|
18
18
|
});
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
} from "./common.ts";
|
|
12
12
|
|
|
13
13
|
export const ProductTailoringDraftSchema = z.object({
|
|
14
|
-
key: z.string().
|
|
14
|
+
key: z.string().nullish(),
|
|
15
15
|
store: StoreResourceIdentifierSchema,
|
|
16
16
|
product: ProductResourceIdentifierSchema,
|
|
17
|
-
name: LocalizedStringSchema.
|
|
18
|
-
description: LocalizedStringSchema.
|
|
19
|
-
metaTitle: LocalizedStringSchema.
|
|
20
|
-
metaDescription: LocalizedStringSchema.
|
|
21
|
-
metaKeywords: LocalizedStringSchema.
|
|
22
|
-
slug: LocalizedStringSchema.
|
|
23
|
-
publish: z.boolean().
|
|
24
|
-
variants: z.array(ProductVariantTailoringDraftSchema).
|
|
25
|
-
attributes: z.array(ProductTailoringAttributeSchema).
|
|
17
|
+
name: LocalizedStringSchema.nullish(),
|
|
18
|
+
description: LocalizedStringSchema.nullish(),
|
|
19
|
+
metaTitle: LocalizedStringSchema.nullish(),
|
|
20
|
+
metaDescription: LocalizedStringSchema.nullish(),
|
|
21
|
+
metaKeywords: LocalizedStringSchema.nullish(),
|
|
22
|
+
slug: LocalizedStringSchema.nullish(),
|
|
23
|
+
publish: z.boolean().nullish(),
|
|
24
|
+
variants: z.array(ProductVariantTailoringDraftSchema).nullish(),
|
|
25
|
+
attributes: z.array(ProductTailoringAttributeSchema).nullish(),
|
|
26
26
|
});
|
|
@@ -5,8 +5,8 @@ import { z } from "zod";
|
|
|
5
5
|
import { AttributeDefinitionDraftSchema } from "./common.ts";
|
|
6
6
|
|
|
7
7
|
export const ProductTypeDraftSchema = z.object({
|
|
8
|
-
key: z.string().
|
|
8
|
+
key: z.string().nullish(),
|
|
9
9
|
name: z.string(),
|
|
10
10
|
description: z.string(),
|
|
11
|
-
attributes: z.array(AttributeDefinitionDraftSchema).
|
|
11
|
+
attributes: z.array(AttributeDefinitionDraftSchema).nullish(),
|
|
12
12
|
});
|
|
@@ -19,19 +19,19 @@ export const ProductDraftSchema = z.object({
|
|
|
19
19
|
productType: ProductTypeResourceIdentifierSchema,
|
|
20
20
|
name: LocalizedStringSchema,
|
|
21
21
|
slug: LocalizedStringSchema,
|
|
22
|
-
key: z.string().
|
|
23
|
-
description: LocalizedStringSchema.
|
|
24
|
-
categories: z.array(CategoryResourceIdentifierSchema).
|
|
25
|
-
categoryOrderHints: CategoryOrderHintsSchema.
|
|
26
|
-
metaTitle: LocalizedStringSchema.
|
|
27
|
-
metaDescription: LocalizedStringSchema.
|
|
28
|
-
metaKeywords: LocalizedStringSchema.
|
|
29
|
-
masterVariant: ProductVariantDraftSchema.
|
|
30
|
-
variants: z.array(ProductVariantDraftSchema).
|
|
31
|
-
taxCategory: TaxCategoryResourceIdentifierSchema.
|
|
32
|
-
searchKeywords: SearchKeywordsSchema.
|
|
33
|
-
state: StateResourceIdentifierSchema.
|
|
34
|
-
publish: z.boolean().
|
|
35
|
-
priceMode: ProductPriceModeEnumSchema.
|
|
36
|
-
attributes: z.array(AttributeSchema).
|
|
22
|
+
key: z.string().nullish(),
|
|
23
|
+
description: LocalizedStringSchema.nullish(),
|
|
24
|
+
categories: z.array(CategoryResourceIdentifierSchema).nullish(),
|
|
25
|
+
categoryOrderHints: CategoryOrderHintsSchema.nullish(),
|
|
26
|
+
metaTitle: LocalizedStringSchema.nullish(),
|
|
27
|
+
metaDescription: LocalizedStringSchema.nullish(),
|
|
28
|
+
metaKeywords: LocalizedStringSchema.nullish(),
|
|
29
|
+
masterVariant: ProductVariantDraftSchema.nullish(),
|
|
30
|
+
variants: z.array(ProductVariantDraftSchema).nullish(),
|
|
31
|
+
taxCategory: TaxCategoryResourceIdentifierSchema.nullish(),
|
|
32
|
+
searchKeywords: SearchKeywordsSchema.nullish(),
|
|
33
|
+
state: StateResourceIdentifierSchema.nullish(),
|
|
34
|
+
publish: z.boolean().nullish(),
|
|
35
|
+
priceMode: ProductPriceModeEnumSchema.nullish(),
|
|
36
|
+
attributes: z.array(AttributeSchema).nullish(),
|
|
37
37
|
});
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
export const QuoteRequestDraftSchema = z.object({
|
|
12
12
|
cart: CartResourceIdentifierSchema,
|
|
13
13
|
cartVersion: z.number().int(),
|
|
14
|
-
key: z.string().
|
|
15
|
-
comment: z.string().
|
|
16
|
-
custom: CustomFieldsDraftSchema.
|
|
17
|
-
state: StateReferenceSchema.
|
|
18
|
-
purchaseOrderNumber: z.string().
|
|
14
|
+
key: z.string().nullish(),
|
|
15
|
+
comment: z.string().nullish(),
|
|
16
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
17
|
+
state: StateReferenceSchema.nullish(),
|
|
18
|
+
purchaseOrderNumber: z.string().nullish(),
|
|
19
19
|
});
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./common.ts";
|
|
10
10
|
|
|
11
11
|
export const QuoteDraftSchema = z.object({
|
|
12
|
-
key: z.string().
|
|
12
|
+
key: z.string().nullish(),
|
|
13
13
|
stagedQuote: StagedQuoteResourceIdentifierSchema,
|
|
14
14
|
stagedQuoteVersion: z.number().int(),
|
|
15
|
-
stagedQuoteStateToSent: z.boolean().
|
|
16
|
-
state: StateReferenceSchema.
|
|
17
|
-
custom: CustomFieldsDraftSchema.
|
|
15
|
+
stagedQuoteStateToSent: z.boolean().nullish(),
|
|
16
|
+
state: StateReferenceSchema.nullish(),
|
|
17
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
18
18
|
});
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
export const RecurrencePolicyDraftSchema = z.object({
|
|
11
11
|
key: z.string(),
|
|
12
|
-
name: LocalizedStringSchema.
|
|
13
|
-
description: LocalizedStringSchema.
|
|
12
|
+
name: LocalizedStringSchema.nullish(),
|
|
13
|
+
description: LocalizedStringSchema.nullish(),
|
|
14
14
|
schedule: RecurrencePolicyScheduleDraftSchema,
|
|
15
15
|
});
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./common.ts";
|
|
10
10
|
|
|
11
11
|
export const RecurringOrderDraftSchema = z.object({
|
|
12
|
-
key: z.string().
|
|
12
|
+
key: z.string().nullish(),
|
|
13
13
|
cart: CartResourceIdentifierSchema,
|
|
14
14
|
cartVersion: z.number().int(),
|
|
15
|
-
startsAt: z.string().
|
|
16
|
-
expiresAt: z.string().
|
|
17
|
-
state: StateResourceIdentifierSchema.
|
|
18
|
-
custom: CustomFieldsDraftSchema.
|
|
15
|
+
startsAt: z.string().nullish(),
|
|
16
|
+
expiresAt: z.string().nullish(),
|
|
17
|
+
state: StateResourceIdentifierSchema.nullish(),
|
|
18
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
19
19
|
});
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
} from "./common.ts";
|
|
11
11
|
|
|
12
12
|
export const ReviewDraftSchema = z.object({
|
|
13
|
-
key: z.string().
|
|
14
|
-
uniquenessValue: z.string().
|
|
15
|
-
locale: LocaleSchema.
|
|
16
|
-
authorName: z.string().
|
|
17
|
-
title: z.string().
|
|
18
|
-
text: z.string().
|
|
19
|
-
target: z.unknown().
|
|
20
|
-
state: StateResourceIdentifierSchema.
|
|
21
|
-
rating: z.number().int().
|
|
22
|
-
customer: CustomerResourceIdentifierSchema.
|
|
23
|
-
custom: CustomFieldsDraftSchema.
|
|
13
|
+
key: z.string().nullish(),
|
|
14
|
+
uniquenessValue: z.string().nullish(),
|
|
15
|
+
locale: LocaleSchema.nullish(),
|
|
16
|
+
authorName: z.string().nullish(),
|
|
17
|
+
title: z.string().nullish(),
|
|
18
|
+
text: z.string().nullish(),
|
|
19
|
+
target: z.unknown().nullish(),
|
|
20
|
+
state: StateResourceIdentifierSchema.nullish(),
|
|
21
|
+
rating: z.number().int().nullish(),
|
|
22
|
+
customer: CustomerResourceIdentifierSchema.nullish(),
|
|
23
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
24
24
|
});
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
} from "./common.ts";
|
|
11
11
|
|
|
12
12
|
export const ShippingMethodDraftSchema = z.object({
|
|
13
|
-
key: z.string().
|
|
13
|
+
key: z.string().nullish(),
|
|
14
14
|
name: z.string(),
|
|
15
|
-
localizedName: LocalizedStringSchema.
|
|
16
|
-
description: z.string().
|
|
17
|
-
localizedDescription: LocalizedStringSchema.
|
|
15
|
+
localizedName: LocalizedStringSchema.nullish(),
|
|
16
|
+
description: z.string().nullish(),
|
|
17
|
+
localizedDescription: LocalizedStringSchema.nullish(),
|
|
18
18
|
taxCategory: TaxCategoryResourceIdentifierSchema,
|
|
19
19
|
zoneRates: z.array(ZoneRateDraftSchema),
|
|
20
|
-
active: z.boolean().
|
|
20
|
+
active: z.boolean().nullish(),
|
|
21
21
|
isDefault: z.boolean(),
|
|
22
|
-
predicate: z.string().
|
|
23
|
-
custom: CustomFieldsDraftSchema.
|
|
22
|
+
predicate: z.string().nullish(),
|
|
23
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
24
24
|
});
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
|
|
15
15
|
export const ShoppingListDraftSchema = z.object({
|
|
16
16
|
name: LocalizedStringSchema,
|
|
17
|
-
slug: LocalizedStringSchema.
|
|
18
|
-
customer: CustomerResourceIdentifierSchema.
|
|
19
|
-
key: z.string().
|
|
20
|
-
description: LocalizedStringSchema.
|
|
21
|
-
anonymousId: z.string().
|
|
22
|
-
deleteDaysAfterLastModification: z.number().int().
|
|
23
|
-
lineItems: z.array(ShoppingListLineItemDraftSchema).
|
|
24
|
-
textLineItems: z.array(TextLineItemDraftSchema).
|
|
25
|
-
store: StoreResourceIdentifierSchema.
|
|
26
|
-
businessUnit: BusinessUnitResourceIdentifierSchema.
|
|
27
|
-
custom: CustomFieldsDraftSchema.
|
|
17
|
+
slug: LocalizedStringSchema.nullish(),
|
|
18
|
+
customer: CustomerResourceIdentifierSchema.nullish(),
|
|
19
|
+
key: z.string().nullish(),
|
|
20
|
+
description: LocalizedStringSchema.nullish(),
|
|
21
|
+
anonymousId: z.string().nullish(),
|
|
22
|
+
deleteDaysAfterLastModification: z.number().int().nullish(),
|
|
23
|
+
lineItems: z.array(ShoppingListLineItemDraftSchema).nullish(),
|
|
24
|
+
textLineItems: z.array(TextLineItemDraftSchema).nullish(),
|
|
25
|
+
store: StoreResourceIdentifierSchema.nullish(),
|
|
26
|
+
businessUnit: BusinessUnitResourceIdentifierSchema.nullish(),
|
|
27
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
28
28
|
});
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
export const StagedQuoteDraftSchema = z.object({
|
|
12
12
|
quoteRequest: QuoteRequestResourceIdentifierSchema,
|
|
13
13
|
quoteRequestVersion: z.number().int(),
|
|
14
|
-
quoteRequestStateToAccepted: z.boolean().
|
|
15
|
-
key: z.string().
|
|
16
|
-
custom: CustomFieldsDraftSchema.
|
|
17
|
-
state: StateReferenceSchema.
|
|
14
|
+
quoteRequestStateToAccepted: z.boolean().nullish(),
|
|
15
|
+
key: z.string().nullish(),
|
|
16
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
17
|
+
state: StateReferenceSchema.nullish(),
|
|
18
18
|
});
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
} from "./common.ts";
|
|
16
16
|
|
|
17
17
|
export const StandalonePriceDraftSchema = z.object({
|
|
18
|
-
key: z.string().
|
|
18
|
+
key: z.string().nullish(),
|
|
19
19
|
sku: z.string(),
|
|
20
20
|
value: MoneySchema,
|
|
21
|
-
country: CountryCodeSchema.
|
|
22
|
-
customerGroup: CustomerGroupResourceIdentifierSchema.
|
|
23
|
-
channel: ChannelResourceIdentifierSchema.
|
|
24
|
-
validFrom: z.string().
|
|
25
|
-
validUntil: z.string().
|
|
26
|
-
tiers: z.array(PriceTierDraftSchema).
|
|
27
|
-
discounted: DiscountedPriceDraftSchema.
|
|
28
|
-
custom: CustomFieldsDraftSchema.
|
|
29
|
-
recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.
|
|
30
|
-
staged: StagedPriceDraftSchema.
|
|
31
|
-
active: z.boolean().
|
|
21
|
+
country: CountryCodeSchema.nullish(),
|
|
22
|
+
customerGroup: CustomerGroupResourceIdentifierSchema.nullish(),
|
|
23
|
+
channel: ChannelResourceIdentifierSchema.nullish(),
|
|
24
|
+
validFrom: z.string().nullish(),
|
|
25
|
+
validUntil: z.string().nullish(),
|
|
26
|
+
tiers: z.array(PriceTierDraftSchema).nullish(),
|
|
27
|
+
discounted: DiscountedPriceDraftSchema.nullish(),
|
|
28
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
29
|
+
recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.nullish(),
|
|
30
|
+
staged: StagedPriceDraftSchema.nullish(),
|
|
31
|
+
active: z.boolean().nullish(),
|
|
32
32
|
});
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
export const StateDraftSchema = z.object({
|
|
13
13
|
key: z.string(),
|
|
14
14
|
type: StateTypeEnumSchema,
|
|
15
|
-
name: LocalizedStringSchema.
|
|
16
|
-
description: LocalizedStringSchema.
|
|
17
|
-
initial: z.boolean().
|
|
18
|
-
roles: z.array(StateRoleEnumSchema).
|
|
19
|
-
transitions: z.array(StateResourceIdentifierSchema).
|
|
15
|
+
name: LocalizedStringSchema.nullish(),
|
|
16
|
+
description: LocalizedStringSchema.nullish(),
|
|
17
|
+
initial: z.boolean().nullish(),
|
|
18
|
+
roles: z.array(StateRoleEnumSchema).nullish(),
|
|
19
|
+
transitions: z.array(StateResourceIdentifierSchema).nullish(),
|
|
20
20
|
});
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
|
|
14
14
|
export const StoreDraftSchema = z.object({
|
|
15
15
|
key: z.string(),
|
|
16
|
-
name: LocalizedStringSchema.
|
|
17
|
-
languages: z.array(LocaleSchema).
|
|
18
|
-
countries: z.array(StoreCountrySchema).
|
|
19
|
-
distributionChannels: z.array(ChannelResourceIdentifierSchema).
|
|
20
|
-
supplyChannels: z.array(ChannelResourceIdentifierSchema).
|
|
21
|
-
productSelections: z.array(ProductSelectionSettingDraftSchema).
|
|
22
|
-
custom: CustomFieldsDraftSchema.
|
|
16
|
+
name: LocalizedStringSchema.nullish(),
|
|
17
|
+
languages: z.array(LocaleSchema).nullish(),
|
|
18
|
+
countries: z.array(StoreCountrySchema).nullish(),
|
|
19
|
+
distributionChannels: z.array(ChannelResourceIdentifierSchema).nullish(),
|
|
20
|
+
supplyChannels: z.array(ChannelResourceIdentifierSchema).nullish(),
|
|
21
|
+
productSelections: z.array(ProductSelectionSettingDraftSchema).nullish(),
|
|
22
|
+
custom: CustomFieldsDraftSchema.nullish(),
|
|
23
23
|
});
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const SubscriptionDraftSchema = z.object({
|
|
14
14
|
destination: DestinationSchema,
|
|
15
|
-
key: z.string().
|
|
16
|
-
messages: z.array(MessageSubscriptionSchema).
|
|
17
|
-
changes: z.array(ChangeSubscriptionSchema).
|
|
18
|
-
events: z.array(EventSubscriptionSchema).
|
|
19
|
-
format: DeliveryFormatSchema.
|
|
15
|
+
key: z.string().nullish(),
|
|
16
|
+
messages: z.array(MessageSubscriptionSchema).nullish(),
|
|
17
|
+
changes: z.array(ChangeSubscriptionSchema).nullish(),
|
|
18
|
+
events: z.array(EventSubscriptionSchema).nullish(),
|
|
19
|
+
format: DeliveryFormatSchema.nullish(),
|
|
20
20
|
});
|
|
@@ -6,7 +6,7 @@ import { TaxRateDraftSchema } from "./common.ts";
|
|
|
6
6
|
|
|
7
7
|
export const TaxCategoryDraftSchema = z.object({
|
|
8
8
|
name: z.string(),
|
|
9
|
-
description: z.string().
|
|
10
|
-
rates: z.array(TaxRateDraftSchema).
|
|
11
|
-
key: z.string().
|
|
9
|
+
description: z.string().nullish(),
|
|
10
|
+
rates: z.array(TaxRateDraftSchema).nullish(),
|
|
11
|
+
key: z.string().nullish(),
|
|
12
12
|
});
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
export const TypeDraftSchema = z.object({
|
|
12
12
|
key: z.string(),
|
|
13
13
|
name: LocalizedStringSchema,
|
|
14
|
-
description: LocalizedStringSchema.
|
|
14
|
+
description: LocalizedStringSchema.nullish(),
|
|
15
15
|
resourceTypeIds: z.array(ResourceTypeIdSchema),
|
|
16
|
-
fieldDefinitions: z.array(FieldDefinitionSchema).
|
|
16
|
+
fieldDefinitions: z.array(FieldDefinitionSchema).nullish(),
|
|
17
17
|
});
|
|
@@ -5,8 +5,8 @@ import { z } from "zod";
|
|
|
5
5
|
import { LocationSchema } from "./common.ts";
|
|
6
6
|
|
|
7
7
|
export const ZoneDraftSchema = z.object({
|
|
8
|
-
key: z.string().
|
|
8
|
+
key: z.string().nullish(),
|
|
9
9
|
name: z.string(),
|
|
10
|
-
description: z.string().
|
|
11
|
-
locations: z.array(LocationSchema).
|
|
10
|
+
description: z.string().nullish(),
|
|
11
|
+
locations: z.array(LocationSchema).nullish(),
|
|
12
12
|
});
|