@shophost/client 2.0.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/README.md +9 -0
- package/package.json +37 -0
- package/src/__generated__/openapi.json +13633 -0
- package/src/__generated__/sdk/client/client.gen.d.ts +2 -0
- package/src/__generated__/sdk/client/client.gen.js +200 -0
- package/src/__generated__/sdk/client/client.gen.js.map +1 -0
- package/src/__generated__/sdk/client/index.d.ts +8 -0
- package/src/__generated__/sdk/client/index.js +7 -0
- package/src/__generated__/sdk/client/index.js.map +1 -0
- package/src/__generated__/sdk/client/types.gen.d.ts +117 -0
- package/src/__generated__/sdk/client/types.gen.js +3 -0
- package/src/__generated__/sdk/client/types.gen.js.map +1 -0
- package/src/__generated__/sdk/client/utils.gen.d.ts +33 -0
- package/src/__generated__/sdk/client/utils.gen.js +221 -0
- package/src/__generated__/sdk/client/utils.gen.js.map +1 -0
- package/src/__generated__/sdk/client.gen.d.ts +12 -0
- package/src/__generated__/sdk/client.gen.js +4 -0
- package/src/__generated__/sdk/client.gen.js.map +1 -0
- package/src/__generated__/sdk/core/auth.gen.d.ts +18 -0
- package/src/__generated__/sdk/core/auth.gen.js +16 -0
- package/src/__generated__/sdk/core/auth.gen.js.map +1 -0
- package/src/__generated__/sdk/core/bodySerializer.gen.d.ts +25 -0
- package/src/__generated__/sdk/core/bodySerializer.gen.js +58 -0
- package/src/__generated__/sdk/core/bodySerializer.gen.js.map +1 -0
- package/src/__generated__/sdk/core/params.gen.d.ts +43 -0
- package/src/__generated__/sdk/core/params.gen.js +101 -0
- package/src/__generated__/sdk/core/params.gen.js.map +1 -0
- package/src/__generated__/sdk/core/pathSerializer.gen.d.ts +33 -0
- package/src/__generated__/sdk/core/pathSerializer.gen.js +115 -0
- package/src/__generated__/sdk/core/pathSerializer.gen.js.map +1 -0
- package/src/__generated__/sdk/core/queryKeySerializer.gen.d.ts +18 -0
- package/src/__generated__/sdk/core/queryKeySerializer.gen.js +100 -0
- package/src/__generated__/sdk/core/queryKeySerializer.gen.js.map +1 -0
- package/src/__generated__/sdk/core/serverSentEvents.gen.d.ts +71 -0
- package/src/__generated__/sdk/core/serverSentEvents.gen.js +135 -0
- package/src/__generated__/sdk/core/serverSentEvents.gen.js.map +1 -0
- package/src/__generated__/sdk/core/types.gen.d.ts +78 -0
- package/src/__generated__/sdk/core/types.gen.js +3 -0
- package/src/__generated__/sdk/core/types.gen.js.map +1 -0
- package/src/__generated__/sdk/core/utils.gen.d.ts +19 -0
- package/src/__generated__/sdk/core/utils.gen.js +88 -0
- package/src/__generated__/sdk/core/utils.gen.js.map +1 -0
- package/src/__generated__/sdk/index.d.ts +2 -0
- package/src/__generated__/sdk/index.js +3 -0
- package/src/__generated__/sdk/index.js.map +1 -0
- package/src/__generated__/sdk/sdk.gen.d.ts +315 -0
- package/src/__generated__/sdk/sdk.gen.js +360 -0
- package/src/__generated__/sdk/sdk.gen.js.map +1 -0
- package/src/__generated__/sdk/types.gen.d.ts +5113 -0
- package/src/__generated__/sdk/types.gen.js +3 -0
- package/src/__generated__/sdk/types.gen.js.map +1 -0
- package/src/index.d.ts +112 -0
- package/src/index.js +147 -0
- package/src/index.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.gen.js","sourceRoot":"","sources":["../../../../../../packages/client/src/__generated__/sdk/types.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD"}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export type * from "./__generated__/sdk";
|
|
2
|
+
export type Locale = import("./__generated__/sdk").OrganizationConfiguration["defaultLocale"];
|
|
3
|
+
export type OrderStatus = import("./__generated__/sdk").UpdateOrderStatusData["path"]["operation"];
|
|
4
|
+
export type PaymentMethodDetails = import("./__generated__/sdk").GetAvailablePaymentMethodsResponses[200][number];
|
|
5
|
+
export type CreateShippingAddressInput = import("./__generated__/sdk").CreateShippingAddressData["body"];
|
|
6
|
+
export type UpdateShippingAddressInput = import("./__generated__/sdk").UpdateShippingAddressData["body"];
|
|
7
|
+
export type ShippingAddress = import("./__generated__/sdk").GetShippingAddressResponses[200];
|
|
8
|
+
export type PaginatedResponse<T> = {
|
|
9
|
+
list: T[];
|
|
10
|
+
meta: import("./__generated__/sdk").PaginationMeta;
|
|
11
|
+
};
|
|
12
|
+
interface RequestInput {
|
|
13
|
+
body?: unknown;
|
|
14
|
+
headers?: Record<string, unknown>;
|
|
15
|
+
params?: Record<string, unknown>;
|
|
16
|
+
query?: Record<string, unknown>;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface InitClientOptions {
|
|
20
|
+
baseHeaders?: HeadersInit;
|
|
21
|
+
baseUrl: string;
|
|
22
|
+
credentials?: RequestCredentials;
|
|
23
|
+
fetch?: typeof fetch;
|
|
24
|
+
throwOnUnknownStatus?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ClientResponse<TBody = any> {
|
|
27
|
+
body: TBody;
|
|
28
|
+
headers: Headers;
|
|
29
|
+
status: number;
|
|
30
|
+
}
|
|
31
|
+
export declare const initClient: ({ baseHeaders, baseUrl, credentials, fetch, throwOnUnknownStatus, }: InitClientOptions) => {
|
|
32
|
+
cart: {
|
|
33
|
+
getCartData: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
34
|
+
};
|
|
35
|
+
file: {
|
|
36
|
+
createTemporaryFile: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
37
|
+
getVercelToken: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
38
|
+
};
|
|
39
|
+
health: {
|
|
40
|
+
ping: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
41
|
+
};
|
|
42
|
+
location: {
|
|
43
|
+
getPlaceDetails: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
44
|
+
getPredictions: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
45
|
+
};
|
|
46
|
+
manufacturer: {
|
|
47
|
+
createManufacturer: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
48
|
+
deleteManufacturer: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
49
|
+
getManufacturer: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
50
|
+
getManufacturers: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
51
|
+
updateManufacturer: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
52
|
+
};
|
|
53
|
+
order: {
|
|
54
|
+
createOrder: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
55
|
+
deleteOrder: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
56
|
+
getOrder: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
57
|
+
getOrders: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
58
|
+
updateStatus: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
59
|
+
};
|
|
60
|
+
organization: {
|
|
61
|
+
createOrganization: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
62
|
+
deleteOrganization: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
63
|
+
getOrganization: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
64
|
+
getOrganizations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
65
|
+
updateOrganization: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
66
|
+
};
|
|
67
|
+
payment: {
|
|
68
|
+
getAvailablePaymentMethods: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
69
|
+
};
|
|
70
|
+
product: {
|
|
71
|
+
createProduct: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
72
|
+
deleteProduct: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
73
|
+
getProduct: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
74
|
+
getProducts: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
75
|
+
getProductsByCategory: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
76
|
+
updateProduct: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
77
|
+
updateStatus: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
78
|
+
};
|
|
79
|
+
productCategory: {
|
|
80
|
+
createProductCategory: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
81
|
+
deleteProductCategory: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
82
|
+
getProductCategories: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
83
|
+
getProductCategory: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
84
|
+
updateProductCategory: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
85
|
+
updateStatus: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
86
|
+
};
|
|
87
|
+
reservation: {
|
|
88
|
+
createReservation: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
89
|
+
deleteReservation: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
90
|
+
getReservation: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
91
|
+
getReservations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
92
|
+
getUserReservations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
93
|
+
updateReservationStatus: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
94
|
+
};
|
|
95
|
+
shipping: {
|
|
96
|
+
createShippingAddress: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
97
|
+
getShippingAddress: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
98
|
+
updateShippingAddress: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
99
|
+
};
|
|
100
|
+
shippingMethod: {
|
|
101
|
+
accessEligibility: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
102
|
+
createShippingMethod: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
103
|
+
deleteShippingMethod: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
104
|
+
getShippingMethod: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
105
|
+
getShippingMethods: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
106
|
+
updateShippingMethod: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
107
|
+
};
|
|
108
|
+
webhook: {
|
|
109
|
+
webhook: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export * from "./__generated__/sdk";
|
package/src/index.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { __awaiter, __rest } from "tslib";
|
|
3
|
+
import openApiDocument from "./__generated__/openapi.json";
|
|
4
|
+
import { createClient as createGeneratedClient, } from "./__generated__/sdk/client";
|
|
5
|
+
import * as sdk from "./__generated__/sdk/sdk.gen";
|
|
6
|
+
const httpMethods = [
|
|
7
|
+
"delete",
|
|
8
|
+
"get",
|
|
9
|
+
"head",
|
|
10
|
+
"options",
|
|
11
|
+
"patch",
|
|
12
|
+
"post",
|
|
13
|
+
"put",
|
|
14
|
+
"trace",
|
|
15
|
+
];
|
|
16
|
+
const operationStatusMap = Object.values((_a = openApiDocument.paths) !== null && _a !== void 0 ? _a : {}).reduce((acc, pathItem) => {
|
|
17
|
+
var _a;
|
|
18
|
+
for (const method of httpMethods) {
|
|
19
|
+
const operation = pathItem === null || pathItem === void 0 ? void 0 : pathItem[method];
|
|
20
|
+
if (!(operation === null || operation === void 0 ? void 0 : operation.operationId)) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
acc[operation.operationId] = Object.keys((_a = operation.responses) !== null && _a !== void 0 ? _a : {}).map((status) => Number(status));
|
|
24
|
+
}
|
|
25
|
+
return acc;
|
|
26
|
+
}, {});
|
|
27
|
+
const normalizeResponse = (operationId, result, throwOnUnknownStatus) => {
|
|
28
|
+
var _a, _b, _c;
|
|
29
|
+
const response = result.response;
|
|
30
|
+
if (!response) {
|
|
31
|
+
throw (_a = result.error) !== null && _a !== void 0 ? _a : new Error(`Request failed for ${operationId}`);
|
|
32
|
+
}
|
|
33
|
+
const documentedStatuses = (_b = operationStatusMap[operationId]) !== null && _b !== void 0 ? _b : [];
|
|
34
|
+
const isDocumented = documentedStatuses.includes(response.status);
|
|
35
|
+
if (!isDocumented && throwOnUnknownStatus) {
|
|
36
|
+
throw (_c = result.error) !== null && _c !== void 0 ? _c : new Error(`Undocumented status ${response.status}`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
body: response.status === 204
|
|
40
|
+
? undefined
|
|
41
|
+
: response.ok
|
|
42
|
+
? result.data
|
|
43
|
+
: result.error,
|
|
44
|
+
headers: response.headers,
|
|
45
|
+
status: response.status,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const createWrappedMethod = (client, operationId, fn, throwOnUnknownStatus) => {
|
|
49
|
+
return (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (input = {}) {
|
|
50
|
+
const { params } = input, rest = __rest(input, ["params"]);
|
|
51
|
+
const result = yield fn(Object.assign(Object.assign({}, rest), { client, path: params }));
|
|
52
|
+
return normalizeResponse(operationId, result, throwOnUnknownStatus);
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
export const initClient = ({ baseHeaders, baseUrl, credentials, fetch, throwOnUnknownStatus = false, }) => {
|
|
56
|
+
const client = createGeneratedClient({
|
|
57
|
+
baseUrl: `${baseUrl}/api`,
|
|
58
|
+
credentials,
|
|
59
|
+
fetch,
|
|
60
|
+
headers: baseHeaders,
|
|
61
|
+
responseStyle: "fields",
|
|
62
|
+
throwOnError: false,
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
cart: {
|
|
66
|
+
getCartData: createWrappedMethod(client, "getCartData", sdk.getCartData, throwOnUnknownStatus),
|
|
67
|
+
},
|
|
68
|
+
file: {
|
|
69
|
+
createTemporaryFile: createWrappedMethod(client, "createTemporaryFile", sdk.createTemporaryFile, throwOnUnknownStatus),
|
|
70
|
+
getVercelToken: createWrappedMethod(client, "getVercelToken", sdk.getVercelToken, throwOnUnknownStatus),
|
|
71
|
+
},
|
|
72
|
+
health: {
|
|
73
|
+
ping: createWrappedMethod(client, "ping", sdk.ping, throwOnUnknownStatus),
|
|
74
|
+
},
|
|
75
|
+
location: {
|
|
76
|
+
getPlaceDetails: createWrappedMethod(client, "getPlaceDetails", sdk.getPlaceDetails, throwOnUnknownStatus),
|
|
77
|
+
getPredictions: createWrappedMethod(client, "getPredictions", sdk.getPredictions, throwOnUnknownStatus),
|
|
78
|
+
},
|
|
79
|
+
manufacturer: {
|
|
80
|
+
createManufacturer: createWrappedMethod(client, "createManufacturer", sdk.createManufacturer, throwOnUnknownStatus),
|
|
81
|
+
deleteManufacturer: createWrappedMethod(client, "deleteManufacturer", sdk.deleteManufacturer, throwOnUnknownStatus),
|
|
82
|
+
getManufacturer: createWrappedMethod(client, "getManufacturer", sdk.getManufacturer, throwOnUnknownStatus),
|
|
83
|
+
getManufacturers: createWrappedMethod(client, "getManufacturers", sdk.getManufacturers, throwOnUnknownStatus),
|
|
84
|
+
updateManufacturer: createWrappedMethod(client, "updateManufacturer", sdk.updateManufacturer, throwOnUnknownStatus),
|
|
85
|
+
},
|
|
86
|
+
order: {
|
|
87
|
+
createOrder: createWrappedMethod(client, "createOrder", sdk.createOrder, throwOnUnknownStatus),
|
|
88
|
+
deleteOrder: createWrappedMethod(client, "deleteOrder", sdk.deleteOrder, throwOnUnknownStatus),
|
|
89
|
+
getOrder: createWrappedMethod(client, "getOrder", sdk.getOrder, throwOnUnknownStatus),
|
|
90
|
+
getOrders: createWrappedMethod(client, "getOrders", sdk.getOrders, throwOnUnknownStatus),
|
|
91
|
+
updateStatus: createWrappedMethod(client, "updateOrderStatus", sdk.updateOrderStatus, throwOnUnknownStatus),
|
|
92
|
+
},
|
|
93
|
+
organization: {
|
|
94
|
+
createOrganization: createWrappedMethod(client, "createOrganization", sdk.createOrganization, throwOnUnknownStatus),
|
|
95
|
+
deleteOrganization: createWrappedMethod(client, "deleteOrganization", sdk.deleteOrganization, throwOnUnknownStatus),
|
|
96
|
+
getOrganization: createWrappedMethod(client, "getOrganization", sdk.getOrganization, throwOnUnknownStatus),
|
|
97
|
+
getOrganizations: createWrappedMethod(client, "getOrganizations", sdk.getOrganizations, throwOnUnknownStatus),
|
|
98
|
+
updateOrganization: createWrappedMethod(client, "updateOrganization", sdk.updateOrganization, throwOnUnknownStatus),
|
|
99
|
+
},
|
|
100
|
+
payment: {
|
|
101
|
+
getAvailablePaymentMethods: createWrappedMethod(client, "getAvailablePaymentMethods", sdk.getAvailablePaymentMethods, throwOnUnknownStatus),
|
|
102
|
+
},
|
|
103
|
+
product: {
|
|
104
|
+
createProduct: createWrappedMethod(client, "createProduct", sdk.createProduct, throwOnUnknownStatus),
|
|
105
|
+
deleteProduct: createWrappedMethod(client, "deleteProduct", sdk.deleteProduct, throwOnUnknownStatus),
|
|
106
|
+
getProduct: createWrappedMethod(client, "getProduct", sdk.getProduct, throwOnUnknownStatus),
|
|
107
|
+
getProducts: createWrappedMethod(client, "getProducts", sdk.getProducts, throwOnUnknownStatus),
|
|
108
|
+
getProductsByCategory: createWrappedMethod(client, "getProductsByCategory", sdk.getProductsByCategory, throwOnUnknownStatus),
|
|
109
|
+
updateProduct: createWrappedMethod(client, "updateProduct", sdk.updateProduct, throwOnUnknownStatus),
|
|
110
|
+
updateStatus: createWrappedMethod(client, "updateProductStatus", sdk.updateProductStatus, throwOnUnknownStatus),
|
|
111
|
+
},
|
|
112
|
+
productCategory: {
|
|
113
|
+
createProductCategory: createWrappedMethod(client, "createProductCategory", sdk.createProductCategory, throwOnUnknownStatus),
|
|
114
|
+
deleteProductCategory: createWrappedMethod(client, "deleteProductCategory", sdk.deleteProductCategory, throwOnUnknownStatus),
|
|
115
|
+
getProductCategories: createWrappedMethod(client, "getProductCategories", sdk.getProductCategories, throwOnUnknownStatus),
|
|
116
|
+
getProductCategory: createWrappedMethod(client, "getProductCategory", sdk.getProductCategory, throwOnUnknownStatus),
|
|
117
|
+
updateProductCategory: createWrappedMethod(client, "updateProductCategory", sdk.updateProductCategory, throwOnUnknownStatus),
|
|
118
|
+
updateStatus: createWrappedMethod(client, "updateProductCategoryStatus", sdk.updateProductCategoryStatus, throwOnUnknownStatus),
|
|
119
|
+
},
|
|
120
|
+
reservation: {
|
|
121
|
+
createReservation: createWrappedMethod(client, "createReservation", sdk.createReservation, throwOnUnknownStatus),
|
|
122
|
+
deleteReservation: createWrappedMethod(client, "deleteReservation", sdk.deleteReservation, throwOnUnknownStatus),
|
|
123
|
+
getReservation: createWrappedMethod(client, "getReservation", sdk.getReservation, throwOnUnknownStatus),
|
|
124
|
+
getReservations: createWrappedMethod(client, "getReservations", sdk.getReservations, throwOnUnknownStatus),
|
|
125
|
+
getUserReservations: createWrappedMethod(client, "getUserReservations", sdk.getUserReservations, throwOnUnknownStatus),
|
|
126
|
+
updateReservationStatus: createWrappedMethod(client, "updateReservationStatus", sdk.updateReservationStatus, throwOnUnknownStatus),
|
|
127
|
+
},
|
|
128
|
+
shipping: {
|
|
129
|
+
createShippingAddress: createWrappedMethod(client, "createShippingAddress", sdk.createShippingAddress, throwOnUnknownStatus),
|
|
130
|
+
getShippingAddress: createWrappedMethod(client, "getShippingAddress", sdk.getShippingAddress, throwOnUnknownStatus),
|
|
131
|
+
updateShippingAddress: createWrappedMethod(client, "updateShippingAddress", sdk.updateShippingAddress, throwOnUnknownStatus),
|
|
132
|
+
},
|
|
133
|
+
shippingMethod: {
|
|
134
|
+
accessEligibility: createWrappedMethod(client, "accessEligibility", sdk.accessEligibility, throwOnUnknownStatus),
|
|
135
|
+
createShippingMethod: createWrappedMethod(client, "createShippingMethod", sdk.createShippingMethod, throwOnUnknownStatus),
|
|
136
|
+
deleteShippingMethod: createWrappedMethod(client, "deleteShippingMethod", sdk.deleteShippingMethod, throwOnUnknownStatus),
|
|
137
|
+
getShippingMethod: createWrappedMethod(client, "getShippingMethod", sdk.getShippingMethod, throwOnUnknownStatus),
|
|
138
|
+
getShippingMethods: createWrappedMethod(client, "getShippingMethods", sdk.getShippingMethods, throwOnUnknownStatus),
|
|
139
|
+
updateShippingMethod: createWrappedMethod(client, "updateShippingMethod", sdk.updateShippingMethod, throwOnUnknownStatus),
|
|
140
|
+
},
|
|
141
|
+
webhook: {
|
|
142
|
+
webhook: createWrappedMethod(client, "webhook", sdk.webhook, throwOnUnknownStatus),
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export * from "./__generated__/sdk";
|
|
147
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/client/src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EACL,YAAY,IAAI,qBAAqB,GAEtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,GAAG,MAAM,6BAA6B,CAAC;AAsDnD,MAAM,WAAW,GAAiB;IAChC,QAAQ;IACR,KAAK;IACL,MAAM;IACN,SAAS;IACT,OAAO;IACP,MAAM;IACN,KAAK;IACL,OAAO;CACR,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,MAAA,eAAe,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,MAAM,CAE1E,CAAC,GAAG,EAAE,QAAa,EAAE,EAAE;;IACvB,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,MAAM,CAAC,CAAC;QAErC,IAAI,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,CAAA,EAAE,CAAC;YAC5B,SAAS;QACX,CAAC;QAED,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAA,SAAS,CAAC,SAAS,mCAAI,EAAE,CAAC,C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