@kizlo/woocommerce 0.5.0 → 0.6.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.
package/dist/index.d.ts CHANGED
@@ -264,6 +264,14 @@ declare const CartError: z$1.ZodObject<{
264
264
  message: z$1.ZodString;
265
265
  }, z$1.core.$strip>;
266
266
  type CartError = z$1.infer<typeof CartError>;
267
+ declare const CartPaymentMethod: z$1.ZodObject<{
268
+ id: z$1.ZodString;
269
+ title: z$1.ZodString;
270
+ description: z$1.ZodString;
271
+ order: z$1.ZodNumber;
272
+ enabled: z$1.ZodBoolean;
273
+ }, z$1.core.$strip>;
274
+ type CartPaymentMethod = z$1.infer<typeof CartPaymentMethod>;
267
275
  declare const Cart: z$1.ZodObject<{
268
276
  items: z$1.ZodArray<z$1.ZodObject<{
269
277
  key: z$1.ZodString;
@@ -520,7 +528,13 @@ declare const Cart: z$1.ZodObject<{
520
528
  needsPayment: z$1.ZodBoolean;
521
529
  needsShipping: z$1.ZodBoolean;
522
530
  hasCalculatedShipping: z$1.ZodBoolean;
523
- paymentMethods: z$1.ZodArray<z$1.ZodString>;
531
+ paymentMethods: z$1.ZodArray<z$1.ZodObject<{
532
+ id: z$1.ZodString;
533
+ title: z$1.ZodString;
534
+ description: z$1.ZodString;
535
+ order: z$1.ZodNumber;
536
+ enabled: z$1.ZodBoolean;
537
+ }, z$1.core.$strip>>;
524
538
  paymentRequirements: z$1.ZodArray<z$1.ZodString>;
525
539
  errors: z$1.ZodArray<z$1.ZodObject<{
526
540
  code: z$1.ZodString;
@@ -939,7 +953,13 @@ declare const Checkout: z$2.ZodObject<{
939
953
  needsPayment: z$2.ZodBoolean;
940
954
  needsShipping: z$2.ZodBoolean;
941
955
  hasCalculatedShipping: z$2.ZodBoolean;
942
- paymentMethods: z$2.ZodArray<z$2.ZodString>;
956
+ paymentMethods: z$2.ZodArray<z$2.ZodObject<{
957
+ id: z$2.ZodString;
958
+ title: z$2.ZodString;
959
+ description: z$2.ZodString;
960
+ order: z$2.ZodNumber;
961
+ enabled: z$2.ZodBoolean;
962
+ }, z$2.core.$strip>>;
943
963
  paymentRequirements: z$2.ZodArray<z$2.ZodString>;
944
964
  errors: z$2.ZodArray<z$2.ZodObject<{
945
965
  code: z$2.ZodString;
@@ -2917,9 +2937,9 @@ declare const ProductOrderBy: z.ZodEnum<{
2917
2937
  date: "date";
2918
2938
  price: "price";
2919
2939
  id: "id";
2940
+ title: "title";
2920
2941
  modified: "modified";
2921
2942
  include: "include";
2922
- title: "title";
2923
2943
  popularity: "popularity";
2924
2944
  rating: "rating";
2925
2945
  menu_order: "menu_order";
@@ -3013,9 +3033,9 @@ declare const ListProductInput: z.ZodObject<{
3013
3033
  date: "date";
3014
3034
  price: "price";
3015
3035
  id: "id";
3036
+ title: "title";
3016
3037
  modified: "modified";
3017
3038
  include: "include";
3018
- title: "title";
3019
3039
  popularity: "popularity";
3020
3040
  rating: "rating";
3021
3041
  menu_order: "menu_order";
@@ -3260,6 +3280,10 @@ declare const RetrieveProductFiltersInput: z.ZodObject<{
3260
3280
  and: "and";
3261
3281
  }>>;
3262
3282
  }, z.core.$strip>>>;
3283
+ order: z.ZodOptional<z.ZodEnum<{
3284
+ asc: "asc";
3285
+ desc: "desc";
3286
+ }>>;
3263
3287
  search: z.ZodOptional<z.ZodString>;
3264
3288
  related: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>>;
3265
3289
  parent: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>, z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>>]>>;
@@ -3276,19 +3300,15 @@ declare const RetrieveProductFiltersInput: z.ZodObject<{
3276
3300
  exclude: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>, z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>>]>>;
3277
3301
  include: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>, z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>>]>>;
3278
3302
  offset: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>>;
3279
- order: z.ZodOptional<z.ZodEnum<{
3280
- asc: "asc";
3281
- desc: "desc";
3282
- }>>;
3283
3303
  rating: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>>, z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>>>]>>;
3284
3304
  orderBy: z.ZodOptional<z.ZodEnum<{
3285
3305
  slug: "slug";
3286
3306
  date: "date";
3287
3307
  price: "price";
3288
3308
  id: "id";
3309
+ title: "title";
3289
3310
  modified: "modified";
3290
3311
  include: "include";
3291
- title: "title";
3292
3312
  popularity: "popularity";
3293
3313
  rating: "rating";
3294
3314
  menu_order: "menu_order";
@@ -3623,7 +3643,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
3623
3643
  needsPayment: boolean;
3624
3644
  needsShipping: boolean;
3625
3645
  hasCalculatedShipping: boolean;
3626
- paymentMethods: string[];
3646
+ paymentMethods: {
3647
+ id: string;
3648
+ title: string;
3649
+ description: string;
3650
+ order: number;
3651
+ enabled: boolean;
3652
+ }[];
3627
3653
  paymentRequirements: string[];
3628
3654
  errors: {
3629
3655
  code: string;
@@ -3955,7 +3981,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
3955
3981
  needsPayment: boolean;
3956
3982
  needsShipping: boolean;
3957
3983
  hasCalculatedShipping: boolean;
3958
- paymentMethods: string[];
3984
+ paymentMethods: {
3985
+ id: string;
3986
+ title: string;
3987
+ description: string;
3988
+ order: number;
3989
+ enabled: boolean;
3990
+ }[];
3959
3991
  paymentRequirements: string[];
3960
3992
  errors: {
3961
3993
  code: string;
@@ -4267,7 +4299,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
4267
4299
  needsPayment: boolean;
4268
4300
  needsShipping: boolean;
4269
4301
  hasCalculatedShipping: boolean;
4270
- paymentMethods: string[];
4302
+ paymentMethods: {
4303
+ id: string;
4304
+ title: string;
4305
+ description: string;
4306
+ order: number;
4307
+ enabled: boolean;
4308
+ }[];
4271
4309
  paymentRequirements: string[];
4272
4310
  errors: {
4273
4311
  code: string;
@@ -4589,7 +4627,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
4589
4627
  needsPayment: boolean;
4590
4628
  needsShipping: boolean;
4591
4629
  hasCalculatedShipping: boolean;
4592
- paymentMethods: string[];
4630
+ paymentMethods: {
4631
+ id: string;
4632
+ title: string;
4633
+ description: string;
4634
+ order: number;
4635
+ enabled: boolean;
4636
+ }[];
4593
4637
  paymentRequirements: string[];
4594
4638
  errors: {
4595
4639
  code: string;
@@ -4927,7 +4971,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
4927
4971
  needsPayment: boolean;
4928
4972
  needsShipping: boolean;
4929
4973
  hasCalculatedShipping: boolean;
4930
- paymentMethods: string[];
4974
+ paymentMethods: {
4975
+ id: string;
4976
+ title: string;
4977
+ description: string;
4978
+ order: number;
4979
+ enabled: boolean;
4980
+ }[];
4931
4981
  paymentRequirements: string[];
4932
4982
  errors: {
4933
4983
  code: string;
@@ -5254,7 +5304,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
5254
5304
  needsPayment: boolean;
5255
5305
  needsShipping: boolean;
5256
5306
  hasCalculatedShipping: boolean;
5257
- paymentMethods: string[];
5307
+ paymentMethods: {
5308
+ id: string;
5309
+ title: string;
5310
+ description: string;
5311
+ order: number;
5312
+ enabled: boolean;
5313
+ }[];
5258
5314
  paymentRequirements: string[];
5259
5315
  errors: {
5260
5316
  code: string;
@@ -5567,7 +5623,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
5567
5623
  needsPayment: boolean;
5568
5624
  needsShipping: boolean;
5569
5625
  hasCalculatedShipping: boolean;
5570
- paymentMethods: string[];
5626
+ paymentMethods: {
5627
+ id: string;
5628
+ title: string;
5629
+ description: string;
5630
+ order: number;
5631
+ enabled: boolean;
5632
+ }[];
5571
5633
  paymentRequirements: string[];
5572
5634
  errors: {
5573
5635
  code: string;
@@ -5882,7 +5944,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
5882
5944
  needsPayment: boolean;
5883
5945
  needsShipping: boolean;
5884
5946
  hasCalculatedShipping: boolean;
5885
- paymentMethods: string[];
5947
+ paymentMethods: {
5948
+ id: string;
5949
+ title: string;
5950
+ description: string;
5951
+ order: number;
5952
+ enabled: boolean;
5953
+ }[];
5886
5954
  paymentRequirements: string[];
5887
5955
  errors: {
5888
5956
  code: string;
@@ -5962,7 +6030,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
5962
6030
  include?: string | number | (string | number)[] | undefined;
5963
6031
  offset?: string | number | undefined;
5964
6032
  order?: "asc" | "desc" | undefined;
5965
- orderBy?: "slug" | "date" | "price" | "id" | "modified" | "include" | "title" | "popularity" | "rating" | "menu_order" | "comment_count" | undefined;
6033
+ orderBy?: "slug" | "date" | "price" | "id" | "title" | "modified" | "include" | "popularity" | "rating" | "menu_order" | "comment_count" | undefined;
5966
6034
  parent?: string | number | (string | number)[] | undefined;
5967
6035
  parentExclude?: string | number | (string | number)[] | undefined;
5968
6036
  type?: string | undefined;
@@ -6008,6 +6076,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6008
6076
  termId?: string | number | (string | number)[] | undefined;
6009
6077
  operator?: "in" | "not_in" | "and" | undefined;
6010
6078
  }[] | undefined;
6079
+ order?: "asc" | "desc" | undefined;
6011
6080
  search?: string | undefined;
6012
6081
  related?: string | number | undefined;
6013
6082
  parent?: string | number | (string | number)[] | undefined;
@@ -6019,9 +6088,8 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6019
6088
  exclude?: string | number | (string | number)[] | undefined;
6020
6089
  include?: string | number | (string | number)[] | undefined;
6021
6090
  offset?: string | number | undefined;
6022
- order?: "asc" | "desc" | undefined;
6023
6091
  rating?: string | number | (string | number)[] | undefined;
6024
- orderBy?: "slug" | "date" | "price" | "id" | "modified" | "include" | "title" | "popularity" | "rating" | "menu_order" | "comment_count" | undefined;
6092
+ orderBy?: "slug" | "date" | "price" | "id" | "title" | "modified" | "include" | "popularity" | "rating" | "menu_order" | "comment_count" | undefined;
6025
6093
  parentExclude?: string | number | (string | number)[] | undefined;
6026
6094
  featured?: string | boolean | undefined;
6027
6095
  category?: string | number | (string | number)[] | undefined;
@@ -6426,7 +6494,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6426
6494
  needsPayment: boolean;
6427
6495
  needsShipping: boolean;
6428
6496
  hasCalculatedShipping: boolean;
6429
- paymentMethods: string[];
6497
+ paymentMethods: {
6498
+ id: string;
6499
+ title: string;
6500
+ description: string;
6501
+ order: number;
6502
+ enabled: boolean;
6503
+ }[];
6430
6504
  paymentRequirements: string[];
6431
6505
  errors: {
6432
6506
  code: string;
@@ -6795,7 +6869,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6795
6869
  needsPayment: boolean;
6796
6870
  needsShipping: boolean;
6797
6871
  hasCalculatedShipping: boolean;
6798
- paymentMethods: string[];
6872
+ paymentMethods: {
6873
+ id: string;
6874
+ title: string;
6875
+ description: string;
6876
+ order: number;
6877
+ enabled: boolean;
6878
+ }[];
6799
6879
  paymentRequirements: string[];
6800
6880
  errors: {
6801
6881
  code: string;
@@ -7114,7 +7194,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
7114
7194
  needsPayment: zod0.ZodBoolean;
7115
7195
  needsShipping: zod0.ZodBoolean;
7116
7196
  hasCalculatedShipping: zod0.ZodBoolean;
7117
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
7197
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
7198
+ id: zod0.ZodString;
7199
+ title: zod0.ZodString;
7200
+ description: zod0.ZodString;
7201
+ order: zod0.ZodNumber;
7202
+ enabled: zod0.ZodBoolean;
7203
+ }, zod_v4_core0.$strip>>;
7118
7204
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
7119
7205
  errors: zod0.ZodArray<zod0.ZodObject<{
7120
7206
  code: zod0.ZodString;
@@ -7410,7 +7496,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
7410
7496
  needsPayment: zod0.ZodBoolean;
7411
7497
  needsShipping: zod0.ZodBoolean;
7412
7498
  hasCalculatedShipping: zod0.ZodBoolean;
7413
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
7499
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
7500
+ id: zod0.ZodString;
7501
+ title: zod0.ZodString;
7502
+ description: zod0.ZodString;
7503
+ order: zod0.ZodNumber;
7504
+ enabled: zod0.ZodBoolean;
7505
+ }, zod_v4_core0.$strip>>;
7414
7506
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
7415
7507
  errors: zod0.ZodArray<zod0.ZodObject<{
7416
7508
  code: zod0.ZodString;
@@ -7706,7 +7798,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
7706
7798
  needsPayment: zod0.ZodBoolean;
7707
7799
  needsShipping: zod0.ZodBoolean;
7708
7800
  hasCalculatedShipping: zod0.ZodBoolean;
7709
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
7801
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
7802
+ id: zod0.ZodString;
7803
+ title: zod0.ZodString;
7804
+ description: zod0.ZodString;
7805
+ order: zod0.ZodNumber;
7806
+ enabled: zod0.ZodBoolean;
7807
+ }, zod_v4_core0.$strip>>;
7710
7808
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
7711
7809
  errors: zod0.ZodArray<zod0.ZodObject<{
7712
7810
  code: zod0.ZodString;
@@ -8002,7 +8100,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
8002
8100
  needsPayment: zod0.ZodBoolean;
8003
8101
  needsShipping: zod0.ZodBoolean;
8004
8102
  hasCalculatedShipping: zod0.ZodBoolean;
8005
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
8103
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
8104
+ id: zod0.ZodString;
8105
+ title: zod0.ZodString;
8106
+ description: zod0.ZodString;
8107
+ order: zod0.ZodNumber;
8108
+ enabled: zod0.ZodBoolean;
8109
+ }, zod_v4_core0.$strip>>;
8006
8110
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
8007
8111
  errors: zod0.ZodArray<zod0.ZodObject<{
8008
8112
  code: zod0.ZodString;
@@ -8298,7 +8402,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
8298
8402
  needsPayment: zod0.ZodBoolean;
8299
8403
  needsShipping: zod0.ZodBoolean;
8300
8404
  hasCalculatedShipping: zod0.ZodBoolean;
8301
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
8405
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
8406
+ id: zod0.ZodString;
8407
+ title: zod0.ZodString;
8408
+ description: zod0.ZodString;
8409
+ order: zod0.ZodNumber;
8410
+ enabled: zod0.ZodBoolean;
8411
+ }, zod_v4_core0.$strip>>;
8302
8412
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
8303
8413
  errors: zod0.ZodArray<zod0.ZodObject<{
8304
8414
  code: zod0.ZodString;
@@ -8693,7 +8803,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
8693
8803
  needsPayment: boolean;
8694
8804
  needsShipping: boolean;
8695
8805
  hasCalculatedShipping: boolean;
8696
- paymentMethods: string[];
8806
+ paymentMethods: {
8807
+ id: string;
8808
+ title: string;
8809
+ description: string;
8810
+ order: number;
8811
+ enabled: boolean;
8812
+ }[];
8697
8813
  paymentRequirements: string[];
8698
8814
  errors: {
8699
8815
  code: string;
@@ -8765,6 +8881,10 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
8765
8881
  readonly status: 400;
8766
8882
  readonly message: "A payment method is required.";
8767
8883
  };
8884
+ readonly CHECKOUT_SHIPPING_OPTION_INVALID: {
8885
+ readonly status: 400;
8886
+ readonly message: "The selected shipping option is missing or unavailable.";
8887
+ };
8768
8888
  readonly CHECKOUT_VALIDATION_FAILED: {
8769
8889
  readonly status: 400;
8770
8890
  readonly message: "Checkout validation failed.";
@@ -9052,7 +9172,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
9052
9172
  needsPayment: zod0.ZodBoolean;
9053
9173
  needsShipping: zod0.ZodBoolean;
9054
9174
  hasCalculatedShipping: zod0.ZodBoolean;
9055
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
9175
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
9176
+ id: zod0.ZodString;
9177
+ title: zod0.ZodString;
9178
+ description: zod0.ZodString;
9179
+ order: zod0.ZodNumber;
9180
+ enabled: zod0.ZodBoolean;
9181
+ }, zod_v4_core0.$strip>>;
9056
9182
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
9057
9183
  errors: zod0.ZodArray<zod0.ZodObject<{
9058
9184
  code: zod0.ZodString;
@@ -9348,7 +9474,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
9348
9474
  needsPayment: zod0.ZodBoolean;
9349
9475
  needsShipping: zod0.ZodBoolean;
9350
9476
  hasCalculatedShipping: zod0.ZodBoolean;
9351
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
9477
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
9478
+ id: zod0.ZodString;
9479
+ title: zod0.ZodString;
9480
+ description: zod0.ZodString;
9481
+ order: zod0.ZodNumber;
9482
+ enabled: zod0.ZodBoolean;
9483
+ }, zod_v4_core0.$strip>>;
9352
9484
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
9353
9485
  errors: zod0.ZodArray<zod0.ZodObject<{
9354
9486
  code: zod0.ZodString;
@@ -9644,7 +9776,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
9644
9776
  needsPayment: zod0.ZodBoolean;
9645
9777
  needsShipping: zod0.ZodBoolean;
9646
9778
  hasCalculatedShipping: zod0.ZodBoolean;
9647
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
9779
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
9780
+ id: zod0.ZodString;
9781
+ title: zod0.ZodString;
9782
+ description: zod0.ZodString;
9783
+ order: zod0.ZodNumber;
9784
+ enabled: zod0.ZodBoolean;
9785
+ }, zod_v4_core0.$strip>>;
9648
9786
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
9649
9787
  errors: zod0.ZodArray<zod0.ZodObject<{
9650
9788
  code: zod0.ZodString;
@@ -9940,7 +10078,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
9940
10078
  needsPayment: zod0.ZodBoolean;
9941
10079
  needsShipping: zod0.ZodBoolean;
9942
10080
  hasCalculatedShipping: zod0.ZodBoolean;
9943
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
10081
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
10082
+ id: zod0.ZodString;
10083
+ title: zod0.ZodString;
10084
+ description: zod0.ZodString;
10085
+ order: zod0.ZodNumber;
10086
+ enabled: zod0.ZodBoolean;
10087
+ }, zod_v4_core0.$strip>>;
9944
10088
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
9945
10089
  errors: zod0.ZodArray<zod0.ZodObject<{
9946
10090
  code: zod0.ZodString;
@@ -10236,7 +10380,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
10236
10380
  needsPayment: zod0.ZodBoolean;
10237
10381
  needsShipping: zod0.ZodBoolean;
10238
10382
  hasCalculatedShipping: zod0.ZodBoolean;
10239
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
10383
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
10384
+ id: zod0.ZodString;
10385
+ title: zod0.ZodString;
10386
+ description: zod0.ZodString;
10387
+ order: zod0.ZodNumber;
10388
+ enabled: zod0.ZodBoolean;
10389
+ }, zod_v4_core0.$strip>>;
10240
10390
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
10241
10391
  errors: zod0.ZodArray<zod0.ZodObject<{
10242
10392
  code: zod0.ZodString;
@@ -10532,7 +10682,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
10532
10682
  needsPayment: zod0.ZodBoolean;
10533
10683
  needsShipping: zod0.ZodBoolean;
10534
10684
  hasCalculatedShipping: zod0.ZodBoolean;
10535
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
10685
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
10686
+ id: zod0.ZodString;
10687
+ title: zod0.ZodString;
10688
+ description: zod0.ZodString;
10689
+ order: zod0.ZodNumber;
10690
+ enabled: zod0.ZodBoolean;
10691
+ }, zod_v4_core0.$strip>>;
10536
10692
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
10537
10693
  errors: zod0.ZodArray<zod0.ZodObject<{
10538
10694
  code: zod0.ZodString;
@@ -10828,7 +10984,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
10828
10984
  needsPayment: zod0.ZodBoolean;
10829
10985
  needsShipping: zod0.ZodBoolean;
10830
10986
  hasCalculatedShipping: zod0.ZodBoolean;
10831
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
10987
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
10988
+ id: zod0.ZodString;
10989
+ title: zod0.ZodString;
10990
+ description: zod0.ZodString;
10991
+ order: zod0.ZodNumber;
10992
+ enabled: zod0.ZodBoolean;
10993
+ }, zod_v4_core0.$strip>>;
10832
10994
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
10833
10995
  errors: zod0.ZodArray<zod0.ZodObject<{
10834
10996
  code: zod0.ZodString;
@@ -11226,7 +11388,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
11226
11388
  needsPayment: boolean;
11227
11389
  needsShipping: boolean;
11228
11390
  hasCalculatedShipping: boolean;
11229
- paymentMethods: string[];
11391
+ paymentMethods: {
11392
+ id: string;
11393
+ title: string;
11394
+ description: string;
11395
+ order: number;
11396
+ enabled: boolean;
11397
+ }[];
11230
11398
  paymentRequirements: string[];
11231
11399
  errors: {
11232
11400
  code: string;
@@ -11394,4 +11562,4 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
11394
11562
  };
11395
11563
  }>;
11396
11564
  //#endregion
11397
- export { AddCartItemInput, ApplyCouponInput, Cart, CartAdditionalFields, CartBillingAddress, CartCoupon, CartCouponTotals, CartError, CartFee, CartFeeTotals, CartItem, CartItemData, CartItemQuantityLimits, CartItemTotals, CartSelectedAttribute, CartShippingAddress, CartShippingDestination, CartShippingItem, CartShippingPackage, CartShippingRate, CartShippingRateMetadata, CartTaxLine, CartTotals, Checkout, CheckoutAdditionalFields, CheckoutExtensions, CheckoutPaymentData, CheckoutPaymentResult, ConfirmCheckoutInput, GetOrderInput, ListProductInput, ListProductInputOut, Order, OrderFee, OrderItem, OrderItemProduct, OrderTotals, PRODUCT_ATTRIBUTE_RELATIONS, PRODUCT_CATALOG_VISIBILITIES, PRODUCT_DATE_COLUMNS, PRODUCT_RATINGS, PRODUCT_STOCK_STATUSES, PRODUCT_TYPES, Product, ProductAddToCart, ProductAttributeCount, ProductAttributeFilter, ProductAttributeRelation, ProductAttributeSummary, ProductAttributeTermSummary, ProductBrandSummary, ProductCatalogVisibility, ProductCategorySummary, ProductCustomFieldsSchema, ProductDateColumn, ProductDimensions, ProductExtensions, ProductFilters, ProductFiltersAttributeTerm, ProductFiltersPriceRange, ProductFiltersRatingCount, ProductFiltersStockStatus, ProductFiltersTaxonomyTerm, ProductFiltersTerm, ProductList, ProductOrderBy, ProductPriceRange, ProductPrices, ProductRating, ProductRecommendations, ProductStockAvailability, ProductStockStatus, ProductSummary, ProductTagSummary, ProductTaxonomyFilter, ProductTaxonomyOperator, ProductTermSummary, ProductType, ProductVariationAttributeSummary, ProductVariationSummary, RemoveCartItemInput, RemoveCouponInput, RetrieveProductFiltersInput, RetrieveProductFiltersInputOut, RetrieveProductInput, RetryCheckoutInput, SWATCH_TYPES, SelectCartShippingRateInput, SwatchType, UpdateCartInput, UpdateCartItemInput, UpdateCheckoutInput, woocommerce };
11565
+ export { AddCartItemInput, ApplyCouponInput, Cart, CartAdditionalFields, CartBillingAddress, CartCoupon, CartCouponTotals, CartError, CartFee, CartFeeTotals, CartItem, CartItemData, CartItemQuantityLimits, CartItemTotals, CartPaymentMethod, CartSelectedAttribute, CartShippingAddress, CartShippingDestination, CartShippingItem, CartShippingPackage, CartShippingRate, CartShippingRateMetadata, CartTaxLine, CartTotals, Checkout, CheckoutAdditionalFields, CheckoutExtensions, CheckoutPaymentData, CheckoutPaymentResult, ConfirmCheckoutInput, GetOrderInput, ListProductInput, ListProductInputOut, Order, OrderFee, OrderItem, OrderItemProduct, OrderTotals, PRODUCT_ATTRIBUTE_RELATIONS, PRODUCT_CATALOG_VISIBILITIES, PRODUCT_DATE_COLUMNS, PRODUCT_RATINGS, PRODUCT_STOCK_STATUSES, PRODUCT_TYPES, Product, ProductAddToCart, ProductAttributeCount, ProductAttributeFilter, ProductAttributeRelation, ProductAttributeSummary, ProductAttributeTermSummary, ProductBrandSummary, ProductCatalogVisibility, ProductCategorySummary, ProductCustomFieldsSchema, ProductDateColumn, ProductDimensions, ProductExtensions, ProductFilters, ProductFiltersAttributeTerm, ProductFiltersPriceRange, ProductFiltersRatingCount, ProductFiltersStockStatus, ProductFiltersTaxonomyTerm, ProductFiltersTerm, ProductList, ProductOrderBy, ProductPriceRange, ProductPrices, ProductRating, ProductRecommendations, ProductStockAvailability, ProductStockStatus, ProductSummary, ProductTagSummary, ProductTaxonomyFilter, ProductTaxonomyOperator, ProductTermSummary, ProductType, ProductVariationAttributeSummary, ProductVariationSummary, RemoveCartItemInput, RemoveCouponInput, RetrieveProductFiltersInput, RetrieveProductFiltersInputOut, RetrieveProductInput, RetryCheckoutInput, SWATCH_TYPES, SelectCartShippingRateInput, SwatchType, UpdateCartInput, UpdateCartItemInput, UpdateCheckoutInput, woocommerce };
package/dist/index.js CHANGED
@@ -627,6 +627,13 @@ const CartError = z$1.object({
627
627
  code: z$1.string(),
628
628
  message: z$1.string()
629
629
  });
630
+ const CartPaymentMethod = z$1.object({
631
+ id: z$1.string(),
632
+ title: z$1.string(),
633
+ description: z$1.string(),
634
+ order: z$1.number(),
635
+ enabled: z$1.boolean()
636
+ });
630
637
  const Cart = z$1.object({
631
638
  items: z$1.array(CartItem),
632
639
  itemCount: z$1.number(),
@@ -640,7 +647,7 @@ const Cart = z$1.object({
640
647
  needsPayment: z$1.boolean(),
641
648
  needsShipping: z$1.boolean(),
642
649
  hasCalculatedShipping: z$1.boolean(),
643
- paymentMethods: z$1.array(z$1.string()),
650
+ paymentMethods: z$1.array(CartPaymentMethod),
644
651
  paymentRequirements: z$1.array(z$1.string()),
645
652
  errors: z$1.array(CartError),
646
653
  totals: CartTotals,
@@ -947,7 +954,7 @@ assertNoMissing$2();
947
954
  assertNoMissing$2();
948
955
  assertNoMissing$2();
949
956
  function deserializeCart(data) {
950
- const { extensions } = deserializeExtensions(data.extensions);
957
+ const { extensions, kizlo } = deserializeExtensions(data.extensions);
951
958
  return {
952
959
  items: data.items.map(deserializeCartItem),
953
960
  itemCount: data.items_count,
@@ -1003,7 +1010,7 @@ function deserializeCart(data) {
1003
1010
  needsPayment: data.needs_payment,
1004
1011
  needsShipping: data.needs_shipping,
1005
1012
  hasCalculatedShipping: data.has_calculated_shipping,
1006
- paymentMethods: data.payment_methods,
1013
+ paymentMethods: deserializePaymentMethods(kizlo.payment_methods),
1007
1014
  paymentRequirements: data.payment_requirements,
1008
1015
  errors: data.errors,
1009
1016
  totals: {
@@ -1090,6 +1097,29 @@ function deserializeCartItem(item) {
1090
1097
  extensions
1091
1098
  };
1092
1099
  }
1100
+ /**
1101
+ * Read the available payment gateways from the Kizlo cart extension.
1102
+ *
1103
+ * WooCommerce's native `payment_methods` is a list of IDs; the presentation
1104
+ * metadata lives on `extensions.kizlo.payment_methods`, which the WooCommerce
1105
+ * plugin populates. Entries missing a required field are dropped rather than
1106
+ * passed through half-formed.
1107
+ */
1108
+ function deserializePaymentMethods(value) {
1109
+ if (!Array.isArray(value)) return [];
1110
+ return value.flatMap((entry) => {
1111
+ if (typeof entry !== "object" || entry === null) return [];
1112
+ const { id, title, description, order, enabled } = entry;
1113
+ if (typeof id !== "string" || typeof title !== "string" || typeof description !== "string" || typeof order !== "number" || typeof enabled !== "boolean") return [];
1114
+ return [{
1115
+ id,
1116
+ title,
1117
+ description,
1118
+ order,
1119
+ enabled
1120
+ }];
1121
+ });
1122
+ }
1093
1123
  function deserializeCartShippingAddress(address) {
1094
1124
  return {
1095
1125
  firstName: address.first_name,
@@ -1387,6 +1417,10 @@ const CONFIRM_CHECKOUT_ERROR_MAP = defineErrorMap({
1387
1417
  status: 400,
1388
1418
  message: "A payment method is required."
1389
1419
  },
1420
+ CHECKOUT_SHIPPING_OPTION_INVALID: {
1421
+ status: 400,
1422
+ message: "The selected shipping option is missing or unavailable."
1423
+ },
1390
1424
  CHECKOUT_VALIDATION_FAILED: {
1391
1425
  status: 400,
1392
1426
  message: "Checkout validation failed.",
@@ -1744,6 +1778,7 @@ const CHECKOUT_PROCEDURES = {
1744
1778
  case "woocommerce_rest_checkout_process_payment_error": throw errors.CHECKOUT_PAYMENT_FAILED({ message: response.error.message });
1745
1779
  case "woocommerce_rest_checkout_payment_method_disabled": throw errors.CHECKOUT_PAYMENT_METHOD_DISABLED({ message: response.error.message });
1746
1780
  case "woocommerce_rest_checkout_missing_payment_method": throw errors.CHECKOUT_PAYMENT_METHOD_MISSING({ message: response.error.message });
1781
+ case "woocommerce_rest_invalid_shipping_option": throw errors.CHECKOUT_SHIPPING_OPTION_INVALID({ message: response.error.message });
1747
1782
  case "woocommerce_rest_checkout_custom_validation_error": throw errors.CHECKOUT_VALIDATION_FAILED({
1748
1783
  message: response.error.message,
1749
1784
  data: { fields: {} }
@@ -2354,7 +2389,7 @@ function woocommerce() {
2354
2389
  requires: {
2355
2390
  plugins: [{
2356
2391
  name: "kizlo-woocommerce",
2357
- version: "0.4.0"
2392
+ version: "0.5.0"
2358
2393
  }],
2359
2394
  endpoints: [
2360
2395
  "woocommerce.customers",
@@ -2376,4 +2411,4 @@ function woocommerce() {
2376
2411
  }
2377
2412
 
2378
2413
  //#endregion
2379
- export { AddCartItemInput, ApplyCouponInput, Cart, CartAdditionalFields, CartBillingAddress, CartCoupon, CartCouponTotals, CartError, CartFee, CartFeeTotals, CartItem, CartItemData, CartItemQuantityLimits, CartItemTotals, CartSelectedAttribute, CartShippingAddress, CartShippingDestination, CartShippingItem, CartShippingPackage, CartShippingRate, CartShippingRateMetadata, CartTaxLine, CartTotals, Checkout, CheckoutAdditionalFields, CheckoutExtensions, CheckoutPaymentData, CheckoutPaymentResult, ConfirmCheckoutInput, GetOrderInput, ListProductInput, Order, OrderFee, OrderItem, OrderItemProduct, OrderTotals, PRODUCT_ATTRIBUTE_RELATIONS, PRODUCT_CATALOG_VISIBILITIES, PRODUCT_DATE_COLUMNS, PRODUCT_RATINGS, PRODUCT_STOCK_STATUSES, PRODUCT_TYPES, Product, ProductAddToCart, ProductAttributeCount, ProductAttributeFilter, ProductAttributeRelation, ProductAttributeSummary, ProductAttributeTermSummary, ProductBrandSummary, ProductCatalogVisibility, ProductCategorySummary, ProductCustomFieldsSchema, ProductDateColumn, ProductDimensions, ProductExtensions, ProductFilters, ProductFiltersAttributeTerm, ProductFiltersPriceRange, ProductFiltersRatingCount, ProductFiltersStockStatus, ProductFiltersTaxonomyTerm, ProductFiltersTerm, ProductList, ProductOrderBy, ProductPriceRange, ProductPrices, ProductRating, ProductRecommendations, ProductStockAvailability, ProductStockStatus, ProductSummary, ProductTagSummary, ProductTaxonomyFilter, ProductTaxonomyOperator, ProductTermSummary, ProductType, ProductVariationAttributeSummary, ProductVariationSummary, RemoveCartItemInput, RemoveCouponInput, RetrieveProductFiltersInput, RetrieveProductInput, RetryCheckoutInput, SWATCH_TYPES, SelectCartShippingRateInput, SwatchType, UpdateCartInput, UpdateCartItemInput, UpdateCheckoutInput, woocommerce };
2414
+ export { AddCartItemInput, ApplyCouponInput, Cart, CartAdditionalFields, CartBillingAddress, CartCoupon, CartCouponTotals, CartError, CartFee, CartFeeTotals, CartItem, CartItemData, CartItemQuantityLimits, CartItemTotals, CartPaymentMethod, CartSelectedAttribute, CartShippingAddress, CartShippingDestination, CartShippingItem, CartShippingPackage, CartShippingRate, CartShippingRateMetadata, CartTaxLine, CartTotals, Checkout, CheckoutAdditionalFields, CheckoutExtensions, CheckoutPaymentData, CheckoutPaymentResult, ConfirmCheckoutInput, GetOrderInput, ListProductInput, Order, OrderFee, OrderItem, OrderItemProduct, OrderTotals, PRODUCT_ATTRIBUTE_RELATIONS, PRODUCT_CATALOG_VISIBILITIES, PRODUCT_DATE_COLUMNS, PRODUCT_RATINGS, PRODUCT_STOCK_STATUSES, PRODUCT_TYPES, Product, ProductAddToCart, ProductAttributeCount, ProductAttributeFilter, ProductAttributeRelation, ProductAttributeSummary, ProductAttributeTermSummary, ProductBrandSummary, ProductCatalogVisibility, ProductCategorySummary, ProductCustomFieldsSchema, ProductDateColumn, ProductDimensions, ProductExtensions, ProductFilters, ProductFiltersAttributeTerm, ProductFiltersPriceRange, ProductFiltersRatingCount, ProductFiltersStockStatus, ProductFiltersTaxonomyTerm, ProductFiltersTerm, ProductList, ProductOrderBy, ProductPriceRange, ProductPrices, ProductRating, ProductRecommendations, ProductStockAvailability, ProductStockStatus, ProductSummary, ProductTagSummary, ProductTaxonomyFilter, ProductTaxonomyOperator, ProductTermSummary, ProductType, ProductVariationAttributeSummary, ProductVariationSummary, RemoveCartItemInput, RemoveCouponInput, RetrieveProductFiltersInput, RetrieveProductInput, RetryCheckoutInput, SWATCH_TYPES, SelectCartShippingRateInput, SwatchType, UpdateCartInput, UpdateCartItemInput, UpdateCheckoutInput, woocommerce };
package/dist/test.d.ts CHANGED
@@ -3,6 +3,16 @@ import { DevPluginSource } from "kizlo/test";
3
3
 
4
4
  //#region src/test/index.d.ts
5
5
 
6
+ /**
7
+ * WooCommerce ships every gateway disabled, and paying an order needs an available one, so the
8
+ * checkout tests have nothing to reach without this. Bank transfer is the gateway with no shipping
9
+ * method or country conditions attached to it, so enabling it says the least about the rest.
10
+ *
11
+ * The title and description are set to distinctive values so the cart's payment-method metadata
12
+ * test can prove the store's configured strings flow through rather than a hardcoded default.
13
+ */
14
+ declare const BANK_TRANSFER_TITLE = "Bank transfer (Kizlo test)";
15
+ declare const BANK_TRANSFER_DESCRIPTION = "Pay by transferring to our test bank account.";
6
16
  /**
7
17
  * WooCommerce test fixture: installs WooCommerce + the kizlo-woocommerce plugin, seeds
8
18
  * products/coupons. Pass `plugins` to override the defaults — e.g. bind-mount your local
@@ -12,4 +22,4 @@ declare function woocommerce(opts?: {
12
22
  plugins?: DevPluginSource[];
13
23
  }): kizlo19.Fixture;
14
24
  //#endregion
15
- export { woocommerce };
25
+ export { BANK_TRANSFER_DESCRIPTION, BANK_TRANSFER_TITLE, woocommerce };
package/dist/test.js CHANGED
@@ -134,9 +134,18 @@ async function linkRecommendations(service, productIds) {
134
134
  * WooCommerce ships every gateway disabled, and paying an order needs an available one, so the
135
135
  * checkout tests have nothing to reach without this. Bank transfer is the gateway with no shipping
136
136
  * method or country conditions attached to it, so enabling it says the least about the rest.
137
+ *
138
+ * The title and description are set to distinctive values so the cart's payment-method metadata
139
+ * test can prove the store's configured strings flow through rather than a hardcoded default.
137
140
  */
141
+ const BANK_TRANSFER_TITLE = "Bank transfer (Kizlo test)";
142
+ const BANK_TRANSFER_DESCRIPTION = "Pay by transferring to our test bank account.";
138
143
  async function enableBankTransfer(service) {
139
- const updated = await service.put(`${WC_CORE_BASE}/payment_gateways/bacs`, { body: { enabled: true } });
144
+ const updated = await service.put(`${WC_CORE_BASE}/payment_gateways/bacs`, { body: {
145
+ enabled: true,
146
+ title: BANK_TRANSFER_TITLE,
147
+ description: BANK_TRANSFER_DESCRIPTION
148
+ } });
140
149
  if (updated.error) throw updated.error;
141
150
  }
142
151
  async function enableFlatRate(service) {
@@ -229,4 +238,4 @@ async function resetCart(service, customerId) {
229
238
  }
230
239
 
231
240
  //#endregion
232
- export { woocommerce };
241
+ export { BANK_TRANSFER_DESCRIPTION, BANK_TRANSFER_TITLE, woocommerce };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizlo/woocommerce",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "WooCommerce integration for Kizlo.",