@liquidcommerce/elements-sdk 2.5.11 → 2.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.esm.js +9699 -9491
- package/dist/types/core/{api-client.service.d.ts → api/api-client.service.d.ts} +2 -2
- package/dist/types/core/{auth.service.d.ts → api/auth-client.service.d.ts} +2 -2
- package/dist/types/core/api/http-client.service.d.ts +45 -0
- package/dist/types/core/client/client-config.service.d.ts +2 -0
- package/dist/types/core/command/base-command.service.d.ts +1 -1
- package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -1
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +2 -0
- package/dist/types/elements-base-client.d.ts +3 -3
- package/dist/types/interfaces/core.interface.d.ts +1 -0
- package/package.json +2 -2
- package/umd/elements.js +1 -1
- package/dist/types/core/utils.d.ts +0 -23
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export type FetchFunction = typeof fetch;
|
|
2
|
-
export interface IHttpClientOptions {
|
|
3
|
-
method: string;
|
|
4
|
-
headers: Record<string, string>;
|
|
5
|
-
body?: string;
|
|
6
|
-
}
|
|
7
|
-
export type HttpClient = (url: string, options: IHttpClientOptions) => Promise<ICustomResponse>;
|
|
8
|
-
export interface IRequestOptions {
|
|
9
|
-
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
body?: any;
|
|
12
|
-
}
|
|
13
|
-
export interface ICustomResponse {
|
|
14
|
-
ok: boolean;
|
|
15
|
-
status: number;
|
|
16
|
-
statusText: string;
|
|
17
|
-
headers: Record<string, string>;
|
|
18
|
-
json: () => Promise<any>;
|
|
19
|
-
text: () => Promise<string>;
|
|
20
|
-
}
|
|
21
|
-
export declare function fetchAdapter(fetchFunc: FetchFunction): HttpClient;
|
|
22
|
-
export declare const xhrFetch: HttpClient;
|
|
23
|
-
export declare function getFetchImplementation(): HttpClient;
|