@atomic-solutions/woocommerce-api-client 0.1.4 → 0.1.5
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/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +24 -3
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +24 -3
- package/dist/client/index.mjs.map +1 -1
- package/dist/http/index.d.mts +2 -2
- package/dist/http/index.d.ts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{types-B09FKPkT.d.mts → types-B7CKE1bj.d.mts} +16 -0
- package/dist/{types-B09FKPkT.d.ts → types-B7CKE1bj.d.ts} +16 -0
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -3402,6 +3402,21 @@ type ProductCategory = z.infer<typeof productCategorySchema>;
|
|
|
3402
3402
|
type ProductImage = z.infer<typeof productImageSchema>;
|
|
3403
3403
|
type ProductParams = z.infer<typeof storeProductsSearchParamsSchema>;
|
|
3404
3404
|
|
|
3405
|
+
declare const orderAttributionSchema: z.ZodObject<{
|
|
3406
|
+
source_type: z.ZodString;
|
|
3407
|
+
utm_source: z.ZodString;
|
|
3408
|
+
device_type: z.ZodString;
|
|
3409
|
+
}, "strip", z.ZodTypeAny, {
|
|
3410
|
+
source_type: string;
|
|
3411
|
+
utm_source: string;
|
|
3412
|
+
device_type: string;
|
|
3413
|
+
}, {
|
|
3414
|
+
source_type: string;
|
|
3415
|
+
utm_source: string;
|
|
3416
|
+
device_type: string;
|
|
3417
|
+
}>;
|
|
3418
|
+
type OrderAttribution = z.infer<typeof orderAttributionSchema>;
|
|
3419
|
+
|
|
3405
3420
|
interface ErrorReporter {
|
|
3406
3421
|
report: (error: Error) => void;
|
|
3407
3422
|
}
|
|
@@ -3435,6 +3450,7 @@ interface WooCommerceConfig {
|
|
|
3435
3450
|
onAuthError?: (error: WooCommerceApiError, client: WooCommerceClient) => Promise<boolean> | boolean;
|
|
3436
3451
|
timeout?: number;
|
|
3437
3452
|
headers?: Record<string, string>;
|
|
3453
|
+
orderAttribution?: OrderAttribution;
|
|
3438
3454
|
}
|
|
3439
3455
|
interface ProductsAPI {
|
|
3440
3456
|
list: (params?: ProductParams) => Promise<PaginatedResponse<Product>>;
|
|
@@ -3402,6 +3402,21 @@ type ProductCategory = z.infer<typeof productCategorySchema>;
|
|
|
3402
3402
|
type ProductImage = z.infer<typeof productImageSchema>;
|
|
3403
3403
|
type ProductParams = z.infer<typeof storeProductsSearchParamsSchema>;
|
|
3404
3404
|
|
|
3405
|
+
declare const orderAttributionSchema: z.ZodObject<{
|
|
3406
|
+
source_type: z.ZodString;
|
|
3407
|
+
utm_source: z.ZodString;
|
|
3408
|
+
device_type: z.ZodString;
|
|
3409
|
+
}, "strip", z.ZodTypeAny, {
|
|
3410
|
+
source_type: string;
|
|
3411
|
+
utm_source: string;
|
|
3412
|
+
device_type: string;
|
|
3413
|
+
}, {
|
|
3414
|
+
source_type: string;
|
|
3415
|
+
utm_source: string;
|
|
3416
|
+
device_type: string;
|
|
3417
|
+
}>;
|
|
3418
|
+
type OrderAttribution = z.infer<typeof orderAttributionSchema>;
|
|
3419
|
+
|
|
3405
3420
|
interface ErrorReporter {
|
|
3406
3421
|
report: (error: Error) => void;
|
|
3407
3422
|
}
|
|
@@ -3435,6 +3450,7 @@ interface WooCommerceConfig {
|
|
|
3435
3450
|
onAuthError?: (error: WooCommerceApiError, client: WooCommerceClient) => Promise<boolean> | boolean;
|
|
3436
3451
|
timeout?: number;
|
|
3437
3452
|
headers?: Record<string, string>;
|
|
3453
|
+
orderAttribution?: OrderAttribution;
|
|
3438
3454
|
}
|
|
3439
3455
|
interface ProductsAPI {
|
|
3440
3456
|
list: (params?: ProductParams) => Promise<PaginatedResponse<Product>>;
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CartHeadersAdapter } from '../types-
|
|
2
|
-
export { P as PaginatedResponse, c as Pagination, R as ResponseOptions, V as ValidationMode, d as calculatePagination, h as handleApiResponse, b as handlePaginatedApiResponse, i as isZodError } from '../types-
|
|
1
|
+
import { C as CartHeadersAdapter } from '../types-B7CKE1bj.mjs';
|
|
2
|
+
export { P as PaginatedResponse, c as Pagination, R as ResponseOptions, V as ValidationMode, d as calculatePagination, h as handleApiResponse, b as handlePaginatedApiResponse, i as isZodError } from '../types-B7CKE1bj.mjs';
|
|
3
3
|
import { AxiosResponse, AxiosInstance } from 'axios';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CartHeadersAdapter } from '../types-
|
|
2
|
-
export { P as PaginatedResponse, c as Pagination, R as ResponseOptions, V as ValidationMode, d as calculatePagination, h as handleApiResponse, b as handlePaginatedApiResponse, i as isZodError } from '../types-
|
|
1
|
+
import { C as CartHeadersAdapter } from '../types-B7CKE1bj.js';
|
|
2
|
+
export { P as PaginatedResponse, c as Pagination, R as ResponseOptions, V as ValidationMode, d as calculatePagination, h as handleApiResponse, b as handlePaginatedApiResponse, i as isZodError } from '../types-B7CKE1bj.js';
|
|
3
3
|
import { AxiosResponse, AxiosInstance } from 'axios';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomic-solutions/woocommerce-api-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Type-safe WooCommerce API client (framework-agnostic)",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"typescript": "^5.9.0",
|
|
83
83
|
"vitest": "^2.0.0",
|
|
84
84
|
"zod": "^3.23.0",
|
|
85
|
-
"@atomic-solutions/schemas": "^0.1.
|
|
85
|
+
"@atomic-solutions/schemas": "^0.1.1"
|
|
86
86
|
},
|
|
87
87
|
"sideEffects": false,
|
|
88
88
|
"scripts": {
|