@atomic-solutions/woocommerce-api-client 0.1.3 → 0.1.4
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 -3
- package/dist/client/index.d.ts +2 -3
- package/dist/client/index.js +8 -151
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +8 -151
- package/dist/client/index.mjs.map +1 -1
- package/dist/http/index.d.mts +2 -3
- package/dist/http/index.d.ts +2 -3
- package/dist/index.d.mts +5021 -7
- package/dist/index.d.ts +5021 -7
- package/dist/index.js +34 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -38
- package/dist/index.mjs.map +1 -1
- package/dist/types-B09FKPkT.d.mts +3475 -0
- package/dist/types-B09FKPkT.d.ts +3475 -0
- package/dist/utils/index.d.mts +2 -3
- package/dist/utils/index.d.ts +2 -3
- package/package.json +1 -1
- package/dist/types-DuA0wOpm.d.mts +0 -183
- package/dist/types-DuA0wOpm.d.ts +0 -183
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { P as PaginatedResponse,
|
|
1
|
+
import { C as CartHeadersAdapter } from '../types-B09FKPkT.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-B09FKPkT.mjs';
|
|
3
3
|
import { AxiosResponse, AxiosInstance } from 'axios';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '@atomic-solutions/schemas/woocommerce/store-api';
|
|
6
5
|
|
|
7
6
|
interface PaginationMeta {
|
|
8
7
|
total: number;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { P as PaginatedResponse,
|
|
1
|
+
import { C as CartHeadersAdapter } from '../types-B09FKPkT.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-B09FKPkT.js';
|
|
3
3
|
import { AxiosResponse, AxiosInstance } from 'axios';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '@atomic-solutions/schemas/woocommerce/store-api';
|
|
6
5
|
|
|
7
6
|
interface PaginationMeta {
|
|
8
7
|
total: number;
|
package/package.json
CHANGED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse, AxiosInstance, InternalAxiosRequestConfig } from 'axios';
|
|
2
|
-
import { ZodError, ZodSchema } from 'zod';
|
|
3
|
-
import { Cart, AddToCartInput, UpdateCartItemInput, RemoveCartItemInput, CouponInput, UpdateCustomerInput, SelectShippingRateInput, Checkout, CheckoutInput, StoreApiOrder, ProductParams, Product, ProductCategory } from '@atomic-solutions/schemas/woocommerce/store-api';
|
|
4
|
-
|
|
5
|
-
type WooCommerceApiErrorCode = 'cart_empty' | 'invalid_coupon' | 'missing_nonce' | 'invalid_nonce' | 'invalid_params' | 'product_not_found' | 'out_of_stock' | 'insufficient_stock' | 'invalid_payment_method' | 'checkout_error' | 'network_error' | 'unknown_error';
|
|
6
|
-
|
|
7
|
-
interface BaseErrorOptions {
|
|
8
|
-
code: string;
|
|
9
|
-
message: string;
|
|
10
|
-
operation?: string;
|
|
11
|
-
userMessage?: string;
|
|
12
|
-
retryable?: boolean;
|
|
13
|
-
cause?: Error | unknown;
|
|
14
|
-
}
|
|
15
|
-
interface BaseReportableData {
|
|
16
|
-
code: string;
|
|
17
|
-
operation?: string;
|
|
18
|
-
userMessage?: string;
|
|
19
|
-
retryable?: boolean;
|
|
20
|
-
}
|
|
21
|
-
interface HttpErrorFields {
|
|
22
|
-
statusCode: number;
|
|
23
|
-
url: string;
|
|
24
|
-
method: string;
|
|
25
|
-
requestBody?: unknown;
|
|
26
|
-
responseBody?: unknown;
|
|
27
|
-
}
|
|
28
|
-
interface WooCommerceApiErrorOptions extends BaseErrorOptions, HttpErrorFields {
|
|
29
|
-
code: WooCommerceApiErrorCode;
|
|
30
|
-
originalCode: string;
|
|
31
|
-
data?: Record<string, unknown>;
|
|
32
|
-
}
|
|
33
|
-
interface ApiReportableData extends BaseReportableData {
|
|
34
|
-
statusCode: number;
|
|
35
|
-
url: string;
|
|
36
|
-
method: string;
|
|
37
|
-
wooCode: WooCommerceApiErrorCode;
|
|
38
|
-
originalCode: string;
|
|
39
|
-
}
|
|
40
|
-
interface WooCommerceDataValidationErrorOptions extends Omit<BaseErrorOptions, 'code' | 'retryable'> {
|
|
41
|
-
url?: string;
|
|
42
|
-
zodError?: ZodError;
|
|
43
|
-
value?: unknown;
|
|
44
|
-
}
|
|
45
|
-
interface ValidationReportableData extends BaseReportableData {
|
|
46
|
-
fieldErrors?: Record<string, string[]>;
|
|
47
|
-
url?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare class BaseError<TOptions extends BaseErrorOptions = BaseErrorOptions, TReportable extends BaseReportableData = BaseReportableData> extends Error {
|
|
51
|
-
readonly options: TOptions;
|
|
52
|
-
constructor(options: TOptions);
|
|
53
|
-
getReportableData(): TReportable;
|
|
54
|
-
toJSON(): Record<string, unknown>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
declare class WooCommerceApiError extends BaseError<WooCommerceApiErrorOptions, ApiReportableData> {
|
|
58
|
-
constructor(options: WooCommerceApiErrorOptions);
|
|
59
|
-
get wooCode(): WooCommerceApiErrorCode;
|
|
60
|
-
get originalCode(): string;
|
|
61
|
-
get statusCode(): number;
|
|
62
|
-
get url(): string;
|
|
63
|
-
get method(): string;
|
|
64
|
-
get requestBody(): unknown | undefined;
|
|
65
|
-
get responseBody(): unknown | undefined;
|
|
66
|
-
get data(): Record<string, unknown> | undefined;
|
|
67
|
-
getReportableData(): ApiReportableData;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
type ValidationMode = 'strict' | 'warn';
|
|
71
|
-
interface ResponseOptions {
|
|
72
|
-
validationMode?: ValidationMode;
|
|
73
|
-
errorReporter?: (error: Error) => void;
|
|
74
|
-
onValidationError?: (error: Error) => void;
|
|
75
|
-
}
|
|
76
|
-
declare const handleApiResponse: <T>(response: AxiosResponse, schema: ZodSchema<T>, options?: ResponseOptions) => T;
|
|
77
|
-
declare const isZodError: (error: unknown) => error is ZodError;
|
|
78
|
-
|
|
79
|
-
interface Pagination {
|
|
80
|
-
page: number;
|
|
81
|
-
perPage: number;
|
|
82
|
-
total: number;
|
|
83
|
-
totalPages: number;
|
|
84
|
-
hasNextPage: boolean;
|
|
85
|
-
hasPrevPage: boolean;
|
|
86
|
-
nextPage: number | null;
|
|
87
|
-
prevPage: number | null;
|
|
88
|
-
}
|
|
89
|
-
interface CalculatePaginationInput {
|
|
90
|
-
page: number;
|
|
91
|
-
perPage: number;
|
|
92
|
-
total: number;
|
|
93
|
-
totalPages: number;
|
|
94
|
-
}
|
|
95
|
-
declare const calculatePagination: (input: CalculatePaginationInput) => Pagination;
|
|
96
|
-
|
|
97
|
-
interface PaginatedResponse<T> {
|
|
98
|
-
data: T[];
|
|
99
|
-
pagination: Pagination;
|
|
100
|
-
}
|
|
101
|
-
declare const handlePaginatedApiResponse: <T>(response: AxiosResponse, schema: ZodSchema<T[]>, params?: {
|
|
102
|
-
page?: number;
|
|
103
|
-
per_page?: number;
|
|
104
|
-
}, options?: ResponseOptions) => PaginatedResponse<T>;
|
|
105
|
-
|
|
106
|
-
declare const setupErrorInterceptor: (axiosInstance: AxiosInstance, config: WooCommerceConfig, client: WooCommerceClient) => void;
|
|
107
|
-
declare module 'axios' {
|
|
108
|
-
interface AxiosRequestConfig {
|
|
109
|
-
_retry?: boolean;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface ErrorReporter {
|
|
114
|
-
report: (error: Error) => void;
|
|
115
|
-
}
|
|
116
|
-
interface CartHeadersAdapter {
|
|
117
|
-
get: () => Promise<{
|
|
118
|
-
nonce?: string;
|
|
119
|
-
cartToken?: string;
|
|
120
|
-
}>;
|
|
121
|
-
save: (headers: {
|
|
122
|
-
nonce?: string;
|
|
123
|
-
cartToken?: string;
|
|
124
|
-
}) => Promise<void>;
|
|
125
|
-
clear: () => Promise<void>;
|
|
126
|
-
}
|
|
127
|
-
interface JwtTokenAdapter {
|
|
128
|
-
get: () => Promise<string | null>;
|
|
129
|
-
}
|
|
130
|
-
type StoreApiVersion = 'v1' | 'legacy';
|
|
131
|
-
interface WooCommerceConfig {
|
|
132
|
-
baseURL: string;
|
|
133
|
-
storeApiVersion?: StoreApiVersion;
|
|
134
|
-
cartHeaders: CartHeadersAdapter;
|
|
135
|
-
jwtToken?: JwtTokenAdapter;
|
|
136
|
-
debug?: boolean;
|
|
137
|
-
validationMode?: ValidationMode;
|
|
138
|
-
errorReporter?: ErrorReporter;
|
|
139
|
-
onRequest?: (config: InternalAxiosRequestConfig, client: WooCommerceClient) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>;
|
|
140
|
-
onResponse?: (response: AxiosResponse, client: WooCommerceClient) => AxiosResponse | Promise<AxiosResponse>;
|
|
141
|
-
onError?: (error: WooCommerceApiError, client: WooCommerceClient) => void;
|
|
142
|
-
onValidationError?: (error: Error) => void;
|
|
143
|
-
onAuthError?: (error: WooCommerceApiError, client: WooCommerceClient) => Promise<boolean> | boolean;
|
|
144
|
-
timeout?: number;
|
|
145
|
-
headers?: Record<string, string>;
|
|
146
|
-
}
|
|
147
|
-
interface ProductsAPI {
|
|
148
|
-
list: (params?: ProductParams) => Promise<PaginatedResponse<Product>>;
|
|
149
|
-
get: (id: number) => Promise<Product>;
|
|
150
|
-
categories: () => Promise<ProductCategory[]>;
|
|
151
|
-
}
|
|
152
|
-
interface CartAPI {
|
|
153
|
-
get: () => Promise<Cart>;
|
|
154
|
-
addItem: (input: AddToCartInput) => Promise<Cart>;
|
|
155
|
-
updateItem: (input: UpdateCartItemInput) => Promise<Cart>;
|
|
156
|
-
removeItem: (input: RemoveCartItemInput) => Promise<Cart>;
|
|
157
|
-
applyCoupon: (input: CouponInput) => Promise<Cart>;
|
|
158
|
-
removeCoupon: (input: CouponInput) => Promise<Cart>;
|
|
159
|
-
updateCustomer: (input: UpdateCustomerInput) => Promise<Cart>;
|
|
160
|
-
selectShippingRate: (input: SelectShippingRateInput) => Promise<Cart>;
|
|
161
|
-
}
|
|
162
|
-
interface CheckoutAPI {
|
|
163
|
-
get: () => Promise<Checkout>;
|
|
164
|
-
process: (input: CheckoutInput) => Promise<Checkout>;
|
|
165
|
-
}
|
|
166
|
-
interface GetOrderInput {
|
|
167
|
-
id: number;
|
|
168
|
-
billing_email?: string;
|
|
169
|
-
key?: string;
|
|
170
|
-
}
|
|
171
|
-
interface OrdersAPI {
|
|
172
|
-
get: (input: GetOrderInput) => Promise<StoreApiOrder>;
|
|
173
|
-
}
|
|
174
|
-
interface WooCommerceClient {
|
|
175
|
-
config: WooCommerceConfig;
|
|
176
|
-
axios: AxiosInstance;
|
|
177
|
-
products: ProductsAPI;
|
|
178
|
-
cart: CartAPI;
|
|
179
|
-
checkout: CheckoutAPI;
|
|
180
|
-
orders: OrdersAPI;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export { BaseError as B, type CartAPI as C, type GetOrderInput as G, type JwtTokenAdapter as J, type OrdersAPI as O, type PaginatedResponse as P, type ResponseOptions as R, type ValidationReportableData as V, type WooCommerceDataValidationErrorOptions as W, type BaseErrorOptions as a, type CartHeadersAdapter as b, type CheckoutAPI as c, type ProductsAPI as d, WooCommerceApiError as e, type WooCommerceApiErrorOptions as f, type WooCommerceClient as g, type WooCommerceConfig as h, type ValidationMode as i, handleApiResponse as j, handlePaginatedApiResponse as k, isZodError as l, type Pagination as m, calculatePagination as n, setupErrorInterceptor as s };
|
package/dist/types-DuA0wOpm.d.ts
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse, AxiosInstance, InternalAxiosRequestConfig } from 'axios';
|
|
2
|
-
import { ZodError, ZodSchema } from 'zod';
|
|
3
|
-
import { Cart, AddToCartInput, UpdateCartItemInput, RemoveCartItemInput, CouponInput, UpdateCustomerInput, SelectShippingRateInput, Checkout, CheckoutInput, StoreApiOrder, ProductParams, Product, ProductCategory } from '@atomic-solutions/schemas/woocommerce/store-api';
|
|
4
|
-
|
|
5
|
-
type WooCommerceApiErrorCode = 'cart_empty' | 'invalid_coupon' | 'missing_nonce' | 'invalid_nonce' | 'invalid_params' | 'product_not_found' | 'out_of_stock' | 'insufficient_stock' | 'invalid_payment_method' | 'checkout_error' | 'network_error' | 'unknown_error';
|
|
6
|
-
|
|
7
|
-
interface BaseErrorOptions {
|
|
8
|
-
code: string;
|
|
9
|
-
message: string;
|
|
10
|
-
operation?: string;
|
|
11
|
-
userMessage?: string;
|
|
12
|
-
retryable?: boolean;
|
|
13
|
-
cause?: Error | unknown;
|
|
14
|
-
}
|
|
15
|
-
interface BaseReportableData {
|
|
16
|
-
code: string;
|
|
17
|
-
operation?: string;
|
|
18
|
-
userMessage?: string;
|
|
19
|
-
retryable?: boolean;
|
|
20
|
-
}
|
|
21
|
-
interface HttpErrorFields {
|
|
22
|
-
statusCode: number;
|
|
23
|
-
url: string;
|
|
24
|
-
method: string;
|
|
25
|
-
requestBody?: unknown;
|
|
26
|
-
responseBody?: unknown;
|
|
27
|
-
}
|
|
28
|
-
interface WooCommerceApiErrorOptions extends BaseErrorOptions, HttpErrorFields {
|
|
29
|
-
code: WooCommerceApiErrorCode;
|
|
30
|
-
originalCode: string;
|
|
31
|
-
data?: Record<string, unknown>;
|
|
32
|
-
}
|
|
33
|
-
interface ApiReportableData extends BaseReportableData {
|
|
34
|
-
statusCode: number;
|
|
35
|
-
url: string;
|
|
36
|
-
method: string;
|
|
37
|
-
wooCode: WooCommerceApiErrorCode;
|
|
38
|
-
originalCode: string;
|
|
39
|
-
}
|
|
40
|
-
interface WooCommerceDataValidationErrorOptions extends Omit<BaseErrorOptions, 'code' | 'retryable'> {
|
|
41
|
-
url?: string;
|
|
42
|
-
zodError?: ZodError;
|
|
43
|
-
value?: unknown;
|
|
44
|
-
}
|
|
45
|
-
interface ValidationReportableData extends BaseReportableData {
|
|
46
|
-
fieldErrors?: Record<string, string[]>;
|
|
47
|
-
url?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare class BaseError<TOptions extends BaseErrorOptions = BaseErrorOptions, TReportable extends BaseReportableData = BaseReportableData> extends Error {
|
|
51
|
-
readonly options: TOptions;
|
|
52
|
-
constructor(options: TOptions);
|
|
53
|
-
getReportableData(): TReportable;
|
|
54
|
-
toJSON(): Record<string, unknown>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
declare class WooCommerceApiError extends BaseError<WooCommerceApiErrorOptions, ApiReportableData> {
|
|
58
|
-
constructor(options: WooCommerceApiErrorOptions);
|
|
59
|
-
get wooCode(): WooCommerceApiErrorCode;
|
|
60
|
-
get originalCode(): string;
|
|
61
|
-
get statusCode(): number;
|
|
62
|
-
get url(): string;
|
|
63
|
-
get method(): string;
|
|
64
|
-
get requestBody(): unknown | undefined;
|
|
65
|
-
get responseBody(): unknown | undefined;
|
|
66
|
-
get data(): Record<string, unknown> | undefined;
|
|
67
|
-
getReportableData(): ApiReportableData;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
type ValidationMode = 'strict' | 'warn';
|
|
71
|
-
interface ResponseOptions {
|
|
72
|
-
validationMode?: ValidationMode;
|
|
73
|
-
errorReporter?: (error: Error) => void;
|
|
74
|
-
onValidationError?: (error: Error) => void;
|
|
75
|
-
}
|
|
76
|
-
declare const handleApiResponse: <T>(response: AxiosResponse, schema: ZodSchema<T>, options?: ResponseOptions) => T;
|
|
77
|
-
declare const isZodError: (error: unknown) => error is ZodError;
|
|
78
|
-
|
|
79
|
-
interface Pagination {
|
|
80
|
-
page: number;
|
|
81
|
-
perPage: number;
|
|
82
|
-
total: number;
|
|
83
|
-
totalPages: number;
|
|
84
|
-
hasNextPage: boolean;
|
|
85
|
-
hasPrevPage: boolean;
|
|
86
|
-
nextPage: number | null;
|
|
87
|
-
prevPage: number | null;
|
|
88
|
-
}
|
|
89
|
-
interface CalculatePaginationInput {
|
|
90
|
-
page: number;
|
|
91
|
-
perPage: number;
|
|
92
|
-
total: number;
|
|
93
|
-
totalPages: number;
|
|
94
|
-
}
|
|
95
|
-
declare const calculatePagination: (input: CalculatePaginationInput) => Pagination;
|
|
96
|
-
|
|
97
|
-
interface PaginatedResponse<T> {
|
|
98
|
-
data: T[];
|
|
99
|
-
pagination: Pagination;
|
|
100
|
-
}
|
|
101
|
-
declare const handlePaginatedApiResponse: <T>(response: AxiosResponse, schema: ZodSchema<T[]>, params?: {
|
|
102
|
-
page?: number;
|
|
103
|
-
per_page?: number;
|
|
104
|
-
}, options?: ResponseOptions) => PaginatedResponse<T>;
|
|
105
|
-
|
|
106
|
-
declare const setupErrorInterceptor: (axiosInstance: AxiosInstance, config: WooCommerceConfig, client: WooCommerceClient) => void;
|
|
107
|
-
declare module 'axios' {
|
|
108
|
-
interface AxiosRequestConfig {
|
|
109
|
-
_retry?: boolean;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface ErrorReporter {
|
|
114
|
-
report: (error: Error) => void;
|
|
115
|
-
}
|
|
116
|
-
interface CartHeadersAdapter {
|
|
117
|
-
get: () => Promise<{
|
|
118
|
-
nonce?: string;
|
|
119
|
-
cartToken?: string;
|
|
120
|
-
}>;
|
|
121
|
-
save: (headers: {
|
|
122
|
-
nonce?: string;
|
|
123
|
-
cartToken?: string;
|
|
124
|
-
}) => Promise<void>;
|
|
125
|
-
clear: () => Promise<void>;
|
|
126
|
-
}
|
|
127
|
-
interface JwtTokenAdapter {
|
|
128
|
-
get: () => Promise<string | null>;
|
|
129
|
-
}
|
|
130
|
-
type StoreApiVersion = 'v1' | 'legacy';
|
|
131
|
-
interface WooCommerceConfig {
|
|
132
|
-
baseURL: string;
|
|
133
|
-
storeApiVersion?: StoreApiVersion;
|
|
134
|
-
cartHeaders: CartHeadersAdapter;
|
|
135
|
-
jwtToken?: JwtTokenAdapter;
|
|
136
|
-
debug?: boolean;
|
|
137
|
-
validationMode?: ValidationMode;
|
|
138
|
-
errorReporter?: ErrorReporter;
|
|
139
|
-
onRequest?: (config: InternalAxiosRequestConfig, client: WooCommerceClient) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>;
|
|
140
|
-
onResponse?: (response: AxiosResponse, client: WooCommerceClient) => AxiosResponse | Promise<AxiosResponse>;
|
|
141
|
-
onError?: (error: WooCommerceApiError, client: WooCommerceClient) => void;
|
|
142
|
-
onValidationError?: (error: Error) => void;
|
|
143
|
-
onAuthError?: (error: WooCommerceApiError, client: WooCommerceClient) => Promise<boolean> | boolean;
|
|
144
|
-
timeout?: number;
|
|
145
|
-
headers?: Record<string, string>;
|
|
146
|
-
}
|
|
147
|
-
interface ProductsAPI {
|
|
148
|
-
list: (params?: ProductParams) => Promise<PaginatedResponse<Product>>;
|
|
149
|
-
get: (id: number) => Promise<Product>;
|
|
150
|
-
categories: () => Promise<ProductCategory[]>;
|
|
151
|
-
}
|
|
152
|
-
interface CartAPI {
|
|
153
|
-
get: () => Promise<Cart>;
|
|
154
|
-
addItem: (input: AddToCartInput) => Promise<Cart>;
|
|
155
|
-
updateItem: (input: UpdateCartItemInput) => Promise<Cart>;
|
|
156
|
-
removeItem: (input: RemoveCartItemInput) => Promise<Cart>;
|
|
157
|
-
applyCoupon: (input: CouponInput) => Promise<Cart>;
|
|
158
|
-
removeCoupon: (input: CouponInput) => Promise<Cart>;
|
|
159
|
-
updateCustomer: (input: UpdateCustomerInput) => Promise<Cart>;
|
|
160
|
-
selectShippingRate: (input: SelectShippingRateInput) => Promise<Cart>;
|
|
161
|
-
}
|
|
162
|
-
interface CheckoutAPI {
|
|
163
|
-
get: () => Promise<Checkout>;
|
|
164
|
-
process: (input: CheckoutInput) => Promise<Checkout>;
|
|
165
|
-
}
|
|
166
|
-
interface GetOrderInput {
|
|
167
|
-
id: number;
|
|
168
|
-
billing_email?: string;
|
|
169
|
-
key?: string;
|
|
170
|
-
}
|
|
171
|
-
interface OrdersAPI {
|
|
172
|
-
get: (input: GetOrderInput) => Promise<StoreApiOrder>;
|
|
173
|
-
}
|
|
174
|
-
interface WooCommerceClient {
|
|
175
|
-
config: WooCommerceConfig;
|
|
176
|
-
axios: AxiosInstance;
|
|
177
|
-
products: ProductsAPI;
|
|
178
|
-
cart: CartAPI;
|
|
179
|
-
checkout: CheckoutAPI;
|
|
180
|
-
orders: OrdersAPI;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export { BaseError as B, type CartAPI as C, type GetOrderInput as G, type JwtTokenAdapter as J, type OrdersAPI as O, type PaginatedResponse as P, type ResponseOptions as R, type ValidationReportableData as V, type WooCommerceDataValidationErrorOptions as W, type BaseErrorOptions as a, type CartHeadersAdapter as b, type CheckoutAPI as c, type ProductsAPI as d, WooCommerceApiError as e, type WooCommerceApiErrorOptions as f, type WooCommerceClient as g, type WooCommerceConfig as h, type ValidationMode as i, handleApiResponse as j, handlePaginatedApiResponse as k, isZodError as l, type Pagination as m, calculatePagination as n, setupErrorInterceptor as s };
|