arky-sdk 0.7.30 → 0.7.33
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.cjs +11 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -10
- package/dist/index.d.ts +3 -10
- package/dist/index.js +11 -34
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +7 -40
- package/dist/types.d.ts +7 -40
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -859,9 +859,19 @@ var createEshopApi = (apiConfig) => {
|
|
|
859
859
|
);
|
|
860
860
|
},
|
|
861
861
|
async getQuote(params, options) {
|
|
862
|
+
const { location, ...rest } = params;
|
|
863
|
+
const shippingAddress = location ? {
|
|
864
|
+
country: location.country || "",
|
|
865
|
+
state: location.state || "",
|
|
866
|
+
city: location.city || "",
|
|
867
|
+
postalCode: location.postalCode || "",
|
|
868
|
+
name: "",
|
|
869
|
+
street1: "",
|
|
870
|
+
street2: null
|
|
871
|
+
} : void 0;
|
|
862
872
|
return apiConfig.httpClient.post(
|
|
863
873
|
`/v1/businesses/${apiConfig.businessId}/orders/quote`,
|
|
864
|
-
{ ...
|
|
874
|
+
{ ...rest, shippingAddress, market: apiConfig.market },
|
|
865
875
|
options
|
|
866
876
|
);
|
|
867
877
|
},
|
|
@@ -1515,38 +1525,6 @@ var createReactionApi = (apiConfig) => {
|
|
|
1515
1525
|
};
|
|
1516
1526
|
};
|
|
1517
1527
|
|
|
1518
|
-
// src/api/network.ts
|
|
1519
|
-
var createNetworkApi = (apiConfig) => {
|
|
1520
|
-
return {
|
|
1521
|
-
async create(params, options) {
|
|
1522
|
-
return apiConfig.httpClient.post(`/v1/networks`, params, options);
|
|
1523
|
-
},
|
|
1524
|
-
async get(params, options) {
|
|
1525
|
-
return apiConfig.httpClient.get(`/v1/networks/${params.id}`, options);
|
|
1526
|
-
},
|
|
1527
|
-
async find(params, options) {
|
|
1528
|
-
const queryParams = {};
|
|
1529
|
-
if (params?.limit !== void 0) queryParams.limit = params.limit;
|
|
1530
|
-
if (params?.cursor) queryParams.cursor = params.cursor;
|
|
1531
|
-
if (params?.query) queryParams.query = params.query;
|
|
1532
|
-
return apiConfig.httpClient.get(`/v1/networks`, {
|
|
1533
|
-
...options,
|
|
1534
|
-
params: queryParams
|
|
1535
|
-
});
|
|
1536
|
-
},
|
|
1537
|
-
async update(params, options) {
|
|
1538
|
-
const { id, ...body } = params;
|
|
1539
|
-
return apiConfig.httpClient.put(`/v1/networks/${id}`, body, options);
|
|
1540
|
-
},
|
|
1541
|
-
async delete(params, options) {
|
|
1542
|
-
return apiConfig.httpClient.delete(
|
|
1543
|
-
`/v1/networks/${params.id}`,
|
|
1544
|
-
options
|
|
1545
|
-
);
|
|
1546
|
-
}
|
|
1547
|
-
};
|
|
1548
|
-
};
|
|
1549
|
-
|
|
1550
1528
|
// src/api/workflow.ts
|
|
1551
1529
|
var createWorkflowApi = (apiConfig) => {
|
|
1552
1530
|
return {
|
|
@@ -2286,7 +2264,6 @@ async function createArkySDK(config) {
|
|
|
2286
2264
|
zone: createZoneApi(apiConfig),
|
|
2287
2265
|
crm: createCustomerApi(apiConfig),
|
|
2288
2266
|
reaction: createReactionApi(apiConfig),
|
|
2289
|
-
network: createNetworkApi(apiConfig),
|
|
2290
2267
|
workflow: createWorkflowApi(apiConfig),
|
|
2291
2268
|
shipping: createShippingApi(apiConfig),
|
|
2292
2269
|
agent: createAgentApi(apiConfig),
|