@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.
Files changed (43) hide show
  1. package/dist/index.mjs +551 -551
  2. package/dist/index.mjs.map +1 -1
  3. package/package.json +1 -1
  4. package/src/schemas/generated/associate-role.ts +4 -4
  5. package/src/schemas/generated/attribute-group.ts +2 -2
  6. package/src/schemas/generated/business-unit.ts +14 -14
  7. package/src/schemas/generated/cart-discount.ts +13 -13
  8. package/src/schemas/generated/cart.ts +30 -30
  9. package/src/schemas/generated/category.ts +10 -10
  10. package/src/schemas/generated/channel.ts +6 -6
  11. package/src/schemas/generated/common.ts +270 -272
  12. package/src/schemas/generated/custom-object.ts +1 -1
  13. package/src/schemas/generated/customer-group.ts +2 -2
  14. package/src/schemas/generated/customer.ts +27 -27
  15. package/src/schemas/generated/discount-code.ts +11 -11
  16. package/src/schemas/generated/discount-group.ts +3 -3
  17. package/src/schemas/generated/extension.ts +2 -2
  18. package/src/schemas/generated/inventory-entry.ts +7 -7
  19. package/src/schemas/generated/my-quote-request.ts +1 -1
  20. package/src/schemas/generated/order-edit.ts +5 -5
  21. package/src/schemas/generated/order-from-cart.ts +9 -9
  22. package/src/schemas/generated/payment.ts +14 -14
  23. package/src/schemas/generated/product-discount.ts +4 -4
  24. package/src/schemas/generated/product-selection.ts +4 -4
  25. package/src/schemas/generated/product-tailoring.ts +10 -10
  26. package/src/schemas/generated/product-type.ts +2 -2
  27. package/src/schemas/generated/product.ts +15 -15
  28. package/src/schemas/generated/quote-request.ts +5 -5
  29. package/src/schemas/generated/quote.ts +4 -4
  30. package/src/schemas/generated/recurrence-policy.ts +2 -2
  31. package/src/schemas/generated/recurring-order.ts +5 -5
  32. package/src/schemas/generated/review.ts +11 -11
  33. package/src/schemas/generated/shipping-method.ts +7 -7
  34. package/src/schemas/generated/shopping-list.ts +11 -11
  35. package/src/schemas/generated/staged-quote.ts +4 -4
  36. package/src/schemas/generated/standalone-price.ts +12 -12
  37. package/src/schemas/generated/state.ts +5 -5
  38. package/src/schemas/generated/store.ts +7 -7
  39. package/src/schemas/generated/subscription.ts +5 -5
  40. package/src/schemas/generated/tax-category.ts +3 -3
  41. package/src/schemas/generated/type.ts +2 -2
  42. package/src/schemas/generated/zone.ts +3 -3
  43. package/src/server.ts +6 -4
package/dist/index.mjs CHANGED
@@ -686,121 +686,121 @@ const CurrencyCodeSchema = z.string();
686
686
  const LocaleSchema = z.string();
