arky-sdk 0.7.18 → 0.7.24
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-Cjdv3omy.d.cts → index-BzBZVueX.d.cts} +0 -16
- package/dist/{index-UQfW3UpN.d.ts → index-CkyDsYWA.d.ts} +0 -16
- package/dist/index.cjs +0 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -11
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +11 -51
- package/dist/types.d.ts +11 -51
- package/dist/types.js.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,26 +18,10 @@ declare function nameToKey(name: string): string;
|
|
|
18
18
|
interface VariantWithInventory {
|
|
19
19
|
inventory: InventoryLevel[];
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Get total available stock across all locations for a variant
|
|
23
|
-
*/
|
|
24
21
|
declare function getAvailableStock(variant: VariantWithInventory): number;
|
|
25
|
-
/**
|
|
26
|
-
* Get total reserved stock across all locations for a variant
|
|
27
|
-
*/
|
|
28
22
|
declare function getReservedStock(variant: VariantWithInventory): number;
|
|
29
|
-
/**
|
|
30
|
-
* Check if variant has any available stock
|
|
31
|
-
*/
|
|
32
23
|
declare function hasStock(variant: VariantWithInventory, quantity?: number): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Get inventory level at a specific location
|
|
35
|
-
*/
|
|
36
24
|
declare function getInventoryAt(variant: VariantWithInventory, locationId: string): InventoryLevel | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* Get the first location with available stock
|
|
39
|
-
* Returns the locationId of the first location that has stock
|
|
40
|
-
*/
|
|
41
25
|
declare function getFirstAvailableFCId(variant: VariantWithInventory, quantity?: number): string | undefined;
|
|
42
26
|
|
|
43
27
|
export { formatMinor as a, getCurrencyName as b, getAvailableStock as c, getReservedStock as d, getInventoryAt as e, formatPayment as f, getCurrencySymbol as g, hasStock as h, isValidKey as i, getFirstAvailableFCId as j, convertToMajor as k, convertToMinor as l, nameToKey as n, toKey as t, validateKey as v };
|
|
@@ -18,26 +18,10 @@ declare function nameToKey(name: string): string;
|
|
|
18
18
|
interface VariantWithInventory {
|
|
19
19
|
inventory: InventoryLevel[];
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Get total available stock across all locations for a variant
|
|
23
|
-
*/
|
|
24
21
|
declare function getAvailableStock(variant: VariantWithInventory): number;
|
|
25
|
-
/**
|
|
26
|
-
* Get total reserved stock across all locations for a variant
|
|
27
|
-
*/
|
|
28
22
|
declare function getReservedStock(variant: VariantWithInventory): number;
|
|
29
|
-
/**
|
|
30
|
-
* Check if variant has any available stock
|
|
31
|
-
*/
|
|
32
23
|
declare function hasStock(variant: VariantWithInventory, quantity?: number): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Get inventory level at a specific location
|
|
35
|
-
*/
|
|
36
24
|
declare function getInventoryAt(variant: VariantWithInventory, locationId: string): InventoryLevel | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* Get the first location with available stock
|
|
39
|
-
* Returns the locationId of the first location that has stock
|
|
40
|
-
*/
|
|
41
25
|
declare function getFirstAvailableFCId(variant: VariantWithInventory, quantity?: number): string | undefined;
|
|
42
26
|
|
|
43
27
|
export { formatMinor as a, getCurrencyName as b, getAvailableStock as c, getReservedStock as d, getInventoryAt as e, formatPayment as f, getCurrencySymbol as g, hasStock as h, isValidKey as i, getFirstAvailableFCId as j, convertToMajor as k, convertToMinor as l, nameToKey as n, toKey as t, validateKey as v };
|
package/dist/index.cjs
CHANGED
|
@@ -379,7 +379,6 @@ var createBusinessApi = (apiConfig) => {
|
|
|
379
379
|
options
|
|
380
380
|
);
|
|
381
381
|
},
|
|
382
|
-
// ── Integration CRUD ──
|
|
383
382
|
async listIntegrations(params, options) {
|
|
384
383
|
return apiConfig.httpClient.get(
|
|
385
384
|
`/v1/businesses/${params.businessId}/integrations`,
|
|
@@ -414,7 +413,6 @@ var createBusinessApi = (apiConfig) => {
|
|
|
414
413
|
options
|
|
415
414
|
);
|
|
416
415
|
},
|
|
417
|
-
// ── Webhook CRUD ──
|
|
418
416
|
async listWebhooks(params, options) {
|
|
419
417
|
return apiConfig.httpClient.get(
|
|
420
418
|
`/v1/businesses/${params.businessId}/webhooks`,
|
|
@@ -1122,7 +1120,6 @@ var createLocationApi = (apiConfig) => {
|
|
|
1122
1120
|
// src/api/crm.ts
|
|
1123
1121
|
var createCustomerApi = (apiConfig) => {
|
|
1124
1122
|
return {
|
|
1125
|
-
// Auth methods
|
|
1126
1123
|
async requestCode(params, options) {
|
|
1127
1124
|
const businessId = params.businessId || apiConfig.businessId;
|
|
1128
1125
|
return apiConfig.httpClient.post(
|
|
@@ -1153,7 +1150,6 @@ var createCustomerApi = (apiConfig) => {
|
|
|
1153
1150
|
options
|
|
1154
1151
|
);
|
|
1155
1152
|
},
|
|
1156
|
-
// CRUD methods
|
|
1157
1153
|
async create(params, options) {
|
|
1158
1154
|
return apiConfig.httpClient.post(
|
|
1159
1155
|
`/v1/businesses/${params.businessId || apiConfig.businessId}/customers`,
|
|
@@ -1229,7 +1225,6 @@ var createCustomerApi = (apiConfig) => {
|
|
|
1229
1225
|
options
|
|
1230
1226
|
);
|
|
1231
1227
|
},
|
|
1232
|
-
// Audiences
|
|
1233
1228
|
audiences: {
|
|
1234
1229
|
async create(params, options) {
|
|
1235
1230
|
return apiConfig.httpClient.post(
|
|
@@ -1423,9 +1418,6 @@ var createPlatformApi = (apiConfig) => {
|
|
|
1423
1418
|
// src/api/shipping.ts
|
|
1424
1419
|
var createShippingApi = (apiConfig) => {
|
|
1425
1420
|
return {
|
|
1426
|
-
/**
|
|
1427
|
-
* Get available shipping rates for a shipment
|
|
1428
|
-
*/
|
|
1429
1421
|
async getRates(params, options) {
|
|
1430
1422
|
const { orderId, ...payload } = params;
|
|
1431
1423
|
return apiConfig.httpClient.post(
|
|
@@ -1434,9 +1426,6 @@ var createShippingApi = (apiConfig) => {
|
|
|
1434
1426
|
options
|
|
1435
1427
|
);
|
|
1436
1428
|
},
|
|
1437
|
-
/**
|
|
1438
|
-
* Ship items: creates shipment + purchases label atomically
|
|
1439
|
-
*/
|
|
1440
1429
|
async ship(params, options) {
|
|
1441
1430
|
const { orderId, ...payload } = params;
|
|
1442
1431
|
return apiConfig.httpClient.post(
|