@simpleapps-com/augur-api 0.4.5 → 0.4.6
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/items/client.d.ts +39 -55
- package/dist/cjs/services/items/client.d.ts.map +1 -1
- package/dist/cjs/services/items/client.js +13 -11
- 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/invLoc.d.ts +14 -14
- package/dist/cjs/services/items/schemas/invMast.d.ts +17 -17
- package/dist/cjs/services/items/schemas/invMast.js +1 -1
- 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/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/items/client.d.ts +39 -55
- package/dist/esm/services/items/client.d.ts.map +1 -1
- package/dist/esm/services/items/client.js +17 -15
- 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/invLoc.d.ts +14 -14
- package/dist/esm/services/items/schemas/invMast.d.ts +17 -17
- package/dist/esm/services/items/schemas/invMast.js +1 -1
- 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/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/items/client.d.ts +39 -55
- 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/invLoc.d.ts +14 -14
- package/dist/types/services/items/schemas/invMast.d.ts +17 -17
- 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/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
|
@@ -268,7 +268,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
268
268
|
* warehouse_name: 'New Facility',
|
|
269
269
|
* customer_id: 12345
|
|
270
270
|
* });
|
|
271
|
-
* console.log(warehouse.
|
|
271
|
+
* console.log(warehouse.warehouseUid); // Direct access to created ID
|
|
272
272
|
* ```
|
|
273
273
|
*/
|
|
274
274
|
createData: async (request) => {
|
|
@@ -343,17 +343,17 @@ export class VMIClient extends BaseServiceClient {
|
|
|
343
343
|
* ```typescript
|
|
344
344
|
* const items = await client.warehouse.availability.get(123, { q: 'wire' });
|
|
345
345
|
* items.forEach(item => {
|
|
346
|
-
* console.log(`${item.
|
|
346
|
+
* console.log(`${item.itemId}: ${item.qtyOnHand} ${item.defaultSellingUnit}`);
|
|
347
347
|
* });
|
|
348
348
|
* ```
|
|
349
349
|
*/
|
|
350
350
|
get: async (warehouseUid, params) => {
|
|
351
351
|
return this.executeRequest({
|
|
352
352
|
method: 'GET',
|
|
353
|
-
path: '/warehouse/{
|
|
353
|
+
path: '/warehouse/{warehouseUid}/availability',
|
|
354
354
|
paramsSchema: InventoryAvailabilityParamsSchema,
|
|
355
355
|
responseSchema: InventoryAvailabilityResponseSchema,
|
|
356
|
-
}, params, {
|
|
356
|
+
}, params, { warehouseUid: String(warehouseUid) });
|
|
357
357
|
},
|
|
358
358
|
/**
|
|
359
359
|
* Check inventory availability (data only)
|
|
@@ -405,12 +405,12 @@ export class VMIClient extends BaseServiceClient {
|
|
|
405
405
|
* await client.warehouse.adjust.create(123, {
|
|
406
406
|
* adjustments: [
|
|
407
407
|
* {
|
|
408
|
-
*
|
|
408
|
+
* invMastUid: 456,
|
|
409
409
|
* qty_on_hand: 200.0,
|
|
410
410
|
* reason: 'Physical count adjustment'
|
|
411
411
|
* },
|
|
412
412
|
* {
|
|
413
|
-
*
|
|
413
|
+
* invMastUid: 789,
|
|
414
414
|
* qty_on_hand: 150.0,
|
|
415
415
|
* reason: 'Damage correction'
|
|
416
416
|
* }
|
|
@@ -421,10 +421,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
421
421
|
create: async (warehouseUid, request) => {
|
|
422
422
|
await this.executeRequest({
|
|
423
423
|
method: 'POST',
|
|
424
|
-
path: '/warehouse/{
|
|
424
|
+
path: '/warehouse/{warehouseUid}/adjust',
|
|
425
425
|
paramsSchema: InventoryAdjustRequestSchema,
|
|
426
426
|
responseSchema: z.boolean(),
|
|
427
|
-
}, request, {
|
|
427
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
428
428
|
return true;
|
|
429
429
|
},
|
|
430
430
|
},
|
|
@@ -445,7 +445,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
445
445
|
* await client.warehouse.receive.create(123, {
|
|
446
446
|
* receipts: [
|
|
447
447
|
* {
|
|
448
|
-
*
|
|
448
|
+
* invMastUid: 456,
|
|
449
449
|
* qty_received: 50.0,
|
|
450
450
|
* po_number: 'PO-2024-001',
|
|
451
451
|
* lot_number: 'LOT-456'
|
|
@@ -457,10 +457,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
457
457
|
create: async (warehouseUid, request) => {
|
|
458
458
|
await this.executeRequest({
|
|
459
459
|
method: 'POST',
|
|
460
|
-
path: '/warehouse/{
|
|
460
|
+
path: '/warehouse/{warehouseUid}/receive',
|
|
461
461
|
paramsSchema: InventoryReceiveRequestSchema,
|
|
462
462
|
responseSchema: z.boolean(),
|
|
463
|
-
}, request, {
|
|
463
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
464
464
|
return true;
|
|
465
465
|
},
|
|
466
466
|
},
|
|
@@ -480,17 +480,17 @@ export class VMIClient extends BaseServiceClient {
|
|
|
480
480
|
* ```typescript
|
|
481
481
|
* const replenishment = await client.warehouse.replenish.get(123, { distributorsUid: 789 });
|
|
482
482
|
* replenishment.replenishment_items.forEach(item => {
|
|
483
|
-
* console.log(`${item.
|
|
483
|
+
* console.log(`${item.itemId}: Need ${item.suggestedOrderQty} (current: ${item.qtyOnHand})`);
|
|
484
484
|
* });
|
|
485
485
|
* ```
|
|
486
486
|
*/
|
|
487
487
|
get: async (warehouseUid, params) => {
|
|
488
488
|
return this.executeRequest({
|
|
489
489
|
method: 'GET',
|
|
490
|
-
path: '/warehouse/{
|
|
490
|
+
path: '/warehouse/{warehouseUid}/replenish',
|
|
491
491
|
paramsSchema: ReplenishmentParamsSchema,
|
|
492
492
|
responseSchema: ReplenishmentInfoResponseSchema,
|
|
493
|
-
}, params, {
|
|
493
|
+
}, params, { warehouseUid: String(warehouseUid) });
|
|
494
494
|
},
|
|
495
495
|
/**
|
|
496
496
|
* Execute inventory replenishment
|
|
@@ -504,8 +504,8 @@ export class VMIClient extends BaseServiceClient {
|
|
|
504
504
|
* await client.warehouse.replenish.create(123, {
|
|
505
505
|
* distributor_uid: 789,
|
|
506
506
|
* restock_items: [
|
|
507
|
-
* {
|
|
508
|
-
* {
|
|
507
|
+
* { invMastUid: 456, qtyToOrder: 100.0 },
|
|
508
|
+
* { invMastUid: 789, qtyToOrder: 75.0 }
|
|
509
509
|
* ]
|
|
510
510
|
* });
|
|
511
511
|
* ```
|
|
@@ -513,10 +513,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
513
513
|
create: async (warehouseUid, request) => {
|
|
514
514
|
await this.executeRequest({
|
|
515
515
|
method: 'POST',
|
|
516
|
-
path: '/warehouse/{
|
|
516
|
+
path: '/warehouse/{warehouseUid}/replenish',
|
|
517
517
|
paramsSchema: ReplenishRequestSchema,
|
|
518
518
|
responseSchema: z.boolean(),
|
|
519
|
-
}, request, {
|
|
519
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
520
520
|
return true;
|
|
521
521
|
},
|
|
522
522
|
/**
|
|
@@ -567,10 +567,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
567
567
|
* @example
|
|
568
568
|
* ```typescript
|
|
569
569
|
* await client.warehouse.transfer.create(123, {
|
|
570
|
-
*
|
|
570
|
+
* toWarehouseUid: 124,
|
|
571
571
|
* transfers: [
|
|
572
572
|
* {
|
|
573
|
-
*
|
|
573
|
+
* invMastUid: 456,
|
|
574
574
|
* qty_to_transfer: 25.0,
|
|
575
575
|
* reason: 'Stock balancing'
|
|
576
576
|
* }
|
|
@@ -581,10 +581,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
581
581
|
create: async (warehouseUid, request) => {
|
|
582
582
|
await this.executeRequest({
|
|
583
583
|
method: 'POST',
|
|
584
|
-
path: '/warehouse/{
|
|
584
|
+
path: '/warehouse/{warehouseUid}/transfer',
|
|
585
585
|
paramsSchema: TransferRequestSchema,
|
|
586
586
|
responseSchema: z.boolean(),
|
|
587
|
-
}, request, {
|
|
587
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
588
588
|
return true;
|
|
589
589
|
},
|
|
590
590
|
},
|
|
@@ -607,12 +607,12 @@ export class VMIClient extends BaseServiceClient {
|
|
|
607
607
|
* department: 'Facilities',
|
|
608
608
|
* usage_items: [
|
|
609
609
|
* {
|
|
610
|
-
*
|
|
610
|
+
* invMastUid: 456,
|
|
611
611
|
* inv_profile_line_type: 'prophet21',
|
|
612
612
|
* qty_used: 5.0
|
|
613
613
|
* },
|
|
614
614
|
* {
|
|
615
|
-
*
|
|
615
|
+
* invMastUid: 789,
|
|
616
616
|
* inv_profile_line_type: 'products',
|
|
617
617
|
* qty_used: 2.0,
|
|
618
618
|
* warranty: {
|
|
@@ -629,10 +629,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
629
629
|
create: async (warehouseUid, request) => {
|
|
630
630
|
await this.executeRequest({
|
|
631
631
|
method: 'POST',
|
|
632
|
-
path: '/warehouse/{
|
|
632
|
+
path: '/warehouse/{warehouseUid}/usage',
|
|
633
633
|
paramsSchema: UsageRequestSchema,
|
|
634
634
|
responseSchema: z.boolean(),
|
|
635
|
-
}, request, {
|
|
635
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
636
636
|
return true;
|
|
637
637
|
},
|
|
638
638
|
},
|
|
@@ -659,10 +659,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
659
659
|
list: async (warehouseUid, params) => {
|
|
660
660
|
return this.executeRequest({
|
|
661
661
|
method: 'GET',
|
|
662
|
-
path: '/warehouse/{
|
|
662
|
+
path: '/warehouse/{warehouseUid}/users',
|
|
663
663
|
paramsSchema: WarehouseUserListParamsSchema,
|
|
664
664
|
responseSchema: WarehouseUserListResponseSchema,
|
|
665
|
-
}, params, {
|
|
665
|
+
}, params, { warehouseUid: String(warehouseUid) });
|
|
666
666
|
},
|
|
667
667
|
/**
|
|
668
668
|
* Create or update warehouse user access
|
|
@@ -689,10 +689,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
689
689
|
create: async (warehouseUid, request) => {
|
|
690
690
|
return this.executeRequest({
|
|
691
691
|
method: 'POST',
|
|
692
|
-
path: '/warehouse/{
|
|
692
|
+
path: '/warehouse/{warehouseUid}/users',
|
|
693
693
|
paramsSchema: CreateWarehouseUserRequestSchema,
|
|
694
694
|
responseSchema: WarehouseUserResponseSchema,
|
|
695
|
-
}, request, {
|
|
695
|
+
}, request, { warehouseUid: String(warehouseUid) });
|
|
696
696
|
},
|
|
697
697
|
/**
|
|
698
698
|
* List warehouse users (data only)
|
|
@@ -749,10 +749,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
749
749
|
* @example
|
|
750
750
|
* ```typescript
|
|
751
751
|
* const distributor = await client.distributors.get(789);
|
|
752
|
-
* console.log(distributor.
|
|
752
|
+
* console.log(distributor.distributorsName, distributor.distributorsEmail);
|
|
753
753
|
* ```
|
|
754
754
|
*/
|
|
755
|
-
get: this.createGetMethod('/distributors/{
|
|
755
|
+
get: this.createGetMethod('/distributors/{distributorsUid}', DistributorResponseSchema),
|
|
756
756
|
/**
|
|
757
757
|
* Create a new distributor
|
|
758
758
|
* @description Creates a new distributor with contact information
|
|
@@ -762,11 +762,11 @@ export class VMIClient extends BaseServiceClient {
|
|
|
762
762
|
* @example
|
|
763
763
|
* ```typescript
|
|
764
764
|
* const distributor = await client.distributors.create({
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
*
|
|
768
|
-
*
|
|
769
|
-
*
|
|
765
|
+
* distributorsName: 'ABC Supply Co',
|
|
766
|
+
* distributorsDesc: 'Primary electrical supplier',
|
|
767
|
+
* customerId: 12345,
|
|
768
|
+
* distributorsEmail: 'orders@abcsupply.com',
|
|
769
|
+
* distributorsAccount: 'ACC-123'
|
|
770
770
|
* });
|
|
771
771
|
* ```
|
|
772
772
|
*/
|
|
@@ -781,12 +781,12 @@ export class VMIClient extends BaseServiceClient {
|
|
|
781
781
|
* @example
|
|
782
782
|
* ```typescript
|
|
783
783
|
* const updated = await client.distributors.update(789, {
|
|
784
|
-
*
|
|
785
|
-
*
|
|
784
|
+
* distributorsEmail: 'newemail@abcsupply.com',
|
|
785
|
+
* distributorsAccount: 'ACC-456'
|
|
786
786
|
* });
|
|
787
787
|
* ```
|
|
788
788
|
*/
|
|
789
|
-
update: this.createUpdateMethod('/distributors/{
|
|
789
|
+
update: this.createUpdateMethod('/distributors/{distributorsUid}', UpdateDistributorRequestSchema, DistributorResponseSchema),
|
|
790
790
|
/**
|
|
791
791
|
* Soft delete a distributor
|
|
792
792
|
* @description Marks distributor as deleted without removing data
|
|
@@ -798,7 +798,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
798
798
|
* const deleted = await client.distributors.delete(789);
|
|
799
799
|
* ```
|
|
800
800
|
*/
|
|
801
|
-
delete: this.createDeleteBooleanMethod('/distributors/{
|
|
801
|
+
delete: this.createDeleteBooleanMethod('/distributors/{distributorsUid}'),
|
|
802
802
|
/**
|
|
803
803
|
* Enable, disable, or delete a distributor
|
|
804
804
|
* @description Changes distributor status using status codes
|
|
@@ -808,17 +808,17 @@ export class VMIClient extends BaseServiceClient {
|
|
|
808
808
|
* @throws ValidationError When request is invalid or response is malformed
|
|
809
809
|
* @example
|
|
810
810
|
* ```typescript
|
|
811
|
-
* await client.distributors.enable(789, {
|
|
812
|
-
* await client.distributors.enable(789, {
|
|
811
|
+
* await client.distributors.enable(789, { statusCd: 705 }); // Disable
|
|
812
|
+
* await client.distributors.enable(789, { statusCd: 704 }); // Enable
|
|
813
813
|
* ```
|
|
814
814
|
*/
|
|
815
815
|
enable: async (distributorsUid, request) => {
|
|
816
816
|
return this.executeRequest({
|
|
817
817
|
method: 'PUT',
|
|
818
|
-
path: '/distributors/{
|
|
818
|
+
path: '/distributors/{distributorsUid}/enable',
|
|
819
819
|
paramsSchema: EnableDistributorRequestSchema,
|
|
820
820
|
responseSchema: DistributorResponseSchema,
|
|
821
|
-
}, request, {
|
|
821
|
+
}, request, { distributorsUid: String(distributorsUid) });
|
|
822
822
|
},
|
|
823
823
|
// Data-only methods for distributors
|
|
824
824
|
/**
|
|
@@ -896,7 +896,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
896
896
|
* distributors_name: 'ABC Supply Co',
|
|
897
897
|
* customer_id: 12345
|
|
898
898
|
* });
|
|
899
|
-
* console.log(distributor.
|
|
899
|
+
* console.log(distributor.distributorsUid); // Direct access to created ID
|
|
900
900
|
* ```
|
|
901
901
|
*/
|
|
902
902
|
createData: async (request) => {
|
|
@@ -973,7 +973,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
973
973
|
* product_id: 'PROD-001',
|
|
974
974
|
* product_name: 'New Product',
|
|
975
975
|
* product_desc: 'Product description',
|
|
976
|
-
*
|
|
976
|
+
* distributorsUid: 789,
|
|
977
977
|
* customer_id: 12345
|
|
978
978
|
* });
|
|
979
979
|
* ```
|
|
@@ -981,10 +981,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
981
981
|
create: async (distributorsUid, request) => {
|
|
982
982
|
return this.executeRequest({
|
|
983
983
|
method: 'POST',
|
|
984
|
-
path: '/distributors/{
|
|
984
|
+
path: '/distributors/{distributorsUid}/products',
|
|
985
985
|
paramsSchema: CreateProductRequestSchema,
|
|
986
986
|
responseSchema: ProductResponseSchema,
|
|
987
|
-
}, request, {
|
|
987
|
+
}, request, { distributorsUid: String(distributorsUid) });
|
|
988
988
|
},
|
|
989
989
|
/**
|
|
990
990
|
* Create distributor product (data only)
|
|
@@ -1041,7 +1041,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1041
1041
|
* });
|
|
1042
1042
|
*
|
|
1043
1043
|
* items.forEach(item => {
|
|
1044
|
-
* console.log(`${item.
|
|
1044
|
+
* console.log(`${item.itemId} (${item.type}): ${item.description}`);
|
|
1045
1045
|
* });
|
|
1046
1046
|
* ```
|
|
1047
1047
|
*/
|
|
@@ -1087,10 +1087,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1087
1087
|
* @example
|
|
1088
1088
|
* ```typescript
|
|
1089
1089
|
* const product = await client.products.get(456);
|
|
1090
|
-
* console.log(product.
|
|
1090
|
+
* console.log(product.partNumber, product.productsDesc);
|
|
1091
1091
|
* ```
|
|
1092
1092
|
*/
|
|
1093
|
-
get: this.createGetMethod('/products/{
|
|
1093
|
+
get: this.createGetMethod('/products/{productsUid}', ProductResponseSchema),
|
|
1094
1094
|
/**
|
|
1095
1095
|
* Update product information
|
|
1096
1096
|
* @description Updates product details with provided data
|
|
@@ -1101,12 +1101,12 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1101
1101
|
* @example
|
|
1102
1102
|
* ```typescript
|
|
1103
1103
|
* const updated = await client.products.update(456, {
|
|
1104
|
-
*
|
|
1105
|
-
*
|
|
1104
|
+
* partNumber: 'PN-456',
|
|
1105
|
+
* productsDesc: 'Updated description'
|
|
1106
1106
|
* });
|
|
1107
1107
|
* ```
|
|
1108
1108
|
*/
|
|
1109
|
-
update: this.createUpdateMethod('/products/{
|
|
1109
|
+
update: this.createUpdateMethod('/products/{productsUid}', UpdateProductRequestSchema, ProductResponseSchema),
|
|
1110
1110
|
/**
|
|
1111
1111
|
* Soft delete a product
|
|
1112
1112
|
* @description Marks product as deleted without removing data
|
|
@@ -1118,7 +1118,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1118
1118
|
* const deleted = await client.products.delete(456);
|
|
1119
1119
|
* ```
|
|
1120
1120
|
*/
|
|
1121
|
-
delete: this.createDeleteBooleanMethod('/products/{
|
|
1121
|
+
delete: this.createDeleteBooleanMethod('/products/{productsUid}'),
|
|
1122
1122
|
/**
|
|
1123
1123
|
* Enable, disable, or delete a product
|
|
1124
1124
|
* @description Changes product status using status codes
|
|
@@ -1128,17 +1128,17 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1128
1128
|
* @throws ValidationError When request is invalid or response is malformed
|
|
1129
1129
|
* @example
|
|
1130
1130
|
* ```typescript
|
|
1131
|
-
* await client.products.enable(456, {
|
|
1132
|
-
* await client.products.enable(456, {
|
|
1131
|
+
* await client.products.enable(456, { statusCd: 705 }); // Disable
|
|
1132
|
+
* await client.products.enable(456, { statusCd: 704 }); // Enable
|
|
1133
1133
|
* ```
|
|
1134
1134
|
*/
|
|
1135
1135
|
enable: async (productsUid, request) => {
|
|
1136
1136
|
return this.executeRequest({
|
|
1137
1137
|
method: 'PUT',
|
|
1138
|
-
path: '/products/{
|
|
1138
|
+
path: '/products/{productsUid}/enable',
|
|
1139
1139
|
paramsSchema: EnableProductRequestSchema,
|
|
1140
1140
|
responseSchema: ProductResponseSchema,
|
|
1141
|
-
}, request, {
|
|
1141
|
+
}, request, { productsUid: String(productsUid) });
|
|
1142
1142
|
},
|
|
1143
1143
|
// Data-only methods for products
|
|
1144
1144
|
/**
|
|
@@ -1219,10 +1219,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1219
1219
|
* @example
|
|
1220
1220
|
* ```typescript
|
|
1221
1221
|
* const header = await client.invProfileHdr.get(1);
|
|
1222
|
-
* console.log(header.
|
|
1222
|
+
* console.log(header.invProfileHdrDesc);
|
|
1223
1223
|
* ```
|
|
1224
1224
|
*/
|
|
1225
|
-
get: this.createGetMethod('/inv-profile-hdr/{
|
|
1225
|
+
get: this.createGetMethod('/inv-profile-hdr/{invProfileHdrUid}', InvProfileHdrResponseSchema),
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Create new inventory profile header
|
|
1228
1228
|
* @description Creates a new inventory profile header container
|
|
@@ -1232,8 +1232,8 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1232
1232
|
* @example
|
|
1233
1233
|
* ```typescript
|
|
1234
1234
|
* const header = await client.invProfileHdr.create({
|
|
1235
|
-
*
|
|
1236
|
-
*
|
|
1235
|
+
* invProfileHdrDesc: 'Standard Office Setup Profile',
|
|
1236
|
+
* customerId: 12345
|
|
1237
1237
|
* });
|
|
1238
1238
|
* ```
|
|
1239
1239
|
*/
|
|
@@ -1248,11 +1248,11 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1248
1248
|
* @example
|
|
1249
1249
|
* ```typescript
|
|
1250
1250
|
* const updated = await client.invProfileHdr.update(1, {
|
|
1251
|
-
*
|
|
1251
|
+
* invProfileHdrDesc: 'Updated Profile Description'
|
|
1252
1252
|
* });
|
|
1253
1253
|
* ```
|
|
1254
1254
|
*/
|
|
1255
|
-
update: this.createUpdateMethod('/inv-profile-hdr/{
|
|
1255
|
+
update: this.createUpdateMethod('/inv-profile-hdr/{invProfileHdrUid}', UpdateInvProfileHdrRequestSchema, InvProfileHdrResponseSchema),
|
|
1256
1256
|
/**
|
|
1257
1257
|
* Delete inventory profile header
|
|
1258
1258
|
* @description Removes inventory profile header and associated lines
|
|
@@ -1264,7 +1264,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1264
1264
|
* const deleted = await client.invProfileHdr.delete(1);
|
|
1265
1265
|
* ```
|
|
1266
1266
|
*/
|
|
1267
|
-
delete: this.createDeleteBooleanMethod('/inv-profile-hdr/{
|
|
1267
|
+
delete: this.createDeleteBooleanMethod('/inv-profile-hdr/{invProfileHdrUid}'),
|
|
1268
1268
|
// Data-only methods for inventory profile headers
|
|
1269
1269
|
/**
|
|
1270
1270
|
* List inventory profile headers (data only)
|
|
@@ -1327,17 +1327,17 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1327
1327
|
* ```typescript
|
|
1328
1328
|
* const lines = await client.invProfileHdr.invProfileLine.list(1, { limit: 20 });
|
|
1329
1329
|
* lines.forEach(line => {
|
|
1330
|
-
* console.log(`Item ${line.
|
|
1330
|
+
* console.log(`Item ${line.invMastUid}: Min ${line.minQty}, Max ${line.maxQty}`);
|
|
1331
1331
|
* });
|
|
1332
1332
|
* ```
|
|
1333
1333
|
*/
|
|
1334
1334
|
list: async (invProfileHdrUid, params) => {
|
|
1335
1335
|
return this.executeRequest({
|
|
1336
1336
|
method: 'GET',
|
|
1337
|
-
path: '/inv-profile-hdr/{
|
|
1337
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line',
|
|
1338
1338
|
paramsSchema: InvProfileLineListParamsSchema,
|
|
1339
1339
|
responseSchema: InvProfileLineListResponseSchema,
|
|
1340
|
-
}, params, {
|
|
1340
|
+
}, params, { invProfileHdrUid: String(invProfileHdrUid) });
|
|
1341
1341
|
},
|
|
1342
1342
|
/**
|
|
1343
1343
|
* Get specific inventory profile line
|
|
@@ -1355,9 +1355,12 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1355
1355
|
get: async (invProfileHdrUid, invProfileLineUid) => {
|
|
1356
1356
|
return this.executeRequest({
|
|
1357
1357
|
method: 'GET',
|
|
1358
|
-
path: '/inv-profile-hdr/{
|
|
1358
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line/{invProfileLineUid}',
|
|
1359
1359
|
responseSchema: InvProfileLineResponseSchema,
|
|
1360
|
-
}, undefined, {
|
|
1360
|
+
}, undefined, {
|
|
1361
|
+
invProfileHdrUid: String(invProfileHdrUid),
|
|
1362
|
+
invProfileLineUid: String(invProfileLineUid),
|
|
1363
|
+
});
|
|
1361
1364
|
},
|
|
1362
1365
|
/**
|
|
1363
1366
|
* Create inventory profile line
|
|
@@ -1369,7 +1372,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1369
1372
|
* @example
|
|
1370
1373
|
* ```typescript
|
|
1371
1374
|
* const line = await client.invProfileHdr.invProfileLine.create(1, {
|
|
1372
|
-
*
|
|
1375
|
+
* invMastUid: 456,
|
|
1373
1376
|
* inv_profile_line_type: 'prophet21',
|
|
1374
1377
|
* min_qty: 50.0,
|
|
1375
1378
|
* max_qty: 200.0,
|
|
@@ -1380,10 +1383,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1380
1383
|
create: async (invProfileHdrUid, request) => {
|
|
1381
1384
|
return this.executeRequest({
|
|
1382
1385
|
method: 'POST',
|
|
1383
|
-
path: '/inv-profile-hdr/{
|
|
1386
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line',
|
|
1384
1387
|
paramsSchema: CreateInvProfileLineRequestSchema,
|
|
1385
1388
|
responseSchema: InvProfileLineResponseSchema,
|
|
1386
|
-
}, request, {
|
|
1389
|
+
}, request, { invProfileHdrUid: String(invProfileHdrUid) });
|
|
1387
1390
|
},
|
|
1388
1391
|
/**
|
|
1389
1392
|
* Update inventory profile line
|
|
@@ -1404,10 +1407,13 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1404
1407
|
update: async (invProfileHdrUid, invProfileLineUid, request) => {
|
|
1405
1408
|
return this.executeRequest({
|
|
1406
1409
|
method: 'PUT',
|
|
1407
|
-
path: '/inv-profile-hdr/{
|
|
1410
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line/{invProfileLineUid}',
|
|
1408
1411
|
paramsSchema: UpdateInvProfileLineRequestSchema,
|
|
1409
1412
|
responseSchema: InvProfileLineResponseSchema,
|
|
1410
|
-
}, request, {
|
|
1413
|
+
}, request, {
|
|
1414
|
+
invProfileHdrUid: String(invProfileHdrUid),
|
|
1415
|
+
invProfileLineUid: String(invProfileLineUid),
|
|
1416
|
+
});
|
|
1411
1417
|
},
|
|
1412
1418
|
/**
|
|
1413
1419
|
* Delete inventory profile line
|
|
@@ -1424,9 +1430,12 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1424
1430
|
delete: async (invProfileHdrUid, invProfileLineUid) => {
|
|
1425
1431
|
await this.executeRequest({
|
|
1426
1432
|
method: 'DELETE',
|
|
1427
|
-
path: '/inv-profile-hdr/{
|
|
1433
|
+
path: '/inv-profile-hdr/{invProfileHdrUid}/inv-profile-line/{invProfileLineUid}',
|
|
1428
1434
|
responseSchema: z.unknown(),
|
|
1429
|
-
}, undefined, {
|
|
1435
|
+
}, undefined, {
|
|
1436
|
+
invProfileHdrUid: String(invProfileHdrUid),
|
|
1437
|
+
invProfileLineUid: String(invProfileLineUid),
|
|
1438
|
+
});
|
|
1430
1439
|
return true;
|
|
1431
1440
|
},
|
|
1432
1441
|
// Data-only methods for inventory profile lines
|
|
@@ -1510,10 +1519,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1510
1519
|
* @example
|
|
1511
1520
|
* ```typescript
|
|
1512
1521
|
* const header = await client.restockHdr.get(100);
|
|
1513
|
-
* console.log(`Warehouse: ${header.
|
|
1522
|
+
* console.log(`Warehouse: ${header.warehouseUid}, Distributor: ${header.distributorsUid}`);
|
|
1514
1523
|
* ```
|
|
1515
1524
|
*/
|
|
1516
|
-
get: this.createGetMethod('/restock-hdr/{
|
|
1525
|
+
get: this.createGetMethod('/restock-hdr/{restockHdrUid}', RestockHdrResponseSchema),
|
|
1517
1526
|
/**
|
|
1518
1527
|
* Create restock header
|
|
1519
1528
|
* @description Creates a new restock header for warehouse and distributor combination
|
|
@@ -1523,8 +1532,8 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1523
1532
|
* @example
|
|
1524
1533
|
* ```typescript
|
|
1525
1534
|
* const header = await client.restockHdr.create({
|
|
1526
|
-
*
|
|
1527
|
-
*
|
|
1535
|
+
* warehouseUid: 123,
|
|
1536
|
+
* distributorsUid: 789
|
|
1528
1537
|
* });
|
|
1529
1538
|
* ```
|
|
1530
1539
|
*/
|
|
@@ -1539,11 +1548,11 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1539
1548
|
* @example
|
|
1540
1549
|
* ```typescript
|
|
1541
1550
|
* const updated = await client.restockHdr.update(100, {
|
|
1542
|
-
*
|
|
1551
|
+
* warehouseUid: 124
|
|
1543
1552
|
* });
|
|
1544
1553
|
* ```
|
|
1545
1554
|
*/
|
|
1546
|
-
update: this.createUpdateMethod('/restock-hdr/{
|
|
1555
|
+
update: this.createUpdateMethod('/restock-hdr/{restockHdrUid}', UpdateRestockHdrRequestSchema, RestockHdrResponseSchema),
|
|
1547
1556
|
/**
|
|
1548
1557
|
* Delete restock header
|
|
1549
1558
|
* @description Removes restock header and associated data
|
|
@@ -1555,7 +1564,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1555
1564
|
* const deleted = await client.restockHdr.delete(100);
|
|
1556
1565
|
* ```
|
|
1557
1566
|
*/
|
|
1558
|
-
delete: this.createDeleteBooleanMethod('/restock-hdr/{
|
|
1567
|
+
delete: this.createDeleteBooleanMethod('/restock-hdr/{restockHdrUid}'),
|
|
1559
1568
|
// Data-only methods for restocking
|
|
1560
1569
|
/**
|
|
1561
1570
|
* List restock headers (data only)
|
|
@@ -1618,7 +1627,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1618
1627
|
* ```typescript
|
|
1619
1628
|
* const sections = await client.sections.list({ customerId: 12345 });
|
|
1620
1629
|
* sections.forEach(section => {
|
|
1621
|
-
* console.log(`${section.
|
|
1630
|
+
* console.log(`${section.sectionName}: ${section.sectionDesc}`);
|
|
1622
1631
|
* });
|
|
1623
1632
|
* ```
|
|
1624
1633
|
*/
|
|
@@ -1632,10 +1641,10 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1632
1641
|
* @example
|
|
1633
1642
|
* ```typescript
|
|
1634
1643
|
* const section = await client.sections.get(200);
|
|
1635
|
-
* console.log(section.
|
|
1644
|
+
* console.log(section.sectionName, section.sectionDesc);
|
|
1636
1645
|
* ```
|
|
1637
1646
|
*/
|
|
1638
|
-
get: this.createGetMethod('/sections/{
|
|
1647
|
+
get: this.createGetMethod('/sections/{sectionsUid}', SectionResponseSchema),
|
|
1639
1648
|
/**
|
|
1640
1649
|
* Create new section
|
|
1641
1650
|
* @description Creates a new organizational section for a customer
|
|
@@ -1645,9 +1654,9 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1645
1654
|
* @example
|
|
1646
1655
|
* ```typescript
|
|
1647
1656
|
* const section = await client.sections.create({
|
|
1648
|
-
*
|
|
1649
|
-
*
|
|
1650
|
-
*
|
|
1657
|
+
* sectionName: 'Electronics Section',
|
|
1658
|
+
* sectionDesc: 'Electronic components and devices',
|
|
1659
|
+
* customerId: 12345
|
|
1651
1660
|
* });
|
|
1652
1661
|
* ```
|
|
1653
1662
|
*/
|
|
@@ -1662,12 +1671,12 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1662
1671
|
* @example
|
|
1663
1672
|
* ```typescript
|
|
1664
1673
|
* const updated = await client.sections.update(200, {
|
|
1665
|
-
*
|
|
1666
|
-
*
|
|
1674
|
+
* sectionName: 'Updated Section Name',
|
|
1675
|
+
* sectionDesc: 'Updated description'
|
|
1667
1676
|
* });
|
|
1668
1677
|
* ```
|
|
1669
1678
|
*/
|
|
1670
|
-
update: this.createUpdateMethod('/sections/{
|
|
1679
|
+
update: this.createUpdateMethod('/sections/{sectionsUid}', UpdateSectionRequestSchema, SectionResponseSchema),
|
|
1671
1680
|
/**
|
|
1672
1681
|
* Soft delete a section
|
|
1673
1682
|
* @description Marks section as deleted without removing data
|
|
@@ -1679,7 +1688,7 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1679
1688
|
* const deleted = await client.sections.delete(200);
|
|
1680
1689
|
* ```
|
|
1681
1690
|
*/
|
|
1682
|
-
delete: this.createDeleteBooleanMethod('/sections/{
|
|
1691
|
+
delete: this.createDeleteBooleanMethod('/sections/{sectionsUid}'),
|
|
1683
1692
|
/**
|
|
1684
1693
|
* Enable, disable, or delete a section
|
|
1685
1694
|
* @description Changes section status using status codes
|
|
@@ -1689,17 +1698,17 @@ export class VMIClient extends BaseServiceClient {
|
|
|
1689
1698
|
* @throws ValidationError When request is invalid or response is malformed
|
|
1690
1699
|
* @example
|
|
1691
1700
|
* ```typescript
|
|
1692
|
-
* await client.sections.enable(200, {
|
|
1693
|
-
* await client.sections.enable(200, {
|
|
1701
|
+
* await client.sections.enable(200, { statusCd: 705 }); // Disable
|
|
1702
|
+
* await client.sections.enable(200, { statusCd: 704 }); // Enable
|
|
1694
1703
|
* ```
|
|
1695
1704
|
*/
|
|
1696
1705
|
enable: async (sectionsUid, request) => {
|
|
1697
1706
|
return this.executeRequest({
|
|
1698
1707
|
method: 'PUT',
|
|
1699
|
-
path: '/sections/{
|
|
1708
|
+
path: '/sections/{sectionsUid}/enable',
|
|
1700
1709
|
paramsSchema: EnableSectionRequestSchema,
|
|
1701
1710
|
responseSchema: SectionResponseSchema,
|
|
1702
|
-
}, request, {
|
|
1711
|
+
}, request, { sectionsUid: String(sectionsUid) });
|
|
1703
1712
|
},
|
|
1704
1713
|
// Data-only methods for sections
|
|
1705
1714
|
/**
|