@arascreative/erp-client 1.0.0 → 2.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.
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
- * ArasERP V1 API
5
- * Enterprise Resource Planning Backend API
6
- * OpenAPI spec version: v1
4
+ * TSNX API
5
+ * OpenAPI spec version: 1.0.0
7
6
  */
8
7
  import * as zod from 'zod';
9
8
  /**
@@ -215,6 +214,55 @@ export declare const searchAddressesResponse: zod.ZodArray<zod.ZodObject<{
215
214
  subDistrictName: string;
216
215
  zipCode: string;
217
216
  }>, "many">;
217
+ /**
218
+ * Creates a pending file metadata record and generates a presigned S3 upload URL for direct client-to-storage upload.
219
+ * @summary Initiate direct file upload to storage
220
+ */
221
+ export declare const initiateUploadBody: zod.ZodObject<{
222
+ originalName: zod.ZodString;
223
+ mimeType: zod.ZodString;
224
+ sizeBytes: zod.ZodNumber;
225
+ checksum: zod.ZodString;
226
+ purpose: zod.ZodString;
227
+ expiresInSeconds: zod.ZodOptional<zod.ZodNumber>;
228
+ }, "strip", zod.ZodTypeAny, {
229
+ originalName: string;
230
+ mimeType: string;
231
+ sizeBytes: number;
232
+ checksum: string;
233
+ purpose: string;
234
+ expiresInSeconds?: number | undefined;
235
+ }, {
236
+ originalName: string;
237
+ mimeType: string;
238
+ sizeBytes: number;
239
+ checksum: string;
240
+ purpose: string;
241
+ expiresInSeconds?: number | undefined;
242
+ }>;
243
+ /**
244
+ * Uploads a file directly with base64 encoded content, verifies against purpose policy, stores to S3, and activates immediately.
245
+ * @summary Direct upload file
246
+ */
247
+ export declare const uploadFileBody: zod.ZodObject<{
248
+ originalName: zod.ZodString;
249
+ mimeType: zod.ZodString;
250
+ contentBase64: zod.ZodString;
251
+ purpose: zod.ZodString;
252
+ uploadedBy: zod.ZodOptional<zod.ZodString>;
253
+ }, "strip", zod.ZodTypeAny, {
254
+ originalName: string;
255
+ mimeType: string;
256
+ purpose: string;
257
+ contentBase64: string;
258
+ uploadedBy?: string | undefined;
259
+ }, {
260
+ originalName: string;
261
+ mimeType: string;
262
+ purpose: string;
263
+ contentBase64: string;
264
+ uploadedBy?: string | undefined;
265
+ }>;
218
266
  /**
219
267
  * Toggles the active state of a warehouse. Soft-deleted warehouses cannot be toggled.
220
268
  * @summary Toggle warehouse active status
@@ -258,6 +306,71 @@ export declare const changeStockItemStatusResponse: zod.ZodObject<{
258
306
  }, {
259
307
  status: string;
260
308
  }>;
309
+ /**
310
+ * Verifies that physical object was written to storage provider, verifies checksum, and transitions file to ACTIVE.
311
+ * @summary Complete direct file upload
312
+ */
313
+ export declare const completeUploadParams: zod.ZodObject<{
314
+ id: zod.ZodString;
315
+ }, "strip", zod.ZodTypeAny, {
316
+ id: string;
317
+ }, {
318
+ id: string;
319
+ }>;
320
+ export declare const completeUploadBody: zod.ZodObject<{
321
+ actualChecksum: zod.ZodOptional<zod.ZodString>;
322
+ }, "strip", zod.ZodTypeAny, {
323
+ actualChecksum?: string | undefined;
324
+ }, {
325
+ actualChecksum?: string | undefined;
326
+ }>;
327
+ export declare const completeUploadResponse: zod.ZodObject<{
328
+ id: zod.ZodString;
329
+ status: zod.ZodString;
330
+ activatedAt: zod.ZodString;
331
+ }, "strip", zod.ZodTypeAny, {
332
+ status: string;
333
+ id: string;
334
+ activatedAt: string;
335
+ }, {
336
+ status: string;
337
+ id: string;
338
+ activatedAt: string;
339
+ }>;
340
+ /**
341
+ * Generates a public CDN URL (for public files) or a time-limited signed download URL (for private files).
342
+ * @summary Get file download or CDN access URL
343
+ */
344
+ export declare const getFileAccessUrlParams: zod.ZodObject<{
345
+ id: zod.ZodString;
346
+ }, "strip", zod.ZodTypeAny, {
347
+ id: string;
348
+ }, {
349
+ id: string;
350
+ }>;
351
+ export declare const getFileAccessUrlQueryParams: zod.ZodObject<{
352
+ expiresInSeconds: zod.ZodOptional<zod.ZodNumber>;
353
+ }, "strip", zod.ZodTypeAny, {
354
+ expiresInSeconds?: number | undefined;
355
+ }, {
356
+ expiresInSeconds?: number | undefined;
357
+ }>;
358
+ export declare const getFileAccessUrlResponse: zod.ZodObject<{
359
+ fileId: zod.ZodString;
360
+ url: zod.ZodString;
361
+ isPublic: zod.ZodBoolean;
362
+ expiresAt: zod.ZodString;
363
+ }, "strip", zod.ZodTypeAny, {
364
+ expiresAt: string;
365
+ fileId: string;
366
+ url: string;
367
+ isPublic: boolean;
368
+ }, {
369
+ expiresAt: string;
370
+ fileId: string;
371
+ url: string;
372
+ isPublic: boolean;
373
+ }>;
261
374
  /**
262
375
  * Retrieves warehouse details by its identifier. Returns 404 if not found or soft-deleted.
263
376
  * @summary Get warehouse by ID
@@ -428,6 +541,74 @@ export declare const deleteStockItemParams: zod.ZodObject<{
428
541
  }, {
429
542
  id: string;
430
543
  }>;
544
+ /**
545
+ * Retrieves active stored file metadata by its ID.
546
+ * @summary Get stored file by ID
547
+ */
548
+ export declare const getStoredFileByIdParams: zod.ZodObject<{
549
+ id: zod.ZodString;
550
+ }, "strip", zod.ZodTypeAny, {
551
+ id: string;
552
+ }, {
553
+ id: string;
554
+ }>;
555
+ export declare const getStoredFileByIdResponse: zod.ZodObject<{
556
+ id: zod.ZodString;
557
+ originalName: zod.ZodString;
558
+ mimeType: zod.ZodString;
559
+ sizeBytes: zod.ZodNumber;
560
+ checksum: zod.ZodString;
561
+ storageKey: zod.ZodString;
562
+ status: zod.ZodString;
563
+ visibility: zod.ZodString;
564
+ purpose: zod.ZodString;
565
+ uploadedBy: zod.ZodString;
566
+ expiresAt: zod.ZodString;
567
+ createdAt: zod.ZodString;
568
+ activatedAt: zod.ZodString;
569
+ deletedAt: zod.ZodString;
570
+ }, "strip", zod.ZodTypeAny, {
571
+ expiresAt: string;
572
+ status: string;
573
+ id: string;
574
+ storageKey: string;
575
+ originalName: string;
576
+ mimeType: string;
577
+ sizeBytes: number;
578
+ checksum: string;
579
+ visibility: string;
580
+ purpose: string;
581
+ activatedAt: string;
582
+ createdAt: string;
583
+ uploadedBy: string;
584
+ deletedAt: string;
585
+ }, {
586
+ expiresAt: string;
587
+ status: string;
588
+ id: string;
589
+ storageKey: string;
590
+ originalName: string;
591
+ mimeType: string;
592
+ sizeBytes: number;
593
+ checksum: string;
594
+ visibility: string;
595
+ purpose: string;
596
+ activatedAt: string;
597
+ createdAt: string;
598
+ uploadedBy: string;
599
+ deletedAt: string;
600
+ }>;
601
+ /**
602
+ * Marks a stored file as DELETED. Files in active use by other modules cannot be deleted.
603
+ * @summary Soft delete stored file
604
+ */
605
+ export declare const deleteStoredFileParams: zod.ZodObject<{
606
+ id: zod.ZodString;
607
+ }, "strip", zod.ZodTypeAny, {
608
+ id: string;
609
+ }, {
610
+ id: string;
611
+ }>;
431
612
  /**
432
613
  * @summary Health check
433
614
  */
