@atomic-solutions/woocommerce-api-client 0.5.1 → 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.
@@ -2636,7 +2636,7 @@ declare const checkoutSchema: z.ZodObject<{
2636
2636
  phone: string;
2637
2637
  }>;
2638
2638
  payment_method: z.ZodString;
2639
- payment_result: z.ZodObject<{
2639
+ payment_result: z.ZodNullable<z.ZodObject<{
2640
2640
  payment_status: z.ZodString;
2641
2641
  payment_details: z.ZodArray<z.ZodUnknown, "many">;
2642
2642
  redirect_url: z.ZodString;
@@ -2648,7 +2648,7 @@ declare const checkoutSchema: z.ZodObject<{
2648
2648
  payment_status: string;
2649
2649
  payment_details: unknown[];
2650
2650
  redirect_url: string;
2651
- }>;
2651
+ }>>;
2652
2652
  }, "strip", z.ZodTypeAny, {
2653
2653
  status: string;
2654
2654
  shipping_address: {
@@ -2685,7 +2685,7 @@ declare const checkoutSchema: z.ZodObject<{
2685
2685
  payment_status: string;
2686
2686
  payment_details: unknown[];
2687
2687
  redirect_url: string;
2688
- };
2688
+ } | null;
2689
2689
  }, {
2690
2690
  status: string;
2691
2691
  shipping_address: {
@@ -2722,7 +2722,7 @@ declare const checkoutSchema: z.ZodObject<{
2722
2722
  payment_status: string;
2723
2723
  payment_details: unknown[];
2724
2724
  redirect_url: string;
2725
- };
2725
+ } | null;
2726
2726
  }>;
