@labdigital/commercetools-mock 3.0.0-beta.0 → 3.0.0-beta.1

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 (42) 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
@@ -424,8 +424,8 @@ export const LocaleSchema = z.string();
424
424
  export const TypeResourceIdentifierSchema = z
425
425
  .object({
426
426
  typeId: ReferenceTypeIdSchema,
427
- id: z.string().optional(),
428
- key: z.string().optional(),
427
+ id: z.string().nullish(),
428
+ key: z.string().nullish(),
429
429
  })
430
430
  .refine((data) => data.id !== undefined || data.key !== undefined, {
431
431
  message: "Either 'id' or 'key' must be provided",
@@ -435,7 +435,7 @@ export const FieldContainerSchema = z.record(z.string(), z.unknown());
435
435
 
436
436
  export const CustomFieldsDraftSchema = z.object({
437
437
  type: TypeResourceIdentifierSchema,
438
- fields: FieldContainerSchema.optional(),
438
+ fields: FieldContainerSchema.nullish(),
439
439
  });
440
440
 
441
441
  export const LocalizedStringSchema = z.record(z.string(), z.string());
@@ -447,8 +447,8 @@ export const AttributeReferenceSchema = z.object({
447
447
  export const StoreResourceIdentifierSchema = z
448
448
  .object({
449
449
  typeId: ReferenceTypeIdSchema,
450
- id: z.string().optional(),
451
- key: z.string().optional(),
450
+ id: z.string().nullish(),
451
+ key: z.string().nullish(),
452
452
  })
453
453
  .refine((data) => data.id !== undefined || data.key !== undefined, {
454
454
  message: "Either 'id' or 'key' must be provided",
@@ -457,8 +457,8 @@ export const StoreResourceIdentifierSchema = z
457
457
  export const AssociateRoleResourceIdentifierSchema = z
458
458
  .object({
459
459
  typeId: ReferenceTypeIdSchema,
460
- id: z.string().optional(),
461
- key: z.string().optional(),
460
+ id: z.string().nullish(),
461
+ key: z.string().nullish(),
462
462
  })
463
463
  .refine((data) => data.id !== undefined || data.key !== undefined, {
464
464
  message: "Either 'id' or 'key' must be provided",
@@ -466,14 +466,14 @@ export const AssociateRoleResourceIdentifierSchema = z
466
466
 
467
467
  export const AssociateRoleAssignmentDraftSchema = z.object({
468
468
  associateRole: AssociateRoleResourceIdentifierSchema,
469
- inheritance: AssociateRoleInheritanceModeSchema.optional(),
469
+ inheritance: AssociateRoleInheritanceModeSchema.nullish(),
470
470
  });
471
471
 
472
472
  export const CustomerResourceIdentifierSchema = z
473
473
  .object({
474
474
  typeId: ReferenceTypeIdSchema,
475
- id: z.string().optional(),
476
- key: z.string().optional(),
475
+ id: z.string().nullish(),
476
+ key: z.string().nullish(),
477
477
  })
478
478
  .refine((data) => data.id !== undefined || data.key !== undefined, {
479
479
  message: "Either 'id' or 'key' must be provided",
@@ -481,43 +481,43 @@ export const CustomerResourceIdentifierSchema = z
481
481
 
482
482
  export const AssociateDraftSchema = z.object({
483
483
  associateRoleAssignments: z.array(AssociateRoleAssignmentDraftSchema),
484
- roles: z.array(AssociateRoleDeprecatedSchema).optional(),
484
+ roles: z.array(AssociateRoleDeprecatedSchema).nullish(),
485
485
  customer: CustomerResourceIdentifierSchema,
486
486
  });
487
487
 
488
488
  export const BaseAddressSchema = z.object({
489
- id: z.string().optional(),
490
- key: z.string().optional(),
489
+ id: z.string().nullish(),
490
+ key: z.string().nullish(),
491
491
  country: CountryCodeSchema,
492
- title: z.string().optional(),
493
- salutation: z.string().optional(),
494
- firstName: z.string().optional(),
495
- lastName: z.string().optional(),
496
- streetName: z.string().optional(),
497
- streetNumber: z.string().optional(),
498
- additionalStreetInfo: z.string().optional(),
499
- postalCode: z.string().optional(),
500
- city: z.string().optional(),
501
- region: z.string().optional(),
502
- state: z.string().optional(),
503
- company: z.string().optional(),
504
- department: z.string().optional(),
505
- building: z.string().optional(),
506
- apartment: z.string().optional(),
507
- pOBox: z.string().optional(),
508
- phone: z.string().optional(),
509
- mobile: z.string().optional(),
510
- email: z.string().optional(),
511
- fax: z.string().optional(),
512
- additionalAddressInfo: z.string().optional(),
513
- externalId: z.string().optional(),
492
+ title: z.string().nullish(),
493
+ salutation: z.string().nullish(),
494
+ firstName: z.string().nullish(),
495
+ lastName: z.string().nullish(),
496
+ streetName: z.string().nullish(),
497
+ streetNumber: z.string().nullish(),
498
+ additionalStreetInfo: z.string().nullish(),
499
+ postalCode: z.string().nullish(),
500
+ city: z.string().nullish(),
501
+ region: z.string().nullish(),
502
+ state: z.string().nullish(),
503
+ company: z.string().nullish(),
504
+ department: z.string().nullish(),
505
+ building: z.string().nullish(),
506
+ apartment: z.string().nullish(),
507
+ pOBox: z.string().nullish(),
508
+ phone: z.string().nullish(),
509
+ mobile: z.string().nullish(),
510
+ email: z.string().nullish(),
511
+ fax: z.string().nullish(),
512
+ additionalAddressInfo: z.string().nullish(),
513
+ externalId: z.string().nullish(),
514
514
  });
515
515
 
516
516
  export const CustomerGroupResourceIdentifierSchema = z
517
517
  .object({
518
518
  typeId: ReferenceTypeIdSchema,
519
- id: z.string().optional(),
520
- key: z.string().optional(),
519
+ id: z.string().nullish(),
520
+ key: z.string().nullish(),
521
521
  })
522
522
  .refine((data) => data.id !== undefined || data.key !== undefined, {
523
523
  message: "Either 'id' or 'key' must be provided",
@@ -529,31 +529,31 @@ export const CustomerGroupAssignmentDraftSchema = z.object({
529
529
 
530
530
  export const CompanyDraftSchema = z.object({
531
531
  key: z.string(),
532
- status: BusinessUnitStatusSchema.optional(),
533
- stores: z.array(StoreResourceIdentifierSchema).optional(),
534
- storeMode: BusinessUnitStoreModeSchema.optional(),
532
+ status: BusinessUnitStatusSchema.nullish(),
533
+ stores: z.array(StoreResourceIdentifierSchema).nullish(),
534
+ storeMode: BusinessUnitStoreModeSchema.nullish(),
535
535
  unitType: BusinessUnitTypeSchema,
536
536
  name: z.string(),
537
- contactEmail: z.string().optional(),
538
- associateMode: BusinessUnitAssociateModeSchema.optional(),
539
- associates: z.array(AssociateDraftSchema).optional(),
540
- approvalRuleMode: BusinessUnitApprovalRuleModeSchema.optional(),
541
- addresses: z.array(BaseAddressSchema).optional(),
542
- shippingAddresses: z.array(z.number().int()).optional(),
543
- defaultShippingAddress: z.number().int().optional(),
544
- billingAddresses: z.array(z.number().int()).optional(),
545
- defaultBillingAddress: z.number().int().optional(),
546
- custom: CustomFieldsDraftSchema.optional(),
537
+ contactEmail: z.string().nullish(),
538
+ associateMode: BusinessUnitAssociateModeSchema.nullish(),
539
+ associates: z.array(AssociateDraftSchema).nullish(),
540
+ approvalRuleMode: BusinessUnitApprovalRuleModeSchema.nullish(),
541
+ addresses: z.array(BaseAddressSchema).nullish(),
542
+ shippingAddresses: z.array(z.number().int()).nullish(),
543
+ defaultShippingAddress: z.number().int().nullish(),
544
+ billingAddresses: z.array(z.number().int()).nullish(),
545
+ defaultBillingAddress: z.number().int().nullish(),
546
+ custom: CustomFieldsDraftSchema.nullish(),
547
547
  customerGroupAssignments: z
548
548
  .array(CustomerGroupAssignmentDraftSchema)
549
- .optional(),
549
+ .nullish(),
550
550
  });
551
551
 
552
552
  export const BusinessUnitResourceIdentifierSchema = z
553
553
  .object({
554
554
  typeId: ReferenceTypeIdSchema,
555
- id: z.string().optional(),
556
- key: z.string().optional(),
555
+ id: z.string().nullish(),
556
+ key: z.string().nullish(),
557
557
  })
558
558
  .refine((data) => data.id !== undefined || data.key !== undefined, {
559
559
  message: "Either 'id' or 'key' must be provided",
@@ -561,32 +561,32 @@ export const BusinessUnitResourceIdentifierSchema = z
561
561
 
562
562
  export const DivisionDraftSchema = z.object({
563
563
  key: z.string(),
564
- status: BusinessUnitStatusSchema.optional(),
565
- stores: z.array(StoreResourceIdentifierSchema).optional(),
566
- storeMode: BusinessUnitStoreModeSchema.optional(),
564
+ status: BusinessUnitStatusSchema.nullish(),
565
+ stores: z.array(StoreResourceIdentifierSchema).nullish(),
566
+ storeMode: BusinessUnitStoreModeSchema.nullish(),
567
567
  unitType: BusinessUnitTypeSchema,
568
568
  name: z.string(),
569
- contactEmail: z.string().optional(),
570
- associateMode: BusinessUnitAssociateModeSchema.optional(),
571
- associates: z.array(AssociateDraftSchema).optional(),
572
- approvalRuleMode: BusinessUnitApprovalRuleModeSchema.optional(),
573
- addresses: z.array(BaseAddressSchema).optional(),
574
- shippingAddresses: z.array(z.number().int()).optional(),
575
- defaultShippingAddress: z.number().int().optional(),
576
- billingAddresses: z.array(z.number().int()).optional(),
577
- defaultBillingAddress: z.number().int().optional(),
578
- custom: CustomFieldsDraftSchema.optional(),
569
+ contactEmail: z.string().nullish(),
570
+ associateMode: BusinessUnitAssociateModeSchema.nullish(),
571
+ associates: z.array(AssociateDraftSchema).nullish(),
572
+ approvalRuleMode: BusinessUnitApprovalRuleModeSchema.nullish(),
573
+ addresses: z.array(BaseAddressSchema).nullish(),
574
+ shippingAddresses: z.array(z.number().int()).nullish(),
575
+ defaultShippingAddress: z.number().int().nullish(),
576
+ billingAddresses: z.array(z.number().int()).nullish(),
577
+ defaultBillingAddress: z.number().int().nullish(),
578
+ custom: CustomFieldsDraftSchema.nullish(),
579
579
  customerGroupAssignments: z
580
580
  .array(CustomerGroupAssignmentDraftSchema)
581
- .optional(),
581
+ .nullish(),
582
582
  parentUnit: BusinessUnitResourceIdentifierSchema,
583
583
  });
584
584
 
585
585
  export const ChannelResourceIdentifierSchema = z
586
586
  .object({
587
587
  typeId: ReferenceTypeIdSchema,
588
- id: z.string().optional(),
589
- key: z.string().optional(),
588
+ id: z.string().nullish(),
589
+ key: z.string().nullish(),
590
590
  })
591
591
  .refine((data) => data.id !== undefined || data.key !== undefined, {
592
592
  message: "Either 'id' or 'key' must be provided",
@@ -609,22 +609,22 @@ export const SubRateSchema = z.object({
609
609
 
610
610
  export const ExternalTaxRateDraftSchema = z.object({
611
611
  name: z.string(),
612
- amount: z.number().optional(),
613
- includedInPrice: z.boolean().optional(),
612
+ amount: z.number().nullish(),
613
+ includedInPrice: z.boolean().nullish(),
614
614
  country: CountryCodeSchema,
615
- state: z.string().optional(),
616
- subRates: z.array(SubRateSchema).optional(),
615
+ state: z.string().nullish(),
616
+ subRates: z.array(SubRateSchema).nullish(),
617
617
  });
618
618
 
619
619
  export const MethodExternalTaxRateDraftSchema = z.object({
620
620
  shippingMethodKey: z.string(),
621
- taxRate: ExternalTaxRateDraftSchema.optional(),
621
+ taxRate: ExternalTaxRateDraftSchema.nullish(),
622
622
  });
623
623
 
624
624
  export const ItemShippingTargetSchema = z.object({
625
625
  addressKey: z.string(),
626
626
  quantity: z.number().int(),
627
- shippingMethodKey: z.string().optional(),
627
+ shippingMethodKey: z.string().nullish(),
628
628
  });
629
629
 
630
630
  export const ItemShippingDetailsDraftSchema = z.object({
@@ -634,8 +634,8 @@ export const ItemShippingDetailsDraftSchema = z.object({
634
634
  export const RecurrencePolicyResourceIdentifierSchema = z
635
635
  .object({
636
636
  typeId: ReferenceTypeIdSchema,
637
- id: z.string().optional(),
638
- key: z.string().optional(),
637
+ id: z.string().nullish(),
638
+ key: z.string().nullish(),
639
639
  })
640
640
  .refine((data) => data.id !== undefined || data.key !== undefined, {
641
641
  message: "Either 'id' or 'key' must be provided",
@@ -647,31 +647,29 @@ export const LineItemRecurrenceInfoDraftSchema = z.object({
647
647
  });
648
648
 
649
649
  export const LineItemDraftSchema = z.object({
650
- key: z.string().optional(),
651
- productId: z.string().optional(),
652
- variantId: z.number().int().optional(),
653
- sku: z.string().optional(),
654
- quantity: z.number().int().optional(),
655
- addedAt: z.string().optional(),
656
- distributionChannel: ChannelResourceIdentifierSchema.optional(),
657
- supplyChannel: ChannelResourceIdentifierSchema.optional(),
658
- externalPrice: MoneySchema.optional(),
659
- externalTotalPrice: ExternalLineItemTotalPriceSchema.optional(),
660
- externalTaxRate: ExternalTaxRateDraftSchema.optional(),
661
- perMethodExternalTaxRate: z
662
- .array(MethodExternalTaxRateDraftSchema)
663
- .optional(),
664
- inventoryMode: InventoryModeSchema.optional(),
665
- shippingDetails: ItemShippingDetailsDraftSchema.optional(),
666
- custom: CustomFieldsDraftSchema.optional(),
667
- recurrenceInfo: LineItemRecurrenceInfoDraftSchema.optional(),
650
+ key: z.string().nullish(),
651
+ productId: z.string().nullish(),
652
+ variantId: z.number().int().nullish(),
653
+ sku: z.string().nullish(),
654
+ quantity: z.number().int().nullish(),
655
+ addedAt: z.string().nullish(),
656
+ distributionChannel: ChannelResourceIdentifierSchema.nullish(),
657
+ supplyChannel: ChannelResourceIdentifierSchema.nullish(),
658
+ externalPrice: MoneySchema.nullish(),
659
+ externalTotalPrice: ExternalLineItemTotalPriceSchema.nullish(),
660
+ externalTaxRate: ExternalTaxRateDraftSchema.nullish(),
661
+ perMethodExternalTaxRate: z.array(MethodExternalTaxRateDraftSchema).nullish(),
662
+ inventoryMode: InventoryModeSchema.nullish(),
663
+ shippingDetails: ItemShippingDetailsDraftSchema.nullish(),
664
+ custom: CustomFieldsDraftSchema.nullish(),
665
+ recurrenceInfo: LineItemRecurrenceInfoDraftSchema.nullish(),
668
666
  });
669
667
 
670
668
  export const TaxCategoryResourceIdentifierSchema = z
671
669
  .object({
672
670
  typeId: ReferenceTypeIdSchema,
673
- id: z.string().optional(),
674
- key: z.string().optional(),
671
+ id: z.string().nullish(),
672
+ key: z.string().nullish(),
675
673
  })
676
674
  .refine((data) => data.id !== undefined || data.key !== undefined, {
677
675
  message: "Either 'id' or 'key' must be provided",
@@ -683,23 +681,23 @@ export const CustomLineItemRecurrenceInfoDraftSchema = z.object({
683
681
 
684
682
  export const CustomLineItemDraftSchema = z.object({
685
683
  name: LocalizedStringSchema,
686
- key: z.string().optional(),
687
- quantity: z.number().int().optional(),
684
+ key: z.string().nullish(),
685
+ quantity: z.number().int().nullish(),
688
686
  money: MoneySchema,
689
687
  slug: z.string(),
690
- taxCategory: TaxCategoryResourceIdentifierSchema.optional(),
691
- externalTaxRate: ExternalTaxRateDraftSchema.optional(),
692
- custom: CustomFieldsDraftSchema.optional(),
693
- shippingDetails: ItemShippingDetailsDraftSchema.optional(),
694
- priceMode: CustomLineItemPriceModeSchema.optional(),
695
- recurrenceInfo: CustomLineItemRecurrenceInfoDraftSchema.optional(),
688
+ taxCategory: TaxCategoryResourceIdentifierSchema.nullish(),
689
+ externalTaxRate: ExternalTaxRateDraftSchema.nullish(),
690
+ custom: CustomFieldsDraftSchema.nullish(),
691
+ shippingDetails: ItemShippingDetailsDraftSchema.nullish(),
692
+ priceMode: CustomLineItemPriceModeSchema.nullish(),
693
+ recurrenceInfo: CustomLineItemRecurrenceInfoDraftSchema.nullish(),
696
694
  });
697
695
 
698
696
  export const ShippingMethodResourceIdentifierSchema = z
699
697
  .object({
700
698
  typeId: ReferenceTypeIdSchema,
701
- id: z.string().optional(),
702
- key: z.string().optional(),
699
+ id: z.string().nullish(),
700
+ key: z.string().nullish(),
703
701
  })
704
702
  .refine((data) => data.id !== undefined || data.key !== undefined, {
705
703
  message: "Either 'id' or 'key' must be provided",
@@ -723,7 +721,7 @@ export const CartClassificationTierSchema = z.object({
723
721
  type: ShippingRateTierTypeSchema,
724
722
  value: z.string(),
725
723
  price: MoneySchema,
726
- isMatching: z.boolean().optional(),
724
+ isMatching: z.boolean().nullish(),
727
725
  });
728
726
 
729
727
  export const PriceFunctionSchema = z.object({
@@ -734,16 +732,16 @@ export const PriceFunctionSchema = z.object({
734
732
  export const CartScoreTierSchema = z.object({
735
733
  type: ShippingRateTierTypeSchema,
736
734
  score: z.number().int(),
737
- price: MoneySchema.optional(),
738
- priceFunction: PriceFunctionSchema.optional(),
739
- isMatching: z.boolean().optional(),
735
+ price: MoneySchema.nullish(),
736
+ priceFunction: PriceFunctionSchema.nullish(),
737
+ isMatching: z.boolean().nullish(),
740
738
  });
741
739
 
742
740
  export const CartValueTierSchema = z.object({
743
741
  type: ShippingRateTierTypeSchema,
744
742
  minimumCentAmount: z.number().int(),
745
743
  price: MoneySchema,
746
- isMatching: z.boolean().optional(),
744
+ isMatching: z.boolean().nullish(),
747
745
  });
748
746
 
749
747
  export const ShippingRatePriceTierSchema = z.object({
@@ -752,8 +750,8 @@ export const ShippingRatePriceTierSchema = z.object({
752
750
 
753
751
  export const ShippingRateDraftSchema = z.object({
754
752
  price: MoneySchema,
755
- freeAbove: MoneySchema.optional(),
756
- tiers: z.array(ShippingRatePriceTierSchema).optional(),
753
+ freeAbove: MoneySchema.nullish(),
754
+ tiers: z.array(ShippingRatePriceTierSchema).nullish(),
757
755
  });
758
756
 
759
757
  export const DeliveryItemSchema = z.object({
@@ -762,75 +760,75 @@ export const DeliveryItemSchema = z.object({
762
760
  });
763
761
 
764
762
  export const ParcelMeasurementsSchema = z.object({
765
- heightInMillimeter: z.number().int().optional(),
766
- lengthInMillimeter: z.number().int().optional(),
767
- widthInMillimeter: z.number().int().optional(),
768
- weightInGram: z.number().int().optional(),
763
+ heightInMillimeter: z.number().int().nullish(),
764
+ lengthInMillimeter: z.number().int().nullish(),
765
+ widthInMillimeter: z.number().int().nullish(),
766
+ weightInGram: z.number().int().nullish(),
769
767
  });
770
768
 
771
769
  export const TrackingDataSchema = z.object({
772
- trackingId: z.string().optional(),
773
- carrier: z.string().optional(),
774
- provider: z.string().optional(),
775
- providerTransaction: z.string().optional(),
776
- isReturn: z.boolean().optional(),
770
+ trackingId: z.string().nullish(),
771
+ carrier: z.string().nullish(),
772
+ provider: z.string().nullish(),
773
+ providerTransaction: z.string().nullish(),
774
+ isReturn: z.boolean().nullish(),
777
775
  });
778
776
 
779
777
  export const ParcelDraftSchema = z.object({
780
- key: z.string().optional(),
781
- measurements: ParcelMeasurementsSchema.optional(),
782
- trackingData: TrackingDataSchema.optional(),
783
- items: z.array(DeliveryItemSchema).optional(),
784
- custom: CustomFieldsDraftSchema.optional(),
778
+ key: z.string().nullish(),
779
+ measurements: ParcelMeasurementsSchema.nullish(),
780
+ trackingData: TrackingDataSchema.nullish(),
781
+ items: z.array(DeliveryItemSchema).nullish(),
782
+ custom: CustomFieldsDraftSchema.nullish(),
785
783
  });
786
784
 
787
785
  export const AddressDraftSchema = z.object({
788
- id: z.string().optional(),
789
- key: z.string().optional(),
786
+ id: z.string().nullish(),
787
+ key: z.string().nullish(),
790
788
  country: CountryCodeSchema,
791
- title: z.string().optional(),
792
- salutation: z.string().optional(),
793
- firstName: z.string().optional(),
794
- lastName: z.string().optional(),
795
- streetName: z.string().optional(),
796
- streetNumber: z.string().optional(),
797
- additionalStreetInfo: z.string().optional(),
798
- postalCode: z.string().optional(),
799
- city: z.string().optional(),
800
- region: z.string().optional(),
801
- state: z.string().optional(),
802
- company: z.string().optional(),
803
- department: z.string().optional(),
804
- building: z.string().optional(),
805
- apartment: z.string().optional(),
806
- pOBox: z.string().optional(),
807
- phone: z.string().optional(),
808
- mobile: z.string().optional(),
809
- email: z.string().optional(),
810
- fax: z.string().optional(),
811
- additionalAddressInfo: z.string().optional(),
812
- externalId: z.string().optional(),
813
- custom: CustomFieldsDraftSchema.optional(),
789
+ title: z.string().nullish(),
790
+ salutation: z.string().nullish(),
791
+ firstName: z.string().nullish(),
792
+ lastName: z.string().nullish(),
793
+ streetName: z.string().nullish(),
794
+ streetNumber: z.string().nullish(),
795
+ additionalStreetInfo: z.string().nullish(),
796
+ postalCode: z.string().nullish(),
797
+ city: z.string().nullish(),
798
+ region: z.string().nullish(),
799
+ state: z.string().nullish(),
800
+ company: z.string().nullish(),
801
+ department: z.string().nullish(),
802
+ building: z.string().nullish(),
803
+ apartment: z.string().nullish(),
804
+ pOBox: z.string().nullish(),
805
+ phone: z.string().nullish(),
806
+ mobile: z.string().nullish(),
807
+ email: z.string().nullish(),
808
+ fax: z.string().nullish(),
809
+ additionalAddressInfo: z.string().nullish(),
810
+ externalId: z.string().nullish(),
811
+ custom: CustomFieldsDraftSchema.nullish(),
814
812
  });
815
813
 
816
814
  export const DeliveryDraftSchema = z.object({
817
- key: z.string().optional(),
818
- items: z.array(DeliveryItemSchema).optional(),
819
- parcels: z.array(ParcelDraftSchema).optional(),
820
- address: AddressDraftSchema.optional(),
821
- custom: CustomFieldsDraftSchema.optional(),
815
+ key: z.string().nullish(),
816
+ items: z.array(DeliveryItemSchema).nullish(),
817
+ parcels: z.array(ParcelDraftSchema).nullish(),
818
+ address: AddressDraftSchema.nullish(),
819
+ custom: CustomFieldsDraftSchema.nullish(),
822
820
  });
823
821
 
824
822
  export const CustomShippingDraftSchema = z.object({
825
823
  key: z.string(),
826
824
  shippingMethodName: z.string(),
827
- shippingAddress: BaseAddressSchema.optional(),
825
+ shippingAddress: BaseAddressSchema.nullish(),
828
826
  shippingRate: ShippingRateDraftSchema,
829
- shippingRateInput: ShippingRateInputDraftSchema.optional(),
830
- taxCategory: TaxCategoryResourceIdentifierSchema.optional(),
831
- externalTaxRate: ExternalTaxRateDraftSchema.optional(),
832
- deliveries: z.array(DeliveryDraftSchema).optional(),
833
- custom: CustomFieldsDraftSchema.optional(),
827
+ shippingRateInput: ShippingRateInputDraftSchema.nullish(),
828
+ taxCategory: TaxCategoryResourceIdentifierSchema.nullish(),
829
+ externalTaxRate: ExternalTaxRateDraftSchema.nullish(),
830
+ deliveries: z.array(DeliveryDraftSchema).nullish(),
831
+ custom: CustomFieldsDraftSchema.nullish(),
834
832
  });
835
833
 
836
834
  export const ShippingMethodReferenceSchema = z.object({
@@ -840,38 +838,38 @@ export const ShippingMethodReferenceSchema = z.object({
840
838
 
841
839
  export const ShippingDraftSchema = z.object({
842
840
  key: z.string(),
843
- shippingMethod: ShippingMethodReferenceSchema.optional(),
841
+ shippingMethod: ShippingMethodReferenceSchema.nullish(),
844
842
  shippingAddress: BaseAddressSchema,
845
- shippingRateInput: ShippingRateInputDraftSchema.optional(),
846
- externalTaxRate: ExternalTaxRateDraftSchema.optional(),
847
- deliveries: z.array(DeliveryDraftSchema).optional(),
848
- custom: CustomFieldsDraftSchema.optional(),
843
+ shippingRateInput: ShippingRateInputDraftSchema.nullish(),
844
+ externalTaxRate: ExternalTaxRateDraftSchema.nullish(),
845
+ deliveries: z.array(DeliveryDraftSchema).nullish(),
846
+ custom: CustomFieldsDraftSchema.nullish(),
849
847
  });
850
848
 
851
849
  export const CartDiscountValueAbsoluteDraftSchema = z.object({
852
850
  type: z.string(),
853
851
  money: z.array(MoneySchema),
854
- applicationMode: DiscountApplicationModeSchema.optional(),
852
+ applicationMode: DiscountApplicationModeSchema.nullish(),
855
853
  });
856
854
 
857
855
  export const TypedMoneyDraftSchema = z.object({
858
856
  centAmount: z.number().int(),
859
857
  currencyCode: CurrencyCodeSchema,
860
858
  type: MoneyTypeSchema,
861
- fractionDigits: z.number().int().optional(),
859
+ fractionDigits: z.number().int().nullish(),
862
860
  });
863
861
 
864
862
  export const CartDiscountValueFixedDraftSchema = z.object({
865
863
  type: z.string(),
866
864
  money: z.array(TypedMoneyDraftSchema),
867
- applicationMode: DiscountApplicationModeSchema.optional(),
865
+ applicationMode: DiscountApplicationModeSchema.nullish(),
868
866
  });
869
867
 
870
868
  export const ProductResourceIdentifierSchema = z
871
869
  .object({
872
870
  typeId: ReferenceTypeIdSchema,
873
- id: z.string().optional(),
874
- key: z.string().optional(),
871
+ id: z.string().nullish(),
872
+ key: z.string().nullish(),
875
873
  })
876
874
  .refine((data) => data.id !== undefined || data.key !== undefined, {
877
875
  message: "Either 'id' or 'key' must be provided",
@@ -881,14 +879,14 @@ export const CartDiscountValueGiftLineItemDraftSchema = z.object({
881
879
  type: z.string(),
882
880
  product: ProductResourceIdentifierSchema,
883
881
  variantId: z.number().int(),
884
- supplyChannel: ChannelResourceIdentifierSchema.optional(),
885
- distributionChannel: ChannelResourceIdentifierSchema.optional(),
882
+ supplyChannel: ChannelResourceIdentifierSchema.nullish(),
883
+ distributionChannel: ChannelResourceIdentifierSchema.nullish(),
886
884
  });
887
885
 
888
886
  export const CartDiscountValueRelativeDraftSchema = z.object({
889
887
  type: z.string(),
890
888
  permyriad: z.number().int(),
891
- applicationMode: DiscountApplicationModeSchema.optional(),
889
+ applicationMode: DiscountApplicationModeSchema.nullish(),
892
890
  });
893
891
 
894
892
  export const CartDiscountValueDraftSchema = z.object({
@@ -902,8 +900,8 @@ export const CartDiscountTargetSchema = z.object({
902
900
  export const DiscountGroupResourceIdentifierSchema = z
903
901
  .object({
904
902
  typeId: ReferenceTypeIdSchema,
905
- id: z.string().optional(),
906
- key: z.string().optional(),
903
+ id: z.string().nullish(),
904
+ key: z.string().nullish(),
907
905
  })
908
906
  .refine((data) => data.id !== undefined || data.key !== undefined, {
909
907
  message: "Either 'id' or 'key' must be provided",
@@ -933,8 +931,8 @@ export const RecurringOrderScopeDraftSchema = z.object({
933
931
  export const CategoryResourceIdentifierSchema = z
934
932
  .object({
935
933
  typeId: ReferenceTypeIdSchema,
936
- id: z.string().optional(),
937
- key: z.string().optional(),
934
+ id: z.string().nullish(),
935
+ key: z.string().nullish(),
938
936
  })
939
937
  .refine((data) => data.id !== undefined || data.key !== undefined, {
940
938
  message: "Either 'id' or 'key' must be provided",
@@ -947,18 +945,18 @@ export const AssetDimensionsSchema = z.object({
947
945
 
948
946
  export const AssetSourceSchema = z.object({
949
947
  uri: z.string(),
950
- key: z.string().optional(),
951
- dimensions: AssetDimensionsSchema.optional(),
952
- contentType: z.string().optional(),
948
+ key: z.string().nullish(),
949
+ dimensions: AssetDimensionsSchema.nullish(),
950
+ contentType: z.string().nullish(),
953
951
  });
954
952
 
955
953
  export const AssetDraftSchema = z.object({
956
954
  sources: z.array(AssetSourceSchema),
957
955
  name: LocalizedStringSchema,
958
- description: LocalizedStringSchema.optional(),
959
- tags: z.array(z.string()).optional(),
960
- custom: CustomFieldsDraftSchema.optional(),
961
- key: z.string().optional(),
956
+ description: LocalizedStringSchema.nullish(),
957
+ tags: z.array(z.string()).nullish(),
958
+ custom: CustomFieldsDraftSchema.nullish(),
959
+ key: z.string().nullish(),
962
960
  });
963
961
 
964
962
  export const GeoJsonPointSchema = z.object({
@@ -974,8 +972,8 @@ export const GeoJsonSchema = z.object({
974
972
  export const CartResourceIdentifierSchema = z
975
973
  .object({
976
974
  typeId: ReferenceTypeIdSchema,
977
- id: z.string().optional(),
978
- key: z.string().optional(),
975
+ id: z.string().nullish(),
976
+ key: z.string().nullish(),
979
977
  })
980
978
  .refine((data) => data.id !== undefined || data.key !== undefined, {
981
979
  message: "Either 'id' or 'key' must be provided",
@@ -984,8 +982,8 @@ export const CartResourceIdentifierSchema = z
984
982
  export const CartDiscountResourceIdentifierSchema = z
985
983
  .object({
986
984
  typeId: ReferenceTypeIdSchema,
987
- id: z.string().optional(),
988
- key: z.string().optional(),
985
+ id: z.string().nullish(),
986
+ key: z.string().nullish(),
989
987
  })
990
988
  .refine((data) => data.id !== undefined || data.key !== undefined, {
991
989
  message: "Either 'id' or 'key' must be provided",
@@ -1020,7 +1018,7 @@ export const HttpDestinationAuthenticationSchema = z.object({
1020
1018
  export const HttpDestinationSchema = z.object({
1021
1019
  type: z.string(),
1022
1020
  url: z.string(),
1023
- authentication: HttpDestinationAuthenticationSchema.optional(),
1021
+ authentication: HttpDestinationAuthenticationSchema.nullish(),
1024
1022
  });
1025
1023
 
1026
1024
  export const ExtensionDestinationSchema = z.object({
@@ -1030,7 +1028,7 @@ export const ExtensionDestinationSchema = z.object({
1030
1028
  export const ExtensionTriggerSchema = z.object({
1031
1029
  resourceTypeId: ExtensionResourceTypeIdSchema,
1032
1030
  actions: z.array(ExtensionActionSchema),
1033
- condition: z.string().optional(),
1031
+ condition: z.string().nullish(),
1034
1032
  });
1035
1033
 
1036
1034
  export const OrderReferenceSchema = z.object({
@@ -1045,8 +1043,8 @@ export const StagedOrderUpdateActionSchema = z.object({
1045
1043
  export const StateResourceIdentifierSchema = z
1046
1044
  .object({
1047
1045
  typeId: ReferenceTypeIdSchema,
1048
- id: z.string().optional(),
1049
- key: z.string().optional(),
1046
+ id: z.string().nullish(),
1047
+ key: z.string().nullish(),
1050
1048
  })
1051
1049
  .refine((data) => data.id !== undefined || data.key !== undefined, {
1052
1050
  message: "Either 'id' or 'key' must be provided",
@@ -1057,35 +1055,35 @@ export const PaymentMethodTokenSchema = z.object({
1057
1055
  });
1058
1056
 
1059
1057
  export const PaymentMethodInfoDraftSchema = z.object({
1060
- paymentInterface: z.string().optional(),
1061
- method: z.string().optional(),
1062
- name: LocalizedStringSchema.optional(),
1063
- token: PaymentMethodTokenSchema.optional(),
1064
- interfaceAccount: z.string().optional(),
1065
- custom: CustomFieldsDraftSchema.optional(),
1058
+ paymentInterface: z.string().nullish(),
1059
+ method: z.string().nullish(),
1060
+ name: LocalizedStringSchema.nullish(),
1061
+ token: PaymentMethodTokenSchema.nullish(),
1062
+ interfaceAccount: z.string().nullish(),
1063
+ custom: CustomFieldsDraftSchema.nullish(),
1066
1064
  });
1067
1065
 
1068
1066
  export const PaymentStatusDraftSchema = z.object({
1069
- interfaceCode: z.string().optional(),
1070
- interfaceText: z.string().optional(),
1071
- state: StateResourceIdentifierSchema.optional(),
1067
+ interfaceCode: z.string().nullish(),
1068
+ interfaceText: z.string().nullish(),
1069
+ state: StateResourceIdentifierSchema.nullish(),
1072
1070
  });
1073
1071
 
1074
1072
  export const TransactionDraftSchema = z.object({
1075
- timestamp: z.string().optional(),
1073
+ timestamp: z.string().nullish(),
1076
1074
  type: TransactionTypeSchema,
1077
1075
  amount: MoneySchema,
1078
- interactionId: z.string().optional(),
1079
- state: TransactionStateSchema.optional(),
1080
- custom: CustomFieldsDraftSchema.optional(),
1081
- interfaceId: z.string().optional(),
1076
+ interactionId: z.string().nullish(),
1077
+ state: TransactionStateSchema.nullish(),
1078
+ custom: CustomFieldsDraftSchema.nullish(),
1079
+ interfaceId: z.string().nullish(),
1082
1080
  });
1083
1081
 
1084
1082
  export const ProductTypeResourceIdentifierSchema = z
1085
1083
  .object({
1086
1084
  typeId: ReferenceTypeIdSchema,
1087
- id: z.string().optional(),
1088
- key: z.string().optional(),
1085
+ id: z.string().nullish(),
1086
+ key: z.string().nullish(),
1089
1087
  })
1090
1088
  .refine((data) => data.id !== undefined || data.key !== undefined, {
1091
1089
  message: "Either 'id' or 'key' must be provided",
@@ -1109,17 +1107,17 @@ export const PriceTierDraftSchema = z.object({
1109
1107
  });
1110
1108
 
1111
1109
  export const PriceDraftSchema = z.object({
1112
- key: z.string().optional(),
1110
+ key: z.string().nullish(),
1113
1111
  value: MoneySchema,
1114
- country: CountryCodeSchema.optional(),
1115
- customerGroup: CustomerGroupResourceIdentifierSchema.optional(),
1116
- channel: ChannelResourceIdentifierSchema.optional(),
1117
- validFrom: z.string().optional(),
1118
- validUntil: z.string().optional(),
1119
- discounted: DiscountedPriceDraftSchema.optional(),
1120
- tiers: z.array(PriceTierDraftSchema).optional(),
1121
- custom: CustomFieldsDraftSchema.optional(),
1122
- recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.optional(),
1112
+ country: CountryCodeSchema.nullish(),
1113
+ customerGroup: CustomerGroupResourceIdentifierSchema.nullish(),
1114
+ channel: ChannelResourceIdentifierSchema.nullish(),
1115
+ validFrom: z.string().nullish(),
1116
+ validUntil: z.string().nullish(),
1117
+ discounted: DiscountedPriceDraftSchema.nullish(),
1118
+ tiers: z.array(PriceTierDraftSchema).nullish(),
1119
+ custom: CustomFieldsDraftSchema.nullish(),
1120
+ recurrencePolicy: RecurrencePolicyResourceIdentifierSchema.nullish(),
1123
1121
  });
1124
1122
 
1125
1123
  export const AttributeSchema = z.object({
@@ -1135,16 +1133,16 @@ export const ImageDimensionsSchema = z.object({
1135
1133
  export const ImageSchema = z.object({
1136
1134
  url: z.string(),
1137
1135
  dimensions: ImageDimensionsSchema,
1138
- label: z.string().optional(),
1136
+ label: z.string().nullish(),
1139
1137
  });
1140
1138
 
1141
1139
  export const ProductVariantDraftSchema = z.object({
1142
- sku: z.string().optional(),
1143
- key: z.string().optional(),
1144
- prices: z.array(PriceDraftSchema).optional(),
1145
- attributes: z.array(AttributeSchema).optional(),
1146
- images: z.array(ImageSchema).optional(),
1147
- assets: z.array(AssetDraftSchema).optional(),
1140
+ sku: z.string().nullish(),
1141
+ key: z.string().nullish(),
1142
+ prices: z.array(PriceDraftSchema).nullish(),
1143
+ attributes: z.array(AttributeSchema).nullish(),
1144
+ images: z.array(ImageSchema).nullish(),
1145
+ assets: z.array(AssetDraftSchema).nullish(),
1148
1146
  });
1149
1147
 
1150
1148
  export const SearchKeywordsSchema = z.record(z.string(), z.string());
@@ -1181,10 +1179,10 @@ export const AssetSchema = z.object({
1181
1179
  id: z.string(),
1182
1180
  sources: z.array(AssetSourceSchema),
1183
1181
  name: LocalizedStringSchema,
1184
- description: LocalizedStringSchema.optional(),
1185
- tags: z.array(z.string()).optional(),
1186
- custom: CustomFieldsSchema.optional(),
1187
- key: z.string().optional(),
1182
+ description: LocalizedStringSchema.nullish(),
1183
+ tags: z.array(z.string()).nullish(),
1184
+ custom: CustomFieldsSchema.nullish(),
1185
+ key: z.string().nullish(),
1188
1186
  });
1189
1187
 
1190
1188
  export const ProductTailoringAttributeSchema = z.object({
@@ -1193,11 +1191,11 @@ export const ProductTailoringAttributeSchema = z.object({
1193
1191
  });
1194
1192
 
1195
1193
  export const ProductVariantTailoringDraftSchema = z.object({
1196
- id: z.number().int().optional(),
1197
- sku: z.string().optional(),
1198
- images: z.array(ImageSchema).optional(),
1199
- assets: z.array(AssetSchema).optional(),
1200
- attributes: z.array(ProductTailoringAttributeSchema).optional(),
1194
+ id: z.number().int().nullish(),
1195
+ sku: z.string().nullish(),
1196
+ images: z.array(ImageSchema).nullish(),
1197
+ assets: z.array(AssetSchema).nullish(),
1198
+ attributes: z.array(ProductTailoringAttributeSchema).nullish(),
1201
1199
  });
1202
1200
 
1203
1201
  export const AttributeTypeSchema = z.object({
@@ -1209,18 +1207,18 @@ export const AttributeDefinitionDraftSchema = z.object({
1209
1207
  name: z.string(),
1210
1208
  label: LocalizedStringSchema,
1211
1209
  isRequired: z.boolean(),
1212
- level: AttributeLevelEnumSchema.optional(),
1213
- attributeConstraint: AttributeConstraintEnumSchema.optional(),
1214
- inputTip: LocalizedStringSchema.optional(),
1215
- inputHint: TextInputHintSchema.optional(),
1216
- isSearchable: z.boolean().optional(),
1210
+ level: AttributeLevelEnumSchema.nullish(),
1211
+ attributeConstraint: AttributeConstraintEnumSchema.nullish(),
1212
+ inputTip: LocalizedStringSchema.nullish(),
1213
+ inputHint: TextInputHintSchema.nullish(),
1214
+ isSearchable: z.boolean().nullish(),
1217
1215
  });
1218
1216
 
1219
1217
  export const StagedQuoteResourceIdentifierSchema = z
1220
1218
  .object({
1221
1219
  typeId: ReferenceTypeIdSchema,
1222
- id: z.string().optional(),
1223
- key: z.string().optional(),
1220
+ id: z.string().nullish(),
1221
+ key: z.string().nullish(),
1224
1222
  })
1225
1223
  .refine((data) => data.id !== undefined || data.key !== undefined, {
1226
1224
  message: "Either 'id' or 'key' must be provided",
@@ -1249,8 +1247,8 @@ export const RecurrencePolicyScheduleDraftSchema = z.object({
1249
1247
  export const ZoneResourceIdentifierSchema = z
1250
1248
  .object({
1251
1249
  typeId: ReferenceTypeIdSchema,
1252
- id: z.string().optional(),
1253
- key: z.string().optional(),
1250
+ id: z.string().nullish(),
1251
+ key: z.string().nullish(),
1254
1252
  })
1255
1253
  .refine((data) => data.id !== undefined || data.key !== undefined, {
1256
1254
  message: "Either 'id' or 'key' must be provided",
@@ -1262,22 +1260,22 @@ export const ZoneRateDraftSchema = z.object({
1262
1260
  });
1263
1261
 
1264
1262
  export const ShoppingListLineItemDraftSchema = z.object({
1265
- key: z.string().optional(),
1266
- productId: z.string().optional(),
1267
- variantId: z.number().int().optional(),
1268
- sku: z.string().optional(),
1269
- addedAt: z.string().optional(),
1270
- custom: CustomFieldsDraftSchema.optional(),
1271
- quantity: z.number().int().optional(),
1263
+ key: z.string().nullish(),
1264
+ productId: z.string().nullish(),
1265
+ variantId: z.number().int().nullish(),
1266
+ sku: z.string().nullish(),
1267
+ addedAt: z.string().nullish(),
1268
+ custom: CustomFieldsDraftSchema.nullish(),
1269
+ quantity: z.number().int().nullish(),
1272
1270
  });
1273
1271
 
1274
1272
  export const TextLineItemDraftSchema = z.object({
1275
- key: z.string().optional(),
1276
- addedAt: z.string().optional(),
1277
- custom: CustomFieldsDraftSchema.optional(),
1278
- description: LocalizedStringSchema.optional(),
1273
+ key: z.string().nullish(),
1274
+ addedAt: z.string().nullish(),
1275
+ custom: CustomFieldsDraftSchema.nullish(),
1276
+ description: LocalizedStringSchema.nullish(),
1279
1277
  name: LocalizedStringSchema,
1280
- quantity: z.number().int().optional(),
1278
+ quantity: z.number().int().nullish(),
1281
1279
  });
1282
1280
 
1283
1281
  export const StagedPriceDraftSchema = z.object({
@@ -1287,8 +1285,8 @@ export const StagedPriceDraftSchema = z.object({
1287
1285
  export const QuoteRequestResourceIdentifierSchema = z
1288
1286
  .object({
1289
1287
  typeId: ReferenceTypeIdSchema,
1290
- id: z.string().optional(),
1291
- key: z.string().optional(),
1288
+ id: z.string().nullish(),
1289
+ key: z.string().nullish(),
1292
1290
  })
1293
1291
  .refine((data) => data.id !== undefined || data.key !== undefined, {
1294
1292
  message: "Either 'id' or 'key' must be provided",
@@ -1301,8 +1299,8 @@ export const StoreCountrySchema = z.object({
1301
1299
  export const ProductSelectionResourceIdentifierSchema = z
1302
1300
  .object({
1303
1301
  typeId: ReferenceTypeIdSchema,
1304
- id: z.string().optional(),
1305
- key: z.string().optional(),
1302
+ id: z.string().nullish(),
1303
+ key: z.string().nullish(),
1306
1304
  })
1307
1305
  .refine((data) => data.id !== undefined || data.key !== undefined, {
1308
1306
  message: "Either 'id' or 'key' must be provided",
@@ -1310,7 +1308,7 @@ export const ProductSelectionResourceIdentifierSchema = z
1310
1308
 
1311
1309
  export const ProductSelectionSettingDraftSchema = z.object({
1312
1310
  productSelection: ProductSelectionResourceIdentifierSchema,
1313
- active: z.boolean().optional(),
1311
+ active: z.boolean().nullish(),
1314
1312
  });
1315
1313
 
1316
1314
  export const DestinationSchema = z.object({
@@ -1319,7 +1317,7 @@ export const DestinationSchema = z.object({
1319
1317
 
1320
1318
  export const MessageSubscriptionSchema = z.object({
1321
1319
  resourceTypeId: MessageSubscriptionResourceTypeIdSchema,
1322
- types: z.array(z.string()).optional(),
1320
+ types: z.array(z.string()).nullish(),
1323
1321
  });
1324
1322
 
1325
1323
  export const ChangeSubscriptionSchema = z.object({
@@ -1328,7 +1326,7 @@ export const ChangeSubscriptionSchema = z.object({
1328
1326
 
1329
1327
  export const EventSubscriptionSchema = z.object({
1330
1328
  resourceTypeId: EventSubscriptionResourceTypeIdSchema,
1331
- types: z.array(EventTypeSchema).optional(),
1329
+ types: z.array(EventTypeSchema).nullish(),
1332
1330
  });
1333
1331
 
1334
1332
  export const CloudEventsFormatSchema = z.object({
@@ -1346,12 +1344,12 @@ export const DeliveryFormatSchema = z.object({
1346
1344
 
1347
1345
  export const TaxRateDraftSchema = z.object({
1348
1346
  name: z.string(),
1349
- amount: z.number().optional(),
1347
+ amount: z.number().nullish(),
1350
1348
  includedInPrice: z.boolean(),
1351
1349
  country: CountryCodeSchema,
1352
- state: z.string().optional(),
1353
- subRates: z.array(SubRateSchema).optional(),
1354
- key: z.string().optional(),
1350
+ state: z.string().nullish(),
1351
+ subRates: z.array(SubRateSchema).nullish(),
1352
+ key: z.string().nullish(),
1355
1353
  });
1356
1354
 
1357
1355
  export const FieldTypeSchema = z.object({
@@ -1363,10 +1361,10 @@ export const FieldDefinitionSchema = z.object({
1363
1361
  name: z.string(),
1364
1362
  label: LocalizedStringSchema,
1365
1363
  required: z.boolean(),
1366
- inputHint: TypeTextInputHintSchema.optional(),
1364
+ inputHint: TypeTextInputHintSchema.nullish(),
1367
1365
  });
1368
1366
 
1369
1367
  export const LocationSchema = z.object({
1370
1368
  country: CountryCodeSchema,
1371
- state: z.string().optional(),
1369
+ state: z.string().nullish(),
1372
1370
  });