@@ -478,135 +659,172 @@ export declare const listWarehousesQueryParams: zod.ZodObject<{
478
659
  isActive?: boolean | undefined;
479
660
  search?: string | undefined;
480
661
  }>;
481
- export declare const listWarehousesResponse: zod.ZodObject<{
482
- "0": zod.ZodObject<{
483
- id: zod.ZodString;
662
+ export declare const listWarehousesResponseItem: zod.ZodObject<{
663
+ id: zod.ZodString;
664
+ name: zod.ZodString;
665
+ pic: zod.ZodObject<{
484
666
  name: zod.ZodString;
485
- pic: zod.ZodObject<{
486
- name: zod.ZodString;
487
- phone: zod.ZodString;
488
- }, "strip", zod.ZodTypeAny, {
489
- name: string;
490
- phone: string;
491
- }, {
492
- name: string;
493
- phone: string;
494
- }>;
495
- address: zod.ZodObject<{
496
- addressId: zod.ZodString;
497
- destinationCode: zod.ZodNullable<zod.ZodString>;
498
- provinceName: zod.ZodNullable<zod.ZodString>;
499
- cityName: zod.ZodNullable<zod.ZodString>;
500
- districtName: zod.ZodNullable<zod.ZodString>;
501
- subDistrictName: zod.ZodNullable<zod.ZodString>;
502
- zipCode: zod.ZodNullable<zod.ZodString>;
503
- }, "strip", zod.ZodTypeAny, {
504
- addressId: string;
505
- destinationCode: string | null;
506
- provinceName: string | null;
507
- cityName: string | null;
508
- districtName: string | null;
509
- subDistrictName: string | null;
510
- zipCode: string | null;
511
- }, {
512
- addressId: string;
513
- destinationCode: string | null;
514
- provinceName: string | null;
515
- cityName: string | null;
516
- districtName: string | null;
517
- subDistrictName: string | null;
518
- zipCode: string | null;
519
- }>;
520
- fullAddressText: zod.ZodNullable<zod.ZodString>;
521
- isActive: zod.ZodBoolean;
522
- createdAt: zod.ZodString;
523
- updatedAt: zod.ZodString;
667
+ phone: zod.ZodString;
524
668
  }, "strip", zod.ZodTypeAny, {
525
- id: string;
526
- isActive: boolean;
527
669
  name: string;
528
- pic: {
529
- name: string;
530
- phone: string;
531
- };
532
- address: {
533
- addressId: string;
534
- destinationCode: string | null;
535
- provinceName: string | null;
536
- cityName: string | null;
537
- districtName: string | null;
538
- subDistrictName: string | null;
539
- zipCode: string | null;
540
- };
541
- fullAddressText: string | null;
542
- createdAt: string;
543
- updatedAt: string;
670
+ phone: string;
544
671
  }, {
545
- id: string;
546
- isActive: boolean;
547
672
  name: string;
548
- pic: {
549
- name: string;
550
- phone: string;
551
- };
552
- address: {
553
- addressId: string;
554
- destinationCode: string | null;
555
- provinceName: string | null;
556
- cityName: string | null;
557
- districtName: string | null;
558
- subDistrictName: string | null;
559
- zipCode: string | null;
560
- };
561
- fullAddressText: string | null;
562
- createdAt: string;
563
- updatedAt: string;
673
+ phone: string;
674
+ }>;
675
+ address: zod.ZodObject<{
676
+ addressId: zod.ZodString;
677
+ destinationCode: zod.ZodNullable<zod.ZodString>;
678
+ provinceName: zod.ZodNullable<zod.ZodString>;
679
+ cityName: zod.ZodNullable<zod.ZodString>;
680
+ districtName: zod.ZodNullable<zod.ZodString>;
681
+ subDistrictName: zod.ZodNullable<zod.ZodString>;
682
+ zipCode: zod.ZodNullable<zod.ZodString>;
683
+ }, "strip", zod.ZodTypeAny, {
684
+ addressId: string;
685
+ destinationCode: string | null;
686
+ provinceName: string | null;
687
+ cityName: string | null;
688
+ districtName: string | null;
689
+ subDistrictName: string | null;
690
+ zipCode: string | null;
691
+ }, {
692
+ addressId: string;
693
+ destinationCode: string | null;
694
+ provinceName: string | null;
695
+ cityName: string | null;
696
+ districtName: string | null;
697
+ subDistrictName: string | null;
698
+ zipCode: string | null;
564
699
  }>;
700
+ fullAddressText: zod.ZodNullable<zod.ZodString>;
701
+ isActive: zod.ZodBoolean;
702
+ createdAt: zod.ZodString;
703
+ updatedAt: zod.ZodString;
565
704
  }, "strip", zod.ZodTypeAny, {
566
- "0": {
567
- id: string;
568
- isActive: boolean;
705
+ id: string;
706
+ isActive: boolean;
707
+ name: string;
708
+ pic: {
569
709
  name: string;
570
- pic: {
571
- name: string;
572
- phone: string;
573
- };
574
- address: {
575
- addressId: string;
576
- destinationCode: string | null;
577
- provinceName: string | null;
578
- cityName: string | null;
579
- districtName: string | null;
580
- subDistrictName: string | null;
581
- zipCode: string | null;
582
- };
583
- fullAddressText: string | null;
584
- createdAt: string;
585
- updatedAt: string;
710
+ phone: string;
586
711
  };
712
+ address: {
713
+ addressId: string;
714
+ destinationCode: string | null;
715
+ provinceName: string | null;
716
+ cityName: string | null;
717
+ districtName: string | null;
718
+ subDistrictName: string | null;
719
+ zipCode: string | null;
720
+ };
721
+ fullAddressText: string | null;
722
+ createdAt: string;
723
+ updatedAt: string;
587
724
  }, {
588
- "0": {
589
- id: string;
590
- isActive: boolean;
725
+ id: string;
726
+ isActive: boolean;
727
+ name: string;
728
+ pic: {
591
729
  name: string;
592
- pic: {
593
- name: string;
594
- phone: string;
595
- };
596
- address: {
597
- addressId: string;
598
- destinationCode: string | null;
599
- provinceName: string | null;
600
- cityName: string | null;
601
- districtName: string | null;
602
- subDistrictName: string | null;
603
- zipCode: string | null;
604
- };
605
- fullAddressText: string | null;
606
- createdAt: string;
607
- updatedAt: string;
730
+ phone: string;
608
731
  };
732
+ address: {
733
+ addressId: string;
734
+ destinationCode: string | null;
735
+ provinceName: string | null;
736
+ cityName: string | null;
737
+ districtName: string | null;
738
+ subDistrictName: string | null;
739
+ zipCode: string | null;
740
+ };
741
+ fullAddressText: string | null;
742
+ createdAt: string;
743
+ updatedAt: string;
609
744
  }>;
745
+ export declare const listWarehousesResponse: zod.ZodArray<zod.ZodObject<{
746
+ id: zod.ZodString;
747
+ name: zod.ZodString;
748
+ pic: zod.ZodObject<{
749
+ name: zod.ZodString;
750
+ phone: zod.ZodString;
751
+ }, "strip", zod.ZodTypeAny, {
752
+ name: string;
753
+ phone: string;
754
+ }, {
755
+ name: string;
756
+ phone: string;
757
+ }>;
758
+ address: zod.ZodObject<{
759
+ addressId: zod.ZodString;
760
+ destinationCode: zod.ZodNullable<zod.ZodString>;
761
+ provinceName: zod.ZodNullable<zod.ZodString>;
762
+ cityName: zod.ZodNullable<zod.ZodString>;
763
+ districtName: zod.ZodNullable<zod.ZodString>;
764
+ subDistrictName: zod.ZodNullable<zod.ZodString>;
765
+ zipCode: zod.ZodNullable<zod.ZodString>;
766
+ }, "strip", zod.ZodTypeAny, {
767
+ addressId: string;
768
+ destinationCode: string | null;
769
+ provinceName: string | null;
770
+ cityName: string | null;
771
+ districtName: string | null;
772
+ subDistrictName: string | null;
773
+ zipCode: string | null;
774
+ }, {
775
+ addressId: string;
776
+ destinationCode: string | null;
777
+ provinceName: string | null;
778
+ cityName: string | null;
779
+ districtName: string | null;
780
+ subDistrictName: string | null;
781
+ zipCode: string | null;
782
+ }>;
783
+ fullAddressText: zod.ZodNullable<zod.ZodString>;
784
+ isActive: zod.ZodBoolean;
785
+ createdAt: zod.ZodString;
786
+ updatedAt: zod.ZodString;
787
+ }, "strip", zod.ZodTypeAny, {
788
+ id: string;
789
+ isActive: boolean;
790
+ name: string;
791
+ pic: {
792
+ name: string;
793
+ phone: string;
794
+ };
795
+ address: {
796
+ addressId: string;
797
+ destinationCode: string | null;
798
+ provinceName: string | null;
799
+ cityName: string | null;
800
+ districtName: string | null;
801
+ subDistrictName: string | null;
802
+ zipCode: string | null;
803
+ };
804
+ fullAddressText: string | null;
805
+ createdAt: string;
806
+ updatedAt: string;
807
+ }, {
808
+ id: string;
809
+ isActive: boolean;
810
+ name: string;
811
+ pic: {
812
+ name: string;
813
+ phone: string;
814
+ };
815
+ address: {
816
+ addressId: string;
817
+ destinationCode: string | null;
818
+ provinceName: string | null;
819
+ cityName: string | null;
820
+ districtName: string | null;
821
+ subDistrictName: string | null;
822
+ zipCode: string | null;
823
+ };
824
+ fullAddressText: string | null;
825
+ createdAt: string;
826
+ updatedAt: string;
827
+ }>, "many">;
610
828
  /**
611
829
  * Lists paginated stock movements with optional filtering by itemId, batchId, warehouseId, and sorting.
612
830
  * @summary List stock movements
@@ -1 +1 @@
1
- {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../src/generated/zod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;EAGtC,CAAA;AAGF;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;EAGpB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUxB,CAAA;AAGF;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOjC,CAAA;AAGF;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;EAGzB,CAAA;AAGF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAA;AAGF;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUtC,CAAA;AACF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAyC,CAAA;AAG7E;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;EAEtC,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBjC,CAAA;AAGF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAA;AAGF;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;EAEtB,CAAA"}
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
- * ArasERP V1 API
5
- * Enterprise Resource Planning Backend API
6
- * OpenAPI spec version: v1
4
+ * TSNX API
5
+ * OpenAPI spec version: 1.0.0
7
6
  */
8
7
  import * as zod from 'zod';
9
8
  /**
@@ -79,6 +78,29 @@ export const searchAddressesResponseItem = zod.object({
79
78
  "zipCode": zod.string()
80
79
  });
81
80
  export const searchAddressesResponse = zod.array(searchAddressesResponseItem);
81
+ /**
82
+ * Creates a pending file metadata record and generates a presigned S3 upload URL for direct client-to-storage upload.
83
+ * @summary Initiate direct file upload to storage
84
+ */
85
+ export const initiateUploadBody = zod.object({
86
+ "originalName": zod.string(),
87
+ "mimeType": zod.string(),
88
+ "sizeBytes": zod.number(),
89
+ "checksum": zod.string(),
90
+ "purpose": zod.string(),
91
+ "expiresInSeconds": zod.number().optional()
92
+ });
93
+ /**
94
+ * Uploads a file directly with base64 encoded content, verifies against purpose policy, stores to S3, and activates immediately.
95
+ * @summary Direct upload file
96
+ */
97
+ export const uploadFileBody = zod.object({
98
+ "originalName": zod.string(),
99
+ "mimeType": zod.string(),
100
+ "contentBase64": zod.string(),
101
+ "purpose": zod.string(),
102
+ "uploadedBy": zod.string().optional()
103
+ });
82
104
  /**
83
105
  * Toggles the active state of a warehouse. Soft-deleted warehouses cannot be toggled.
84
106
  * @summary Toggle warehouse active status
@@ -102,6 +124,37 @@ export const changeStockItemStatusBody = zod.object({
102
124
  export const changeStockItemStatusResponse = zod.object({
103
125
  "status": zod.string()
104
126
  });
127
+ /**
128
+ * Verifies that physical object was written to storage provider, verifies checksum, and transitions file to ACTIVE.
129
+ * @summary Complete direct file upload
130
+ */
131
+ export const completeUploadParams = zod.object({
132
+ "id": zod.string()
133
+ });
134
+ export const completeUploadBody = zod.object({
135
+ "actualChecksum": zod.string().optional()
136
+ });
137
+ export const completeUploadResponse = zod.object({
138
+ "id": zod.string(),
139
+ "status": zod.string(),
140
+ "activatedAt": zod.string()
141
+ });
142
+ /**
143
+ * Generates a public CDN URL (for public files) or a time-limited signed download URL (for private files).
144
+ * @summary Get file download or CDN access URL
145
+ */
146
+ export const getFileAccessUrlParams = zod.object({
147
+ "id": zod.string()
148
+ });
149
+ export const getFileAccessUrlQueryParams = zod.object({
150
+ "expiresInSeconds": zod.number().optional()
151
+ });
152
+ export const getFileAccessUrlResponse = zod.object({
153
+ "fileId": zod.string(),
154
+ "url": zod.string(),
155
+ "isPublic": zod.boolean(),
156
+ "expiresAt": zod.string()
157
+ });
105
158
  /**
106
159
  * Retrieves warehouse details by its identifier. Returns 404 if not found or soft-deleted.
107
160
  * @summary Get warehouse by ID
@@ -170,6 +223,36 @@ export const updateStockItemBody = zod.object({
170
223
  export const deleteStockItemParams = zod.object({
171
224
  "id": zod.string()
172
225
  });
226
+ /**
227
+ * Retrieves active stored file metadata by its ID.
228
+ * @summary Get stored file by ID
229
+ */
230
+ export const getStoredFileByIdParams = zod.object({
231
+ "id": zod.string()
232
+ });
233
+ export const getStoredFileByIdResponse = zod.object({
234
+ "id": zod.string(),
235
+ "originalName": zod.string(),
236
+ "mimeType": zod.string(),
237
+ "sizeBytes": zod.number(),
238
+ "checksum": zod.string(),
239
+ "storageKey": zod.string(),
240
+ "status": zod.string(),
241
+ "visibility": zod.string(),
242
+ "purpose": zod.string(),
243
+ "uploadedBy": zod.string(),
244
+ "expiresAt": zod.string(),
245
+ "createdAt": zod.string(),
246
+ "activatedAt": zod.string(),
247
+ "deletedAt": zod.string()
248
+ });
249
+ /**
250
+ * Marks a stored file as DELETED. Files in active use by other modules cannot be deleted.
251
+ * @summary Soft delete stored file
252
+ */
253
+ export const deleteStoredFileParams = zod.object({
254
+ "id": zod.string()
255
+ });
173
256
  /**
174
257
  * @summary Health check
175
258
  */
@@ -196,29 +279,28 @@ export const listWarehousesQueryParams = zod.object({
196
279
  "search": zod.string().optional(),
197
280
  "isActive": zod.boolean().optional()
198
281
  });
199
- export const listWarehousesResponse = zod.object({
200
- "0": zod.object({
201
- "id": zod.string(),
282
+ export const listWarehousesResponseItem = zod.object({
283
+ "id": zod.string(),
284
+ "name": zod.string(),
285
+ "pic": zod.object({
202
286
  "name": zod.string(),
203
- "pic": zod.object({
204
- "name": zod.string(),
205
- "phone": zod.string()
206
- }),
207
- "address": zod.object({
208
- "addressId": zod.string(),
209
- "destinationCode": zod.string().nullable(),
210
- "provinceName": zod.string().nullable(),
211
- "cityName": zod.string().nullable(),
212
- "districtName": zod.string().nullable(),
213
- "subDistrictName": zod.string().nullable(),
214
- "zipCode": zod.string().nullable()
215
- }),
216
- "fullAddressText": zod.string().nullable(),
217
- "isActive": zod.boolean(),
218
- "createdAt": zod.string(),
219
- "updatedAt": zod.string()
220
- })
287
+ "phone": zod.string()
288
+ }),
289
+ "address": zod.object({
290
+ "addressId": zod.string(),
291
+ "destinationCode": zod.string().nullable(),
292
+ "provinceName": zod.string().nullable(),
293
+ "cityName": zod.string().nullable(),
294
+ "districtName": zod.string().nullable(),
295
+ "subDistrictName": zod.string().nullable(),
296
+ "zipCode": zod.string().nullable()
297
+ }),
298
+ "fullAddressText": zod.string().nullable(),
299
+ "isActive": zod.boolean(),
300
+ "createdAt": zod.string(),
301
+ "updatedAt": zod.string()
221
302
  });
303
+ export const listWarehousesResponse = zod.array(listWarehousesResponseItem);
222
304
  /**
223
305
  * Lists paginated stock movements with optional filtering by itemId, batchId, warehouseId, and sorting.
224
306
  * @summary List stock movements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arascreative/erp-client",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",