@kizlo/woocommerce 0.8.0 → 0.9.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
@@ -658,6 +658,7 @@ declare const Checkout: z$2.ZodObject<{
658
658
  orderNumber: z$2.ZodNullable<z$2.ZodString>;
659
659
  orderKey: z$2.ZodNullable<z$2.ZodString>;
660
660
  status: z$2.ZodString;
661
+ isPaid: z$2.ZodBoolean;
661
662
  customerId: z$2.ZodNullable<z$2.ZodNumber>;
662
663
  customerNote: z$2.ZodString;
663
664
  billingAddress: z$2.ZodObject<{
@@ -1219,6 +1220,7 @@ type OrderTotals = z.infer<typeof OrderTotals>;
1219
1220
  declare const Order: z.ZodObject<{
1220
1221
  id: z.ZodNumber;
1221
1222
  status: z.ZodString;
1223
+ isPaid: z.ZodBoolean;
1222
1224
  items: z.ZodArray<z.ZodObject<{
1223
1225
  id: z.ZodNumber;
1224
1226
  productId: z.ZodNullable<z.ZodNumber>;
@@ -2979,8 +2981,8 @@ declare const ProductStockStatus: z.ZodEnum<{
2979
2981
  type ProductStockStatus = z.infer<typeof ProductStockStatus>;
2980
2982
  declare const PRODUCT_CATALOG_VISIBILITIES: readonly ["any", "visible", "catalog", "search", "hidden"];
2981
2983
  declare const ProductCatalogVisibility: z.ZodEnum<{
2982
- search: "search";
2983
2984
  any: "any";
2985
+ search: "search";
2984
2986
  visible: "visible";
2985
2987
  catalog: "catalog";
2986
2988
  hidden: "hidden";
@@ -3095,8 +3097,8 @@ declare const ListProductInput: z.ZodObject<{
3095
3097
  and: "and";
3096
3098
  }>>;
3097
3099
  catalogVisibility: z.ZodOptional<z.ZodEnum<{
3098
- search: "search";
3099
3100
  any: "any";
3101
+ search: "search";
3100
3102
  visible: "visible";
3101
3103
  catalog: "catalog";
3102
3104
  hidden: "hidden";
@@ -3264,13 +3266,12 @@ declare const ProductAttributeCount: z.ZodObject<{
3264
3266
  }, z.core.$strip>;
3265
3267
  type ProductAttributeCount = z.input<typeof ProductAttributeCount>;
3266
3268
  declare const RetrieveProductFiltersInput: z.ZodObject<{
3267
- search: z.ZodOptional<z.ZodString>;
3268
3269
  type: z.ZodOptional<z.ZodString>;
3269
3270
  sku: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
3270
3271
  slug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
3271
3272
  catalogVisibility: z.ZodOptional<z.ZodEnum<{
3272
- search: "search";
3273
3273
  any: "any";
3274
+ search: "search";
3274
3275
  visible: "visible";
3275
3276
  catalog: "catalog";
3276
3277
  hidden: "hidden";
@@ -3289,6 +3290,7 @@ declare const RetrieveProductFiltersInput: z.ZodObject<{
3289
3290
  asc: "asc";
3290
3291
  desc: "desc";
3291
3292
  }>>;
3293
+ search: z.ZodOptional<z.ZodString>;
3292
3294
  related: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>>;
3293
3295
  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>>>]>>;
3294
3296
  page: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodCoercedNumber<string | number>>>;
@@ -6057,7 +6059,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6057
6059
  operator?: "in" | "not_in" | "and" | undefined;
6058
6060
  }[] | undefined;
6059
6061
  attributeRelation?: "in" | "and" | undefined;
6060
- catalogVisibility?: "search" | "any" | "visible" | "catalog" | "hidden" | undefined;
6062
+ catalogVisibility?: "any" | "search" | "visible" | "catalog" | "hidden" | undefined;
6061
6063
  rating?: string | number | (string | number)[] | undefined;
6062
6064
  related?: string | number | undefined;
6063
6065
  taxonomies?: {
@@ -6070,11 +6072,10 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6070
6072
  }, ProductList, {}>;
6071
6073
  filters: kizlo0.Procedure<"api", {
6072
6074
  query?: {
6073
- search?: string | undefined;
6074
6075
  type?: string | undefined;
6075
6076
  sku?: string | string[] | undefined;
6076
6077
  slug?: string | string[] | undefined;
6077
- catalogVisibility?: "search" | "any" | "visible" | "catalog" | "hidden" | undefined;
6078
+ catalogVisibility?: "any" | "search" | "visible" | "catalog" | "hidden" | undefined;
6078
6079
  attributes?: {
6079
6080
  taxonomy: string;
6080
6081
  slug?: string | string[] | undefined;
@@ -6082,6 +6083,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6082
6083
  operator?: "in" | "not_in" | "and" | undefined;
6083
6084
  }[] | undefined;
6084
6085
  order?: "asc" | "desc" | undefined;
6086
+ search?: string | undefined;
6085
6087
  related?: string | number | undefined;
6086
6088
  parent?: string | number | (string | number)[] | undefined;
6087
6089
  page?: string | number | undefined;
@@ -6187,6 +6189,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6187
6189
  orderNumber: string | null;
6188
6190
  orderKey: string | null;
6189
6191
  status: string;
6192
+ isPaid: boolean;
6190
6193
  customerId: number | null;
6191
6194
  customerNote: string;
6192
6195
  billingAddress: {
@@ -6562,6 +6565,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
6562
6565
  orderNumber: string | null;
6563
6566
  orderKey: string | null;
6564
6567
  status: string;
6568
+ isPaid: boolean;
6565
6569
  customerId: number | null;
6566
6570
  customerNote: string;
6567
6571
  billingAddress: {
@@ -8498,6 +8502,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
8498
8502
  orderNumber: string | null;
8499
8503
  orderKey: string | null;
8500
8504
  status: string;
8505
+ isPaid: boolean;
8501
8506
  customerId: number | null;
8502
8507
  customerNote: string;
8503
8508
  billingAddress: {
@@ -11085,6 +11090,7 @@ declare function woocommerce(): kizlo0.Integration<"woocommerce", {
11085
11090
  orderNumber: string | null;
11086
11091
  orderKey: string | null;
11087
11092
  status: string;
11093
+ isPaid: boolean;
11088
11094
  customerId: number | null;
11089
11095
  customerNote: string;
11090
11096
  billingAddress: {
package/dist/index.js CHANGED
@@ -1588,6 +1588,7 @@ const Checkout = z$2.object({
1588
1588
  orderNumber: z$2.string().nullable(),
1589
1589
  orderKey: z$2.string().nullable(),
1590
1590
  status: z$2.string(),
1591
+ isPaid: z$2.boolean(),
1591
1592
  customerId: z$2.number().nullable(),
1592
1593
  customerNote: z$2.string(),
1593
1594
  billingAddress: CartBillingAddress,
@@ -1644,13 +1645,14 @@ function gateway(method) {
1644
1645
  return method;
1645
1646
  }
1646
1647
  function deserializeCheckout(data) {
1647
- const { extensions } = deserializeExtensions(data.extensions);
1648
+ const { extensions, kizlo } = deserializeExtensions(data.extensions);
1648
1649
  const paymentResult = data.payment_result;
1649
1650
  return {
1650
1651
  orderId: data.order_id === 0 ? null : data.order_id,
1651
1652
  orderNumber: data.order_number === "" || data.order_number === "0" ? null : data.order_number,
1652
1653
  orderKey: data.order_key === "" ? null : data.order_key,
1653
1654
  status: data.status,
1655
+ isPaid: kizlo.is_paid === true,
1654
1656
  customerId: data.customer_id === 0 ? null : data.customer_id,
1655
1657
  customerNote: data.customer_note,
1656
1658
  billingAddress: deserializeCartBillingAddress(data.billing_address),
@@ -2110,6 +2112,7 @@ const OrderTotals = z.object({
2110
2112
  const Order = z.object({
2111
2113
  id: z.number(),
2112
2114
  status: z.string(),
2115
+ isPaid: z.boolean(),
2113
2116
  items: z.array(OrderItem),
2114
2117
  coupons: z.array(CartCoupon),
2115
2118
  fees: z.array(OrderFee),
@@ -2148,9 +2151,11 @@ assertNoMissing();
2148
2151
  assertNoMissing();
2149
2152
  assertNoMissing();
2150
2153
  function deserializeOrder(data) {
2154
+ const { kizlo } = deserializeExtensions(data.extensions);
2151
2155
  return {
2152
2156
  id: data.id,
2153
2157
  status: data.status,
2158
+ isPaid: kizlo.is_paid === true,
2154
2159
  items: data.items.map(deserializeOrderItem),
2155
2160
  coupons: data.coupons.map((coupon) => ({
2156
2161
  code: coupon.code,
@@ -2416,7 +2421,7 @@ function woocommerce() {
2416
2421
  requires: {
2417
2422
  plugins: [{
2418
2423
  name: "kizlo-woocommerce",
2419
- version: "0.5.0"
2424
+ version: "0.10.0"
2420
2425
  }],
2421
2426
  endpoints: [
2422
2427
  "woocommerce.customers",
package/dist/test.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as kizlo0 from "kizlo";
1
+ import * as kizlo19 from "kizlo";
2
2
  import { DevPluginSource } from "kizlo/test";
3
3
 
4
4
  //#region src/test/index.d.ts
@@ -20,6 +20,6 @@ declare const BANK_TRANSFER_DESCRIPTION = "Pay by transferring to our test bank
20
20
  */
21
21
  declare function woocommerce(opts?: {
22
22
  plugins?: DevPluginSource[];
23
- }): kizlo0.Fixture;
23
+ }): kizlo19.Fixture;
24
24
  //#endregion
25
25
  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.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "WooCommerce integration for Kizlo.",