arky-sdk 0.7.29 → 0.7.32
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 -37
- 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 -37
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -34
- package/dist/types.d.ts +1 -34
- 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
|
},
|
|
@@ -1114,9 +1124,6 @@ var createLocationApi = (apiConfig) => {
|
|
|
1114
1124
|
options
|
|
1115
1125
|
);
|
|
1116
1126
|
},
|
|
1117
|
-
// Business location CRUD. Locations are now first-class entities (their own
|
|
1118
|
-
// table) and are no longer embedded in BusinessConfigs. Reads and writes go
|
|
1119
|
-
// through these endpoints.
|
|
1120
1127
|
async list(options) {
|
|
1121
1128
|
return apiConfig.httpClient.get(
|
|
1122
1129
|
`/v1/businesses/${apiConfig.businessId}/locations`,
|
|
@@ -1518,38 +1525,6 @@ var createReactionApi = (apiConfig) => {
|
|
|
1518
1525
|
};
|
|
1519
1526
|
};
|
|
1520
1527
|
|
|
1521
|
-
// src/api/network.ts
|
|
1522
|
-
var createNetworkApi = (apiConfig) => {
|
|
1523
|
-
return {
|
|
1524
|
-
async create(params, options) {
|
|
1525
|
-
return apiConfig.httpClient.post(`/v1/networks`, params, options);
|
|
1526
|
-
},
|
|
1527
|
-
async get(params, options) {
|
|
1528
|
-
return apiConfig.httpClient.get(`/v1/networks/${params.id}`, options);
|
|
1529
|
-
},
|
|
1530
|
-
async find(params, options) {
|
|
1531
|
-
const queryParams = {};
|
|
1532
|
-
if (params?.limit !== void 0) queryParams.limit = params.limit;
|
|
1533
|
-
if (params?.cursor) queryParams.cursor = params.cursor;
|
|
1534
|
-
if (params?.query) queryParams.query = params.query;
|
|
1535
|
-
return apiConfig.httpClient.get(`/v1/networks`, {
|
|
1536
|
-
...options,
|
|
1537
|
-
params: queryParams
|
|
1538
|
-
});
|
|
1539
|
-
},
|
|
1540
|
-
async update(params, options) {
|
|
1541
|
-
const { id, ...body } = params;
|
|
1542
|
-
return apiConfig.httpClient.put(`/v1/networks/${id}`, body, options);
|
|
1543
|
-
},
|
|
1544
|
-
async delete(params, options) {
|
|
1545
|
-
return apiConfig.httpClient.delete(
|
|
1546
|
-
`/v1/networks/${params.id}`,
|
|
1547
|
-
options
|
|
1548
|
-
);
|
|
1549
|
-
}
|
|
1550
|
-
};
|
|
1551
|
-
};
|
|
1552
|
-
|
|
1553
1528
|
// src/api/workflow.ts
|
|
1554
1529
|
var createWorkflowApi = (apiConfig) => {
|
|
1555
1530
|
return {
|
|
@@ -2289,7 +2264,6 @@ async function createArkySDK(config) {
|
|
|
2289
2264
|
zone: createZoneApi(apiConfig),
|
|
2290
2265
|
crm: createCustomerApi(apiConfig),
|
|
2291
2266
|
reaction: createReactionApi(apiConfig),
|
|
2292
|
-
network: createNetworkApi(apiConfig),
|
|
2293
2267
|
workflow: createWorkflowApi(apiConfig),
|
|
2294
2268
|
shipping: createShippingApi(apiConfig),
|
|
2295
2269
|
agent: createAgentApi(apiConfig),
|