@kizlo/woocommerce 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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";
@@ -2955,8 +2975,8 @@ declare const ProductStockStatus: z.ZodEnum<{
2955
2975
  type ProductStockStatus = z.infer<typeof ProductStockStatus>;
2956
2976
  declare const PRODUCT_CATALOG_VISIBILITIES: readonly ["any", "visible", "catalog", "search", "hidden"];
2957
2977
  declare const ProductCatalogVisibility: z.ZodEnum<{
2958
- any: "any";
2959
2978
  search: "search";
2979
+ any: "any";
2960
2980
  visible: "visible";
2961
2981
  catalog: "catalog";
2962
2982
  hidden: "hidden";
@@ -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";
@@ -3071,8 +3091,8 @@ declare const ListProductInput: z.ZodObject<{
3071
3091
  and: "and";
3072
3092
  }>>;
3073
3093
  catalogVisibility: z.ZodOptional<z.ZodEnum<{
3074
- any: "any";
3075
3094
  search: "search";
3095
+ any: "any";
3076
3096
  visible: "visible";
3077
3097
  catalog: "catalog";
3078
3098
  hidden: "hidden";
@@ -3240,12 +3260,13 @@ declare const ProductAttributeCount: z.ZodObject<{
3240
3260
  }, z.core.$strip>;
3241
3261
  type ProductAttributeCount = z.input<typeof ProductAttributeCount>;
3242
3262
  declare const RetrieveProductFiltersInput: z.ZodObject<{
3263
+ search: z.ZodOptional<z.ZodString>;
3243
3264
  type: z.ZodOptional<z.ZodString>;
3244
3265
  sku: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
3245
3266
  slug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
3246
3267
  catalogVisibility: z.ZodOptional<z.ZodEnum<{
3247
- any: "any";
3248
3268
  search: "search";
3269
+ any: "any";
3249
3270
  visible: "visible";
3250
3271
  catalog: "catalog";
3251
3272
  hidden: "hidden";
@@ -3260,7 +3281,10 @@ declare const RetrieveProductFiltersInput: z.ZodObject<{
3260
3281
  and: "and";
3261
3282
  }>>;
3262
3283
  }, z.core.$strip>>>;
3263
- search: z.ZodOptional<z.ZodString>;
3284
+ order: z.ZodOptional<z.ZodEnum<{
3285
+ asc: "asc";
3286
+ desc: "desc";
3287
+ }>>;
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>>>]>>;
3266
3290
  page: z.ZodOptional<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;
@@ -5985,7 +6053,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
5985
6053
  operator?: "in" | "not_in" | "and" | undefined;
5986
6054
  }[] | undefined;
5987
6055
  attributeRelation?: "in" | "and" | undefined;
5988
- catalogVisibility?: "any" | "search" | "visible" | "catalog" | "hidden" | undefined;
6056
+ catalogVisibility?: "search" | "any" | "visible" | "catalog" | "hidden" | undefined;
5989
6057
  rating?: string | number | (string | number)[] | undefined;
5990
6058
  related?: string | number | undefined;
5991
6059
  taxonomies?: {
@@ -5998,17 +6066,18 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
5998
6066
  }, ProductList, {}>;
5999
6067
  filters: kizlo0.Procedure<"api", {
6000
6068
  query?: {
6069
+ search?: string | undefined;
6001
6070
  type?: string | undefined;
6002
6071
  sku?: string | string[] | undefined;
6003
6072
  slug?: string | string[] | undefined;
6004
- catalogVisibility?: "any" | "search" | "visible" | "catalog" | "hidden" | undefined;
6073
+ catalogVisibility?: "search" | "any" | "visible" | "catalog" | "hidden" | undefined;
6005
6074
  attributes?: {
6006
6075
  taxonomy: string;
6007
6076
  slug?: string | string[] | undefined;
6008
6077
  termId?: string | number | (string | number)[] | undefined;
6009
6078
  operator?: "in" | "not_in" | "and" | undefined;
6010
6079
  }[] | undefined;
6011
- search?: string | undefined;
6080
+ order?: "asc" | "desc" | undefined;
6012
6081
  related?: string | number | undefined;
6013
6082
  parent?: string | number | (string | number)[] | undefined;
6014
6083
  page?: 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;
@@ -9052,7 +9168,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
9052
9168
  needsPayment: zod0.ZodBoolean;
9053
9169
  needsShipping: zod0.ZodBoolean;
9054
9170
  hasCalculatedShipping: zod0.ZodBoolean;
9055
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
9171
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
9172
+ id: zod0.ZodString;
9173
+ title: zod0.ZodString;
9174
+ description: zod0.ZodString;
9175
+ order: zod0.ZodNumber;
9176
+ enabled: zod0.ZodBoolean;
9177
+ }, zod_v4_core0.$strip>>;
9056
9178
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
9057
9179
  errors: zod0.ZodArray<zod0.ZodObject<{
9058
9180
  code: zod0.ZodString;
@@ -9348,7 +9470,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
9348
9470
  needsPayment: zod0.ZodBoolean;
9349
9471
  needsShipping: zod0.ZodBoolean;
9350
9472
  hasCalculatedShipping: zod0.ZodBoolean;
9351
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
9473
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
9474
+ id: zod0.ZodString;
9475
+ title: zod0.ZodString;
9476
+ description: zod0.ZodString;
9477
+ order: zod0.ZodNumber;
9478
+ enabled: zod0.ZodBoolean;
9479
+ }, zod_v4_core0.$strip>>;
9352
9480
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
9353
9481
  errors: zod0.ZodArray<zod0.ZodObject<{
9354
9482
  code: zod0.ZodString;
@@ -9644,7 +9772,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
9644
9772
  needsPayment: zod0.ZodBoolean;
9645
9773
  needsShipping: zod0.ZodBoolean;
9646
9774
  hasCalculatedShipping: zod0.ZodBoolean;
9647
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
9775
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
9776
+ id: zod0.ZodString;
9777
+ title: zod0.ZodString;
9778
+ description: zod0.ZodString;
9779
+ order: zod0.ZodNumber;
9780
+ enabled: zod0.ZodBoolean;
9781
+ }, zod_v4_core0.$strip>>;
9648
9782
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
9649
9783
  errors: zod0.ZodArray<zod0.ZodObject<{
9650
9784
  code: zod0.ZodString;
@@ -9940,7 +10074,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
9940
10074
  needsPayment: zod0.ZodBoolean;
9941
10075
  needsShipping: zod0.ZodBoolean;
9942
10076
  hasCalculatedShipping: zod0.ZodBoolean;
9943
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
10077
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
10078
+ id: zod0.ZodString;
10079
+ title: zod0.ZodString;
10080
+ description: zod0.ZodString;
10081
+ order: zod0.ZodNumber;
10082
+ enabled: zod0.ZodBoolean;
10083
+ }, zod_v4_core0.$strip>>;
9944
10084
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
9945
10085
  errors: zod0.ZodArray<zod0.ZodObject<{
9946
10086
  code: zod0.ZodString;
@@ -10236,7 +10376,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
10236
10376
  needsPayment: zod0.ZodBoolean;
10237
10377
  needsShipping: zod0.ZodBoolean;
10238
10378
  hasCalculatedShipping: zod0.ZodBoolean;
10239
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
10379
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
10380
+ id: zod0.ZodString;
10381
+ title: zod0.ZodString;
10382
+ description: zod0.ZodString;
10383
+ order: zod0.ZodNumber;
10384
+ enabled: zod0.ZodBoolean;
10385
+ }, zod_v4_core0.$strip>>;
10240
10386
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
10241
10387
  errors: zod0.ZodArray<zod0.ZodObject<{
10242
10388
  code: zod0.ZodString;
@@ -10532,7 +10678,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
10532
10678
  needsPayment: zod0.ZodBoolean;
10533
10679
  needsShipping: zod0.ZodBoolean;
10534
10680
  hasCalculatedShipping: zod0.ZodBoolean;
10535
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
10681
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
10682
+ id: zod0.ZodString;
10683
+ title: zod0.ZodString;
10684
+ description: zod0.ZodString;
10685
+ order: zod0.ZodNumber;
10686
+ enabled: zod0.ZodBoolean;
10687
+ }, zod_v4_core0.$strip>>;
10536
10688
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
10537
10689
  errors: zod0.ZodArray<zod0.ZodObject<{
10538
10690
  code: zod0.ZodString;
@@ -10828,7 +10980,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
10828
10980
  needsPayment: zod0.ZodBoolean;
10829
10981
  needsShipping: zod0.ZodBoolean;
10830
10982
  hasCalculatedShipping: zod0.ZodBoolean;
10831
- paymentMethods: zod0.ZodArray<zod0.ZodString>;
10983
+ paymentMethods: zod0.ZodArray<zod0.ZodObject<{
10984
+ id: zod0.ZodString;
10985
+ title: zod0.ZodString;
10986
+ description: zod0.ZodString;
10987
+ order: zod0.ZodNumber;
10988
+ enabled: zod0.ZodBoolean;
10989
+ }, zod_v4_core0.$strip>>;
10832
10990
  paymentRequirements: zod0.ZodArray<zod0.ZodString>;
10833
10991
  errors: zod0.ZodArray<zod0.ZodObject<{
10834
10992
  code: zod0.ZodString;
@@ -11226,7 +11384,13 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
11226
11384
  needsPayment: boolean;
11227
11385
  needsShipping: boolean;
11228
11386
  hasCalculatedShipping: boolean;
11229
- paymentMethods: string[];
11387
+ paymentMethods: {
11388
+ id: string;
11389
+ title: string;
11390
+ description: string;
11391
+ order: number;
11392
+ enabled: boolean;
11393
+ }[];
11230
11394
  paymentRequirements: string[];
11231
11395
  errors: {
11232
11396
  code: string;
@@ -11394,4 +11558,4 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
11394
11558
  };
11395
11559
  }>;
11396
11560
  //#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 };
11561
+ 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,
@@ -2354,7 +2384,7 @@ function woocommerce() {
2354
2384
  requires: {
2355
2385
  plugins: [{
2356
2386
  name: "kizlo-woocommerce",
2357
- version: "0.4.0"
2387
+ version: "0.5.0"
2358
2388
  }],
2359
2389
  endpoints: [
2360
2390
  "woocommerce.customers",
@@ -2376,4 +2406,4 @@ function woocommerce() {
2376
2406
  }
2377
2407
 
2378
2408
  //#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 };
2409
+ 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
@@ -1,8 +1,18 @@
1
- import * as kizlo19 from "kizlo";
1
+ import * as kizlo0 from "kizlo";
2
2
  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
@@ -10,6 +20,6 @@ import { DevPluginSource } from "kizlo/test";
10
20
  */
11
21
  declare function woocommerce(opts?: {
12
22
  plugins?: DevPluginSource[];
13
- }): kizlo19.Fixture;
23
+ }): kizlo0.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.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "WooCommerce integration for Kizlo.",