@arascreative/erp-api-client 0.1.0 → 1.0.0
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.d.mts +151 -283
- package/dist/index.d.ts +151 -283
- package/dist/index.js +98 -162
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +96 -162
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70,6 +70,7 @@ __export(index_exports, {
|
|
|
70
70
|
getWarehouseByIdResponse: () => getWarehouseByIdResponse,
|
|
71
71
|
getWarehouseOptions: () => getWarehouseOptions,
|
|
72
72
|
getWarehouseOptionsResponse: () => getWarehouseOptionsResponse,
|
|
73
|
+
getWarehouseOptionsResponseItem: () => getWarehouseOptionsResponseItem,
|
|
73
74
|
listStockItems: () => listStockItems,
|
|
74
75
|
listStockItemsQueryDescendingDefault: () => listStockItemsQueryDescendingDefault,
|
|
75
76
|
listStockItemsQueryPageDefault: () => listStockItemsQueryPageDefault,
|
|
@@ -91,6 +92,7 @@ __export(index_exports, {
|
|
|
91
92
|
searchAddressesQueryLimitDefault: () => searchAddressesQueryLimitDefault,
|
|
92
93
|
searchAddressesQueryParams: () => searchAddressesQueryParams,
|
|
93
94
|
searchAddressesResponse: () => searchAddressesResponse,
|
|
95
|
+
searchAddressesResponseItem: () => searchAddressesResponseItem,
|
|
94
96
|
toggleWarehouseStatus: () => toggleWarehouseStatus,
|
|
95
97
|
toggleWarehouseStatusParams: () => toggleWarehouseStatusParams,
|
|
96
98
|
updateWarehouse: () => updateWarehouse,
|
|
@@ -382,21 +384,11 @@ function useListStockMovements(params, options, queryClient) {
|
|
|
382
384
|
|
|
383
385
|
// src/gen/v1.zod.ts
|
|
384
386
|
var zod = __toESM(require("zod"));
|
|
385
|
-
var
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
zod.strictObject({
|
|
389
|
-
warehouseId: zod.uuid(),
|
|
390
|
-
name: zod.string()
|
|
391
|
-
})
|
|
392
|
-
).nullish(),
|
|
393
|
-
success: zod.boolean().optional(),
|
|
394
|
-
statusCode: zod.number().optional(),
|
|
395
|
-
message: zod.string().nullish(),
|
|
396
|
-
errors: zod.array(zod.string()).nullish(),
|
|
397
|
-
requestId: zod.string().nullish(),
|
|
398
|
-
timestamp: zod.iso.datetime({}).optional()
|
|
387
|
+
var getWarehouseOptionsResponseItem = zod.strictObject({
|
|
388
|
+
warehouseId: zod.uuid(),
|
|
389
|
+
name: zod.string()
|
|
399
390
|
});
|
|
391
|
+
var getWarehouseOptionsResponse = zod.array(getWarehouseOptionsResponseItem);
|
|
400
392
|
var listWarehousesQueryPageDefault = 1;
|
|
401
393
|
var listWarehousesQueryPageSizeDefault = 10;
|
|
402
394
|
var listWarehousesQueryParams = zod.strictObject({
|
|
@@ -404,61 +396,7 @@ var listWarehousesQueryParams = zod.strictObject({
|
|
|
404
396
|
pageSize: zod.coerce.number().default(listWarehousesQueryPageSizeDefault).describe("Number of items per page (max 100).")
|
|
405
397
|
});
|
|
406
398
|
var listWarehousesResponse = zod.strictObject({
|
|
407
|
-
|
|
408
|
-
data: zod.union([
|
|
409
|
-
zod.null(),
|
|
410
|
-
zod.strictObject({
|
|
411
|
-
items: zod.array(
|
|
412
|
-
zod.strictObject({
|
|
413
|
-
warehouseId: zod.uuid(),
|
|
414
|
-
name: zod.string(),
|
|
415
|
-
isActive: zod.boolean(),
|
|
416
|
-
personInCharge: zod.strictObject({
|
|
417
|
-
name: zod.string(),
|
|
418
|
-
phone: zod.string().nullable()
|
|
419
|
-
}),
|
|
420
|
-
address: zod.strictObject({
|
|
421
|
-
addressId: zod.uuid(),
|
|
422
|
-
subDistrictName: zod.string(),
|
|
423
|
-
districtName: zod.string(),
|
|
424
|
-
cityName: zod.string(),
|
|
425
|
-
provinceName: zod.string(),
|
|
426
|
-
zipCode: zod.string()
|
|
427
|
-
}),
|
|
428
|
-
fullAddressText: zod.string().nullish()
|
|
429
|
-
})
|
|
430
|
-
),
|
|
431
|
-
page: zod.number(),
|
|
432
|
-
pageSize: zod.number(),
|
|
433
|
-
totalCount: zod.number(),
|
|
434
|
-
totalPages: zod.number().optional(),
|
|
435
|
-
hasNextPage: zod.boolean().optional(),
|
|
436
|
-
hasPreviousPage: zod.boolean().optional()
|
|
437
|
-
})
|
|
438
|
-
]).optional(),
|
|
439
|
-
success: zod.boolean().optional(),
|
|
440
|
-
statusCode: zod.number().optional(),
|
|
441
|
-
message: zod.string().nullish(),
|
|
442
|
-
errors: zod.array(zod.string()).nullish(),
|
|
443
|
-
requestId: zod.string().nullish(),
|
|
444
|
-
timestamp: zod.iso.datetime({}).optional()
|
|
445
|
-
});
|
|
446
|
-
var createWarehouseBody = zod.strictObject({
|
|
447
|
-
name: zod.string(),
|
|
448
|
-
addressId: zod.uuid(),
|
|
449
|
-
personInCharge: zod.strictObject({
|
|
450
|
-
name: zod.string(),
|
|
451
|
-
phone: zod.string().nullable()
|
|
452
|
-
}),
|
|
453
|
-
fullAddressText: zod.string().nullish()
|
|
454
|
-
});
|
|
455
|
-
var getWarehouseByIdParams = zod.strictObject({
|
|
456
|
-
id: zod.uuid().describe("Warehouse identifier.")
|
|
457
|
-
});
|
|
458
|
-
var getWarehouseByIdResponse = zod.strictObject({
|
|
459
|
-
code: zod.string().nullish(),
|
|
460
|
-
data: zod.union([
|
|
461
|
-
zod.null(),
|
|
399
|
+
items: zod.array(
|
|
462
400
|
zod.strictObject({
|
|
463
401
|
warehouseId: zod.uuid(),
|
|
464
402
|
name: zod.string(),
|
|
@@ -477,13 +415,43 @@ var getWarehouseByIdResponse = zod.strictObject({
|
|
|
477
415
|
}),
|
|
478
416
|
fullAddressText: zod.string().nullish()
|
|
479
417
|
})
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
418
|
+
),
|
|
419
|
+
page: zod.number(),
|
|
420
|
+
pageSize: zod.number(),
|
|
421
|
+
totalCount: zod.number(),
|
|
422
|
+
totalPages: zod.number().optional(),
|
|
423
|
+
hasNextPage: zod.boolean().optional(),
|
|
424
|
+
hasPreviousPage: zod.boolean().optional()
|
|
425
|
+
});
|
|
426
|
+
var createWarehouseBody = zod.strictObject({
|
|
427
|
+
name: zod.string(),
|
|
428
|
+
addressId: zod.uuid(),
|
|
429
|
+
personInCharge: zod.strictObject({
|
|
430
|
+
name: zod.string(),
|
|
431
|
+
phone: zod.string().nullable()
|
|
432
|
+
}),
|
|
433
|
+
fullAddressText: zod.string().nullish()
|
|
434
|
+
});
|
|
435
|
+
var getWarehouseByIdParams = zod.strictObject({
|
|
436
|
+
id: zod.uuid().describe("Warehouse identifier.")
|
|
437
|
+
});
|
|
438
|
+
var getWarehouseByIdResponse = zod.strictObject({
|
|
439
|
+
warehouseId: zod.uuid(),
|
|
440
|
+
name: zod.string(),
|
|
441
|
+
isActive: zod.boolean(),
|
|
442
|
+
personInCharge: zod.strictObject({
|
|
443
|
+
name: zod.string(),
|
|
444
|
+
phone: zod.string().nullable()
|
|
445
|
+
}),
|
|
446
|
+
address: zod.strictObject({
|
|
447
|
+
addressId: zod.uuid(),
|
|
448
|
+
subDistrictName: zod.string(),
|
|
449
|
+
districtName: zod.string(),
|
|
450
|
+
cityName: zod.string(),
|
|
451
|
+
provinceName: zod.string(),
|
|
452
|
+
zipCode: zod.string()
|
|
453
|
+
}),
|
|
454
|
+
fullAddressText: zod.string().nullish()
|
|
487
455
|
});
|
|
488
456
|
var updateWarehouseParams = zod.strictObject({
|
|
489
457
|
id: zod.uuid().describe("Warehouse identifier.")
|
|
@@ -509,28 +477,18 @@ var searchAddressesQueryParams = zod.strictObject({
|
|
|
509
477
|
keyword: zod.coerce.string(),
|
|
510
478
|
limit: zod.coerce.number().default(searchAddressesQueryLimitDefault)
|
|
511
479
|
});
|
|
512
|
-
var
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
districtName: zod.string().optional(),
|
|
523
|
-
subDistrictName: zod.string().optional(),
|
|
524
|
-
zipCode: zod.string().optional()
|
|
525
|
-
})
|
|
526
|
-
).nullish(),
|
|
527
|
-
success: zod.boolean().optional(),
|
|
528
|
-
statusCode: zod.number().optional(),
|
|
529
|
-
message: zod.string().nullish(),
|
|
530
|
-
errors: zod.array(zod.string()).nullish(),
|
|
531
|
-
requestId: zod.string().nullish(),
|
|
532
|
-
timestamp: zod.iso.datetime({}).optional()
|
|
480
|
+
var searchAddressesResponseItem = zod.strictObject({
|
|
481
|
+
addressId: zod.uuid().optional(),
|
|
482
|
+
externalId: zod.string().nullish(),
|
|
483
|
+
destinationCode: zod.string().optional(),
|
|
484
|
+
originCode: zod.string().optional(),
|
|
485
|
+
provinceName: zod.string().optional(),
|
|
486
|
+
cityName: zod.string().optional(),
|
|
487
|
+
districtName: zod.string().optional(),
|
|
488
|
+
subDistrictName: zod.string().optional(),
|
|
489
|
+
zipCode: zod.string().optional()
|
|
533
490
|
});
|
|
491
|
+
var searchAddressesResponse = zod.array(searchAddressesResponseItem);
|
|
534
492
|
var createStockItemsBody = zod.strictObject({
|
|
535
493
|
name: zod.string(),
|
|
536
494
|
sku: zod.string(),
|
|
@@ -549,38 +507,26 @@ var listStockItemsQueryParams = zod.strictObject({
|
|
|
549
507
|
warehouseId: zod.uuid().optional().describe("Filters by warehouse.")
|
|
550
508
|
});
|
|
551
509
|
var listStockItemsResponse = zod.strictObject({
|
|
552
|
-
|
|
553
|
-
data: zod.union([
|
|
554
|
-
zod.null(),
|
|
510
|
+
items: zod.array(
|
|
555
511
|
zod.strictObject({
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
reservedQty: zod.number().optional(),
|
|
567
|
-
availableQty: zod.number().optional()
|
|
568
|
-
})
|
|
569
|
-
),
|
|
570
|
-
page: zod.number(),
|
|
571
|
-
pageSize: zod.number(),
|
|
572
|
-
totalCount: zod.number(),
|
|
573
|
-
totalPages: zod.number().optional(),
|
|
574
|
-
hasNextPage: zod.boolean().optional(),
|
|
575
|
-
hasPreviousPage: zod.boolean().optional()
|
|
512
|
+
id: zod.uuid().optional(),
|
|
513
|
+
sku: zod.string().optional(),
|
|
514
|
+
name: zod.string().optional(),
|
|
515
|
+
unit: zod.string().optional(),
|
|
516
|
+
isActive: zod.boolean().optional(),
|
|
517
|
+
warehouseId: zod.uuid().nullish(),
|
|
518
|
+
warehouseName: zod.string().nullish(),
|
|
519
|
+
onHandQty: zod.number().optional(),
|
|
520
|
+
reservedQty: zod.number().optional(),
|
|
521
|
+
availableQty: zod.number().optional()
|
|
576
522
|
})
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
523
|
+
),
|
|
524
|
+
page: zod.number(),
|
|
525
|
+
pageSize: zod.number(),
|
|
526
|
+
totalCount: zod.number(),
|
|
527
|
+
totalPages: zod.number().optional(),
|
|
528
|
+
hasNextPage: zod.boolean().optional(),
|
|
529
|
+
hasPreviousPage: zod.boolean().optional()
|
|
584
530
|
});
|
|
585
531
|
var createBatchBody = zod.strictObject({
|
|
586
532
|
itemId: zod.uuid(),
|
|
@@ -623,43 +569,31 @@ var listStockMovementsQueryParams = zod.strictObject({
|
|
|
623
569
|
descending: zod.coerce.boolean().optional().describe("Sort descending when true.")
|
|
624
570
|
});
|
|
625
571
|
var listStockMovementsResponse = zod.strictObject({
|
|
626
|
-
|
|
627
|
-
data: zod.union([
|
|
628
|
-
zod.null(),
|
|
572
|
+
items: zod.array(
|
|
629
573
|
zod.strictObject({
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
recordedBy: zod.uuid().optional(),
|
|
646
|
-
receivedBy: zod.string().nullish()
|
|
647
|
-
})
|
|
648
|
-
),
|
|
649
|
-
page: zod.number(),
|
|
650
|
-
pageSize: zod.number(),
|
|
651
|
-
totalCount: zod.number(),
|
|
652
|
-
totalPages: zod.number().optional(),
|
|
653
|
-
hasNextPage: zod.boolean().optional(),
|
|
654
|
-
hasPreviousPage: zod.boolean().optional()
|
|
574
|
+
id: zod.uuid().optional(),
|
|
575
|
+
itemId: zod.uuid().optional(),
|
|
576
|
+
itemName: zod.string().optional(),
|
|
577
|
+
warehouseId: zod.uuid().optional(),
|
|
578
|
+
warehouseName: zod.string().nullish(),
|
|
579
|
+
batchId: zod.uuid().nullish(),
|
|
580
|
+
direction: zod.string().optional(),
|
|
581
|
+
quantity: zod.number().optional(),
|
|
582
|
+
sourceType: zod.string().optional(),
|
|
583
|
+
sourceReferenceId: zod.uuid().nullish(),
|
|
584
|
+
externalReferenceNo: zod.string().nullish(),
|
|
585
|
+
note: zod.string().nullish(),
|
|
586
|
+
createdAt: zod.iso.datetime({}).optional(),
|
|
587
|
+
recordedBy: zod.uuid().optional(),
|
|
588
|
+
receivedBy: zod.string().nullish()
|
|
655
589
|
})
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
590
|
+
),
|
|
591
|
+
page: zod.number(),
|
|
592
|
+
pageSize: zod.number(),
|
|
593
|
+
totalCount: zod.number(),
|
|
594
|
+
totalPages: zod.number().optional(),
|
|
595
|
+
hasNextPage: zod.boolean().optional(),
|
|
596
|
+
hasPreviousPage: zod.boolean().optional()
|
|
663
597
|
});
|
|
664
598
|
// Annotate the CommonJS export names for ESM import in node:
|
|
665
599
|
0 && (module.exports = {
|
|
@@ -703,6 +637,7 @@ var listStockMovementsResponse = zod.strictObject({
|
|
|
703
637
|
getWarehouseByIdResponse,
|
|
704
638
|
getWarehouseOptions,
|
|
705
639
|
getWarehouseOptionsResponse,
|
|
640
|
+
getWarehouseOptionsResponseItem,
|
|
706
641
|
listStockItems,
|
|
707
642
|
listStockItemsQueryDescendingDefault,
|
|
708
643
|
listStockItemsQueryPageDefault,
|
|
@@ -724,6 +659,7 @@ var listStockMovementsResponse = zod.strictObject({
|
|
|
724
659
|
searchAddressesQueryLimitDefault,
|
|
725
660
|
searchAddressesQueryParams,
|
|
726
661
|
searchAddressesResponse,
|
|
662
|
+
searchAddressesResponseItem,
|
|
727
663
|
toggleWarehouseStatus,
|
|
728
664
|
toggleWarehouseStatusParams,
|
|
729
665
|
updateWarehouse,
|