687
687
  const TypeResourceIdentifierSchema = z.object({
688
688
  typeId: ReferenceTypeIdSchema,
689
- id: z.string().optional(),
690
- key: z.string().optional()
689
+ id: z.string().nullish(),
690
+ key: z.string().nullish()
691
691
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
692
692
  const FieldContainerSchema = z.record(z.string(), z.unknown());
693
693
  const CustomFieldsDraftSchema = z.object({
694
694
  type: TypeResourceIdentifierSchema,
695
- fields: FieldContainerSchema.optional()
695
+ fields: FieldContainerSchema.nullish()
696
696
  });
697
697
  const LocalizedStringSchema = z.record(z.string(), z.string());
698
698
  const AttributeReferenceSchema = z.object({ key: z.string() });
699
699
  const StoreResourceIdentifierSchema = z.object({
700
700
  typeId: ReferenceTypeIdSchema,
701
- id: z.string().optional(),
702
- key: z.string().optional()
701
+ id: z.string().nullish(),
702
+ key: z.string().nullish()
703
703
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
704
704
  const AssociateRoleResourceIdentifierSchema = z.object({
705
705
  typeId: ReferenceTypeIdSchema,
706
- id: z.string().optional(),
707
- key: z.string().optional()
706
+ id: z.string().nullish(),
707
+ key: z.string().nullish()
708
708
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
709
709
  const AssociateRoleAssignmentDraftSchema = z.object({
710
710
  associateRole: AssociateRoleResourceIdentifierSchema,
711
- inheritance: AssociateRoleInheritanceModeSchema.optional()
711
+ inheritance: AssociateRoleInheritanceModeSchema.nullish()
712
712
  });
713
713
  const CustomerResourceIdentifierSchema = z.object({
714
714
  typeId: ReferenceTypeIdSchema,
715
- id: z.string().optional(),
716
- key: z.string().optional()
715
+ id: z.string().nullish(),
716
+ key: z.string().nullish()
717
717
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
718
718
  const AssociateDraftSchema = z.object({
719
719
  associateRoleAssignments: z.array(AssociateRoleAssignmentDraftSchema),
720
- roles: z.array(AssociateRoleDeprecatedSchema).optional(),
720
+ roles: z.array(AssociateRoleDeprecatedSchema).nullish(),
721
721
  customer: CustomerResourceIdentifierSchema
722
722
  });
723
723
  const BaseAddressSchema = z.object({
724
- id: z.string().optional(),
725
- key: z.string().optional(),
724
+ id: z.string().nullish(),
725
+ key: z.string().nullish(),
726
726
  country: CountryCodeSchema,
727
- title: z.string().optional(),
728
- salutation: z.string().optional(),
729
- firstName: z.string().optional(),
730
- lastName: z.string().optional(),
731
- streetName: z.string().optional(),
732
- streetNumber: z.string().optional(),
733
- additionalStreetInfo: z.string().optional(),
734
- postalCode: z.string().optional(),
735
- city: z.string().optional(),
736
- region: z.string().optional(),
737
- state: z.string().optional(),
738
- company: z.string().optional(),
739
- department: z.string().optional(),
740
- building: z.string().optional(),
741
- apartment: z.string().optional(),
742
- pOBox: z.string().optional(),
743
- phone: z.string().optional(),
744
- mobile: z.string().optional(),
745
- email: z.string().optional(),
746
- fax: z.string().optional(),
747
- additionalAddressInfo: z.string().optional(),
748
- externalId: z.string().optional()
727
+ title: z.string().nullish(),
728
+ salutation: z.string().nullish(),
729
+ firstName: z.string().nullish(),
730
+ lastName: z.string().nullish(),
731
+ streetName: z.string().nullish(),
732
+ streetNumber: z.string().nullish(),
733
+ additionalStreetInfo: z.string().nullish(),
734
+ postalCode: z.string().nullish(),
735
+ city: z.string().nullish(),
736
+ region: z.string().nullish(),
737
+ state: z.string().nullish(),
738
+ company: z.string().nullish(),
739
+ department: z.string().nullish(),
740
+ building: z.string().nullish(),
741
+ apartment: z.string().nullish(),
742
+ pOBox: z.string().nullish(),
743
+ phone: z.string().nullish(),
744
+ mobile: z.string().nullish(),
745
+ email: z.string().nullish(),
746
+ fax: z.string().nullish(),
747
+ additionalAddressInfo: z.string().nullish(),
748
+ externalId: z.string().nullish()
749
749
  });
750
750
  const CustomerGroupResourceIdentifierSchema = z.object({
751
751
  typeId: ReferenceTypeIdSchema,
752
- id: z.string().optional(),
753
- key: z.string().optional()
752
+ id: z.string().nullish(),
753
+ key: z.string().nullish()
754
754
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
755
755
  const CustomerGroupAssignmentDraftSchema = z.object({ customerGroup: CustomerGroupResourceIdentifierSchema });
756
756
  const CompanyDraftSchema = z.object({
757
757
  key: z.string(),
758
- status: BusinessUnitStatusSchema.optional(),
759
- stores: z.array(StoreResourceIdentifierSchema).optional(),
760
- storeMode: BusinessUnitStoreModeSchema.optional(),
758
+ status: BusinessUnitStatusSchema.nullish(),
759
+ stores: z.array(StoreResourceIdentifierSchema).nullish(),
760
+ storeMode: BusinessUnitStoreModeSchema.nullish(),
761
761
  unitType: BusinessUnitTypeSchema,
762
762
  name: z.string(),
763
- contactEmail: z.string().optional(),
764
- associateMode: BusinessUnitAssociateModeSchema.optional(),
765
- associates: z.array(AssociateDraftSchema).optional(),
766
- approvalRuleMode: BusinessUnitApprovalRuleModeSchema.optional(),
767
- addresses: z.array(BaseAddressSchema).optional(),
768
- shippingAddresses: z.array(z.number().int()).optional(),
769
- defaultShippingAddress: z.number().int().optional(),
770
- billingAddresses: z.array(z.number().int()).optional(),
771
- defaultBillingAddress: z.number().int().optional(),
772
- custom: CustomFieldsDraftSchema.optional(),
773
- customerGroupAssignments: z.array(CustomerGroupAssignmentDraftSchema).optional()
763
+ contactEmail: z.string().nullish(),
764
+ associateMode: BusinessUnitAssociateModeSchema.nullish(),
765
+ associates: z.array(AssociateDraftSchema).nullish(),
766
+ approvalRuleMode: BusinessUnitApprovalRuleModeSchema.nullish(),
767
+ addresses: z.array(BaseAddressSchema).nullish(),
768
+ shippingAddresses: z.array(z.number().int()).nullish(),
769
+ defaultShippingAddress: z.number().int().nullish(),
770
+ billingAddresses: z.array(z.number().int()).nullish(),
771
+ defaultBillingAddress: z.number().int().nullish(),
772
+ custom: CustomFieldsDraftSchema.nullish(),
773
+ customerGroupAssignments: z.array(CustomerGroupAssignmentDraftSchema).nullish()
774
774
  });
775
775
  const BusinessUnitResourceIdentifierSchema = z.object({
776
776
  typeId: ReferenceTypeIdSchema,
777
- id: z.string().optional(),
778
- key: z.string().optional()
777
+ id: z.string().nullish(),
778
+ key: z.string().nullish()
779
779
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
780
780
  const DivisionDraftSchema = z.object({
781
781
  key: z.string(),
782
- status: BusinessUnitStatusSchema.optional(),
783
- stores: z.array(StoreResourceIdentifierSchema).optional(),
784
- storeMode: BusinessUnitStoreModeSchema.optional(),
782
+ status: BusinessUnitStatusSchema.nullish(),
783
+ stores: z.array(StoreResourceIdentifierSchema).nullish(),
784
+ storeMode: BusinessUnitStoreModeSchema.nullish(),
785
785
  unitType: BusinessUnitTypeSchema,
786
786
  name: z.string(),
787
- contactEmail: z.string().optional(),
788
- associateMode: BusinessUnitAssociateModeSchema.optional(),
789
- associates: z.array(AssociateDraftSchema).optional(),
790
- approvalRuleMode: BusinessUnitApprovalRuleModeSchema.optional(),
791
- addresses: z.array(BaseAddressSchema).optional(),
792
- shippingAddresses: z.array(z.number().int()).optional(),
793
- defaultShippingAddress: z.number().int().optional(),
794
- billingAddresses: z.array(z.number().int()).optional(),
795
- defaultBillingAddress: z.number().int().optional(),
796
- custom: CustomFieldsDraftSchema.optional(),
797
- customerGroupAssignments: z.array(CustomerGroupAssignmentDraftSchema).optional(),
787
+ contactEmail: z.string().nullish(),
788
+ associateMode: BusinessUnitAssociateModeSchema.nullish(),
789
+ associates: z.array(AssociateDraftSchema).nullish(),
790
+ approvalRuleMode: BusinessUnitApprovalRuleModeSchema.nullish(),
791
+ addresses: z.array(BaseAddressSchema).nullish(),
792
+ shippingAddresses: z.array(z.number().int()).nullish(),
793
+ defaultShippingAddress: z.number().int().nullish(),
794
+ billingAddresses: z.array(z.number().int()).nullish(),
795
+ defaultBillingAddress: z.number().int().nullish(),
796
+ custom: CustomFieldsDraftSchema.nullish(),
797
+ customerGroupAssignments: z.array(CustomerGroupAssignmentDraftSchema).nullish(),
798
798
  parentUnit: BusinessUnitResourceIdentifierSchema
799
799
  });
800
800
  const ChannelResourceIdentifierSchema = z.object({
801
801
  typeId: ReferenceTypeIdSchema,
802
- id: z.string().optional(),
803
- key: z.string().optional()
802
+ id: z.string().nullish(),
803
+ key: z.string().nullish()
804
804
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
805
805
  const MoneySchema = z.object({
806
806
  centAmount: z.number().int(),
@@ -816,72 +816,72 @@ const SubRateSchema = z.object({
816
816
  });
817
817
  const ExternalTaxRateDraftSchema = z.object({
818
818
  name: z.string(),
819
- amount: z.number().optional(),
820
- includedInPrice: z.boolean().optional(),
819
+ amount: z.number().nullish(),
820
+ includedInPrice: z.boolean().nullish(),
821
821
  country: CountryCodeSchema,
822
- state: z.string().optional(),
823
- subRates: z.array(SubRateSchema).optional()
822
+ state: z.string().nullish(),
823
+ subRates: z.array(SubRateSchema).nullish()
824
824
  });
825
825
  const MethodExternalTaxRateDraftSchema = z.object({
826
826
  shippingMethodKey: z.string(),
827
- taxRate: ExternalTaxRateDraftSchema.optional()
827
+ taxRate: ExternalTaxRateDraftSchema.nullish()
828
828
  });
829
829
  const ItemShippingTargetSchema = z.object({
830
830
  addressKey: z.string(),
831
831
  quantity: z.number().int(),
832
- shippingMethodKey: z.string().optional()
832
+ shippingMethodKey: z.string().nullish()
833
833
  });
834
834
  const ItemShippingDetailsDraftSchema = z.object({ targets: z.array(ItemShippingTargetSchema) });
835
835
  const RecurrencePolicyResourceIdentifierSchema = z.object({
836
836
  typeId: ReferenceTypeIdSchema,
837
- id: z.string().optional(),
838
- key: z.string().optional()
837
+ id: z.string().nullish(),
838
+ key: z.string().nullish()
839
839
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
840
840
  const LineItemRecurrenceInfoDraftSchema = z.object({
841
841
  recurrencePolicy: RecurrencePolicyResourceIdentifierSchema,
842
842
  priceSelectionMode: PriceSelectionModeSchema
843
843
  });
844
844
  const LineItemDraftSchema = z.object({
845
- key: z.string().optional(),
846
- productId: z.string().optional(),
847
- variantId: z.number().int().optional(),
848
- sku: z.string().optional(),
849
- quantity: z.number().int().optional(),
850
- addedAt: z.string().optional(),
851
- distributionChannel: ChannelResourceIdentifierSchema.optional(),
852
- supplyChannel: ChannelResourceIdentifierSchema.optional(),
853
- externalPrice: MoneySchema.optional(),
854
- externalTotalPrice: ExternalLineItemTotalPriceSchema.optional(),
855
- externalTaxRate: ExternalTaxRateDraftSchema.optional(),
856
- perMethodExternalTaxRate: z.array(MethodExternalTaxRateDraftSchema).optional(),
857
- inventoryMode: InventoryModeSchema.optional(),
858
- shippingDetails: ItemShippingDetailsDraftSchema.optional(),
859
- custom: CustomFieldsDraftSchema.optional(),
860
- recurrenceInfo: LineItemRecurrenceInfoDraftSchema.optional()
845
+ key: z.string().nullish(),
846
+ productId: z.string().nullish(),
847
+ variantId: z.number().int().nullish(),
848
+ sku: z.string().nullish(),
849
+ quantity: z.number().int().nullish(),
850
+ addedAt: z.string().nullish(),
851
+ distributionChannel: ChannelResourceIdentifierSchema.nullish(),
852
+ supplyChannel: ChannelResourceIdentifierSchema.nullish(),
853
+ externalPrice: MoneySchema.nullish(),
854
+ externalTotalPrice: ExternalLineItemTotalPriceSchema.nullish(),
855
+ externalTaxRate: ExternalTaxRateDraftSchema.nullish(),
856
+ perMethodExternalTaxRate: z.array(MethodExternalTaxRateDraftSchema).nullish(),
857
+ inventoryMode: InventoryModeSchema.nullish(),
858
+ shippingDetails: ItemShippingDetailsDraftSchema.nullish(),
859
+ custom: CustomFieldsDraftSchema.nullish(),
860
+ recurrenceInfo: LineItemRecurrenceInfoDraftSchema.nullish()
861
861
  });
862
862
  const TaxCategoryResourceIdentifierSchema = z.object({
863
863
  typeId: ReferenceTypeIdSchema,
864
- id: z.string().optional(),
865
- key: z.string().optional()
864
+ id: z.string().nullish(),
865
+ key: z.string().nullish()
866
866
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
867
867
  const CustomLineItemRecurrenceInfoDraftSchema = z.object({ recurrencePolicy: RecurrencePolicyResourceIdentifierSchema });
868
868
  const CustomLineItemDraftSchema = z.object({
869
869
  name: LocalizedStringSchema,
870
- key: z.string().optional(),
871
- quantity: z.number().int().optional(),
870
+ key: z.string().nullish(),
871
+ quantity: z.number().int().nullish(),
872
872
  money: MoneySchema,
873
873
  slug: z.string(),
874
- taxCategory: TaxCategoryResourceIdentifierSchema.optional(),
875
- externalTaxRate: ExternalTaxRateDraftSchema.optional(),
876
- custom: CustomFieldsDraftSchema.optional(),
877
- shippingDetails: ItemShippingDetailsDraftSchema.optional(),
878
- priceMode: CustomLineItemPriceModeSchema.optional(),
879
- recurrenceInfo: CustomLineItemRecurrenceInfoDraftSchema.optional()
874
+ taxCategory: TaxCategoryResourceIdentifierSchema.nullish(),
875
+ externalTaxRate: ExternalTaxRateDraftSchema.nullish(),
876
+ custom: CustomFieldsDraftSchema.nullish(),
877
+ shippingDetails: ItemShippingDetailsDraftSchema.nullish(),
878
+ priceMode: CustomLineItemPriceModeSchema.nullish(),
879
+ recurrenceInfo: CustomLineItemRecurrenceInfoDraftSchema.nullish()
880
880
  });
881
881
  const ShippingMethodResourceIdentifierSchema = z.object({
882
882
  typeId: ReferenceTypeIdSchema,
883
- id: z.string().optional(),
884
- key: z.string().optional()
883
+ id: z.string().nullish(),
884
+ key: z.string().nullish()
885
885
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
886
886
  const ClassificationShippingRateInputDraftSchema = z.object({
887
887
  type: z.string(),
@@ -896,7 +896,7 @@ const CartClassificationTierSchema = z.object({
896
896
  type: ShippingRateTierTypeSchema,
897
897
  value: z.string(),
898
898
  price: MoneySchema,
899
- isMatching: z.boolean().optional()
899
+ isMatching: z.boolean().nullish()
900
900
  });
901
901
  const PriceFunctionSchema = z.object({
902
902
  currencyCode: CurrencyCodeSchema,
@@ -905,91 +905,91 @@ const PriceFunctionSchema = z.object({
905
905
  const CartScoreTierSchema = z.object({
906
906
  type: ShippingRateTierTypeSchema,
907
907
  score: z.number().int(),
908
- price: MoneySchema.optional(),
909
- priceFunction: PriceFunctionSchema.optional(),
910
- isMatching: z.boolean().optional()
908
+ price: MoneySchema.nullish(),
909
+ priceFunction: PriceFunctionSchema.nullish(),
910
+ isMatching: z.boolean().nullish()
911
911
  });
912
912
  const CartValueTierSchema = z.object({
913
913
  type: ShippingRateTierTypeSchema,
914
914
  minimumCentAmount: z.number().int(),
915
915
  price: MoneySchema,
916
- isMatching: z.boolean().optional()
916
+ isMatching: z.boolean().nullish()
917
917
  });
918
918
  const ShippingRatePriceTierSchema = z.object({ type: ShippingRateTierTypeSchema });
919
919
  const ShippingRateDraftSchema = z.object({
920
920
  price: MoneySchema,
921
- freeAbove: MoneySchema.optional(),
922
- tiers: z.array(ShippingRatePriceTierSchema).optional()
921
+ freeAbove: MoneySchema.nullish(),
922
+ tiers: z.array(ShippingRatePriceTierSchema).nullish()
923
923
  });
924
924
  const DeliveryItemSchema = z.object({
925
925
  id: z.string(),
926
926
  quantity: z.number().int()
927
927
  });
928
928
  const ParcelMeasurementsSchema = z.object({
929
- heightInMillimeter: z.number().int().optional(),
930
- lengthInMillimeter: z.number().int().optional(),
931
- widthInMillimeter: z.number().int().optional(),
932
- weightInGram: z.number().int().optional()
929
+ heightInMillimeter: z.number().int().nullish(),
930
+ lengthInMillimeter: z.number().int().nullish(),
931
+ widthInMillimeter: z.number().int().nullish(),
932
+ weightInGram: z.number().int().nullish()
933
933
  });
934
934
  const TrackingDataSchema = z.object({
935
- trackingId: z.string().optional(),
936
- carrier: z.string().optional(),
937
- provider: z.string().optional(),
938
- providerTransaction: z.string().optional(),
939
- isReturn: z.boolean().optional()
935
+ trackingId: z.string().nullish(),
936
+ carrier: z.string().nullish(),
937
+ provider: z.string().nullish(),
938
+ providerTransaction: z.string().nullish(),
939
+ isReturn: z.boolean().nullish()
940
940
  });
941
941
  const ParcelDraftSchema = z.object({
942
- key: z.string().optional(),
943
- measurements: ParcelMeasurementsSchema.optional(),
944
- trackingData: TrackingDataSchema.optional(),
945
- items: z.array(DeliveryItemSchema).optional(),
946
- custom: CustomFieldsDraftSchema.optional()
942
+ key: z.string().nullish(),
943
+ measurements: ParcelMeasurementsSchema.nullish(),
944
+ trackingData: TrackingDataSchema.nullish(),
945
+ items: z.array(DeliveryItemSchema).nullish(),
946
+ custom: CustomFieldsDraftSchema.nullish()
947
947
  });
948
948
  const AddressDraftSchema = z.object({
949
- id: z.string().optional(),
950
- key: z.string().optional(),
949
+ id: z.string().nullish(),
950
+ key: z.string().nullish(),
951
951
  country: CountryCodeSchema,
952
- title: z.string().optional(),
953
- salutation: z.string().optional(),
954
- firstName: z.string().optional(),
955
- lastName: z.string().optional(),
956
- streetName: z.string().optional(),
957
- streetNumber: z.string().optional(),
958
- additionalStreetInfo: z.string().optional(),
959
- postalCode: z.string().optional(),
960
- city: z.string().optional(),
961
- region: z.string().optional(),
962
- state: z.string().optional(),
963
- company: z.string().optional(),
964
- department: z.string().optional(),
965
- building: z.string().optional(),
966
- apartment: z.string().optional(),
967
- pOBox: z.string().optional(),
968
- phone: z.string().optional(),
969
- mobile: z.string().optional(),
970
- email: z.string().optional(),
971
- fax: z.string().optional(),
972
- additionalAddressInfo: z.string().optional(),
973
- externalId: z.string().optional(),
974
- custom: CustomFieldsDraftSchema.optional()
952
+ title: z.string().nullish(),
953
+ salutation: z.string().nullish(),
954
+ firstName: z.string().nullish(),
955
+ lastName: z.string().nullish(),
956
+ streetName: z.string().nullish(),
957
+ streetNumber: z.string().nullish(),
958
+ additionalStreetInfo: z.string().nullish(),
959
+ postalCode: z.string().nullish(),
960
+ city: z.string().nullish(),
961
+ region: z.string().nullish(),
962
+ state: z.string().nullish(),
963
+ company: z.string().nullish(),
964
+ department: z.string().nullish(),
965
+ building: z.string().nullish(),
966
+ apartment: z.string().nullish(),
967
+ pOBox: z.string().nullish(),
968
+ phone: z.string().nullish(),
969
+ mobile: z.string().nullish(),
970
+ email: z.string().nullish(),
971
+ fax: z.string().nullish(),
972
+ additionalAddressInfo: z.string().nullish(),
973
+ externalId: z.string().nullish(),
974
+ custom: CustomFieldsDraftSchema.nullish()
975
975
  });
976
976
  const DeliveryDraftSchema = z.object({
977
- key: z.string().optional(),
978
- items: z.array(DeliveryItemSchema).optional(),
979
- parcels: z.array(ParcelDraftSchema).optional(),
980
- address: AddressDraftSchema.optional(),
981
- custom: CustomFieldsDraftSchema.optional()
977
+ key: z.string().nullish(),
978
+ items: z.array(DeliveryItemSchema).nullish(),
979
+ parcels: z.array(ParcelDraftSchema).nullish(),
980
+ address: AddressDraftSchema.nullish(),
981
+ custom: CustomFieldsDraftSchema.nullish()
982
982
  });
983
983
  const CustomShippingDraftSchema = z.object({
984
984
  key: z.string(),
985
985
  shippingMethodName: z.string(),
986
- shippingAddress: BaseAddressSchema.optional(),
986
+ shippingAddress: BaseAddressSchema.nullish(),
987
987
  shippingRate: ShippingRateDraftSchema,
988
- shippingRateInput: ShippingRateInputDraftSchema.optional(),
989
- taxCategory: TaxCategoryResourceIdentifierSchema.optional(),
990
- externalTaxRate: ExternalTaxRateDraftSchema.optional(),
991
- deliveries: z.array(DeliveryDraftSchema).optional(),
992
- custom: CustomFieldsDraftSchema.optional()
988
+ shippingRateInput: ShippingRateInputDraftSchema.nullish(),
989
+ taxCategory: TaxCategoryResourceIdentifierSchema.nullish(),
990
+ externalTaxRate: ExternalTaxRateDraftSchema.nullish(),
991
+ deliveries: z.array(DeliveryDraftSchema).nullish(),
992
+ custom: CustomFieldsDraftSchema.nullish()
993
993
  });
994
994
  const ShippingMethodReferenceSchema = z.object({
995
995
  typeId: ReferenceTypeIdSchema,
@@ -997,52 +997,52 @@ const ShippingMethodReferenceSchema = z.object({
997
997
  });
998
998
  const ShippingDraftSchema = z.object({
999
999
  key: z.string(),
1000
- shippingMethod: ShippingMethodReferenceSchema.optional(),
1000
+ shippingMethod: ShippingMethodReferenceSchema.nullish(),
1001
1001
  shippingAddress: BaseAddressSchema,
1002
- shippingRateInput: ShippingRateInputDraftSchema.optional(),
1003
- externalTaxRate: ExternalTaxRateDraftSchema.optional(),
1004
- deliveries: z.array(DeliveryDraftSchema).optional(),
1005
- custom: CustomFieldsDraftSchema.optional()
1002
+ shippingRateInput: ShippingRateInputDraftSchema.nullish(),
1003
+ externalTaxRate: ExternalTaxRateDraftSchema.nullish(),
1004
+ deliveries: z.array(DeliveryDraftSchema).nullish(),
1005
+ custom: CustomFieldsDraftSchema.nullish()
1006
1006
  });
1007
1007
  const CartDiscountValueAbsoluteDraftSchema = z.object({
1008
1008
  type: z.string(),
1009
1009
  money: z.array(MoneySchema),
1010
- applicationMode: DiscountApplicationModeSchema.optional()
1010
+ applicationMode: DiscountApplicationModeSchema.nullish()
1011
1011
  });
1012
1012
  const TypedMoneyDraftSchema = z.object({
1013
1013
  centAmount: z.number().int(),
1014
1014
  currencyCode: CurrencyCodeSchema,
1015
1015
  type: MoneyTypeSchema,
1016
- fractionDigits: z.number().int().optional()
1016
+ fractionDigits: z.number().int().nullish()
1017
1017
  });
1018
1018
  const CartDiscountValueFixedDraftSchema = z.object({
1019
1019
  type: z.string(),
1020
1020
  money: z.array(TypedMoneyDraftSchema),
1021
- applicationMode: DiscountApplicationModeSchema.optional()
1021
+ applicationMode: DiscountApplicationModeSchema.nullish()
1022
1022
  });
1023
1023
  const ProductResourceIdentifierSchema = z.object({
1024
1024
  typeId: ReferenceTypeIdSchema,
1025
- id: z.string().optional(),
1026
- key: z.string().optional()
1025
+ id: z.string().nullish(),
1026
+ key: z.string().nullish()
1027
1027
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1028
1028
  const CartDiscountValueGiftLineItemDraftSchema = z.object({
1029
1029
  type: z.string(),
1030
1030
  product: ProductResourceIdentifierSchema,
1031
1031
  variantId: z.number().int(),
1032
- supplyChannel: ChannelResourceIdentifierSchema.optional(),
1033
- distributionChannel: ChannelResourceIdentifierSchema.optional()
1032
+ supplyChannel: ChannelResourceIdentifierSchema.nullish(),
1033
+ distributionChannel: ChannelResourceIdentifierSchema.nullish()
1034
1034
  });
1035
1035
  const CartDiscountValueRelativeDraftSchema = z.object({
1036
1036
  type: z.string(),
1037
1037
  permyriad: z.number().int(),
1038
- applicationMode: DiscountApplicationModeSchema.optional()
1038
+ applicationMode: DiscountApplicationModeSchema.nullish()
1039
1039
  });
1040
1040
  const CartDiscountValueDraftSchema = z.object({ type: z.string() });
1041
1041
  const CartDiscountTargetSchema = z.object({ type: z.string() });
1042
1042
  const DiscountGroupResourceIdentifierSchema = z.object({
1043
1043
  typeId: ReferenceTypeIdSchema,
1044
- id: z.string().optional(),
1045
- key: z.string().optional()
1044
+ id: z.string().nullish(),
1045
+ key: z.string().nullish()
1046
1046
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1047
1047
  const AnyOrderDraftSchema = z.object({ type: z.string() });
1048
1048
  const ApplicableRecurrencePoliciesDraftSchema = z.object({
@@ -1054,8 +1054,8 @@ const RecurringOrdersOnlyDraftSchema = z.object({ type: z.string() });
1054
1054
  const RecurringOrderScopeDraftSchema = z.object({ type: z.string() });
1055
1055
  const CategoryResourceIdentifierSchema = z.object({
1056
1056
  typeId: ReferenceTypeIdSchema,
1057
- id: z.string().optional(),
1058
- key: z.string().optional()
1057
+ id: z.string().nullish(),
1058
+ key: z.string().nullish()
1059
1059
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1060
1060
  const AssetDimensionsSchema = z.object({
1061
1061
  w: z.number().int(),
@@ -1063,17 +1063,17 @@ const AssetDimensionsSchema = z.object({
1063
1063
  });
1064
1064
  const AssetSourceSchema = z.object({
1065
1065
  uri: z.string(),
1066
- key: z.string().optional(),
1067
- dimensions: AssetDimensionsSchema.optional(),
1068
- contentType: z.string().optional()
1066
+ key: z.string().nullish(),
1067
+ dimensions: AssetDimensionsSchema.nullish(),
1068
+ contentType: z.string().nullish()
1069
1069
  });
1070
1070
  const AssetDraftSchema = z.object({
1071
1071
  sources: z.array(AssetSourceSchema),
1072
1072
  name: LocalizedStringSchema,
1073
- description: LocalizedStringSchema.optional(),
1074
- tags: z.array(z.string()).optional(),
1075
- custom: CustomFieldsDraftSchema.optional(),
1076
- key: z.string().optional()
1073
+ description: LocalizedStringSchema.nullish(),
1074
+ tags: z.array(z.string()).nullish(),
1075
+ custom: CustomFieldsDraftSchema.nullish(),
1076
+ key: z.string().nullish()
1077
1077
  });
1078
1078
  const GeoJsonPointSchema = z.object({
1079
1079
  type: z.string(),
@@ -1085,13 +1085,13 @@ const GeoJsonSchema = z.object({
1085
1085
  });
1086
1086
  const CartResourceIdentifierSchema = z.object({
1087
1087
  typeId: ReferenceTypeIdSchema,
1088
- id: z.string().optional(),
1089
- key: z.string().optional()
1088
+ id: z.string().nullish(),
1089
+ key: z.string().nullish()
1090
1090
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1091
1091
  const CartDiscountResourceIdentifierSchema = z.object({
1092
1092
  typeId: ReferenceTypeIdSchema,
1093
- id: z.string().optional(),
1094
- key: z.string().optional()
1093
+ id: z.string().nullish(),
1094
+ key: z.string().nullish()
1095
1095
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1096
1096
  const AWSLambdaDestinationSchema = z.object({
1097
1097
  type: z.string(),
@@ -1115,13 +1115,13 @@ const HttpDestinationAuthenticationSchema = z.object({ type: z.string() });
1115
1115
  const HttpDestinationSchema = z.object({
1116
1116
  type: z.string(),
1117
1117
  url: z.string(),
1118
- authentication: HttpDestinationAuthenticationSchema.optional()
1118
+ authentication: HttpDestinationAuthenticationSchema.nullish()
1119
1119
  });
1120
1120
  const ExtensionDestinationSchema = z.object({ type: z.string() });
1121
1121
  const ExtensionTriggerSchema = z.object({
1122
1122
  resourceTypeId: ExtensionResourceTypeIdSchema,
1123
1123
  actions: z.array(ExtensionActionSchema),
1124
- condition: z.string().optional()
1124
+ condition: z.string().nullish()
1125
1125
  });
1126
1126
  const OrderReferenceSchema = z.object({
1127
1127
  typeId: ReferenceTypeIdSchema,
@@ -1130,36 +1130,36 @@ const OrderReferenceSchema = z.object({
1130
1130
  const StagedOrderUpdateActionSchema = z.object({ action: z.string() });
1131
1131
  const StateResourceIdentifierSchema = z.object({
1132
1132
  typeId: ReferenceTypeIdSchema,
1133
- id: z.string().optional(),
1134
- key: z.string().optional()
1133
+ id: z.string().nullish(),
1134
+ key: z.string().nullish()
1135
1135
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1136
1136
  const PaymentMethodTokenSchema = z.object({ value: z.string() });
1137
1137
  const PaymentMethodInfoDraftSchema = z.object({
1138
- paymentInterface: z.string().optional(),
1139
- method: z.string().optional(),
1140
- name: LocalizedStringSchema.optional(),
1141
- token: PaymentMethodTokenSchema.optional(),
1142
- interfaceAccount: z.string().optional(),
1143
- custom: CustomFieldsDraftSchema.optional()
1138
+ paymentInterface: z.string().nullish(),
1139
+ method: z.string().nullish(),
1140
+ name: LocalizedStringSchema.nullish(),
1141
+ token: PaymentMethodTokenSchema.nullish(),
1142
+ interfaceAccount: z.string().nullish(),
1143
+ custom: CustomFieldsDraftSchema.nullish()
1144
1144
  });
1145
1145
  const PaymentStatusDraftSchema = z.object({
1146
- interfaceCode: z.string().optional(),
1147
- interfaceText: z.string().optional(),
1148
- state: StateResourceIdentifierSchema.optional()
1146
+ interfaceCode: z.string().nullish(),
1147
+ interfaceText: z.string().nullish(),
1148
+ state: StateResourceIdentifierSchema.nullish()
1149
1149
  });
1150
1150
  const TransactionDraftSchema = z.object({
1151
- timestamp: z.string().optional(),
1151
+ timestamp: z.string().nullish(),
1152
1152
  type: TransactionTypeSchema,
1153
1153
  amount: MoneySchema,
1154
- interactionId: z.string().optional(),
1155
- state: TransactionStateSchema.optional(),
1156
- custom: CustomFieldsDraftSchema.optional(),
1157
- interfaceId: z.string().optional()
1154
+ interactionId: z.string().nullish(),
1155
+ state: TransactionStateSchema.nullish(),
1156
+ custom: CustomFieldsDraftSchema.nullish(),
1157
+ interfaceId: z.string().nullish()
1158
1158
  });
1159
1159
  const ProductTypeResourceIdentifierSchema = z.object({
1160
1160
  typeId: ReferenceTypeIdSchema,
1161
- id: z.string().optional(),
1162
- key: z.string().optional()
1161
+ id: z.string().nullish(),
1162
+ key: z.string().nullish()
1163
1163
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1164
1164
  const CategoryOrderHintsSchema = z.record(z.string(), z.string());
1165
1165
  const ProductDiscountReferenceSchema = z.object({
@@ -1175,17 +1175,17 @@ const PriceTierDraftSchema = z.object({
1175
1175
  value: MoneySchema
1176
1176
  });
1177
1177
  const PriceDraftSchema = z.object({
1178
- key: z.string().optional(),
1178
+ key: z.string().nullish(),
1179
1179
  value: MoneySchema,
1180
- country: CountryCodeSchema.optional(),
1181
- customerGroup: CustomerGroupResourceIdentifierSchema.optional(),
1182
- channel: ChannelResourceIdentifierSchema.optional(),
1183
- validFrom: z.string().optional(),
1184
- validUntil: z.string().optional(),
1185
- discounted: DiscountedPriceDraftSchema.optional(),
1186
- tiers: z.array(PriceTierDraftSchema).optional(),
1187
- custom: CustomFieldsDraftSchema.optional(),
1188
- recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.optional()
1180
+ country: CountryCodeSchema.nullish(),
1181
+ customerGroup: CustomerGroupResourceIdentifierSchema.nullish(),
1182
+ channel: ChannelResourceIdentifierSchema.nullish(),
1183
+ validFrom: z.string().nullish(),
1184
+ validUntil: z.string().nullish(),
1185
+ discounted: DiscountedPriceDraftSchema.nullish(),
1186
+ tiers: z.array(PriceTierDraftSchema).nullish(),
1187
+ custom: CustomFieldsDraftSchema.nullish(),
1188
+ recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.nullish()
1189
1189
  });
1190
1190
  const AttributeSchema = z.object({
1191
1191
  name: z.string(),
@@ -1198,15 +1198,15 @@ const ImageDimensionsSchema = z.object({
1198
1198
  const ImageSchema = z.object({
1199
1199
  url: z.string(),
1200
1200
  dimensions: ImageDimensionsSchema,
1201
- label: z.string().optional()
1201
+ label: z.string().nullish()
1202
1202
  });
1203
1203
  const ProductVariantDraftSchema = z.object({
1204
- sku: z.string().optional(),
1205
- key: z.string().optional(),
1206
- prices: z.array(PriceDraftSchema).optional(),
1207
- attributes: z.array(AttributeSchema).optional(),
1208
- images: z.array(ImageSchema).optional(),
1209
- assets: z.array(AssetDraftSchema).optional()
1204
+ sku: z.string().nullish(),
1205
+ key: z.string().nullish(),
1206
+ prices: z.array(PriceDraftSchema).nullish(),
1207
+ attributes: z.array(AttributeSchema).nullish(),
1208
+ images: z.array(ImageSchema).nullish(),
1209
+ assets: z.array(AssetDraftSchema).nullish()
1210
1210
  });
1211
1211
  const SearchKeywordsSchema = z.record(z.string(), z.string());
1212
1212
  const ProductDiscountValueAbsoluteDraftSchema = z.object({
@@ -1231,21 +1231,21 @@ const AssetSchema = z.object({
1231
1231
  id: z.string(),
1232
1232
  sources: z.array(AssetSourceSchema),
1233
1233
  name: LocalizedStringSchema,
1234
- description: LocalizedStringSchema.optional(),
1235
- tags: z.array(z.string()).optional(),
1236
- custom: CustomFieldsSchema.optional(),
1237
- key: z.string().optional()
1234
+ description: LocalizedStringSchema.nullish(),
1235
+ tags: z.array(z.string()).nullish(),
1236
+ custom: CustomFieldsSchema.nullish(),
1237
+ key: z.string().nullish()
1238
1238
  });
1239
1239
  const ProductTailoringAttributeSchema = z.object({
1240
1240
  name: z.string(),
1241
1241
  value: z.unknown()
1242
1242
  });
1243
1243
  const ProductVariantTailoringDraftSchema = z.object({
1244
- id: z.number().int().optional(),
1245
- sku: z.string().optional(),
1246
- images: z.array(ImageSchema).optional(),
1247
- assets: z.array(AssetSchema).optional(),
1248
- attributes: z.array(ProductTailoringAttributeSchema).optional()
1244
+ id: z.number().int().nullish(),
1245
+ sku: z.string().nullish(),
1246
+ images: z.array(ImageSchema).nullish(),
1247
+ assets: z.array(AssetSchema).nullish(),
1248
+ attributes: z.array(ProductTailoringAttributeSchema).nullish()
1249
1249
  });
1250
1250
  const AttributeTypeSchema = z.object({ name: z.string() });
1251
1251
  const AttributeDefinitionDraftSchema = z.object({
@@ -1253,16 +1253,16 @@ const AttributeDefinitionDraftSchema = z.object({
1253
1253
  name: z.string(),
1254
1254
  label: LocalizedStringSchema,
1255
1255
  isRequired: z.boolean(),
1256
- level: AttributeLevelEnumSchema.optional(),
1257
- attributeConstraint: AttributeConstraintEnumSchema.optional(),
1258
- inputTip: LocalizedStringSchema.optional(),
1259
- inputHint: TextInputHintSchema.optional(),
1260
- isSearchable: z.boolean().optional()
1256
+ level: AttributeLevelEnumSchema.nullish(),
1257
+ attributeConstraint: AttributeConstraintEnumSchema.nullish(),
1258
+ inputTip: LocalizedStringSchema.nullish(),
1259
+ inputHint: TextInputHintSchema.nullish(),
1260
+ isSearchable: z.boolean().nullish()
1261
1261
  });
1262
1262
  const StagedQuoteResourceIdentifierSchema = z.object({
1263
1263
  typeId: ReferenceTypeIdSchema,
1264
- id: z.string().optional(),
1265
- key: z.string().optional()
1264
+ id: z.string().nullish(),
1265
+ key: z.string().nullish()
1266
1266
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1267
1267
  const StateReferenceSchema = z.object({
1268
1268
  typeId: ReferenceTypeIdSchema,
@@ -1280,55 +1280,55 @@ const StandardScheduleDraftSchema = z.object({
1280
1280
  const RecurrencePolicyScheduleDraftSchema = z.object({ type: z.string() });
1281
1281
  const ZoneResourceIdentifierSchema = z.object({
1282
1282
  typeId: ReferenceTypeIdSchema,
1283
- id: z.string().optional(),
1284
- key: z.string().optional()
1283
+ id: z.string().nullish(),
1284
+ key: z.string().nullish()
1285
1285
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1286
1286
  const ZoneRateDraftSchema = z.object({
1287
1287
  zone: ZoneResourceIdentifierSchema,
1288
1288
  shippingRates: z.array(ShippingRateDraftSchema)
1289
1289
  });
1290
1290
  const ShoppingListLineItemDraftSchema = z.object({
1291
- key: z.string().optional(),
1292
- productId: z.string().optional(),
1293
- variantId: z.number().int().optional(),
1294
- sku: z.string().optional(),
1295
- addedAt: z.string().optional(),
1296
- custom: CustomFieldsDraftSchema.optional(),
1297
- quantity: z.number().int().optional()
1291
+ key: z.string().nullish(),
1292
+ productId: z.string().nullish(),
1293
+ variantId: z.number().int().nullish(),
1294
+ sku: z.string().nullish(),
1295
+ addedAt: z.string().nullish(),
1296
+ custom: CustomFieldsDraftSchema.nullish(),
1297
+ quantity: z.number().int().nullish()
1298
1298
  });
1299
1299
  const TextLineItemDraftSchema = z.object({
1300
- key: z.string().optional(),
1301
- addedAt: z.string().optional(),
1302
- custom: CustomFieldsDraftSchema.optional(),
1303
- description: LocalizedStringSchema.optional(),
1300
+ key: z.string().nullish(),
1301
+ addedAt: z.string().nullish(),
1302
+ custom: CustomFieldsDraftSchema.nullish(),
1303
+ description: LocalizedStringSchema.nullish(),
1304
1304
  name: LocalizedStringSchema,
1305
- quantity: z.number().int().optional()
1305
+ quantity: z.number().int().nullish()
1306
1306
  });
1307
1307
  const StagedPriceDraftSchema = z.object({ value: TypedMoneyDraftSchema });
1308
1308
  const QuoteRequestResourceIdentifierSchema = z.object({
1309
1309
  typeId: ReferenceTypeIdSchema,
1310
- id: z.string().optional(),
1311
- key: z.string().optional()
1310
+ id: z.string().nullish(),
1311
+ key: z.string().nullish()
1312
1312
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1313
1313
  const StoreCountrySchema = z.object({ code: CountryCodeSchema });
1314
1314
  const ProductSelectionResourceIdentifierSchema = z.object({
1315
1315
  typeId: ReferenceTypeIdSchema,
1316
- id: z.string().optional(),
1317
- key: z.string().optional()
1316
+ id: z.string().nullish(),
1317
+ key: z.string().nullish()
1318
1318
  }).refine((data) => data.id !== void 0 || data.key !== void 0, { message: "Either 'id' or 'key' must be provided" });
1319
1319
  const ProductSelectionSettingDraftSchema = z.object({
1320
1320
  productSelection: ProductSelectionResourceIdentifierSchema,
1321
- active: z.boolean().optional()
1321
+ active: z.boolean().nullish()
1322
1322
  });
1323
1323
  const DestinationSchema = z.object({ type: z.string() });
1324
1324
  const MessageSubscriptionSchema = z.object({
1325
1325
  resourceTypeId: MessageSubscriptionResourceTypeIdSchema,
1326
- types: z.array(z.string()).optional()
1326
+ types: z.array(z.string()).nullish()
1327
1327
  });
1328
1328
  const ChangeSubscriptionSchema = z.object({ resourceTypeId: ChangeSubscriptionResourceTypeIdSchema });
1329
1329
  const EventSubscriptionSchema = z.object({
1330
1330
  resourceTypeId: EventSubscriptionResourceTypeIdSchema,
1331
- types: z.array(EventTypeSchema).optional()
1331
+ types: z.array(EventTypeSchema).nullish()
1332
1332
  });
1333
1333
  const CloudEventsFormatSchema = z.object({
1334
1334
  type: z.string(),
@@ -1338,12 +1338,12 @@ const PlatformFormatSchema = z.object({ type: z.string() });
1338
1338
  const DeliveryFormatSchema = z.object({ type: z.string() });
1339
1339
  const TaxRateDraftSchema = z.object({
1340
1340
  name: z.string(),
1341
- amount: z.number().optional(),
1341
+ amount: z.number().nullish(),
1342
1342
  includedInPrice: z.boolean(),
1343
1343
  country: CountryCodeSchema,
1344
- state: z.string().optional(),
1345
- subRates: z.array(SubRateSchema).optional(),
1346
- key: z.string().optional()
1344
+ state: z.string().nullish(),
1345
+ subRates: z.array(SubRateSchema).nullish(),
1346
+ key: z.string().nullish()
1347
1347
  });
1348
1348
  const FieldTypeSchema = z.object({ name: z.string() });
1349
1349
  const FieldDefinitionSchema = z.object({
@@ -1351,28 +1351,28 @@ const FieldDefinitionSchema = z.object({
1351
1351
  name: z.string(),
1352
1352
  label: LocalizedStringSchema,
1353
1353
  required: z.boolean(),
1354
- inputHint: TypeTextInputHintSchema.optional()
1354
+ inputHint: TypeTextInputHintSchema.nullish()
1355
1355
  });
1356
1356
  const LocationSchema = z.object({
1357
1357
  country: CountryCodeSchema,
1358
- state: z.string().optional()
1358
+ state: z.string().nullish()
1359
1359
  });
1360
1360
 
1361
1361
  //#endregion
1362
1362
  //#region src/schemas/generated/product-tailoring.ts
1363
1363
  const ProductTailoringDraftSchema = z.object({
1364
- key: z.string().optional(),
1364
+ key: z.string().nullish(),
1365
1365
  store: StoreResourceIdentifierSchema,
1366
1366
  product: ProductResourceIdentifierSchema,
1367
- name: LocalizedStringSchema.optional(),
1368
- description: LocalizedStringSchema.optional(),
1369
- metaTitle: LocalizedStringSchema.optional(),
1370
- metaDescription: LocalizedStringSchema.optional(),
1371
- metaKeywords: LocalizedStringSchema.optional(),
1372
- slug: LocalizedStringSchema.optional(),
1373
- publish: z.boolean().optional(),
1374
- variants: z.array(ProductVariantTailoringDraftSchema).optional(),
1375
- attributes: z.array(ProductTailoringAttributeSchema).optional()
1367
+ name: LocalizedStringSchema.nullish(),
1368
+ description: LocalizedStringSchema.nullish(),
1369
+ metaTitle: LocalizedStringSchema.nullish(),
1370
+ metaDescription: LocalizedStringSchema.nullish(),
1371
+ metaKeywords: LocalizedStringSchema.nullish(),
1372
+ slug: LocalizedStringSchema.nullish(),
1373
+ publish: z.boolean().nullish(),
1374
+ variants: z.array(ProductVariantTailoringDraftSchema).nullish(),
1375
+ attributes: z.array(ProductTailoringAttributeSchema).nullish()
1376
1376
  });
1377
1377
 
1378
1378
  //#endregion
@@ -1915,36 +1915,36 @@ const calculateTaxedPrice = (amount, taxCategory, currency, country) => {
1915
1915
  //#region src/schemas/generated/cart.ts
1916
1916
  const CartDraftSchema = z.object({
1917
1917
  currency: CurrencyCodeSchema,
1918
- key: z.string().optional(),
1919
- customerId: z.string().optional(),
1920
- customerEmail: z.string().optional(),
1921
- customerGroup: CustomerGroupResourceIdentifierSchema.optional(),
1922
- anonymousId: z.string().optional(),
1923
- businessUnit: BusinessUnitResourceIdentifierSchema.optional(),
1924
- store: StoreResourceIdentifierSchema.optional(),
1925
- lineItems: z.array(LineItemDraftSchema).optional(),
1926
- customLineItems: z.array(CustomLineItemDraftSchema).optional(),
1927
- taxMode: TaxModeSchema.optional(),
1928
- externalTaxRateForShippingMethod: ExternalTaxRateDraftSchema.optional(),
1929
- priceRoundingMode: RoundingModeSchema.optional(),
1930
- taxRoundingMode: RoundingModeSchema.optional(),
1931
- taxCalculationMode: TaxCalculationModeSchema.optional(),
1932
- inventoryMode: InventoryModeSchema.optional(),
1933
- billingAddress: BaseAddressSchema.optional(),
1934
- shippingAddress: BaseAddressSchema.optional(),
1935
- shippingMethod: ShippingMethodResourceIdentifierSchema.optional(),
1936
- shippingRateInput: ShippingRateInputDraftSchema.optional(),
1937
- shippingMode: ShippingModeSchema.optional(),
1938
- customShipping: z.array(CustomShippingDraftSchema).optional(),
1939
- shipping: z.array(ShippingDraftSchema).optional(),
1940
- itemShippingAddresses: z.array(BaseAddressSchema).optional(),
1941
- discountCodes: z.array(z.string()).optional(),
1942
- country: CountryCodeSchema.optional(),
1943
- locale: LocaleSchema.optional(),
1944
- origin: CartOriginSchema.optional(),
1945
- deleteDaysAfterLastModification: z.number().int().optional(),
1946
- custom: CustomFieldsDraftSchema.optional(),
1947
- purchaseOrderNumber: z.string().optional()
1918
+ key: z.string().nullish(),
1919
+ customerId: z.string().nullish(),
1920
+ customerEmail: z.string().nullish(),
1921
+ customerGroup: CustomerGroupResourceIdentifierSchema.nullish(),
1922
+ anonymousId: z.string().nullish(),
1923
+ businessUnit: BusinessUnitResourceIdentifierSchema.nullish(),
1924
+ store: StoreResourceIdentifierSchema.nullish(),
1925
+ lineItems: z.array(LineItemDraftSchema).nullish(),
1926
+ customLineItems: z.array(CustomLineItemDraftSchema).nullish(),
1927
+ taxMode: TaxModeSchema.nullish(),
1928
+ externalTaxRateForShippingMethod: ExternalTaxRateDraftSchema.nullish(),
1929
+ priceRoundingMode: RoundingModeSchema.nullish(),
1930
+ taxRoundingMode: RoundingModeSchema.nullish(),
1931
+ taxCalculationMode: TaxCalculationModeSchema.nullish(),
1932
+ inventoryMode: InventoryModeSchema.nullish(),
1933
+ billingAddress: BaseAddressSchema.nullish(),
1934
+ shippingAddress: BaseAddressSchema.nullish(),
1935
+ shippingMethod: ShippingMethodResourceIdentifierSchema.nullish(),
1936
+ shippingRateInput: ShippingRateInputDraftSchema.nullish(),
1937
+ shippingMode: ShippingModeSchema.nullish(),
1938
+ customShipping: z.array(CustomShippingDraftSchema).nullish(),
1939
+ shipping: z.array(ShippingDraftSchema).nullish(),
1940
+ itemShippingAddresses: z.array(BaseAddressSchema).nullish(),
1941
+ discountCodes: z.array(z.string()).nullish(),
1942
+ country: CountryCodeSchema.nullish(),
1943
+ locale: LocaleSchema.nullish(),
1944
+ origin: CartOriginSchema.nullish(),
1945
+ deleteDaysAfterLastModification: z.number().int().nullish(),
1946
+ custom: CustomFieldsDraftSchema.nullish(),
1947
+ purchaseOrderNumber: z.string().nullish()
1948
1948
  });
1949
1949
 
1950
1950
  //#endregion
@@ -2798,16 +2798,16 @@ var OrderSearch = class {
2798
2798
  //#endregion
2799
2799
  //#region src/schemas/generated/order-from-cart.ts
2800
2800
  const OrderFromCartDraftSchema = z.object({
2801
- id: z.string().optional(),
2802
- cart: CartResourceIdentifierSchema.optional(),
2801
+ id: z.string().nullish(),
2802
+ cart: CartResourceIdentifierSchema.nullish(),
2803
2803
  version: z.number().int(),
2804
- orderNumber: z.string().optional(),
2805
- purchaseOrderNumber: z.string().optional(),
2806
- paymentState: PaymentStateSchema.optional(),
2807
- shipmentState: ShipmentStateSchema.optional(),
2808
- orderState: OrderStateSchema.optional(),
2809
- state: StateResourceIdentifierSchema.optional(),
2810
- custom: CustomFieldsDraftSchema.optional()
2804
+ orderNumber: z.string().nullish(),
2805
+ purchaseOrderNumber: z.string().nullish(),
2806
+ paymentState: PaymentStateSchema.nullish(),
2807
+ shipmentState: ShipmentStateSchema.nullish(),
2808
+ orderState: OrderStateSchema.nullish(),
2809
+ state: StateResourceIdentifierSchema.nullish(),
2810
+ custom: CustomFieldsDraftSchema.nullish()
2811
2811
  });
2812
2812
 
2813
2813
  //#endregion
@@ -3266,11 +3266,11 @@ var OrderRepository = class extends AbstractResourceRepository {
3266
3266
  const QuoteRequestDraftSchema = z.object({
3267
3267
  cart: CartResourceIdentifierSchema,
3268
3268
  cartVersion: z.number().int(),
3269
- key: z.string().optional(),
3270
- comment: z.string().optional(),
3271
- custom: CustomFieldsDraftSchema.optional(),
3272
- state: StateReferenceSchema.optional(),
3273
- purchaseOrderNumber: z.string().optional()
3269
+ key: z.string().nullish(),
3270
+ comment: z.string().nullish(),
3271
+ custom: CustomFieldsDraftSchema.nullish(),
3272
+ state: StateReferenceSchema.nullish(),
3273
+ purchaseOrderNumber: z.string().nullish()
3274
3274
  });
3275
3275
 
3276
3276
  //#endregion
@@ -3363,17 +3363,17 @@ var QuoteRequestRepository = class extends AbstractResourceRepository {
3363
3363
  //#region src/schemas/generated/shopping-list.ts
3364
3364
  const ShoppingListDraftSchema = z.object({
3365
3365
  name: LocalizedStringSchema,
3366
- slug: LocalizedStringSchema.optional(),
3367
- customer: CustomerResourceIdentifierSchema.optional(),
3368
- key: z.string().optional(),
3369
- description: LocalizedStringSchema.optional(),
3370
- anonymousId: z.string().optional(),
3371
- deleteDaysAfterLastModification: z.number().int().optional(),
3372
- lineItems: z.array(ShoppingListLineItemDraftSchema).optional(),
3373
- textLineItems: z.array(TextLineItemDraftSchema).optional(),
3374
- store: StoreResourceIdentifierSchema.optional(),
3375
- businessUnit: BusinessUnitResourceIdentifierSchema.optional(),
3376
- custom: CustomFieldsDraftSchema.optional()
3366
+ slug: LocalizedStringSchema.nullish(),
3367
+ customer: CustomerResourceIdentifierSchema.nullish(),
3368
+ key: z.string().nullish(),
3369
+ description: LocalizedStringSchema.nullish(),
3370
+ anonymousId: z.string().nullish(),
3371
+ deleteDaysAfterLastModification: z.number().int().nullish(),
3372
+ lineItems: z.array(ShoppingListLineItemDraftSchema).nullish(),
3373
+ textLineItems: z.array(TextLineItemDraftSchema).nullish(),
3374
+ store: StoreResourceIdentifierSchema.nullish(),
3375
+ businessUnit: BusinessUnitResourceIdentifierSchema.nullish(),
3376
+ custom: CustomFieldsDraftSchema.nullish()
3377
3377
  });
3378
3378
 
3379
3379
  //#endregion
@@ -3576,10 +3576,10 @@ var AsAssociateShoppingListRepository = class extends ShoppingListRepository {};
3576
3576
  //#region src/schemas/generated/associate-role.ts
3577
3577
  const AssociateRoleDraftSchema = z.object({
3578
3578
  key: z.string(),
3579
- name: z.string().optional(),
3580
- buyerAssignable: z.boolean().optional(),
3581
- permissions: z.array(PermissionSchema).optional(),
3582
- custom: CustomFieldsDraftSchema.optional()
3579
+ name: z.string().nullish(),
3580
+ buyerAssignable: z.boolean().nullish(),
3581
+ permissions: z.array(PermissionSchema).nullish(),
3582
+ custom: CustomFieldsDraftSchema.nullish()
3583
3583
  });
3584
3584
 
3585
3585
  //#endregion
@@ -3641,9 +3641,9 @@ var AssociateRoleUpdateHandler = class extends AbstractUpdateHandler {
3641
3641
  //#region src/schemas/generated/attribute-group.ts
3642
3642
  const AttributeGroupDraftSchema = z.object({
3643
3643
  name: LocalizedStringSchema,
3644
- description: LocalizedStringSchema.optional(),
3644
+ description: LocalizedStringSchema.nullish(),
3645
3645
  attributes: z.array(AttributeReferenceSchema),
3646
- key: z.string().optional()
3646
+ key: z.string().nullish()
3647
3647
  });
3648
3648
 
3649
3649
  //#endregion
@@ -3684,22 +3684,22 @@ var AttributeGroupUpdateHandler = class extends AbstractUpdateHandler {
3684
3684
  //#region src/schemas/generated/business-unit.ts
3685
3685
  const BusinessUnitDraftSchema = z.object({
3686
3686
  key: z.string(),
3687
- status: BusinessUnitStatusSchema.optional(),
3688
- stores: z.array(StoreResourceIdentifierSchema).optional(),
3689
- storeMode: BusinessUnitStoreModeSchema.optional(),
3687
+ status: BusinessUnitStatusSchema.nullish(),
3688
+ stores: z.array(StoreResourceIdentifierSchema).nullish(),
3689
+ storeMode: BusinessUnitStoreModeSchema.nullish(),
3690
3690
  unitType: BusinessUnitTypeSchema,
3691
3691
  name: z.string(),
3692
- contactEmail: z.string().optional(),
3693
- associateMode: BusinessUnitAssociateModeSchema.optional(),
3694
- associates: z.array(AssociateDraftSchema).optional(),
3695
- approvalRuleMode: BusinessUnitApprovalRuleModeSchema.optional(),
3696
- addresses: z.array(BaseAddressSchema).optional(),
3697
- shippingAddresses: z.array(z.number().int()).optional(),
3698
- defaultShippingAddress: z.number().int().optional(),
3699
- billingAddresses: z.array(z.number().int()).optional(),
3700
- defaultBillingAddress: z.number().int().optional(),
3701
- custom: CustomFieldsDraftSchema.optional(),
3702
- customerGroupAssignments: z.array(CustomerGroupAssignmentDraftSchema).optional()
3692
+ contactEmail: z.string().nullish(),
3693
+ associateMode: BusinessUnitAssociateModeSchema.nullish(),
3694
+ associates: z.array(AssociateDraftSchema).nullish(),
3695
+ approvalRuleMode: BusinessUnitApprovalRuleModeSchema.nullish(),
3696
+ addresses: z.array(BaseAddressSchema).nullish(),
3697
+ shippingAddresses: z.array(z.number().int()).nullish(),
3698
+ defaultShippingAddress: z.number().int().nullish(),
3699
+ billingAddresses: z.array(z.number().int()).nullish(),
3700
+ defaultBillingAddress: z.number().int().nullish(),
3701
+ custom: CustomFieldsDraftSchema.nullish(),
3702
+ customerGroupAssignments: z.array(CustomerGroupAssignmentDraftSchema).nullish()
3703
3703
  });
3704
3704
 
3705
3705
  //#endregion
@@ -3952,21 +3952,21 @@ var BusinessUnitUpdateHandler = class extends AbstractUpdateHandler {
3952
3952
  //#region src/schemas/generated/cart-discount.ts
3953
3953
  const CartDiscountDraftSchema = z.object({
3954
3954
  name: LocalizedStringSchema,
3955
- key: z.string().optional(),
3956
- description: LocalizedStringSchema.optional(),
3955
+ key: z.string().nullish(),
3956
+ description: LocalizedStringSchema.nullish(),
3957
3957
  value: CartDiscountValueDraftSchema,
3958
3958
  cartPredicate: z.string(),
3959
- target: CartDiscountTargetSchema.optional(),
3960
- sortOrder: z.string().optional(),
3961
- stores: z.array(StoreResourceIdentifierSchema).optional(),
3962
- isActive: z.boolean().optional(),
3963
- validFrom: z.string().optional(),
3964
- validUntil: z.string().optional(),
3965
- requiresDiscountCode: z.boolean().optional(),
3966
- stackingMode: StackingModeSchema.optional(),
3967
- custom: CustomFieldsDraftSchema.optional(),
3968
- discountGroup: DiscountGroupResourceIdentifierSchema.optional(),
3969
- recurringOrderScope: RecurringOrderScopeDraftSchema.optional()
3959
+ target: CartDiscountTargetSchema.nullish(),
3960
+ sortOrder: z.string().nullish(),
3961
+ stores: z.array(StoreResourceIdentifierSchema).nullish(),
3962
+ isActive: z.boolean().nullish(),
3963
+ validFrom: z.string().nullish(),
3964
+ validUntil: z.string().nullish(),
3965
+ requiresDiscountCode: z.boolean().nullish(),
3966
+ stackingMode: StackingModeSchema.nullish(),
3967
+ custom: CustomFieldsDraftSchema.nullish(),
3968
+ discountGroup: DiscountGroupResourceIdentifierSchema.nullish(),
3969
+ recurringOrderScope: RecurringOrderScopeDraftSchema.nullish()
3970
3970
  });
3971
3971
 
3972
3972
  //#endregion
@@ -4066,16 +4066,16 @@ var CartDiscountRepository = class extends AbstractResourceRepository {
4066
4066
  const CategoryDraftSchema = z.object({
4067
4067
  name: LocalizedStringSchema,
4068
4068
  slug: LocalizedStringSchema,
4069
- description: LocalizedStringSchema.optional(),
4070
- parent: CategoryResourceIdentifierSchema.optional(),
4071
- orderHint: z.string().optional(),
4072
- externalId: z.string().optional(),
4073
- metaTitle: LocalizedStringSchema.optional(),
4074
- metaDescription: LocalizedStringSchema.optional(),
4075
- metaKeywords: LocalizedStringSchema.optional(),
4076
- custom: CustomFieldsDraftSchema.optional(),
4077
- assets: z.array(AssetDraftSchema).optional(),
4078
- key: z.string().optional()
4069
+ description: LocalizedStringSchema.nullish(),
4070
+ parent: CategoryResourceIdentifierSchema.nullish(),
4071
+ orderHint: z.string().nullish(),
4072
+ externalId: z.string().nullish(),
4073
+ metaTitle: LocalizedStringSchema.nullish(),
4074
+ metaDescription: LocalizedStringSchema.nullish(),
4075
+ metaKeywords: LocalizedStringSchema.nullish(),
4076
+ custom: CustomFieldsDraftSchema.nullish(),
4077
+ assets: z.array(AssetDraftSchema).nullish(),
4078
+ key: z.string().nullish()
4079
4079
  });
4080
4080
 
4081
4081
  //#endregion
@@ -4224,12 +4224,12 @@ var CategoryRepository = class extends AbstractResourceRepository {
4224
4224
  //#region src/schemas/generated/channel.ts
4225
4225
  const ChannelDraftSchema = z.object({
4226
4226
  key: z.string(),
4227
- roles: z.array(ChannelRoleEnumSchema).optional(),
4228
- name: LocalizedStringSchema.optional(),
4229
- description: LocalizedStringSchema.optional(),
4230
- address: BaseAddressSchema.optional(),
4231
- custom: CustomFieldsDraftSchema.optional(),
4232
- geoLocation: GeoJsonSchema.optional()
4227
+ roles: z.array(ChannelRoleEnumSchema).nullish(),
4228
+ name: LocalizedStringSchema.nullish(),
4229
+ description: LocalizedStringSchema.nullish(),
4230
+ address: BaseAddressSchema.nullish(),
4231
+ custom: CustomFieldsDraftSchema.nullish(),
4232
+ geoLocation: GeoJsonSchema.nullish()
4233
4233
  });
4234
4234
 
4235
4235
  //#endregion
@@ -4290,7 +4290,7 @@ const CustomObjectDraftSchema = z.object({
4290
4290
  container: z.string(),
4291
4291
  key: z.string(),
4292
4292
  value: z.unknown(),
4293
- version: z.number().int().optional()
4293
+ version: z.number().int().nullish()
4294
4294
  });
4295
4295
 
4296
4296
  //#endregion
@@ -4344,34 +4344,34 @@ var CustomObjectRepository = class extends AbstractResourceRepository {
4344
4344
  //#endregion
4345
4345
  //#region src/schemas/generated/customer.ts
4346
4346
  const CustomerDraftSchema = z.object({
4347
- key: z.string().optional(),
4348
- customerNumber: z.string().optional(),
4349
- externalId: z.string().optional(),
4347
+ key: z.string().nullish(),
4348
+ customerNumber: z.string().nullish(),
4349
+ externalId: z.string().nullish(),
4350
4350
  email: z.string(),
4351
- password: z.string().optional(),
4352
- firstName: z.string().optional(),
4353
- lastName: z.string().optional(),
4354
- middleName: z.string().optional(),
4355
- title: z.string().optional(),
4356
- anonymousCartId: z.string().optional(),
4357
- anonymousCart: CartResourceIdentifierSchema.optional(),
4358
- anonymousId: z.string().optional(),
4359
- dateOfBirth: z.string().optional(),
4360
- companyName: z.string().optional(),
4361
- vatId: z.string().optional(),
4362
- addresses: z.array(BaseAddressSchema).optional(),
4363
- defaultShippingAddress: z.number().int().optional(),
4364
- shippingAddresses: z.array(z.number().int()).optional(),
4365
- defaultBillingAddress: z.number().int().optional(),
4366
- billingAddresses: z.array(z.number().int()).optional(),
4367
- isEmailVerified: z.boolean().optional(),
4368
- customerGroup: CustomerGroupResourceIdentifierSchema.optional(),
4369
- customerGroupAssignments: z.array(CustomerGroupAssignmentDraftSchema).optional(),
4370
- custom: CustomFieldsDraftSchema.optional(),
4371
- locale: LocaleSchema.optional(),
4372
- salutation: z.string().optional(),
4373
- stores: z.array(StoreResourceIdentifierSchema).optional(),
4374
- authenticationMode: AuthenticationModeSchema.optional()
4351
+ password: z.string().nullish(),
4352
+ firstName: z.string().nullish(),
4353
+ lastName: z.string().nullish(),
4354
+ middleName: z.string().nullish(),
4355
+ title: z.string().nullish(),
4356
+ anonymousCartId: z.string().nullish(),
4357
+ anonymousCart: CartResourceIdentifierSchema.nullish(),
4358
+ anonymousId: z.string().nullish(),
4359
+ dateOfBirth: z.string().nullish(),
4360
+ companyName: z.string().nullish(),
4361
+ vatId: z.string().nullish(),
4362
+ addresses: z.array(BaseAddressSchema).nullish(),
4363
+ defaultShippingAddress: z.number().int().nullish(),
4364
+ shippingAddresses: z.array(z.number().int()).nullish(),
4365
+ defaultBillingAddress: z.number().int().nullish(),
4366
+ billingAddresses: z.array(z.number().int()).nullish(),
4367
+ isEmailVerified: z.boolean().nullish(),
4368
+ customerGroup: CustomerGroupResourceIdentifierSchema.nullish(),
4369
+ customerGroupAssignments: z.array(CustomerGroupAssignmentDraftSchema).nullish(),
4370
+ custom: CustomFieldsDraftSchema.nullish(),
4371
+ locale: LocaleSchema.nullish(),
4372
+ salutation: z.string().nullish(),
4373
+ stores: z.array(StoreResourceIdentifierSchema).nullish(),
4374
+ authenticationMode: AuthenticationModeSchema.nullish()
4375
4375
  });
4376
4376
 
4377
4377
  //#endregion
@@ -4757,9 +4757,9 @@ var CustomerRepository = class extends AbstractResourceRepository {
4757
4757
  //#endregion
4758
4758
  //#region src/schemas/generated/customer-group.ts
4759
4759
  const CustomerGroupDraftSchema = z.object({
4760
- key: z.string().optional(),
4760
+ key: z.string().nullish(),
4761
4761
  groupName: z.string(),
4762
- custom: CustomFieldsDraftSchema.optional()
4762
+ custom: CustomFieldsDraftSchema.nullish()
4763
4763
  });
4764
4764
 
4765
4765
  //#endregion
@@ -4804,19 +4804,19 @@ var CustomerGroupUpdateHandler = class extends AbstractUpdateHandler {
4804
4804
  //#endregion
4805
4805
  //#region src/schemas/generated/discount-code.ts
4806
4806
  const DiscountCodeDraftSchema = z.object({
4807
- key: z.string().optional(),
4808
- name: LocalizedStringSchema.optional(),
4809
- description: LocalizedStringSchema.optional(),
4807
+ key: z.string().nullish(),
4808
+ name: LocalizedStringSchema.nullish(),
4809
+ description: LocalizedStringSchema.nullish(),
4810
4810
  code: z.string(),
4811
4811
  cartDiscounts: z.array(CartDiscountResourceIdentifierSchema),
4812
- cartPredicate: z.string().optional(),
4813
- isActive: z.boolean().optional(),
4814
- maxApplications: z.number().int().optional(),
4815
- maxApplicationsPerCustomer: z.number().int().optional(),
4816
- custom: CustomFieldsDraftSchema.optional(),
4817
- groups: z.array(z.string()).optional(),
4818
- validFrom: z.string().optional(),
4819
- validUntil: z.string().optional()
4812
+ cartPredicate: z.string().nullish(),
4813
+ isActive: z.boolean().nullish(),
4814
+ maxApplications: z.number().int().nullish(),
4815
+ maxApplicationsPerCustomer: z.number().int().nullish(),
4816
+ custom: CustomFieldsDraftSchema.nullish(),
4817
+ groups: z.array(z.string()).nullish(),
4818
+ validFrom: z.string().nullish(),
4819
+ validUntil: z.string().nullish()
4820
4820
  });
4821
4821
 
4822
4822
  //#endregion
@@ -4906,11 +4906,11 @@ var DiscountCodeRepository = class extends AbstractResourceRepository {
4906
4906
  //#endregion
4907
4907
  //#region src/schemas/generated/discount-group.ts
4908
4908
  const DiscountGroupDraftSchema = z.object({
4909
- name: LocalizedStringSchema.optional(),
4909
+ name: LocalizedStringSchema.nullish(),
4910
4910
  key: z.string(),
4911
- description: LocalizedStringSchema.optional(),
4911
+ description: LocalizedStringSchema.nullish(),
4912
4912
  sortOrder: z.string(),
4913
- isActive: z.boolean().optional()
4913
+ isActive: z.boolean().nullish()
4914
4914
  });
4915
4915
 
4916
4916
  //#endregion
@@ -4954,10 +4954,10 @@ var DiscountGroupRepository = class extends AbstractResourceRepository {
4954
4954
  //#endregion
4955
4955
  //#region src/schemas/generated/extension.ts
4956
4956
  const ExtensionDraftSchema = z.object({
4957
- key: z.string().optional(),
4957
+ key: z.string().nullish(),
4958
4958
  destination: ExtensionDestinationSchema,
4959
4959
  triggers: z.array(ExtensionTriggerSchema),
4960
- timeoutInMs: z.number().int().optional()
4960
+ timeoutInMs: z.number().int().nullish()
4961
4961
  });
4962
4962
 
4963
4963
  //#endregion
@@ -5021,14 +5021,14 @@ var ExtensionUpdateHandler = class extends AbstractUpdateHandler {
5021
5021
  //#region src/schemas/generated/inventory-entry.ts
5022
5022
  const InventoryEntryDraftSchema = z.object({
5023
5023
  sku: z.string(),
5024
- key: z.string().optional(),
5025
- supplyChannel: ChannelResourceIdentifierSchema.optional(),
5024
+ key: z.string().nullish(),
5025
+ supplyChannel: ChannelResourceIdentifierSchema.nullish(),
5026
5026
  quantityOnStock: z.number().int(),
5027
- minCartQuantity: z.number().int().optional(),
5028
- maxCartQuantity: z.number().int().optional(),
5029
- restockableInDays: z.number().int().optional(),
5030
- expectedDelivery: z.string().optional(),
5031
- custom: CustomFieldsDraftSchema.optional()
5027
+ minCartQuantity: z.number().int().nullish(),
5028
+ maxCartQuantity: z.number().int().nullish(),
5029
+ restockableInDays: z.number().int().nullish(),
5030
+ expectedDelivery: z.string().nullish(),
5031
+ custom: CustomFieldsDraftSchema.nullish()
5032
5032
  });
5033
5033
 
5034
5034
  //#endregion
@@ -5150,12 +5150,12 @@ var MyOrderRepository = class extends OrderRepository {
5150
5150
  //#endregion
5151
5151
  //#region src/schemas/generated/order-edit.ts
5152
5152
  const OrderEditDraftSchema = z.object({
5153
- key: z.string().optional(),
5153
+ key: z.string().nullish(),
5154
5154
  resource: OrderReferenceSchema,
5155
- stagedActions: z.array(StagedOrderUpdateActionSchema).optional(),
5156
- custom: CustomFieldsDraftSchema.optional(),
5157
- comment: z.string().optional(),
5158
- dryRun: z.boolean().optional()
5155
+ stagedActions: z.array(StagedOrderUpdateActionSchema).nullish(),
5156
+ custom: CustomFieldsDraftSchema.nullish(),
5157
+ comment: z.string().nullish(),
5158
+ dryRun: z.boolean().nullish()
5159
5159
  });
5160
5160
 
5161
5161
  //#endregion
@@ -5179,21 +5179,21 @@ var OrderEditRepository = class extends AbstractResourceRepository {
5179
5179
  //#endregion
5180
5180
  //#region src/schemas/generated/payment.ts
5181
5181
  const PaymentDraftSchema = z.object({
5182
- customer: CustomerResourceIdentifierSchema.optional(),
5183
- anonymousId: z.string().optional(),
5184
- externalId: z.string().optional(),
5185
- interfaceId: z.string().optional(),
5182
+ customer: CustomerResourceIdentifierSchema.nullish(),
5183
+ anonymousId: z.string().nullish(),
5184
+ externalId: z.string().nullish(),
5185
+ interfaceId: z.string().nullish(),
5186
5186
  amountPlanned: MoneySchema,
5187
- amountAuthorized: MoneySchema.optional(),
5188
- authorizedUntil: z.string().optional(),
5189
- amountPaid: MoneySchema.optional(),
5190
- amountRefunded: MoneySchema.optional(),
5191
- paymentMethodInfo: PaymentMethodInfoDraftSchema.optional(),
5192
- paymentStatus: PaymentStatusDraftSchema.optional(),
5193
- transactions: z.array(TransactionDraftSchema).optional(),
5194
- interfaceInteractions: z.array(CustomFieldsDraftSchema).optional(),
5195
- custom: CustomFieldsDraftSchema.optional(),
5196
- key: z.string().optional()
5187
+ amountAuthorized: MoneySchema.nullish(),
5188
+ authorizedUntil: z.string().nullish(),
5189
+ amountPaid: MoneySchema.nullish(),
5190
+ amountRefunded: MoneySchema.nullish(),
5191
+ paymentMethodInfo: PaymentMethodInfoDraftSchema.nullish(),
5192
+ paymentStatus: PaymentStatusDraftSchema.nullish(),
5193
+ transactions: z.array(TransactionDraftSchema).nullish(),
5194
+ interfaceInteractions: z.array(CustomFieldsDraftSchema).nullish(),
5195
+ custom: CustomFieldsDraftSchema.nullish(),
5196
+ key: z.string().nullish()
5197
5197
  });
5198
5198
 
5199
5199
  //#endregion
@@ -5833,21 +5833,21 @@ const ProductDraftSchema = z.object({
5833
5833
  productType: ProductTypeResourceIdentifierSchema,
5834
5834
  name: LocalizedStringSchema,
5835
5835
  slug: LocalizedStringSchema,
5836
- key: z.string().optional(),
5837
- description: LocalizedStringSchema.optional(),
5838
- categories: z.array(CategoryResourceIdentifierSchema).optional(),
5839
- categoryOrderHints: CategoryOrderHintsSchema.optional(),
5840
- metaTitle: LocalizedStringSchema.optional(),
5841
- metaDescription: LocalizedStringSchema.optional(),
5842
- metaKeywords: LocalizedStringSchema.optional(),
5843
- masterVariant: ProductVariantDraftSchema.optional(),
5844
- variants: z.array(ProductVariantDraftSchema).optional(),
5845
- taxCategory: TaxCategoryResourceIdentifierSchema.optional(),
5846
- searchKeywords: SearchKeywordsSchema.optional(),
5847
- state: StateResourceIdentifierSchema.optional(),
5848
- publish: z.boolean().optional(),
5849
- priceMode: ProductPriceModeEnumSchema.optional(),
5850
- attributes: z.array(AttributeSchema).optional()
5836
+ key: z.string().nullish(),
5837
+ description: LocalizedStringSchema.nullish(),
5838
+ categories: z.array(CategoryResourceIdentifierSchema).nullish(),
5839
+ categoryOrderHints: CategoryOrderHintsSchema.nullish(),
5840
+ metaTitle: LocalizedStringSchema.nullish(),
5841
+ metaDescription: LocalizedStringSchema.nullish(),
5842
+ metaKeywords: LocalizedStringSchema.nullish(),
5843
+ masterVariant: ProductVariantDraftSchema.nullish(),
5844
+ variants: z.array(ProductVariantDraftSchema).nullish(),
5845
+ taxCategory: TaxCategoryResourceIdentifierSchema.nullish(),
5846
+ searchKeywords: SearchKeywordsSchema.nullish(),
5847
+ state: StateResourceIdentifierSchema.nullish(),
5848
+ publish: z.boolean().nullish(),
5849
+ priceMode: ProductPriceModeEnumSchema.nullish(),
5850
+ attributes: z.array(AttributeSchema).nullish()
5851
5851
  });
5852
5852
 
5853
5853
  //#endregion
@@ -6364,14 +6364,14 @@ var ProductRepository = class extends AbstractResourceRepository {
6364
6364
  //#region src/schemas/generated/product-discount.ts
6365
6365
  const ProductDiscountDraftSchema = z.object({
6366
6366
  name: LocalizedStringSchema,
6367
- key: z.string().optional(),
6368
- description: LocalizedStringSchema.optional(),
6367
+ key: z.string().nullish(),
6368
+ description: LocalizedStringSchema.nullish(),
6369
6369
  value: ProductDiscountValueDraftSchema,
6370
6370
  predicate: z.string(),
6371
6371
  sortOrder: z.string(),
6372
6372
  isActive: z.boolean(),
6373
- validFrom: z.string().optional(),
6374
- validUntil: z.string().optional()
6373
+ validFrom: z.string().nullish(),
6374
+ validUntil: z.string().nullish()
6375
6375
  });
6376
6376
 
6377
6377
  //#endregion
@@ -6700,11 +6700,11 @@ var ProductProjectionRepository = class extends AbstractResourceRepository {
6700
6700
  //#endregion
6701
6701
  //#region src/schemas/generated/product-selection.ts
6702
6702
  const ProductSelectionDraftSchema = z.object({
6703
- key: z.string().optional(),
6703
+ key: z.string().nullish(),
6704
6704
  name: LocalizedStringSchema,
6705
- custom: CustomFieldsDraftSchema.optional(),
6706
- type: ProductSelectionTypeEnumSchema.optional(),
6707
- mode: ProductSelectionModeSchema.optional()
6705
+ custom: CustomFieldsDraftSchema.nullish(),
6706
+ type: ProductSelectionTypeEnumSchema.nullish(),
6707
+ mode: ProductSelectionModeSchema.nullish()
6708
6708
  });
6709
6709
 
6710
6710
  //#endregion
@@ -6741,10 +6741,10 @@ var ProductSelectionUpdateHandler = class extends AbstractUpdateHandler {
6741
6741
  //#endregion
6742
6742
  //#region src/schemas/generated/product-type.ts
6743
6743
  const ProductTypeDraftSchema = z.object({
6744
- key: z.string().optional(),
6744
+ key: z.string().nullish(),
6745
6745
  name: z.string(),
6746
6746
  description: z.string(),
6747
- attributes: z.array(AttributeDefinitionDraftSchema).optional()
6747
+ attributes: z.array(AttributeDefinitionDraftSchema).nullish()
6748
6748
  });
6749
6749
 
6750
6750
  //#endregion
@@ -6965,12 +6965,12 @@ var ProjectUpdateHandler = class extends AbstractUpdateHandler {
6965
6965
  //#endregion
6966
6966
  //#region src/schemas/generated/quote.ts
6967
6967
  const QuoteDraftSchema = z.object({
6968
- key: z.string().optional(),
6968
+ key: z.string().nullish(),
6969
6969
  stagedQuote: StagedQuoteResourceIdentifierSchema,
6970
6970
  stagedQuoteVersion: z.number().int(),
6971
- stagedQuoteStateToSent: z.boolean().optional(),
6972
- state: StateReferenceSchema.optional(),
6973
- custom: CustomFieldsDraftSchema.optional()
6971
+ stagedQuoteStateToSent: z.boolean().nullish(),
6972
+ state: StateReferenceSchema.nullish(),
6973
+ custom: CustomFieldsDraftSchema.nullish()
6974
6974
  });
6975
6975
 
6976
6976
  //#endregion
@@ -7051,10 +7051,10 @@ var QuoteRepository = class extends AbstractResourceRepository {
7051
7051
  const StagedQuoteDraftSchema = z.object({
7052
7052
  quoteRequest: QuoteRequestResourceIdentifierSchema,
7053
7053
  quoteRequestVersion: z.number().int(),
7054
- quoteRequestStateToAccepted: z.boolean().optional(),
7055
- key: z.string().optional(),
7056
- custom: CustomFieldsDraftSchema.optional(),
7057
- state: StateReferenceSchema.optional()
7054
+ quoteRequestStateToAccepted: z.boolean().nullish(),
7055
+ key: z.string().nullish(),
7056
+ custom: CustomFieldsDraftSchema.nullish(),
7057
+ state: StateReferenceSchema.nullish()
7058
7058
  });
7059
7059
 
7060
7060
  //#endregion
@@ -7119,8 +7119,8 @@ var StagedQuoteRepository = class extends AbstractResourceRepository {
7119
7119
  //#region src/schemas/generated/recurrence-policy.ts
7120
7120
  const RecurrencePolicyDraftSchema = z.object({
7121
7121
  key: z.string(),
7122
- name: LocalizedStringSchema.optional(),
7123
- description: LocalizedStringSchema.optional(),
7122
+ name: LocalizedStringSchema.nullish(),
7123
+ description: LocalizedStringSchema.nullish(),
7124
7124
  schedule: RecurrencePolicyScheduleDraftSchema
7125
7125
  });
7126
7126
 
@@ -7164,13 +7164,13 @@ var RecurrencePolicyRepository = class extends AbstractResourceRepository {
7164
7164
  //#endregion
7165
7165
  //#region src/schemas/generated/recurring-order.ts
7166
7166
  const RecurringOrderDraftSchema = z.object({
7167
- key: z.string().optional(),
7167
+ key: z.string().nullish(),
7168
7168
  cart: CartResourceIdentifierSchema,
7169
7169
  cartVersion: z.number().int(),
7170
- startsAt: z.string().optional(),
7171
- expiresAt: z.string().optional(),
7172
- state: StateResourceIdentifierSchema.optional(),
7173
- custom: CustomFieldsDraftSchema.optional()
7170
+ startsAt: z.string().nullish(),
7171
+ expiresAt: z.string().nullish(),
7172
+ state: StateResourceIdentifierSchema.nullish(),
7173
+ custom: CustomFieldsDraftSchema.nullish()
7174
7174
  });
7175
7175
 
7176
7176
  //#endregion
@@ -7279,17 +7279,17 @@ var RecurringOrderRepository = class extends AbstractResourceRepository {
7279
7279
  //#endregion
7280
7280
  //#region src/schemas/generated/review.ts
7281
7281
  const ReviewDraftSchema = z.object({
7282
- key: z.string().optional(),
7283
- uniquenessValue: z.string().optional(),
7284
- locale: LocaleSchema.optional(),
7285
- authorName: z.string().optional(),
7286
- title: z.string().optional(),
7287
- text: z.string().optional(),
7288
- target: z.unknown().optional(),
7289
- state: StateResourceIdentifierSchema.optional(),
7290
- rating: z.number().int().optional(),
7291
- customer: CustomerResourceIdentifierSchema.optional(),
7292
- custom: CustomFieldsDraftSchema.optional()
7282
+ key: z.string().nullish(),
7283
+ uniquenessValue: z.string().nullish(),
7284
+ locale: LocaleSchema.nullish(),
7285
+ authorName: z.string().nullish(),
7286
+ title: z.string().nullish(),
7287
+ text: z.string().nullish(),
7288
+ target: z.unknown().nullish(),
7289
+ state: StateResourceIdentifierSchema.nullish(),
7290
+ rating: z.number().int().nullish(),
7291
+ customer: CustomerResourceIdentifierSchema.nullish(),
7292
+ custom: CustomFieldsDraftSchema.nullish()
7293
7293
  });
7294
7294
 
7295
7295
  //#endregion
@@ -7368,17 +7368,17 @@ var ReviewUpdateHandler = class extends AbstractUpdateHandler {
7368
7368
  //#endregion
7369
7369
  //#region src/schemas/generated/shipping-method.ts
7370
7370
  const ShippingMethodDraftSchema = z.object({
7371
- key: z.string().optional(),
7371
+ key: z.string().nullish(),
7372
7372
  name: z.string(),
7373
- localizedName: LocalizedStringSchema.optional(),
7374
- description: z.string().optional(),
7375
- localizedDescription: LocalizedStringSchema.optional(),
7373
+ localizedName: LocalizedStringSchema.nullish(),
7374
+ description: z.string().nullish(),
7375
+ localizedDescription: LocalizedStringSchema.nullish(),
7376
7376
  taxCategory: TaxCategoryResourceIdentifierSchema,
7377
7377
  zoneRates: z.array(ZoneRateDraftSchema),
7378
- active: z.boolean().optional(),
7378
+ active: z.boolean().nullish(),
7379
7379
  isDefault: z.boolean(),
7380
- predicate: z.string().optional(),
7381
- custom: CustomFieldsDraftSchema.optional()
7380
+ predicate: z.string().nullish(),
7381
+ custom: CustomFieldsDraftSchema.nullish()
7382
7382
  });
7383
7383
 
7384
7384
  //#endregion
@@ -7501,20 +7501,20 @@ var ShippingMethodRepository = class extends AbstractResourceRepository {
7501
7501
  //#endregion
7502
7502
  //#region src/schemas/generated/standalone-price.ts
7503
7503
  const StandalonePriceDraftSchema = z.object({
7504
- key: z.string().optional(),
7504
+ key: z.string().nullish(),
7505
7505
  sku: z.string(),
7506
7506
  value: MoneySchema,
7507
- country: CountryCodeSchema.optional(),
7508
- customerGroup: CustomerGroupResourceIdentifierSchema.optional(),
7509
- channel: ChannelResourceIdentifierSchema.optional(),
7510
- validFrom: z.string().optional(),
7511
- validUntil: z.string().optional(),
7512
- tiers: z.array(PriceTierDraftSchema).optional(),
7513
- discounted: DiscountedPriceDraftSchema.optional(),
7514
- custom: CustomFieldsDraftSchema.optional(),
7515
- recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.optional(),
7516
- staged: StagedPriceDraftSchema.optional(),
7517
- active: z.boolean().optional()
7507
+ country: CountryCodeSchema.nullish(),
7508
+ customerGroup: CustomerGroupResourceIdentifierSchema.nullish(),
7509
+ channel: ChannelResourceIdentifierSchema.nullish(),
7510
+ validFrom: z.string().nullish(),
7511
+ validUntil: z.string().nullish(),
7512
+ tiers: z.array(PriceTierDraftSchema).nullish(),
7513
+ discounted: DiscountedPriceDraftSchema.nullish(),
7514
+ custom: CustomFieldsDraftSchema.nullish(),
7515
+ recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.nullish(),
7516
+ staged: StagedPriceDraftSchema.nullish(),
7517
+ active: z.boolean().nullish()
7518
7518
  });
7519
7519
 
7520
7520
  //#endregion
@@ -7567,11 +7567,11 @@ var StandalonePriceUpdateHandler = class extends AbstractUpdateHandler {
7567
7567
  const StateDraftSchema = z.object({
7568
7568
  key: z.string(),
7569
7569
  type: StateTypeEnumSchema,
7570
- name: LocalizedStringSchema.optional(),
7571
- description: LocalizedStringSchema.optional(),
7572
- initial: z.boolean().optional(),
7573
- roles: z.array(StateRoleEnumSchema).optional(),
7574
- transitions: z.array(StateResourceIdentifierSchema).optional()
7570
+ name: LocalizedStringSchema.nullish(),
7571
+ description: LocalizedStringSchema.nullish(),
7572
+ initial: z.boolean().nullish(),
7573
+ roles: z.array(StateRoleEnumSchema).nullish(),
7574
+ transitions: z.array(StateResourceIdentifierSchema).nullish()
7575
7575
  });
7576
7576
 
7577
7577
  //#endregion
@@ -7632,13 +7632,13 @@ var StateUpdateHandler = class extends AbstractUpdateHandler {
7632
7632
  //#region src/schemas/generated/store.ts
7633
7633
  const StoreDraftSchema = z.object({
7634
7634
  key: z.string(),
7635
- name: LocalizedStringSchema.optional(),
7636
- languages: z.array(LocaleSchema).optional(),
7637
- countries: z.array(StoreCountrySchema).optional(),
7638
- distributionChannels: z.array(ChannelResourceIdentifierSchema).optional(),
7639
- supplyChannels: z.array(ChannelResourceIdentifierSchema).optional(),
7640
- productSelections: z.array(ProductSelectionSettingDraftSchema).optional(),
7641
- custom: CustomFieldsDraftSchema.optional()
7635
+ name: LocalizedStringSchema.nullish(),
7636
+ languages: z.array(LocaleSchema).nullish(),
7637
+ countries: z.array(StoreCountrySchema).nullish(),
7638
+ distributionChannels: z.array(ChannelResourceIdentifierSchema).nullish(),
7639
+ supplyChannels: z.array(ChannelResourceIdentifierSchema).nullish(),
7640
+ productSelections: z.array(ProductSelectionSettingDraftSchema).nullish(),
7641
+ custom: CustomFieldsDraftSchema.nullish()
7642
7642
  });
7643
7643
 
7644
7644
  //#endregion
@@ -7699,11 +7699,11 @@ var StoreUpdateHandler = class extends AbstractUpdateHandler {
7699
7699
  //#region src/schemas/generated/subscription.ts
7700
7700
  const SubscriptionDraftSchema = z.object({
7701
7701
  destination: DestinationSchema,
7702
- key: z.string().optional(),
7703
- messages: z.array(MessageSubscriptionSchema).optional(),
7704
- changes: z.array(ChangeSubscriptionSchema).optional(),
7705
- events: z.array(EventSubscriptionSchema).optional(),
7706
- format: DeliveryFormatSchema.optional()
7702
+ key: z.string().nullish(),
7703
+ messages: z.array(MessageSubscriptionSchema).nullish(),
7704
+ changes: z.array(ChangeSubscriptionSchema).nullish(),
7705
+ events: z.array(EventSubscriptionSchema).nullish(),
7706
+ format: DeliveryFormatSchema.nullish()
7707
7707
  });
7708
7708
 
7709
7709
  //#endregion
@@ -7747,9 +7747,9 @@ var SubscriptionUpdateHandler = class extends AbstractUpdateHandler {
7747
7747
  //#region src/schemas/generated/tax-category.ts
7748
7748
  const TaxCategoryDraftSchema = z.object({
7749
7749
  name: z.string(),
7750
- description: z.string().optional(),
7751
- rates: z.array(TaxRateDraftSchema).optional(),
7752
- key: z.string().optional()
7750
+ description: z.string().nullish(),
7751
+ rates: z.array(TaxRateDraftSchema).nullish(),
7752
+ key: z.string().nullish()
7753
7753
  });
7754
7754
 
7755
7755
  //#endregion
@@ -7810,9 +7810,9 @@ var TaxCategoryRepository = class extends AbstractResourceRepository {
7810
7810
  const TypeDraftSchema = z.object({
7811
7811
  key: z.string(),
7812
7812
  name: LocalizedStringSchema,
7813
- description: LocalizedStringSchema.optional(),
7813
+ description: LocalizedStringSchema.nullish(),
7814
7814
  resourceTypeIds: z.array(ResourceTypeIdSchema),
7815
- fieldDefinitions: z.array(FieldDefinitionSchema).optional()
7815
+ fieldDefinitions: z.array(FieldDefinitionSchema).nullish()
7816
7816
  });
7817
7817
 
7818
7818
  //#endregion
@@ -7904,10 +7904,10 @@ var TypeRepository = class extends AbstractResourceRepository {
7904
7904
  //#endregion
7905
7905
  //#region src/schemas/generated/zone.ts
7906
7906
  const ZoneDraftSchema = z.object({
7907
- key: z.string().optional(),
7907
+ key: z.string().nullish(),
7908
7908
  name: z.string(),
7909
- description: z.string().optional(),
7910
- locations: z.array(LocationSchema).optional()
7909
+ description: z.string().nullish(),
7910
+ locations: z.array(LocationSchema).nullish()
7911
7911
  });
7912
7912
 
7913
7913
  //#endregion