@simpleapps-com/augur-api 0.4.5 → 0.4.7
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/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/services/customers/client.d.ts +55 -0
- package/dist/cjs/services/customers/client.d.ts.map +1 -1
- package/dist/cjs/services/customers/client.js +17 -0
- package/dist/cjs/services/customers/client.js.map +1 -1
- package/dist/cjs/services/customers/schemas/customer.d.ts +178 -0
- package/dist/cjs/services/customers/schemas/customer.d.ts.map +1 -1
- package/dist/cjs/services/customers/schemas/customer.js +2 -1
- package/dist/cjs/services/customers/schemas/customer.js.map +1 -1
- package/dist/cjs/services/items/client.d.ts +60 -86
- package/dist/cjs/services/items/client.d.ts.map +1 -1
- package/dist/cjs/services/items/client.js +17 -15
- package/dist/cjs/services/items/client.js.map +1 -1
- package/dist/cjs/services/items/schemas/attributeGroups.d.ts +0 -3
- package/dist/cjs/services/items/schemas/attributeGroups.d.ts.map +1 -1
- package/dist/cjs/services/items/schemas/attributeGroups.js +0 -1
- package/dist/cjs/services/items/schemas/attributeGroups.js.map +1 -1
- package/dist/cjs/services/items/schemas/attributeGroupsAttributes.d.ts +24 -0
- package/dist/cjs/services/items/schemas/attributeGroupsAttributes.d.ts.map +1 -1
- package/dist/cjs/services/items/schemas/attributeGroupsAttributes.js +12 -1
- package/dist/cjs/services/items/schemas/attributeGroupsAttributes.js.map +1 -1
- package/dist/cjs/services/items/schemas/attributes.d.ts +48 -0
- package/dist/cjs/services/items/schemas/attributes.d.ts.map +1 -1
- package/dist/cjs/services/items/schemas/attributes.js +23 -1
- package/dist/cjs/services/items/schemas/attributes.js.map +1 -1
- package/dist/cjs/services/items/schemas/bins.d.ts +14 -14
- package/dist/cjs/services/items/schemas/brandsItems.d.ts +18 -18
- package/dist/cjs/services/items/schemas/categories.d.ts +48 -0
- package/dist/cjs/services/items/schemas/categories.d.ts.map +1 -1
- package/dist/cjs/services/items/schemas/categories.js +20 -1
- package/dist/cjs/services/items/schemas/categories.js.map +1 -1
- package/dist/cjs/services/items/schemas/index.d.ts +1 -0
- package/dist/cjs/services/items/schemas/index.d.ts.map +1 -1
- package/dist/cjs/services/items/schemas/index.js +2 -0
- package/dist/cjs/services/items/schemas/index.js.map +1 -1
- package/dist/cjs/services/items/schemas/invLoc.d.ts +14 -14
- package/dist/cjs/services/items/schemas/invMast.d.ts +20 -23
- package/dist/cjs/services/items/schemas/invMast.d.ts.map +1 -1
- package/dist/cjs/services/items/schemas/invMast.js +2 -3
- package/dist/cjs/services/items/schemas/invMast.js.map +1 -1
- package/dist/cjs/services/items/schemas/invMastAccessory.d.ts +8 -8
- package/dist/cjs/services/items/schemas/invMastDoc.d.ts +21 -84
- package/dist/cjs/services/items/schemas/invMastDoc.d.ts.map +1 -1
- package/dist/cjs/services/items/schemas/invMastDoc.js +18 -11
- package/dist/cjs/services/items/schemas/invMastDoc.js.map +1 -1
- package/dist/cjs/services/items/schemas/invMastLocationsBins.d.ts +18 -0
- package/dist/cjs/services/items/schemas/invMastLocationsBins.d.ts.map +1 -1
- package/dist/cjs/services/items/schemas/invMastLocationsBins.js +10 -1
- package/dist/cjs/services/items/schemas/invMastLocationsBins.js.map +1 -1
- package/dist/cjs/services/items/schemas/invMastLookup.d.ts +185 -0
- package/dist/cjs/services/items/schemas/invMastLookup.d.ts.map +1 -0
- package/dist/cjs/services/items/schemas/invMastLookup.js +37 -0
- package/dist/cjs/services/items/schemas/invMastLookup.js.map +1 -0
- package/dist/cjs/services/items/schemas/itemWishlistHdr.d.ts +17 -17
- package/dist/cjs/services/items/schemas/itemWishlistHdr.js +1 -1
- package/dist/cjs/services/items/schemas/variants.d.ts +30 -30
- package/dist/cjs/services/orders/client.d.ts +4 -4
- package/dist/cjs/services/orders/schemas/poHdr.d.ts +14 -14
- package/dist/cjs/services/orders/schemas/poHdrDoc.d.ts +12 -12
- package/dist/cjs/services/p21-pim/client.d.ts +6 -6
- package/dist/cjs/services/p21-pim/schemas/inventory.d.ts +32 -32
- package/dist/cjs/services/vmi/client.d.ts +612 -502
- package/dist/cjs/services/vmi/client.d.ts.map +1 -1
- package/dist/cjs/services/vmi/client.js +109 -100
- package/dist/cjs/services/vmi/client.js.map +1 -1
- package/dist/cjs/services/vmi/schemas/inventory.d.ts +182 -182
- package/dist/cjs/services/vmi/schemas/inventory.js +21 -21
- package/dist/cjs/services/vmi/schemas/inventory.js.map +1 -1
- package/dist/cjs/services/vmi/schemas/products.d.ts +524 -390
- package/dist/cjs/services/vmi/schemas/products.d.ts.map +1 -1
- package/dist/cjs/services/vmi/schemas/products.js +51 -39
- package/dist/cjs/services/vmi/schemas/products.js.map +1 -1
- package/dist/cjs/services/vmi/schemas/profiles.d.ts +339 -305
- package/dist/cjs/services/vmi/schemas/profiles.d.ts.map +1 -1
- package/dist/cjs/services/vmi/schemas/profiles.js +29 -27
- package/dist/cjs/services/vmi/schemas/profiles.js.map +1 -1
- package/dist/cjs/services/vmi/schemas/restock.d.ts +311 -294
- package/dist/cjs/services/vmi/schemas/restock.d.ts.map +1 -1
- package/dist/cjs/services/vmi/schemas/restock.js +25 -24
- package/dist/cjs/services/vmi/schemas/restock.js.map +1 -1
- package/dist/cjs/services/vmi/schemas/warehouse.d.ts +487 -402
- package/dist/cjs/services/vmi/schemas/warehouse.d.ts.map +1 -1
- package/dist/cjs/services/vmi/schemas/warehouse.js +41 -36
- package/dist/cjs/services/vmi/schemas/warehouse.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/services/customers/client.d.ts +55 -0
- package/dist/esm/services/customers/client.d.ts.map +1 -1
- package/dist/esm/services/customers/client.js +18 -1
- package/dist/esm/services/customers/client.js.map +1 -1
- package/dist/esm/services/customers/schemas/customer.d.ts +178 -0
- package/dist/esm/services/customers/schemas/customer.d.ts.map +1 -1
- package/dist/esm/services/customers/schemas/customer.js +1 -0
- package/dist/esm/services/customers/schemas/customer.js.map +1 -1
- package/dist/esm/services/items/client.d.ts +60 -86
- package/dist/esm/services/items/client.d.ts.map +1 -1
- package/dist/esm/services/items/client.js +26 -22
- package/dist/esm/services/items/client.js.map +1 -1
- package/dist/esm/services/items/schemas/attributeGroups.d.ts +0 -3
- package/dist/esm/services/items/schemas/attributeGroups.d.ts.map +1 -1
- package/dist/esm/services/items/schemas/attributeGroups.js +0 -1
- package/dist/esm/services/items/schemas/attributeGroups.js.map +1 -1
- package/dist/esm/services/items/schemas/attributeGroupsAttributes.d.ts +24 -0
- package/dist/esm/services/items/schemas/attributeGroupsAttributes.d.ts.map +1 -1
- package/dist/esm/services/items/schemas/attributeGroupsAttributes.js +11 -0
- package/dist/esm/services/items/schemas/attributeGroupsAttributes.js.map +1 -1
- package/dist/esm/services/items/schemas/attributes.d.ts +48 -0
- package/dist/esm/services/items/schemas/attributes.d.ts.map +1 -1
- package/dist/esm/services/items/schemas/attributes.js +22 -0
- package/dist/esm/services/items/schemas/attributes.js.map +1 -1
- package/dist/esm/services/items/schemas/bins.d.ts +14 -14
- package/dist/esm/services/items/schemas/brandsItems.d.ts +18 -18
- package/dist/esm/services/items/schemas/categories.d.ts +48 -0
- package/dist/esm/services/items/schemas/categories.d.ts.map +1 -1
- package/dist/esm/services/items/schemas/categories.js +19 -0
- package/dist/esm/services/items/schemas/categories.js.map +1 -1
- package/dist/esm/services/items/schemas/index.d.ts +1 -0
- package/dist/esm/services/items/schemas/index.d.ts.map +1 -1
- package/dist/esm/services/items/schemas/index.js +2 -0
- package/dist/esm/services/items/schemas/index.js.map +1 -1
- package/dist/esm/services/items/schemas/invLoc.d.ts +14 -14
- package/dist/esm/services/items/schemas/invMast.d.ts +20 -23
- package/dist/esm/services/items/schemas/invMast.d.ts.map +1 -1
- package/dist/esm/services/items/schemas/invMast.js +2 -3
- package/dist/esm/services/items/schemas/invMast.js.map +1 -1
- package/dist/esm/services/items/schemas/invMastAccessory.d.ts +8 -8
- package/dist/esm/services/items/schemas/invMastDoc.d.ts +21 -84
- package/dist/esm/services/items/schemas/invMastDoc.d.ts.map +1 -1
- package/dist/esm/services/items/schemas/invMastDoc.js +17 -10
- package/dist/esm/services/items/schemas/invMastDoc.js.map +1 -1
- package/dist/esm/services/items/schemas/invMastLocationsBins.d.ts +18 -0
- package/dist/esm/services/items/schemas/invMastLocationsBins.d.ts.map +1 -1
- package/dist/esm/services/items/schemas/invMastLocationsBins.js +9 -0
- package/dist/esm/services/items/schemas/invMastLocationsBins.js.map +1 -1
- package/dist/esm/services/items/schemas/invMastLookup.d.ts +185 -0
- package/dist/esm/services/items/schemas/invMastLookup.d.ts.map +1 -0
- package/dist/esm/services/items/schemas/invMastLookup.js +34 -0
- package/dist/esm/services/items/schemas/invMastLookup.js.map +1 -0
- package/dist/esm/services/items/schemas/itemWishlistHdr.d.ts +17 -17
- package/dist/esm/services/items/schemas/itemWishlistHdr.js +1 -1
- package/dist/esm/services/items/schemas/variants.d.ts +30 -30
- package/dist/esm/services/orders/client.d.ts +4 -4
- package/dist/esm/services/orders/schemas/poHdr.d.ts +14 -14
- package/dist/esm/services/orders/schemas/poHdrDoc.d.ts +12 -12
- package/dist/esm/services/p21-pim/client.d.ts +6 -6
- package/dist/esm/services/p21-pim/schemas/inventory.d.ts +32 -32
- package/dist/esm/services/vmi/client.d.ts +612 -502
- package/dist/esm/services/vmi/client.d.ts.map +1 -1
- package/dist/esm/services/vmi/client.js +109 -100
- package/dist/esm/services/vmi/client.js.map +1 -1
- package/dist/esm/services/vmi/schemas/inventory.d.ts +182 -182
- package/dist/esm/services/vmi/schemas/inventory.js +21 -21
- package/dist/esm/services/vmi/schemas/inventory.js.map +1 -1
- package/dist/esm/services/vmi/schemas/products.d.ts +524 -390
- package/dist/esm/services/vmi/schemas/products.d.ts.map +1 -1
- package/dist/esm/services/vmi/schemas/products.js +51 -39
- package/dist/esm/services/vmi/schemas/products.js.map +1 -1
- package/dist/esm/services/vmi/schemas/profiles.d.ts +339 -305
- package/dist/esm/services/vmi/schemas/profiles.d.ts.map +1 -1
- package/dist/esm/services/vmi/schemas/profiles.js +29 -27
- package/dist/esm/services/vmi/schemas/profiles.js.map +1 -1
- package/dist/esm/services/vmi/schemas/restock.d.ts +311 -294
- package/dist/esm/services/vmi/schemas/restock.d.ts.map +1 -1
- package/dist/esm/services/vmi/schemas/restock.js +25 -24
- package/dist/esm/services/vmi/schemas/restock.js.map +1 -1
- package/dist/esm/services/vmi/schemas/warehouse.d.ts +487 -402
- package/dist/esm/services/vmi/schemas/warehouse.d.ts.map +1 -1
- package/dist/esm/services/vmi/schemas/warehouse.js +41 -36
- package/dist/esm/services/vmi/schemas/warehouse.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/services/customers/client.d.ts +55 -0
- package/dist/types/services/customers/client.d.ts.map +1 -1
- package/dist/types/services/customers/schemas/customer.d.ts +178 -0
- package/dist/types/services/customers/schemas/customer.d.ts.map +1 -1
- package/dist/types/services/items/client.d.ts +60 -86
- package/dist/types/services/items/client.d.ts.map +1 -1
- package/dist/types/services/items/schemas/attributeGroups.d.ts +0 -3
- package/dist/types/services/items/schemas/attributeGroups.d.ts.map +1 -1
- package/dist/types/services/items/schemas/attributeGroupsAttributes.d.ts +24 -0
- package/dist/types/services/items/schemas/attributeGroupsAttributes.d.ts.map +1 -1
- package/dist/types/services/items/schemas/attributes.d.ts +48 -0
- package/dist/types/services/items/schemas/attributes.d.ts.map +1 -1
- package/dist/types/services/items/schemas/bins.d.ts +14 -14
- package/dist/types/services/items/schemas/brandsItems.d.ts +18 -18
- package/dist/types/services/items/schemas/categories.d.ts +48 -0
- package/dist/types/services/items/schemas/categories.d.ts.map +1 -1
- package/dist/types/services/items/schemas/index.d.ts +1 -0
- package/dist/types/services/items/schemas/index.d.ts.map +1 -1
- package/dist/types/services/items/schemas/invLoc.d.ts +14 -14
- package/dist/types/services/items/schemas/invMast.d.ts +20 -23
- package/dist/types/services/items/schemas/invMast.d.ts.map +1 -1
- package/dist/types/services/items/schemas/invMastAccessory.d.ts +8 -8
- package/dist/types/services/items/schemas/invMastDoc.d.ts +21 -84
- package/dist/types/services/items/schemas/invMastDoc.d.ts.map +1 -1
- package/dist/types/services/items/schemas/invMastLocationsBins.d.ts +18 -0
- package/dist/types/services/items/schemas/invMastLocationsBins.d.ts.map +1 -1
- package/dist/types/services/items/schemas/invMastLookup.d.ts +185 -0
- package/dist/types/services/items/schemas/invMastLookup.d.ts.map +1 -0
- package/dist/types/services/items/schemas/itemWishlistHdr.d.ts +17 -17
- package/dist/types/services/items/schemas/variants.d.ts +30 -30
- package/dist/types/services/orders/client.d.ts +4 -4
- package/dist/types/services/orders/schemas/poHdr.d.ts +14 -14
- package/dist/types/services/orders/schemas/poHdrDoc.d.ts +12 -12
- package/dist/types/services/p21-pim/client.d.ts +6 -6
- package/dist/types/services/p21-pim/schemas/inventory.d.ts +32 -32
- package/dist/types/services/vmi/client.d.ts +612 -502
- package/dist/types/services/vmi/client.d.ts.map +1 -1
- package/dist/types/services/vmi/schemas/inventory.d.ts +182 -182
- package/dist/types/services/vmi/schemas/products.d.ts +524 -390
- package/dist/types/services/vmi/schemas/products.d.ts.map +1 -1
- package/dist/types/services/vmi/schemas/profiles.d.ts +339 -305
- package/dist/types/services/vmi/schemas/profiles.d.ts.map +1 -1
- package/dist/types/services/vmi/schemas/restock.d.ts +311 -294
- package/dist/types/services/vmi/schemas/restock.d.ts.map +1 -1
- package/dist/types/services/vmi/schemas/warehouse.d.ts +487 -402
- package/dist/types/services/vmi/schemas/warehouse.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -253,7 +253,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
253
253
|
* warehouse_name: 'New Facility',
|
|
254
254
|
* customer_id: 12345
|
|
255
255
|
* });
|
|
256
|
-
* console.log(warehouse.
|
|
256
|
+
* console.log(warehouse.warehouseUid); // Direct access to created ID
|
|
257
257
|
* ```
|
|
258
258
|
*/
|
|
259
259
|
createData: async (request) => {
|
|
@@ -328,17 +328,17 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
328
328
|
* ```typescript
|
|
329
329
|
* const items = await client.warehouse.availability.get(123, { q: 'wire' });
|
|
330
330
|
* items.forEach(item => {
|
|
331
|
-
* console.log(`${item.
|
|
331
|
+
* console.log(`${item.itemId}: ${item.qtyOnHand} ${item.defaultSellingUnit}`);
|
|
332
332
|
* });
|
|
333
333
|
* ```
|
|
334
334
|
*/
|
|
335
335
|
get: async (warehouseUid, params) => {
|
|
336
336
|
return this.executeRequest({
|
|
337
337
|
method: 'GET',
|
|
338
|
-
path: '/warehouse/{
|
|
338
|
+
path: '/warehouse/{warehouseUid}/availability',
|
|
339
339
|
paramsSchema: schemas_1.InventoryAvailabilityParamsSchema,
|
|
340
340
|
responseSchema: schemas_1.InventoryAvailabilityResponseSchema,
|
|
341
|
-
}, params, {
|
|
341
|
+
}, params, { warehouseUid: String(warehouseUid) });
|
|
342
342
|
},
|
|
343
343
|
/**
|
|
344
344
|
* Check inventory availability (data only)
|
|
@@ -390,12 +390,12 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
390
390
|
* await client.warehouse.adjust.create(123, {
|
|
391
391
|
* adjustments: [
|
|
392
392
|
* {
|
|
393
|
-
*
|
|
393
|
+
* invMastUid: 456,
|
|
394
394
|
* qty_on_hand: 200.0,
|
|
395
395
|
* reason: 'Physical count adjustment'
|
|
396
396
|
* },
|
|
397
397
|
* {
|
|
398
|
-
*
|
|
398
|
+
* invMastUid: 789,
|
|
399
399
|
* qty_on_hand: 150.0,
|
|
400
400
|
* reason: 'Damage correction'
|
|
401
401
|
* }
|
|
@@ -406,10 +406,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
406
406
|
create: async (warehouseUid, request) => {
|
|
407
407
|
await this.executeRequest({
|
|
408
408
|
method: 'POST',
|
|
409
|
-
path: '/warehouse/{
|
|
409
|
+
path: '/warehouse/{warehouseUid}/adjust',
|
|
410
410
|
paramsSchema: schemas_1.InventoryAdjustRequestSchema,
|
|
411
411
|
responseSchema: zod_1.z.boolean(),
|
|
412
|
-
}, request, {
|
|
412
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
413
413
|
return true;
|
|
414
414
|
},
|
|
415
415
|
},
|
|
@@ -430,7 +430,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
430
430
|
* await client.warehouse.receive.create(123, {
|
|
431
431
|
* receipts: [
|
|
432
432
|
* {
|
|
433
|
-
*
|
|
433
|
+
* invMastUid: 456,
|
|
434
434
|
* qty_received: 50.0,
|
|
435
435
|
* po_number: 'PO-2024-001',
|
|
436
436
|
* lot_number: 'LOT-456'
|
|
@@ -442,10 +442,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
442
442
|
create: async (warehouseUid, request) => {
|
|
443
443
|
await this.executeRequest({
|
|
444
444
|
method: 'POST',
|
|
445
|
-
path: '/warehouse/{
|
|
445
|
+
path: '/warehouse/{warehouseUid}/receive',
|
|
446
446
|
paramsSchema: schemas_1.InventoryReceiveRequestSchema,
|
|
447
447
|
responseSchema: zod_1.z.boolean(),
|
|
448
|
-
}, request, {
|
|
448
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
449
449
|
return true;
|
|
450
450
|
},
|
|
451
451
|
},
|
|
@@ -465,17 +465,17 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
465
465
|
* ```typescript
|
|
466
466
|
* const replenishment = await client.warehouse.replenish.get(123, { distributorsUid: 789 });
|
|
467
467
|
* replenishment.replenishment_items.forEach(item => {
|
|
468
|
-
* console.log(`${item.
|
|
468
|
+
* console.log(`${item.itemId}: Need ${item.suggestedOrderQty} (current: ${item.qtyOnHand})`);
|
|
469
469
|
* });
|
|
470
470
|
* ```
|
|
471
471
|
*/
|
|
472
472
|
get: async (warehouseUid, params) => {
|
|
473
473
|
return this.executeRequest({
|
|
474
474
|
method: 'GET',
|
|
475
|
-
path: '/warehouse/{
|
|
475
|
+
path: '/warehouse/{warehouseUid}/replenish',
|
|
476
476
|
paramsSchema: schemas_1.ReplenishmentParamsSchema,
|
|
477
477
|
responseSchema: schemas_1.ReplenishmentInfoResponseSchema,
|
|
478
|
-
}, params, {
|
|
478
|
+
}, params, { warehouseUid: String(warehouseUid) });
|
|
479
479
|
},
|
|
480
480
|
/**
|
|
481
481
|
* Execute inventory replenishment
|
|
@@ -489,8 +489,8 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
489
489
|
* await client.warehouse.replenish.create(123, {
|
|
490
490
|
* distributor_uid: 789,
|
|
491
491
|
* restock_items: [
|
|
492
|
-
* {
|
|
493
|
-
* {
|
|
492
|
+
* { invMastUid: 456, qtyToOrder: 100.0 },
|
|
493
|
+
* { invMastUid: 789, qtyToOrder: 75.0 }
|
|
494
494
|
* ]
|
|
495
495
|
* });
|
|
496
496
|
* ```
|
|
@@ -498,10 +498,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
498
498
|
create: async (warehouseUid, request) => {
|
|
499
499
|
await this.executeRequest({
|
|
500
500
|
method: 'POST',
|
|
501
|
-
path: '/warehouse/{
|
|
501
|
+
path: '/warehouse/{warehouseUid}/replenish',
|
|
502
502
|
paramsSchema: schemas_1.ReplenishRequestSchema,
|
|
503
503
|
responseSchema: zod_1.z.boolean(),
|
|
504
|
-
}, request, {
|
|
504
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
505
505
|
return true;
|
|
506
506
|
},
|
|
507
507
|
/**
|
|
@@ -552,10 +552,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
552
552
|
* @example
|
|
553
553
|
* ```typescript
|
|
554
554
|
* await client.warehouse.transfer.create(123, {
|
|
555
|
-
*
|
|
555
|
+
* toWarehouseUid: 124,
|
|
556
556
|
* transfers: [
|
|
557
557
|
* {
|
|
558
|
-
*
|
|
558
|
+
* invMastUid: 456,
|
|
559
559
|
* qty_to_transfer: 25.0,
|
|
560
560
|
* reason: 'Stock balancing'
|
|
561
561
|
* }
|
|
@@ -566,10 +566,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
566
566
|
create: async (warehouseUid, request) => {
|
|
567
567
|
await this.executeRequest({
|
|
568
568
|
method: 'POST',
|
|
569
|
-
path: '/warehouse/{
|
|
569
|
+
path: '/warehouse/{warehouseUid}/transfer',
|
|
570
570
|
paramsSchema: schemas_1.TransferRequestSchema,
|
|
571
571
|
responseSchema: zod_1.z.boolean(),
|
|
572
|
-
}, request, {
|
|
572
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
573
573
|
return true;
|
|
574
574
|
},
|
|
575
575
|
},
|
|
@@ -592,12 +592,12 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
592
592
|
* department: 'Facilities',
|
|
593
593
|
* usage_items: [
|
|
594
594
|
* {
|
|
595
|
-
*
|
|
595
|
+
* invMastUid: 456,
|
|
596
596
|
* inv_profile_line_type: 'prophet21',
|
|
597
597
|
* qty_used: 5.0
|
|
598
598
|
* },
|
|
599
599
|
* {
|
|
600
|
-
*
|
|
600
|
+
* invMastUid: 789,
|
|
601
601
|
* inv_profile_line_type: 'products',
|
|
602
602
|
* qty_used: 2.0,
|
|
603
603
|
* warranty: {
|
|
@@ -614,10 +614,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
614
614
|
create: async (warehouseUid, request) => {
|
|
615
615
|
await this.executeRequest({
|
|
616
616
|
method: 'POST',
|
|
617
|
-
path: '/warehouse/{
|
|
617
|
+
path: '/warehouse/{warehouseUid}/usage',
|
|
618
618
|
paramsSchema: schemas_1.UsageRequestSchema,
|
|
619
619
|
responseSchema: zod_1.z.boolean(),
|
|
620
|
-
}, request, {
|
|
620
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
621
621
|
return true;
|
|
622
622
|
},
|
|
623
623
|
},
|
|
@@ -644,10 +644,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
644
644
|
list: async (warehouseUid, params) => {
|
|
645
645
|
return this.executeRequest({
|
|
646
646
|
method: 'GET',
|
|
647
|
-
path: '/warehouse/{
|
|
647
|
+
path: '/warehouse/{warehouseUid}/users',
|
|
648
648
|
paramsSchema: schemas_1.WarehouseUserListParamsSchema,
|
|
649
649
|
responseSchema: schemas_1.WarehouseUserListResponseSchema,
|
|
650
|
-
}, params, {
|
|
650
|
+
}, params, { warehouseUid: String(warehouseUid) });
|
|
651
651
|
},
|
|
652
652
|
/**
|
|
653
653
|
* Create or update warehouse user access
|
|
@@ -674,10 +674,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
674
674
|
create: async (warehouseUid, request) => {
|
|
675
675
|
return this.executeRequest({
|
|
676
676
|
method: 'POST',
|
|
677
|
-
path: '/warehouse/{
|
|
677
|
+
path: '/warehouse/{warehouseUid}/users',
|
|
678
678
|
paramsSchema: schemas_1.CreateWarehouseUserRequestSchema,
|
|
679
679
|
responseSchema: schemas_1.WarehouseUserResponseSchema,
|
|
680
|
-
}, request, {
|
|
680
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
681
681
|
},
|
|
682
682
|
/**
|
|
683
683
|
* List warehouse users (data only)
|
|
@@ -734,10 +734,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
734
734
|
* @example
|
|
735
735
|
* ```typescript
|
|
736
736
|
* const distributor = await client.distributors.get(789);
|
|
737
|
-
* console.log(distributor.
|
|
737
|
+
* console.log(distributor.distributorsName, distributor.distributorsEmail);
|
|
738
738
|
* ```
|
|
739
739
|
*/
|
|
740
|
-
get: this.createGetMethod('/distributors/{
|
|
740
|
+
get: this.createGetMethod('/distributors/{distributorsUid}', schemas_1.DistributorResponseSchema),
|
|
741
741
|
/**
|
|
742
742
|
* Create a new distributor
|
|
743
743
|
* @description Creates a new distributor with contact information
|
|
@@ -747,11 +747,11 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
747
747
|
* @example
|
|
748
748
|
* ```typescript
|
|
749
749
|
* const distributor = await client.distributors.create({
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
750
|
+
* distributorsName: 'ABC Supply Co',
|
|
751
|
+
* distributorsDesc: 'Primary electrical supplier',
|
|
752
|
+
* customerId: 12345,
|
|
753
|
+
* distributorsEmail: 'orders@abcsupply.com',
|
|
754
|
+
* distributorsAccount: 'ACC-123'
|
|
755
755
|
* });
|
|
756
756
|
* ```
|
|
757
757
|
*/
|
|
@@ -766,12 +766,12 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
766
766
|
* @example
|
|
767
767
|
* ```typescript
|
|
768
768
|
* const updated = await client.distributors.update(789, {
|
|
769
|
-
*
|
|
770
|
-
*
|
|
769
|
+
* distributorsEmail: 'newemail@abcsupply.com',
|
|
770
|
+
* distributorsAccount: 'ACC-456'
|
|
771
771
|
* });
|
|
772
772
|
* ```
|
|
773
773
|
*/
|
|
774
|
-
update: this.createUpdateMethod('/distributors/{
|
|
774
|
+
update: this.createUpdateMethod('/distributors/{distributorsUid}', schemas_1.UpdateDistributorRequestSchema, schemas_1.DistributorResponseSchema),
|
|
775
775
|
/**
|
|
776
776
|
* Soft delete a distributor
|
|
777
777
|
* @description Marks distributor as deleted without removing data
|
|
@@ -783,7 +783,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
783
783
|
* const deleted = await client.distributors.delete(789);
|
|
784
784
|
* ```
|
|
785
785
|
*/
|
|
786
|
-
delete: this.createDeleteBooleanMethod('/distributors/{
|
|
786
|
+
delete: this.createDeleteBooleanMethod('/distributors/{distributorsUid}'),
|
|
787
787
|
/**
|
|
788
788
|
* Enable, disable, or delete a distributor
|
|
789
789
|
* @description Changes distributor status using status codes
|
|
@@ -793,17 +793,17 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
793
793
|
* @throws ValidationError When request is invalid or response is malformed
|
|
794
794
|
* @example
|
|
795
795
|
* ```typescript
|
|
796
|
-
* await client.distributors.enable(789, {
|
|
797
|
-
* await client.distributors.enable(789, {
|
|
796
|
+
* await client.distributors.enable(789, { statusCd: 705 }); // Disable
|
|
797
|
+
* await client.distributors.enable(789, { statusCd: 704 }); // Enable
|
|
798
798
|
* ```
|
|
799
799
|
*/
|
|
800
800
|
enable: async (distributorsUid, request) => {
|
|
801
801
|
return this.executeRequest({
|
|
802
802
|
method: 'PUT',
|
|
803
|
-
path: '/distributors/{
|
|
803
|
+
path: '/distributors/{distributorsUid}/enable',
|
|
804
804
|
paramsSchema: schemas_1.EnableDistributorRequestSchema,
|
|
805
805
|
responseSchema: schemas_1.DistributorResponseSchema,
|
|
806
|
-
}, request, {
|
|
806
|
+
}, request, { distributorsUid: String(distributorsUid) });
|
|
807
807
|
},
|
|
808
808
|
// Data-only methods for distributors
|
|
809
809
|
/**
|
|
@@ -881,7 +881,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
881
881
|
* distributors_name: 'ABC Supply Co',
|
|
882
882
|
* customer_id: 12345
|
|
883
883
|
* });
|
|
884
|
-
* console.log(distributor.
|
|
884
|
+
* console.log(distributor.distributorsUid); // Direct access to created ID
|
|
885
885
|
* ```
|
|
886
886
|
*/
|
|
887
887
|
createData: async (request) => {
|
|
@@ -958,7 +958,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
958
958
|
* product_id: 'PROD-001',
|
|
959
959
|
* product_name: 'New Product',
|
|
960
960
|
* product_desc: 'Product description',
|
|
961
|
-
*
|
|
961
|
+
* distributorsUid: 789,
|
|
962
962
|
* customer_id: 12345
|
|
963
963
|
* });
|
|
964
964
|
* ```
|
|
@@ -966,10 +966,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
966
966
|
create: async (distributorsUid, request) => {
|
|
967
967
|
return this.executeRequest({
|
|
968
968
|
method: 'POST',
|
|
969
|
-
path: '/distributors/{
|
|
969
|
+
path: '/distributors/{distributorsUid}/products',
|
|
970
970
|
paramsSchema: schemas_1.CreateProductRequestSchema,
|
|
971
971
|
responseSchema: schemas_1.ProductResponseSchema,
|
|
972
|
-
}, request, {
|
|
972
|
+
}, request, { distributorsUid: String(distributorsUid) });
|
|
973
973
|
},
|
|
974
974
|
/**
|
|
975
975
|
* Create distributor product (data only)
|
|
@@ -1026,7 +1026,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1026
1026
|
* });
|
|
1027
1027
|
*
|
|
1028
1028
|
* items.forEach(item => {
|
|
1029
|
-
* console.log(`${item.
|
|
1029
|
+
* console.log(`${item.itemId} (${item.type}): ${item.description}`);
|
|
1030
1030
|
* });
|
|
1031
1031
|
* ```
|
|
1032
1032
|
*/
|
|
@@ -1072,10 +1072,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1072
1072
|
* @example
|
|
1073
1073
|
* ```typescript
|
|
1074
1074
|
* const product = await client.products.get(456);
|
|
1075
|
-
* console.log(product.
|
|
1075
|
+
* console.log(product.partNumber, product.productsDesc);
|
|
1076
1076
|
* ```
|
|
1077
1077
|
*/
|
|
1078
|
-
get: this.createGetMethod('/products/{
|
|
1078
|
+
get: this.createGetMethod('/products/{productsUid}', schemas_1.ProductResponseSchema),
|
|
1079
1079
|
/**
|
|
1080
1080
|
* Update product information
|
|
1081
1081
|
* @description Updates product details with provided data
|
|
@@ -1086,12 +1086,12 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1086
1086
|
* @example
|
|
1087
1087
|
* ```typescript
|
|
1088
1088
|
* const updated = await client.products.update(456, {
|
|
1089
|
-
*
|
|
1090
|
-
*
|
|
1089
|
+
* partNumber: 'PN-456',
|
|
1090
|
+
* productsDesc: 'Updated description'
|
|
1091
1091
|
* });
|
|
1092
1092
|
* ```
|
|
1093
1093
|
*/
|
|
1094
|
-
update: this.createUpdateMethod('/products/{
|
|
1094
|
+
update: this.createUpdateMethod('/products/{productsUid}', schemas_1.UpdateProductRequestSchema, schemas_1.ProductResponseSchema),
|
|
1095
1095
|
/**
|
|
1096
1096
|
* Soft delete a product
|
|
1097
1097
|
* @description Marks product as deleted without removing data
|
|
@@ -1103,7 +1103,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1103
1103
|
* const deleted = await client.products.delete(456);
|
|
1104
1104
|
* ```
|
|
1105
1105
|
*/
|
|
1106
|
-
delete: this.createDeleteBooleanMethod('/products/{
|
|
1106
|
+
delete: this.createDeleteBooleanMethod('/products/{productsUid}'),
|
|
1107
1107
|
/**
|
|
1108
1108
|
* Enable, disable, or delete a product
|
|
1109
1109
|
* @description Changes product status using status codes
|
|
@@ -1113,17 +1113,17 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1113
1113
|
* @throws ValidationError When request is invalid or response is malformed
|
|
1114
1114
|
* @example
|
|
1115
1115
|
* ```typescript
|
|
1116
|
-
* await client.products.enable(456, {
|
|
1117
|
-
* await client.products.enable(456, {
|
|
1116
|
+
* await client.products.enable(456, { statusCd: 705 }); // Disable
|
|
1117
|
+
* await client.products.enable(456, { statusCd: 704 }); // Enable
|
|
1118
1118
|
* ```
|
|
1119
1119
|
*/
|
|
1120
1120
|
enable: async (productsUid, request) => {
|
|
1121
1121
|
return this.executeRequest({
|
|
1122
1122
|
method: 'PUT',
|
|
1123
|
-
path: '/products/{
|
|
1123
|
+
path: '/products/{productsUid}/enable',
|
|
1124
1124
|
paramsSchema: schemas_1.EnableProductRequestSchema,
|
|
1125
1125
|
responseSchema: schemas_1.ProductResponseSchema,
|
|
1126
|
-
}, request, {
|
|
1126
|
+
}, request, { productsUid: String(productsUid) });
|
|
1127
1127
|
},
|
|
1128
1128
|
// Data-only methods for products
|
|
1129
1129
|
/**
|
|
@@ -1204,10 +1204,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1204
1204
|
* @example
|
|
1205
1205
|
* ```typescript
|
|
1206
1206
|
* const header = await client.invProfileHdr.get(1);
|
|
1207
|
-
* console.log(header.
|
|
1207
|
+
* console.log(header.invProfileHdrDesc);
|
|
1208
1208
|
* ```
|
|
1209
1209
|
*/
|
|
1210
|
-
get: this.createGetMethod('/inv-profile-hdr/{
|
|
1210
|
+
get: this.createGetMethod('/inv-profile-hdr/{invProfileHdrUid}', schemas_1.InvProfileHdrResponseSchema),
|
|
1211
1211
|
/**
|
|
1212
1212
|
* Create new inventory profile header
|
|
1213
1213
|
* @description Creates a new inventory profile header container
|
|
@@ -1217,8 +1217,8 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1217
1217
|
* @example
|
|
1218
1218
|
* ```typescript
|
|
1219
1219
|
* const header = await client.invProfileHdr.create({
|
|
1220
|
-
*
|
|
1221
|
-
*
|
|
1220
|
+
* invProfileHdrDesc: 'Standard Office Setup Profile',
|
|
1221
|
+
* customerId: 12345
|
|
1222
1222
|
* });
|
|
1223
1223
|
* ```
|
|
1224
1224
|
*/
|
|
@@ -1233,11 +1233,11 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1233
1233
|
* @example
|
|
1234
1234
|
* ```typescript
|
|
1235
1235
|
* const updated = await client.invProfileHdr.update(1, {
|
|
1236
|
-
*
|
|
1236
|
+
* invProfileHdrDesc: 'Updated Profile Description'
|
|
1237
1237
|
* });
|
|
1238
1238
|
* ```
|
|
1239
1239
|
*/
|
|
1240
|
-
update: this.createUpdateMethod('/inv-profile-hdr/{
|
|
1240
|
+
update: this.createUpdateMethod('/inv-profile-hdr/{invProfileHdrUid}', schemas_1.UpdateInvProfileHdrRequestSchema, schemas_1.InvProfileHdrResponseSchema),
|
|
1241
1241
|
/**
|
|
1242
1242
|
* Delete inventory profile header
|
|
1243
1243
|
* @description Removes inventory profile header and associated lines
|
|
@@ -1249,7 +1249,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1249
1249
|
* const deleted = await client.invProfileHdr.delete(1);
|
|
1250
1250
|
* ```
|
|
1251
1251
|
*/
|
|
1252
|
-
delete: this.createDeleteBooleanMethod('/inv-profile-hdr/{
|
|
1252
|
+
delete: this.createDeleteBooleanMethod('/inv-profile-hdr/{invProfileHdrUid}'),
|
|
1253
1253
|
// Data-only methods for inventory profile headers
|
|
1254
1254
|
/**
|
|
1255
1255
|
* List inventory profile headers (data only)
|
|
@@ -1312,17 +1312,17 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1312
1312
|
* ```typescript
|
|
1313
1313
|
* const lines = await client.invProfileHdr.invProfileLine.list(1, { limit: 20 });
|
|
1314
1314
|
* lines.forEach(line => {
|
|
1315
|
-
* console.log(`Item ${line.
|
|
1315
|
+
* console.log(`Item ${line.invMastUid}: Min ${line.minQty}, Max ${line.maxQty}`);
|
|
1316
1316
|
* });
|
|
1317
1317
|
* ```
|
|
1318
1318
|
*/
|
|
1319
1319
|
list: async (invProfileHdrUid, params) => {
|
|
1320
1320
|
return this.executeRequest({
|
|
1321
1321
|
method: 'GET',
|
|
1322
|
-
path: '/inv-profile-hdr/{
|
|
1322
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line',
|
|
1323
1323
|
paramsSchema: schemas_1.InvProfileLineListParamsSchema,
|
|
1324
1324
|
responseSchema: schemas_1.InvProfileLineListResponseSchema,
|
|
1325
|
-
}, params, {
|
|
1325
|
+
}, params, { invProfileHdrUid: String(invProfileHdrUid) });
|
|
1326
1326
|
},
|
|
1327
1327
|
/**
|
|
1328
1328
|
* Get specific inventory profile line
|
|
@@ -1340,9 +1340,12 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1340
1340
|
get: async (invProfileHdrUid, invProfileLineUid) => {
|
|
1341
1341
|
return this.executeRequest({
|
|
1342
1342
|
method: 'GET',
|
|
1343
|
-
path: '/inv-profile-hdr/{
|
|
1343
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line/{invProfileLineUid}',
|
|
1344
1344
|
responseSchema: schemas_1.InvProfileLineResponseSchema,
|
|
1345
|
-
}, undefined, {
|
|
1345
|
+
}, undefined, {
|
|
1346
|
+
invProfileHdrUid: String(invProfileHdrUid),
|
|
1347
|
+
invProfileLineUid: String(invProfileLineUid),
|
|
1348
|
+
});
|
|
1346
1349
|
},
|
|
1347
1350
|
/**
|
|
1348
1351
|
* Create inventory profile line
|
|
@@ -1354,7 +1357,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1354
1357
|
* @example
|
|
1355
1358
|
* ```typescript
|
|
1356
1359
|
* const line = await client.invProfileHdr.invProfileLine.create(1, {
|
|
1357
|
-
*
|
|
1360
|
+
* invMastUid: 456,
|
|
1358
1361
|
* inv_profile_line_type: 'prophet21',
|
|
1359
1362
|
* min_qty: 50.0,
|
|
1360
1363
|
* max_qty: 200.0,
|
|
@@ -1365,10 +1368,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1365
1368
|
create: async (invProfileHdrUid, request) => {
|
|
1366
1369
|
return this.executeRequest({
|
|
1367
1370
|
method: 'POST',
|
|
1368
|
-
path: '/inv-profile-hdr/{
|
|
1371
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line',
|
|
1369
1372
|
paramsSchema: schemas_1.CreateInvProfileLineRequestSchema,
|
|
1370
1373
|
responseSchema: schemas_1.InvProfileLineResponseSchema,
|
|
1371
|
-
}, request, {
|
|
1374
|
+
}, request, { invProfileHdrUid: String(invProfileHdrUid) });
|
|
1372
1375
|
},
|
|
1373
1376
|
/**
|
|
1374
1377
|
* Update inventory profile line
|
|
@@ -1389,10 +1392,13 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1389
1392
|
update: async (invProfileHdrUid, invProfileLineUid, request) => {
|
|
1390
1393
|
return this.executeRequest({
|
|
1391
1394
|
method: 'PUT',
|
|
1392
|
-
path: '/inv-profile-hdr/{
|
|
1395
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line/{invProfileLineUid}',
|
|
1393
1396
|
paramsSchema: schemas_1.UpdateInvProfileLineRequestSchema,
|
|
1394
1397
|
responseSchema: schemas_1.InvProfileLineResponseSchema,
|
|
1395
|
-
}, request, {
|
|
1398
|
+
}, request, {
|
|
1399
|
+
invProfileHdrUid: String(invProfileHdrUid),
|
|
1400
|
+
invProfileLineUid: String(invProfileLineUid),
|
|
1401
|
+
});
|
|
1396
1402
|
},
|
|
1397
1403
|
/**
|
|
1398
1404
|
* Delete inventory profile line
|
|
@@ -1409,9 +1415,12 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1409
1415
|
delete: async (invProfileHdrUid, invProfileLineUid) => {
|
|
1410
1416
|
await this.executeRequest({
|
|
1411
1417
|
method: 'DELETE',
|
|
1412
|
-
path: '/inv-profile-hdr/{
|
|
1418
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line/{invProfileLineUid}',
|
|
1413
1419
|
responseSchema: zod_1.z.unknown(),
|
|
1414
|
-
}, undefined, {
|
|
1420
|
+
}, undefined, {
|
|
1421
|
+
invProfileHdrUid: String(invProfileHdrUid),
|
|
1422
|
+
invProfileLineUid: String(invProfileLineUid),
|
|
1423
|
+
});
|
|
1415
1424
|
return true;
|
|
1416
1425
|
},
|
|
1417
1426
|
// Data-only methods for inventory profile lines
|
|
@@ -1495,10 +1504,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1495
1504
|
* @example
|
|
1496
1505
|
* ```typescript
|
|
1497
1506
|
* const header = await client.restockHdr.get(100);
|
|
1498
|
-
* console.log(`Warehouse: ${header.
|
|
1507
|
+
* console.log(`Warehouse: ${header.warehouseUid}, Distributor: ${header.distributorsUid}`);
|
|
1499
1508
|
* ```
|
|
1500
1509
|
*/
|
|
1501
|
-
get: this.createGetMethod('/restock-hdr/{
|
|
1510
|
+
get: this.createGetMethod('/restock-hdr/{restockHdrUid}', schemas_1.RestockHdrResponseSchema),
|
|
1502
1511
|
/**
|
|
1503
1512
|
* Create restock header
|
|
1504
1513
|
* @description Creates a new restock header for warehouse and distributor combination
|
|
@@ -1508,8 +1517,8 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1508
1517
|
* @example
|
|
1509
1518
|
* ```typescript
|
|
1510
1519
|
* const header = await client.restockHdr.create({
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1520
|
+
* warehouseUid: 123,
|
|
1521
|
+
* distributorsUid: 789
|
|
1513
1522
|
* });
|
|
1514
1523
|
* ```
|
|
1515
1524
|
*/
|
|
@@ -1524,11 +1533,11 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1524
1533
|
* @example
|
|
1525
1534
|
* ```typescript
|
|
1526
1535
|
* const updated = await client.restockHdr.update(100, {
|
|
1527
|
-
*
|
|
1536
|
+
* warehouseUid: 124
|
|
1528
1537
|
* });
|
|
1529
1538
|
* ```
|
|
1530
1539
|
*/
|
|
1531
|
-
update: this.createUpdateMethod('/restock-hdr/{
|
|
1540
|
+
update: this.createUpdateMethod('/restock-hdr/{restockHdrUid}', schemas_1.UpdateRestockHdrRequestSchema, schemas_1.RestockHdrResponseSchema),
|
|
1532
1541
|
/**
|
|
1533
1542
|
* Delete restock header
|
|
1534
1543
|
* @description Removes restock header and associated data
|
|
@@ -1540,7 +1549,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1540
1549
|
* const deleted = await client.restockHdr.delete(100);
|
|
1541
1550
|
* ```
|
|
1542
1551
|
*/
|
|
1543
|
-
delete: this.createDeleteBooleanMethod('/restock-hdr/{
|
|
1552
|
+
delete: this.createDeleteBooleanMethod('/restock-hdr/{restockHdrUid}'),
|
|
1544
1553
|
// Data-only methods for restocking
|
|
1545
1554
|
/**
|
|
1546
1555
|
* List restock headers (data only)
|
|
@@ -1603,7 +1612,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1603
1612
|
* ```typescript
|
|
1604
1613
|
* const sections = await client.sections.list({ customerId: 12345 });
|
|
1605
1614
|
* sections.forEach(section => {
|
|
1606
|
-
* console.log(`${section.
|
|
1615
|
+
* console.log(`${section.sectionName}: ${section.sectionDesc}`);
|
|
1607
1616
|
* });
|
|
1608
1617
|
* ```
|
|
1609
1618
|
*/
|
|
@@ -1617,10 +1626,10 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1617
1626
|
* @example
|
|
1618
1627
|
* ```typescript
|
|
1619
1628
|
* const section = await client.sections.get(200);
|
|
1620
|
-
* console.log(section.
|
|
1629
|
+
* console.log(section.sectionName, section.sectionDesc);
|
|
1621
1630
|
* ```
|
|
1622
1631
|
*/
|
|
1623
|
-
get: this.createGetMethod('/sections/{
|
|
1632
|
+
get: this.createGetMethod('/sections/{sectionsUid}', schemas_1.SectionResponseSchema),
|
|
1624
1633
|
/**
|
|
1625
1634
|
* Create new section
|
|
1626
1635
|
* @description Creates a new organizational section for a customer
|
|
@@ -1630,9 +1639,9 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1630
1639
|
* @example
|
|
1631
1640
|
* ```typescript
|
|
1632
1641
|
* const section = await client.sections.create({
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1642
|
+
* sectionName: 'Electronics Section',
|
|
1643
|
+
* sectionDesc: 'Electronic components and devices',
|
|
1644
|
+
* customerId: 12345
|
|
1636
1645
|
* });
|
|
1637
1646
|
* ```
|
|
1638
1647
|
*/
|
|
@@ -1647,12 +1656,12 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1647
1656
|
* @example
|
|
1648
1657
|
* ```typescript
|
|
1649
1658
|
* const updated = await client.sections.update(200, {
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1659
|
+
* sectionName: 'Updated Section Name',
|
|
1660
|
+
* sectionDesc: 'Updated description'
|
|
1652
1661
|
* });
|
|
1653
1662
|
* ```
|
|
1654
1663
|
*/
|
|
1655
|
-
update: this.createUpdateMethod('/sections/{
|
|
1664
|
+
update: this.createUpdateMethod('/sections/{sectionsUid}', schemas_1.UpdateSectionRequestSchema, schemas_1.SectionResponseSchema),
|
|
1656
1665
|
/**
|
|
1657
1666
|
* Soft delete a section
|
|
1658
1667
|
* @description Marks section as deleted without removing data
|
|
@@ -1664,7 +1673,7 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1664
1673
|
* const deleted = await client.sections.delete(200);
|
|
1665
1674
|
* ```
|
|
1666
1675
|
*/
|
|
1667
|
-
delete: this.createDeleteBooleanMethod('/sections/{
|
|
1676
|
+
delete: this.createDeleteBooleanMethod('/sections/{sectionsUid}'),
|
|
1668
1677
|
/**
|
|
1669
1678
|
* Enable, disable, or delete a section
|
|
1670
1679
|
* @description Changes section status using status codes
|
|
@@ -1674,17 +1683,17 @@ class VMIClient extends base_client_1.BaseServiceClient {
|
|
|
1674
1683
|
* @throws ValidationError When request is invalid or response is malformed
|
|
1675
1684
|
* @example
|
|
1676
1685
|
* ```typescript
|
|
1677
|
-
* await client.sections.enable(200, {
|
|
1678
|
-
* await client.sections.enable(200, {
|
|
1686
|
+
* await client.sections.enable(200, { statusCd: 705 }); // Disable
|
|
1687
|
+
* await client.sections.enable(200, { statusCd: 704 }); // Enable
|
|
1679
1688
|
* ```
|
|
1680
1689
|
*/
|
|
1681
1690
|
enable: async (sectionsUid, request) => {
|
|
1682
1691
|
return this.executeRequest({
|
|
1683
1692
|
method: 'PUT',
|
|
1684
|
-
path: '/sections/{
|
|
1693
|
+
path: '/sections/{sectionsUid}/enable',
|
|
1685
1694
|
paramsSchema: schemas_1.EnableSectionRequestSchema,
|
|
1686
1695
|
responseSchema: schemas_1.SectionResponseSchema,
|
|
1687
|
-
}, request, {
|
|
1696
|
+
}, request, { sectionsUid: String(sectionsUid) });
|
|
1688
1697
|
},
|
|
1689
1698
|
// Data-only methods for sections
|
|
1690
1699
|
/**
|