2727
2727
  declare const checkoutInputSchema: z.ZodObject<{
2728
2728
  payment_method: z.ZodString;
@@ -3476,6 +3476,24 @@ type ProductCategory = z.infer<typeof productCategorySchema>;
3476
3476
  type ProductImage = z.infer<typeof productImageSchema>;
3477
3477
  type ProductParams = z.infer<typeof storeProductsSearchParamsSchema>;
3478
3478
 
3479
+ declare const productTagSchema: z.ZodObject<{
3480
+ id: z.ZodNumber;
3481
+ name: z.ZodString;
3482
+ slug: z.ZodString;
3483
+ }, "strip", z.ZodTypeAny, {
3484
+ id: number;
3485
+ name: string;
3486
+ slug: string;
3487
+ }, {
3488
+ id: number;
3489
+ name: string;
3490
+ slug: string;
3491
+ }>;
3492
+ type ProductTag = z.infer<typeof productTagSchema>;
3493
+ type ProductTagsParams = {
3494
+ include?: number[];
3495
+ };
3496
+
3479
3497
  declare const orderAttributionSchema: z.ZodObject<{
3480
3498
  source_type: z.ZodString;
3481
3499
  utm_source: z.ZodString;
@@ -3530,6 +3548,7 @@ interface ProductsAPI {
3530
3548
  list: (params?: ProductParams) => Promise<PaginatedResponse<Product>>;
3531
3549
  get: (id: number) => Promise<Product>;
3532
3550
  categories: () => Promise<ProductCategory[]>;
3551
+ tags: (params?: ProductTagsParams) => Promise<ProductTag[]>;
3533
3552
  }
3534
3553
  interface AddItemsResult {
3535
3554
  cart: Cart;
@@ -3572,4 +3591,4 @@ interface WooCommerceClient {
3572
3591
  orders: OrdersAPI;
3573
3592
  }
3574
3593
 
3575
- export { checkoutSchema as $, type AddItemsInput as A, type BaseErrorOptions as B, type CartHeadersAdapter as C, type ProductImage as D, type ProductParams as E, type ProductsAPI as F, type GetOrderInput as G, type RemoveCartItemInput as H, type SelectShippingRateInput as I, type JwtTokenAdapter as J, type StoreApiOrder as K, type UpdateCustomerInput as L, WooCommerceApiError as M, type WooCommerceApiErrorOptions as N, type OrderStatus as O, type PaginatedResponse as P, addItemsInputSchema as Q, type ResponseOptions as R, type StoreApiVersion as S, addToCartInputSchema as T, type UpdateCartItemInput as U, type ValidationMode as V, type WooCommerceConfig as W, batchResponseSchema as X, cartItemImageSchema as Y, cartSchema as Z, checkoutInputSchema as _, type WooCommerceClient as a, couponInputSchema as a0, productCategorySchema as a1, productImageSchema as a2, productSchema as a3, removeCartItemInputSchema as a4, storeProductsSearchParamsSchema as a5, selectShippingRateInputSchema as a6, storeApiOrderSchema as a7, updateCartItemInputSchema as a8, updateCustomerInputSchema as a9, handleApiResponse as b, handlePaginatedApiResponse as c, type Pagination as d, calculatePagination as e, type WooCommerceApiErrorCode as f, type BaseReportableData as g, handleApiData as h, isZodError as i, type ValidationReportableData as j, type WooCommerceDataValidationErrorOptions as k, type AddItemsResult as l, type AddToCartInput as m, type BatchResponse as n, type Cart as o, type CartAPI as p, type CartItem as q, type CartItemImage as r, setupErrorInterceptor as s, type Checkout as t, type CheckoutAPI as u, type CheckoutInput as v, type CouponInput as w, type OrdersAPI as x, type Product as y, type ProductCategory as z };
3594
+ export { cartSchema as $, type AddItemsInput as A, type BaseErrorOptions as B, type CartHeadersAdapter as C, type ProductImage as D, type ProductParams as E, type ProductTag as F, type GetOrderInput as G, type ProductTagsParams as H, type ProductsAPI as I, type JwtTokenAdapter as J, type RemoveCartItemInput as K, type SelectShippingRateInput as L, type StoreApiOrder as M, type UpdateCustomerInput as N, type OrderStatus as O, type PaginatedResponse as P, WooCommerceApiError as Q, type ResponseOptions as R, type StoreApiVersion as S, type WooCommerceApiErrorOptions as T, type UpdateCartItemInput as U, type ValidationMode as V, type WooCommerceConfig as W, addItemsInputSchema as X, addToCartInputSchema as Y, batchResponseSchema as Z, cartItemImageSchema as _, type WooCommerceClient as a, checkoutInputSchema as a0, checkoutSchema as a1, couponInputSchema as a2, productCategorySchema as a3, productImageSchema as a4, productSchema as a5, removeCartItemInputSchema as a6, storeProductsSearchParamsSchema as a7, selectShippingRateInputSchema as a8, storeApiOrderSchema as a9, updateCartItemInputSchema as aa, updateCustomerInputSchema as ab, handleApiResponse as b, handlePaginatedApiResponse as c, type Pagination as d, calculatePagination as e, type WooCommerceApiErrorCode as f, type BaseReportableData as g, handleApiData as h, isZodError as i, type ValidationReportableData as j, type WooCommerceDataValidationErrorOptions as k, type AddItemsResult as l, type AddToCartInput as m, type BatchResponse as n, type Cart as o, type CartAPI as p, type CartItem as q, type CartItemImage as r, setupErrorInterceptor as s, type Checkout as t, type CheckoutAPI as u, type CheckoutInput as v, type CouponInput as w, type OrdersAPI as x, type Product as y, type ProductCategory as z };
@@ -2636,7 +2636,7 @@ declare const checkoutSchema: z.ZodObject<{
2636
2636
  phone: string;
2637
2637
  }>;
2638
2638
  payment_method: z.ZodString;
2639
- payment_result: z.ZodObject<{
2639
+ payment_result: z.ZodNullable<z.ZodObject<{
2640
2640
  payment_status: z.ZodString;
2641
2641
  payment_details: z.ZodArray<z.ZodUnknown, "many">;
2642
2642
  redirect_url: z.ZodString;
@@ -2648,7 +2648,7 @@ declare const checkoutSchema: z.ZodObject<{
2648
2648
  payment_status: string;
2649
2649
  payment_details: unknown[];
2650
2650
  redirect_url: string;
2651
- }>;
2651
+ }>>;
2652
2652
  }, "strip", z.ZodTypeAny, {
2653
2653
  status: string;
2654
2654
  shipping_address: {
@@ -2685,7 +2685,7 @@ declare const checkoutSchema: z.ZodObject<{
2685
2685
  payment_status: string;
2686
2686
  payment_details: unknown[];
2687
2687
  redirect_url: string;
2688
- };
2688
+ } | null;
2689
2689
  }, {
2690
2690
  status: string;
2691
2691
  shipping_address: {
@@ -2722,7 +2722,7 @@ declare const checkoutSchema: z.ZodObject<{
2722
2722
  payment_status: string;
2723
2723
  payment_details: unknown[];
2724
2724
  redirect_url: string;
2725
- };
2725
+ } | null;
2726
2726
  }>;
2727
2727
  declare const checkoutInputSchema: z.ZodObject<{
2728
2728
  payment_method: z.ZodString;
@@ -3476,6 +3476,24 @@ type ProductCategory = z.infer<typeof productCategorySchema>;
3476
3476
  type ProductImage = z.infer<typeof productImageSchema>;
3477
3477
  type ProductParams = z.infer<typeof storeProductsSearchParamsSchema>;
3478
3478
 
3479
+ declare const productTagSchema: z.ZodObject<{
3480
+ id: z.ZodNumber;
3481
+ name: z.ZodString;
3482
+ slug: z.ZodString;
3483
+ }, "strip", z.ZodTypeAny, {
3484
+ id: number;
3485
+ name: string;
3486
+ slug: string;
3487
+ }, {
3488
+ id: number;
3489
+ name: string;
3490
+ slug: string;
3491
+ }>;
3492
+ type ProductTag = z.infer<typeof productTagSchema>;
3493
+ type ProductTagsParams = {
3494
+ include?: number[];
3495
+ };
3496
+
3479
3497
  declare const orderAttributionSchema: z.ZodObject<{
3480
3498
  source_type: z.ZodString;
3481
3499
  utm_source: z.ZodString;
@@ -3530,6 +3548,7 @@ interface ProductsAPI {
3530
3548
  list: (params?: ProductParams) => Promise<PaginatedResponse<Product>>;
3531
3549
  get: (id: number) => Promise<Product>;
3532
3550
  categories: () => Promise<ProductCategory[]>;
3551
+ tags: (params?: ProductTagsParams) => Promise<ProductTag[]>;
3533
3552
  }
3534
3553
  interface AddItemsResult {
3535
3554
  cart: Cart;
@@ -3572,4 +3591,4 @@ interface WooCommerceClient {
3572
3591
  orders: OrdersAPI;
3573
3592
  }
3574
3593
 
3575
- export { checkoutSchema as $, type AddItemsInput as A, type BaseErrorOptions as B, type CartHeadersAdapter as C, type ProductImage as D, type ProductParams as E, type ProductsAPI as F, type GetOrderInput as G, type RemoveCartItemInput as H, type SelectShippingRateInput as I, type JwtTokenAdapter as J, type StoreApiOrder as K, type UpdateCustomerInput as L, WooCommerceApiError as M, type WooCommerceApiErrorOptions as N, type OrderStatus as O, type PaginatedResponse as P, addItemsInputSchema as Q, type ResponseOptions as R, type StoreApiVersion as S, addToCartInputSchema as T, type UpdateCartItemInput as U, type ValidationMode as V, type WooCommerceConfig as W, batchResponseSchema as X, cartItemImageSchema as Y, cartSchema as Z, checkoutInputSchema as _, type WooCommerceClient as a, couponInputSchema as a0, productCategorySchema as a1, productImageSchema as a2, productSchema as a3, removeCartItemInputSchema as a4, storeProductsSearchParamsSchema as a5, selectShippingRateInputSchema as a6, storeApiOrderSchema as a7, updateCartItemInputSchema as a8, updateCustomerInputSchema as a9, handleApiResponse as b, handlePaginatedApiResponse as c, type Pagination as d, calculatePagination as e, type WooCommerceApiErrorCode as f, type BaseReportableData as g, handleApiData as h, isZodError as i, type ValidationReportableData as j, type WooCommerceDataValidationErrorOptions as k, type AddItemsResult as l, type AddToCartInput as m, type BatchResponse as n, type Cart as o, type CartAPI as p, type CartItem as q, type CartItemImage as r, setupErrorInterceptor as s, type Checkout as t, type CheckoutAPI as u, type CheckoutInput as v, type CouponInput as w, type OrdersAPI as x, type Product as y, type ProductCategory as z };
3594
+ export { cartSchema as $, type AddItemsInput as A, type BaseErrorOptions as B, type CartHeadersAdapter as C, type ProductImage as D, type ProductParams as E, type ProductTag as F, type GetOrderInput as G, type ProductTagsParams as H, type ProductsAPI as I, type JwtTokenAdapter as J, type RemoveCartItemInput as K, type SelectShippingRateInput as L, type StoreApiOrder as M, type UpdateCustomerInput as N, type OrderStatus as O, type PaginatedResponse as P, WooCommerceApiError as Q, type ResponseOptions as R, type StoreApiVersion as S, type WooCommerceApiErrorOptions as T, type UpdateCartItemInput as U, type ValidationMode as V, type WooCommerceConfig as W, addItemsInputSchema as X, addToCartInputSchema as Y, batchResponseSchema as Z, cartItemImageSchema as _, type WooCommerceClient as a, checkoutInputSchema as a0, checkoutSchema as a1, couponInputSchema as a2, productCategorySchema as a3, productImageSchema as a4, productSchema as a5, removeCartItemInputSchema as a6, storeProductsSearchParamsSchema as a7, selectShippingRateInputSchema as a8, storeApiOrderSchema as a9, updateCartItemInputSchema as aa, updateCustomerInputSchema as ab, handleApiResponse as b, handlePaginatedApiResponse as c, type Pagination as d, calculatePagination as e, type WooCommerceApiErrorCode as f, type BaseReportableData as g, handleApiData as h, isZodError as i, type ValidationReportableData as j, type WooCommerceDataValidationErrorOptions as k, type AddItemsResult as l, type AddToCartInput as m, type BatchResponse as n, type Cart as o, type CartAPI as p, type CartItem as q, type CartItemImage as r, setupErrorInterceptor as s, type Checkout as t, type CheckoutAPI as u, type CheckoutInput as v, type CouponInput as w, type OrdersAPI as x, type Product as y, type ProductCategory as z };
@@ -1,5 +1,5 @@
1
- import { C as CartHeadersAdapter } from '../types-9I6oS_83.mjs';
2
- export { P as PaginatedResponse, d as Pagination, R as ResponseOptions, V as ValidationMode, e as calculatePagination, b as handleApiResponse, c as handlePaginatedApiResponse, i as isZodError } from '../types-9I6oS_83.mjs';
1
+ import { C as CartHeadersAdapter } from '../types-Cbf1-EhK.mjs';
2
+ export { P as PaginatedResponse, d as Pagination, R as ResponseOptions, V as ValidationMode, e as calculatePagination, b as handleApiResponse, c as handlePaginatedApiResponse, i as isZodError } from '../types-Cbf1-EhK.mjs';
3
3
  import { AxiosResponse, AxiosInstance } from 'axios';
4
4
  import '@atomic-solutions/errors';
5
5
  import 'zod';
@@ -1,5 +1,5 @@
1
- import { C as CartHeadersAdapter } from '../types-9I6oS_83.js';
2
- export { P as PaginatedResponse, d as Pagination, R as ResponseOptions, V as ValidationMode, e as calculatePagination, b as handleApiResponse, c as handlePaginatedApiResponse, i as isZodError } from '../types-9I6oS_83.js';
1
+ import { C as CartHeadersAdapter } from '../types-Cbf1-EhK.js';
2
+ export { P as PaginatedResponse, d as Pagination, R as ResponseOptions, V as ValidationMode, e as calculatePagination, b as handleApiResponse, c as handlePaginatedApiResponse, i as isZodError } from '../types-Cbf1-EhK.js';
3
3
  import { AxiosResponse, AxiosInstance } from 'axios';
4
4
  import '@atomic-solutions/errors';
5
5
  import 'zod';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomic-solutions/woocommerce-api-client",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Type-safe WooCommerce API client (framework-agnostic)",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",