erpnext-queue-client 1.11.1 → 1.12.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,186 +1,7 @@
1
1
  import { z } from "zod";
2
- declare const DispatcherPresetFulfillerPriority: z.ZodObject<{
3
- name: z.ZodString;
4
- owner: z.ZodString;
5
- creation: z.ZodEffects<z.ZodDate, Date, unknown>;
6
- modified: z.ZodEffects<z.ZodDate, Date, unknown>;
7
- modified_by: z.ZodString;
8
- parent: z.ZodString;
9
- parentfield: z.ZodString;
10
- parenttype: z.ZodString;
11
- idx: z.ZodNumber;
12
- docstatus: z.ZodNumber;
13
- fulfiller: z.ZodString;
14
- doctype: z.ZodString;
15
- }, "strip", z.ZodTypeAny, {
16
- name: string;
17
- doctype: string;
18
- owner: string;
19
- creation: Date;
20
- modified: Date;
21
- modified_by: string;
22
- parent: string;
23
- parentfield: string;
24
- parenttype: string;
25
- idx: number;
26
- docstatus: number;
27
- fulfiller: string;
28
- }, {
29
- name: string;
30
- doctype: string;
31
- owner: string;
32
- modified_by: string;
33
- parent: string;
34
- parentfield: string;
35
- parenttype: string;
36
- idx: number;
37
- docstatus: number;
38
- fulfiller: string;
39
- creation?: unknown;
40
- modified?: unknown;
41
- }>;
42
- export type DispatcherPresetFulfillerPriorityType = z.infer<typeof DispatcherPresetFulfillerPriority>;
43
- export declare const ERPNextDispatcherPreset: z.ZodObject<{
44
- name: z.ZodString;
45
- owner: z.ZodString;
46
- creation: z.ZodEffects<z.ZodDate, Date, unknown>;
47
- modified: z.ZodEffects<z.ZodDate, Date, unknown>;
48
- modified_by: z.ZodString;
49
- idx: z.ZodNumber;
50
- docstatus: z.ZodNumber;
51
- is_active: z.ZodEffects<z.ZodNumber, boolean, number>;
52
- title: z.ZodString;
53
- fulfiller: z.ZodString;
54
- doctype: z.ZodString;
55
- is_simulation_mode: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
56
- fulfiller_priority: z.ZodArray<z.ZodObject<{
57
- name: z.ZodString;
58
- owner: z.ZodString;
59
- creation: z.ZodEffects<z.ZodDate, Date, unknown>;
60
- modified: z.ZodEffects<z.ZodDate, Date, unknown>;
61
- modified_by: z.ZodString;
62
- parent: z.ZodString;
63
- parentfield: z.ZodString;
64
- parenttype: z.ZodString;
65
- idx: z.ZodNumber;
66
- docstatus: z.ZodNumber;
67
- fulfiller: z.ZodString;
68
- doctype: z.ZodString;
69
- }, "strip", z.ZodTypeAny, {
70
- name: string;
71
- doctype: string;
72
- owner: string;
73
- creation: Date;
74
- modified: Date;
75
- modified_by: string;
76
- parent: string;
77
- parentfield: string;
78
- parenttype: string;
79
- idx: number;
80
- docstatus: number;
81
- fulfiller: string;
82
- }, {
83
- name: string;
84
- doctype: string;
85
- owner: string;
86
- modified_by: string;
87
- parent: string;
88
- parentfield: string;
89
- parenttype: string;
90
- idx: number;
91
- docstatus: number;
92
- fulfiller: string;
93
- creation?: unknown;
94
- modified?: unknown;
95
- }>, "many">;
96
- }, "strip", z.ZodTypeAny, {
97
- name: string;
98
- doctype: string;
99
- owner: string;
100
- creation: Date;
101
- modified: Date;
102
- modified_by: string;
103
- idx: number;
104
- docstatus: number;
105
- title: string;
106
- fulfiller: string;
107
- is_active: boolean;
108
- fulfiller_priority: {
109
- name: string;
110
- doctype: string;
111
- owner: string;
112
- creation: Date;
113
- modified: Date;
114
- modified_by: string;
115
- parent: string;
116
- parentfield: string;
117
- parenttype: string;
118
- idx: number;
119
- docstatus: number;
120
- fulfiller: string;
121
- }[];
122
- is_simulation_mode?: number | null | undefined;
123
- }, {
124
- name: string;
125
- doctype: string;
126
- owner: string;
127
- modified_by: string;
128
- idx: number;
129
- docstatus: number;
130
- title: string;
131
- fulfiller: string;
132
- is_active: number;
133
- fulfiller_priority: {
134
- name: string;
135
- doctype: string;
136
- owner: string;
137
- modified_by: string;
138
- parent: string;
139
- parentfield: string;
140
- parenttype: string;
141
- idx: number;
142
- docstatus: number;
143
- fulfiller: string;
144
- creation?: unknown;
145
- modified?: unknown;
146
- }[];
147
- creation?: unknown;
148
- modified?: unknown;
149
- is_simulation_mode?: number | null | undefined;
150
- }>;
151
- export type DispatcherPresetType = z.infer<typeof ERPNextDispatcherPreset>;
152
- export declare const ShipstormRunOptions: z.ZodObject<{
153
- dispatcherPresetId: z.ZodString;
154
- warehouseCategories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
155
- fulfillmentStation: z.ZodOptional<z.ZodString>;
156
- skus: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
157
- limit: z.ZodOptional<z.ZodNumber>;
158
- isAutoBundling: z.ZodBoolean;
159
- strategy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"multiOrder">, z.ZodLiteral<"singleOrder">]>>;
160
- orderNumber: z.ZodOptional<z.ZodString>;
161
- }, "strip", z.ZodTypeAny, {
162
- dispatcherPresetId: string;
163
- isAutoBundling: boolean;
164
- limit?: number | undefined;
165
- warehouseCategories?: string[] | undefined;
166
- fulfillmentStation?: string | undefined;
167
- skus?: string[] | undefined;
168
- strategy?: "multiOrder" | "singleOrder" | undefined;
169
- orderNumber?: string | undefined;
170
- }, {
171
- dispatcherPresetId: string;
172
- isAutoBundling: boolean;
173
- limit?: number | undefined;
174
- warehouseCategories?: string[] | undefined;
175
- fulfillmentStation?: string | undefined;
176
- skus?: string[] | undefined;
177
- strategy?: "multiOrder" | "singleOrder" | undefined;
178
- orderNumber?: string | undefined;
179
- }>;
180
- export type ShipstormRunOptionsType = z.infer<typeof ShipstormRunOptions>;
181
2
  export declare const Trigger: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"UI">, z.ZodLiteral<"API">]>, z.ZodLiteral<"API-TEST">]>, z.ZodLiteral<"REAL-DATA-TEST">]>, z.ZodLiteral<"SCHEDULE">]>;
182
3
  export type TriggerType = z.infer<typeof Trigger>;
183
- export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<Omit<{
4
+ export declare const DispatchRun: z.ZodObject<z.objectUtil.extendShape<Omit<{
184
5
  name: z.ZodString;
185
6
  owner: z.ZodString;
186
7
  creation: z.ZodEffects<z.ZodDate, Date, unknown>;
@@ -243,14 +64,27 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
243
64
  warehouse_category: string;
244
65
  }>, "many">>>;
245
66
  fulfillment_station: z.ZodNullable<z.ZodOptional<z.ZodString>>;
246
- items: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
67
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
68
+ item: z.ZodString;
69
+ }, "strip", z.ZodTypeAny, {
70
+ item: string;
71
+ }, {
72
+ item: string;
73
+ }>, "many">>;
247
74
  limit: z.ZodOptional<z.ZodNumber>;
248
75
  is_auto_bundling: z.ZodNumber;
249
76
  dispatcher_preset: z.ZodString;
250
77
  picking_strategy: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"Single Order">, z.ZodLiteral<"Multi Order">]>>>;
78
+ fulfiller_priority: z.ZodArray<z.ZodObject<{
79
+ fulfiller: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ fulfiller: string;
82
+ }, {
83
+ fulfiller: string;
84
+ }>, "many">;
251
85
  trigger: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"UI">, z.ZodLiteral<"API">]>, z.ZodLiteral<"API-TEST">]>, z.ZodLiteral<"REAL-DATA-TEST">]>, z.ZodLiteral<"SCHEDULE">]>;
252
86
  order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
253
- status: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"Processing">, z.ZodLiteral<"Failed">]>, z.ZodLiteral<"Completed">]>;
87
+ status: z.ZodDefault<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"Processing">, z.ZodLiteral<"Failed">]>, z.ZodLiteral<"Completed">]>>;
254
88
  }>, "strip", z.ZodTypeAny, {
255
89
  status: "Processing" | "Failed" | "Completed";
256
90
  name: string;
@@ -264,17 +98,6 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
264
98
  title: string;
265
99
  fulfiller: string;
266
100
  fulfiller_priority: {
267
- name: string;
268
- doctype: string;
269
- owner: string;
270
- creation: Date;
271
- modified: Date;
272
- modified_by: string;
273
- parent: string;
274
- parentfield: string;
275
- parenttype: string;
276
- idx: number;
277
- docstatus: number;
278
101
  fulfiller: string;
279
102
  }[];
280
103
  dispatch_run_id: string;
@@ -282,7 +105,9 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
282
105
  dispatcher_preset: string;
283
106
  trigger: "UI" | "API" | "API-TEST" | "REAL-DATA-TEST" | "SCHEDULE";
284
107
  limit?: number | undefined;
285
- items?: string[] | undefined;
108
+ items?: {
109
+ item: string;
110
+ }[] | undefined;
286
111
  is_simulation_mode?: number | null | undefined;
287
112
  warehouse_categories?: {
288
113
  warehouse_category: string;
@@ -291,7 +116,6 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
291
116
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
292
117
  order_number?: string | null | undefined;
293
118
  }, {
294
- status: "Processing" | "Failed" | "Completed";
295
119
  name: string;
296
120
  doctype: string;
297
121
  owner: string;
@@ -301,27 +125,19 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
301
125
  title: string;
302
126
  fulfiller: string;
303
127
  fulfiller_priority: {
304
- name: string;
305
- doctype: string;
306
- owner: string;
307
- modified_by: string;
308
- parent: string;
309
- parentfield: string;
310
- parenttype: string;
311
- idx: number;
312
- docstatus: number;
313
128
  fulfiller: string;
314
- creation?: unknown;
315
- modified?: unknown;
316
129
  }[];
317
130
  dispatch_run_id: string;
318
131
  is_auto_bundling: number;
319
132
  dispatcher_preset: string;
320
133
  trigger: "UI" | "API" | "API-TEST" | "REAL-DATA-TEST" | "SCHEDULE";
134
+ status?: "Processing" | "Failed" | "Completed" | undefined;
321
135
  limit?: number | undefined;
322
136
  creation?: unknown;
323
137
  modified?: unknown;
324
- items?: string[] | undefined;
138
+ items?: {
139
+ item: string;
140
+ }[] | undefined;
325
141
  is_simulation_mode?: number | null | undefined;
326
142
  warehouse_categories?: {
327
143
  warehouse_category: string;
@@ -330,8 +146,8 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
330
146
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
331
147
  order_number?: string | null | undefined;
332
148
  }>;
333
- export type ERPNextShipstormRunType = z.infer<typeof ERPNextShipstormRun>;
334
- export declare const ShipstormRun: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<Omit<{
149
+ export type DispatchRunType = z.infer<typeof DispatchRun>;
150
+ export declare const DispatchRunPostBody: z.ZodObject<Pick<z.objectUtil.extendShape<Omit<{
335
151
  name: z.ZodString;
336
152
  owner: z.ZodString;
337
153
  creation: z.ZodEffects<z.ZodDate, Date, unknown>;
@@ -394,136 +210,17 @@ export declare const ShipstormRun: z.ZodObject<z.objectUtil.extendShape<Omit<z.o
394
210
  warehouse_category: string;
395
211
  }>, "many">>>;
396
212
  fulfillment_station: z.ZodNullable<z.ZodOptional<z.ZodString>>;
397
- items: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
398
- limit: z.ZodOptional<z.ZodNumber>;
399
- is_auto_bundling: z.ZodNumber;
400
- dispatcher_preset: z.ZodString;
401
- picking_strategy: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"Single Order">, z.ZodLiteral<"Multi Order">]>>>;
402
- trigger: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"UI">, z.ZodLiteral<"API">]>, z.ZodLiteral<"API-TEST">]>, z.ZodLiteral<"REAL-DATA-TEST">]>, z.ZodLiteral<"SCHEDULE">]>;
403
- order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
404
- status: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"Processing">, z.ZodLiteral<"Failed">]>, z.ZodLiteral<"Completed">]>;
405
- }>, "name" | "doctype" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus">, {
406
- fulfiller_priority: z.ZodArray<z.ZodObject<{
407
- fulfiller: z.ZodString;
408
- }, "strip", z.ZodTypeAny, {
409
- fulfiller: string;
410
- }, {
411
- fulfiller: string;
412
- }>, "many">;
413
- }>, "strip", z.ZodTypeAny, {
414
- status: "Processing" | "Failed" | "Completed";
415
- title: string;
416
- fulfiller: string;
417
- fulfiller_priority: {
418
- fulfiller: string;
419
- }[];
420
- dispatch_run_id: string;
421
- is_auto_bundling: number;
422
- dispatcher_preset: string;
423
- trigger: "UI" | "API" | "API-TEST" | "REAL-DATA-TEST" | "SCHEDULE";
424
- limit?: number | undefined;
425
- items?: string[] | undefined;
426
- is_simulation_mode?: number | null | undefined;
427
- warehouse_categories?: {
428
- warehouse_category: string;
429
- }[] | null | undefined;
430
- fulfillment_station?: string | null | undefined;
431
- picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
432
- order_number?: string | null | undefined;
433
- }, {
434
- status: "Processing" | "Failed" | "Completed";
435
- title: string;
436
- fulfiller: string;
437
- fulfiller_priority: {
438
- fulfiller: string;
439
- }[];
440
- dispatch_run_id: string;
441
- is_auto_bundling: number;
442
- dispatcher_preset: string;
443
- trigger: "UI" | "API" | "API-TEST" | "REAL-DATA-TEST" | "SCHEDULE";
444
- limit?: number | undefined;
445
- items?: string[] | undefined;
446
- is_simulation_mode?: number | null | undefined;
447
- warehouse_categories?: {
448
- warehouse_category: string;
449
- }[] | null | undefined;
450
- fulfillment_station?: string | null | undefined;
451
- picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
452
- order_number?: string | null | undefined;
453
- }>;
454
- export type ShipstormRunType = z.infer<typeof ShipstormRun>;
455
- export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extendShape<Pick<z.objectUtil.extendShape<Omit<{
456
- name: z.ZodString;
457
- owner: z.ZodString;
458
- creation: z.ZodEffects<z.ZodDate, Date, unknown>;
459
- modified: z.ZodEffects<z.ZodDate, Date, unknown>;
460
- modified_by: z.ZodString;
461
- idx: z.ZodNumber;
462
- docstatus: z.ZodNumber;
463
- is_active: z.ZodEffects<z.ZodNumber, boolean, number>;
464
- title: z.ZodString;
465
- fulfiller: z.ZodString;
466
- doctype: z.ZodString;
467
- is_simulation_mode: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
468
- fulfiller_priority: z.ZodArray<z.ZodObject<{
469
- name: z.ZodString;
470
- owner: z.ZodString;
471
- creation: z.ZodEffects<z.ZodDate, Date, unknown>;
472
- modified: z.ZodEffects<z.ZodDate, Date, unknown>;
473
- modified_by: z.ZodString;
474
- parent: z.ZodString;
475
- parentfield: z.ZodString;
476
- parenttype: z.ZodString;
477
- idx: z.ZodNumber;
478
- docstatus: z.ZodNumber;
479
- fulfiller: z.ZodString;
480
- doctype: z.ZodString;
481
- }, "strip", z.ZodTypeAny, {
482
- name: string;
483
- doctype: string;
484
- owner: string;
485
- creation: Date;
486
- modified: Date;
487
- modified_by: string;
488
- parent: string;
489
- parentfield: string;
490
- parenttype: string;
491
- idx: number;
492
- docstatus: number;
493
- fulfiller: string;
494
- }, {
495
- name: string;
496
- doctype: string;
497
- owner: string;
498
- modified_by: string;
499
- parent: string;
500
- parentfield: string;
501
- parenttype: string;
502
- idx: number;
503
- docstatus: number;
504
- fulfiller: string;
505
- creation?: unknown;
506
- modified?: unknown;
507
- }>, "many">;
508
- }, "is_active">, {
509
- dispatch_run_id: z.ZodString;
510
- warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
511
- warehouse_category: z.ZodString;
213
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
214
+ item: z.ZodString;
512
215
  }, "strip", z.ZodTypeAny, {
513
- warehouse_category: string;
216
+ item: string;
514
217
  }, {
515
- warehouse_category: string;
516
- }>, "many">>>;
517
- fulfillment_station: z.ZodNullable<z.ZodOptional<z.ZodString>>;
518
- items: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
218
+ item: string;
219
+ }>, "many">>;
519
220
  limit: z.ZodOptional<z.ZodNumber>;
520
221
  is_auto_bundling: z.ZodNumber;
521
222
  dispatcher_preset: z.ZodString;
522
223
  picking_strategy: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"Single Order">, z.ZodLiteral<"Multi Order">]>>>;
523
- trigger: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"UI">, z.ZodLiteral<"API">]>, z.ZodLiteral<"API-TEST">]>, z.ZodLiteral<"REAL-DATA-TEST">]>, z.ZodLiteral<"SCHEDULE">]>;
524
- order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
525
- status: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"Processing">, z.ZodLiteral<"Failed">]>, z.ZodLiteral<"Completed">]>;
526
- }>, "limit" | "items" | "title" | "fulfiller" | "is_auto_bundling" | "dispatcher_preset" | "picking_strategy" | "trigger">, {
527
224
  fulfiller_priority: z.ZodArray<z.ZodObject<{
528
225
  fulfiller: z.ZodString;
529
226
  }, "strip", z.ZodTypeAny, {
@@ -531,21 +228,10 @@ export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extend
531
228
  }, {
532
229
  fulfiller: string;
533
230
  }>, "many">;
534
- items: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
535
- item: z.ZodString;
536
- }, "strip", z.ZodTypeAny, {
537
- item: string;
538
- }, {
539
- item: string;
540
- }>, "many">>>;
541
- warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
542
- warehouse_category: z.ZodString;
543
- }, "strip", z.ZodTypeAny, {
544
- warehouse_category: string;
545
- }, {
546
- warehouse_category: string;
547
- }>, "many">>>;
548
- }>, "strip", z.ZodTypeAny, {
231
+ trigger: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"UI">, z.ZodLiteral<"API">]>, z.ZodLiteral<"API-TEST">]>, z.ZodLiteral<"REAL-DATA-TEST">]>, z.ZodLiteral<"SCHEDULE">]>;
232
+ order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
233
+ status: z.ZodDefault<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"Processing">, z.ZodLiteral<"Failed">]>, z.ZodLiteral<"Completed">]>>;
234
+ }>, "limit" | "items" | "title" | "fulfiller" | "fulfiller_priority" | "warehouse_categories" | "is_auto_bundling" | "dispatcher_preset" | "picking_strategy" | "trigger">, "strip", z.ZodTypeAny, {
549
235
  title: string;
550
236
  fulfiller: string;
551
237
  fulfiller_priority: {
@@ -557,7 +243,7 @@ export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extend
557
243
  limit?: number | undefined;
558
244
  items?: {
559
245
  item: string;
560
- }[] | null | undefined;
246
+ }[] | undefined;
561
247
  warehouse_categories?: {
562
248
  warehouse_category: string;
563
249
  }[] | null | undefined;
@@ -574,13 +260,13 @@ export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extend
574
260
  limit?: number | undefined;
575
261
  items?: {
576
262
  item: string;
577
- }[] | null | undefined;
263
+ }[] | undefined;
578
264
  warehouse_categories?: {
579
265
  warehouse_category: string;
580
266
  }[] | null | undefined;
581
267
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
582
268
  }>;
583
- export type ERPNextDispatchRunPostBodyType = z.infer<typeof ERPNextDispatchRunPostBody>;
269
+ export type DispatchRunPostBodyType = z.infer<typeof DispatchRunPostBody>;
584
270
  export declare const DispatchRunPostFilteredResponse: z.ZodObject<{
585
271
  name: z.ZodString;
586
272
  }, "strip", z.ZodTypeAny, {
@@ -588,132 +274,6 @@ export declare const DispatchRunPostFilteredResponse: z.ZodObject<{
588
274
  }, {
589
275
  name: string;
590
276
  }>;
591
- export declare const DispatchRun: z.ZodObject<{
592
- name: z.ZodString;
593
- owner: z.ZodString;
594
- creation: z.ZodEffects<z.ZodString, Date, string>;
595
- modified: z.ZodEffects<z.ZodString, Date, string>;
596
- modified_by: z.ZodString;
597
- idx: z.ZodNumber;
598
- docstatus: z.ZodNumber;
599
- title: z.ZodString;
600
- fulfiller: z.ZodString;
601
- picking_strategy: z.ZodString;
602
- limit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
603
- items: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
604
- warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
605
- trigger: z.ZodString;
606
- doctype: z.ZodString;
607
- fulfiller_priority: z.ZodArray<z.ZodObject<{
608
- name: z.ZodString;
609
- owner: z.ZodString;
610
- creation: z.ZodEffects<z.ZodString, Date, string>;
611
- modified: z.ZodEffects<z.ZodString, Date, string>;
612
- modified_by: z.ZodString;
613
- parent: z.ZodString;
614
- parentfield: z.ZodString;
615
- parenttype: z.ZodString;
616
- idx: z.ZodNumber;
617
- docstatus: z.ZodNumber;
618
- fulfiller: z.ZodString;
619
- doctype: z.ZodString;
620
- }, "strip", z.ZodTypeAny, {
621
- name: string;
622
- doctype: string;
623
- owner: string;
624
- creation: Date;
625
- modified: Date;
626
- modified_by: string;
627
- parent: string;
628
- parentfield: string;
629
- parenttype: string;
630
- idx: number;
631
- docstatus: number;
632
- fulfiller: string;
633
- }, {
634
- name: string;
635
- doctype: string;
636
- owner: string;
637
- creation: string;
638
- modified: string;
639
- modified_by: string;
640
- parent: string;
641
- parentfield: string;
642
- parenttype: string;
643
- idx: number;
644
- docstatus: number;
645
- fulfiller: string;
646
- }>, "many">;
647
- is_auto_bundling: z.ZodEffects<z.ZodNumber, boolean, number>;
648
- dispatcher_preset: z.ZodString;
649
- is_simulation_mode: z.ZodNumber;
650
- }, "strip", z.ZodTypeAny, {
651
- name: string;
652
- doctype: string;
653
- owner: string;
654
- creation: Date;
655
- modified: Date;
656
- modified_by: string;
657
- idx: number;
658
- docstatus: number;
659
- title: string;
660
- fulfiller: string;
661
- is_simulation_mode: number;
662
- fulfiller_priority: {
663
- name: string;
664
- doctype: string;
665
- owner: string;
666
- creation: Date;
667
- modified: Date;
668
- modified_by: string;
669
- parent: string;
670
- parentfield: string;
671
- parenttype: string;
672
- idx: number;
673
- docstatus: number;
674
- fulfiller: string;
675
- }[];
676
- is_auto_bundling: boolean;
677
- dispatcher_preset: string;
678
- picking_strategy: string;
679
- trigger: string;
680
- limit?: number | null | undefined;
681
- items?: string[] | null | undefined;
682
- warehouse_categories?: string[] | null | undefined;
683
- }, {
684
- name: string;
685
- doctype: string;
686
- owner: string;
687
- creation: string;
688
- modified: string;
689
- modified_by: string;
690
- idx: number;
691
- docstatus: number;
692
- title: string;
693
- fulfiller: string;
694
- is_simulation_mode: number;
695
- fulfiller_priority: {
696
- name: string;
697
- doctype: string;
698
- owner: string;
699
- creation: string;
700
- modified: string;
701
- modified_by: string;
702
- parent: string;
703
- parentfield: string;
704
- parenttype: string;
705
- idx: number;
706
- docstatus: number;
707
- fulfiller: string;
708
- }[];
709
- is_auto_bundling: number;
710
- dispatcher_preset: string;
711
- picking_strategy: string;
712
- trigger: string;
713
- limit?: number | null | undefined;
714
- items?: string[] | null | undefined;
715
- warehouse_categories?: string[] | null | undefined;
716
- }>;
717
277
  export declare const DispatchRunMatchesByOrderNumber: z.ZodArray<z.ZodObject<{
718
278
  name: z.ZodString;
719
279
  picking_strategy: z.ZodString;
@@ -733,5 +293,4 @@ export declare const DispatchRunMatchesByOrderNumber: z.ZodArray<z.ZodObject<{
733
293
  picking_strategy: string;
734
294
  order_number: string;
735
295
  }>, "many">;
736
- export type DispatchRunType = z.infer<typeof DispatchRun>;
737
- export {};
296
+ export type DispatchRunMatchesByOrderNumberType = z.infer<typeof DispatchRunMatchesByOrderNumber>;
@@ -1,55 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DispatchRunMatchesByOrderNumber = exports.DispatchRun = exports.DispatchRunPostFilteredResponse = exports.ERPNextDispatchRunPostBody = exports.ShipstormRun = exports.ERPNextShipstormRun = exports.Trigger = exports.ShipstormRunOptions = exports.ERPNextDispatcherPreset = void 0;
3
+ exports.DispatchRunMatchesByOrderNumber = exports.DispatchRunPostFilteredResponse = exports.DispatchRunPostBody = exports.DispatchRun = exports.Trigger = void 0;
4
4
  const zod_1 = require("zod");
5
- const DateSchema_1 = require("./DateSchema");
6
- // A shipstormRun has ERPNextDispatcherPreset data AND the shipstorm run options
7
- // Dispatch Run Response from ERPNext
8
- const DispatcherPresetFulfillerPriority = zod_1.z.object({
9
- name: zod_1.z.string(),
10
- owner: zod_1.z.string(),
11
- creation: DateSchema_1.dateSchema,
12
- modified: DateSchema_1.dateSchema,
13
- modified_by: zod_1.z.string(),
14
- parent: zod_1.z.string(),
15
- parentfield: zod_1.z.string(),
16
- parenttype: zod_1.z.string(),
17
- idx: zod_1.z.number().int(),
18
- docstatus: zod_1.z.number().int(),
19
- fulfiller: zod_1.z.string(),
20
- doctype: zod_1.z.string(),
21
- });
22
- // Dispatcher Preset Response from ERPNext
23
- exports.ERPNextDispatcherPreset = zod_1.z
24
- .object({
25
- name: zod_1.z.string(),
26
- owner: zod_1.z.string(),
27
- creation: DateSchema_1.dateSchema,
28
- modified: DateSchema_1.dateSchema,
29
- modified_by: zod_1.z.string(),
30
- idx: zod_1.z.number().int(),
31
- docstatus: zod_1.z.number().int(),
32
- is_active: zod_1.z.number().transform(Boolean),
33
- title: zod_1.z.string(),
34
- fulfiller: zod_1.z.string(),
35
- doctype: zod_1.z.string(),
36
- is_simulation_mode: zod_1.z.number().optional().nullable(),
37
- fulfiller_priority: zod_1.z.array(DispatcherPresetFulfillerPriority),
38
- })
39
- .describe("ERPNextDispatcherPreset");
40
- // Options needed to create a shipstorm run
41
- exports.ShipstormRunOptions = zod_1.z
42
- .object({
43
- dispatcherPresetId: zod_1.z.string(),
44
- warehouseCategories: zod_1.z.array(zod_1.z.string()).min(0).optional(),
45
- fulfillmentStation: zod_1.z.string().optional(),
46
- skus: zod_1.z.array(zod_1.z.string()).min(0).optional(),
47
- limit: zod_1.z.number().min(1).optional(),
48
- isAutoBundling: zod_1.z.boolean(),
49
- strategy: zod_1.z.literal("multiOrder").or(zod_1.z.literal("singleOrder")).optional(),
50
- orderNumber: zod_1.z.string().optional(),
51
- })
52
- .describe("ShipstormRunOptions");
5
+ const DispatcherPreset_1 = require("./DispatcherPreset");
53
6
  exports.Trigger = zod_1.z
54
7
  .literal("UI")
55
8
  .or(zod_1.z.literal("API"))
@@ -57,7 +10,7 @@ exports.Trigger = zod_1.z
57
10
  .or(zod_1.z.literal("REAL-DATA-TEST"))
58
11
  .or(zod_1.z.literal("SCHEDULE"));
59
12
  // A shipstormRun has ERPNextDispatcherPreset data AND the shipstorm run options
60
- exports.ERPNextShipstormRun = exports.ERPNextDispatcherPreset.omit({
13
+ exports.DispatchRun = DispatcherPreset_1.DispatcherPreset.omit({
61
14
  is_active: true,
62
15
  })
63
16
  .merge(zod_1.z.object({
@@ -68,7 +21,10 @@ exports.ERPNextShipstormRun = exports.ERPNextDispatcherPreset.omit({
68
21
  .optional()
69
22
  .nullable(),
70
23
  fulfillment_station: zod_1.z.string().optional().nullable(),
71
- items: zod_1.z.array(zod_1.z.string()).min(0).optional(),
24
+ items: zod_1.z
25
+ .array(zod_1.z.object({ item: zod_1.z.string() }))
26
+ .min(0)
27
+ .optional(),
72
28
  limit: zod_1.z.number().optional(),
73
29
  is_auto_bundling: zod_1.z.number(),
74
30
  dispatcher_preset: zod_1.z.string(),
@@ -77,29 +33,19 @@ exports.ERPNextShipstormRun = exports.ERPNextDispatcherPreset.omit({
77
33
  .or(zod_1.z.literal("Multi Order"))
78
34
  .optional()
79
35
  .nullable(),
36
+ fulfiller_priority: zod_1.z.array(zod_1.z.object({
37
+ fulfiller: zod_1.z.string(),
38
+ })),
80
39
  trigger: exports.Trigger,
81
40
  order_number: zod_1.z.string().optional().nullable(),
82
41
  status: zod_1.z
83
42
  .literal("Processing")
84
43
  .or(zod_1.z.literal("Failed"))
85
- .or(zod_1.z.literal("Completed")),
44
+ .or(zod_1.z.literal("Completed"))
45
+ .default("Processing"),
86
46
  }))
87
- .describe("ShipstormRun");
88
- exports.ShipstormRun = exports.ERPNextShipstormRun.omit({
89
- name: true,
90
- creation: true,
91
- docstatus: true,
92
- doctype: true,
93
- idx: true,
94
- modified: true,
95
- modified_by: true,
96
- owner: true,
97
- }).extend({
98
- fulfiller_priority: zod_1.z.array(zod_1.z.object({
99
- fulfiller: zod_1.z.string(),
100
- })),
101
- });
102
- exports.ERPNextDispatchRunPostBody = exports.ERPNextShipstormRun.pick({
47
+ .describe("DispatchRun");
48
+ exports.DispatchRunPostBody = exports.DispatchRun.pick({
103
49
  fulfiller: true,
104
50
  trigger: true,
105
51
  picking_strategy: true,
@@ -108,25 +54,9 @@ exports.ERPNextDispatchRunPostBody = exports.ERPNextShipstormRun.pick({
108
54
  limit: true,
109
55
  title: true,
110
56
  dispatcher_preset: true,
111
- })
112
- .merge(zod_1.z.object({
113
- fulfiller_priority: zod_1.z.array(zod_1.z.object({
114
- fulfiller: zod_1.z.string(),
115
- })),
116
- items: zod_1.z
117
- .array(zod_1.z.object({
118
- item: zod_1.z.string(),
119
- }))
120
- .optional()
121
- .nullable(),
122
- warehouse_categories: zod_1.z
123
- .array(zod_1.z.object({
124
- warehouse_category: zod_1.z.string(),
125
- }))
126
- .optional()
127
- .nullable(),
128
- }))
129
- .describe("ERPNextDispatchRunPostBody");
57
+ fulfiller_priority: true,
58
+ warehouse_categories: true,
59
+ }).describe("DispatchRunPostBody");
130
60
  exports.DispatchRunPostFilteredResponse = zod_1.z
131
61
  .object({
132
62
  name: zod_1.z.string(),
@@ -148,29 +78,6 @@ const FulfillerPriority = zod_1.z
148
78
  doctype: zod_1.z.string(),
149
79
  })
150
80
  .describe("WarehousePriority");
151
- exports.DispatchRun = zod_1.z
152
- .object({
153
- name: zod_1.z.string(),
154
- owner: zod_1.z.string(),
155
- creation: zod_1.z.string().transform((i) => new Date(i)),
156
- modified: zod_1.z.string().transform((i) => new Date(i)),
157
- modified_by: zod_1.z.string(),
158
- idx: zod_1.z.number(),
159
- docstatus: zod_1.z.number(),
160
- title: zod_1.z.string(),
161
- fulfiller: zod_1.z.string(),
162
- picking_strategy: zod_1.z.string(),
163
- limit: zod_1.z.number().optional().nullable(),
164
- items: zod_1.z.array(zod_1.z.string()).min(0).optional().nullable(),
165
- warehouse_categories: zod_1.z.array(zod_1.z.string()).min(0).optional().nullable(),
166
- trigger: zod_1.z.string(),
167
- doctype: zod_1.z.string(),
168
- fulfiller_priority: zod_1.z.array(FulfillerPriority),
169
- is_auto_bundling: zod_1.z.number().transform(Boolean),
170
- dispatcher_preset: zod_1.z.string(),
171
- is_simulation_mode: zod_1.z.number(),
172
- })
173
- .describe("DispatchRun");
174
81
  exports.DispatchRunMatchesByOrderNumber = zod_1.z
175
82
  .array(zod_1.z.object({
176
83
  name: zod_1.z.string(),
@@ -40,7 +40,7 @@ declare const DispatcherPresetFulfillerPriority: z.ZodObject<{
40
40
  modified?: unknown;
41
41
  }>;
42
42
  export type DispatcherPresetFulfillerPriorityType = z.infer<typeof DispatcherPresetFulfillerPriority>;
43
- export declare const ERPNextDispatcherPreset: z.ZodObject<{
43
+ export declare const DispatcherPreset: z.ZodObject<{
44
44
  name: z.ZodString;
45
45
  owner: z.ZodString;
46
46
  creation: z.ZodEffects<z.ZodDate, Date, unknown>;
@@ -148,8 +148,8 @@ export declare const ERPNextDispatcherPreset: z.ZodObject<{
148
148
  modified?: unknown;
149
149
  is_simulation_mode?: number | null | undefined;
150
150
  }>;
151
- export type DispatcherPresetType = z.infer<typeof ERPNextDispatcherPreset>;
152
- export declare const ERPNextDispatcherPresetList: z.ZodArray<z.ZodObject<{
151
+ export type DispatcherPresetType = z.infer<typeof DispatcherPreset>;
152
+ export declare const DispatcherPresetList: z.ZodArray<z.ZodObject<{
153
153
  name: z.ZodString;
154
154
  }, "strip", z.ZodTypeAny, {
155
155
  name: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ERPNextDispatcherPresetList = exports.ERPNextDispatcherPreset = void 0;
3
+ exports.DispatcherPresetList = exports.DispatcherPreset = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const DateSchema_1 = require("./DateSchema");
6
6
  const DispatcherPresetFulfillerPriority = zod_1.z.object({
@@ -18,7 +18,7 @@ const DispatcherPresetFulfillerPriority = zod_1.z.object({
18
18
  doctype: zod_1.z.string(),
19
19
  });
20
20
  // Dispatcher Preset Response from ERPNext
21
- exports.ERPNextDispatcherPreset = zod_1.z
21
+ exports.DispatcherPreset = zod_1.z
22
22
  .object({
23
23
  name: zod_1.z.string(),
24
24
  owner: zod_1.z.string(),
@@ -34,10 +34,10 @@ exports.ERPNextDispatcherPreset = zod_1.z
34
34
  is_simulation_mode: zod_1.z.number().optional().nullable(),
35
35
  fulfiller_priority: zod_1.z.array(DispatcherPresetFulfillerPriority),
36
36
  })
37
- .describe("ERPNextDispatcherPreset");
37
+ .describe("DispatcherPreset");
38
38
  // Dispatcher Preset Response from ERPNext
39
- exports.ERPNextDispatcherPresetList = zod_1.z
39
+ exports.DispatcherPresetList = zod_1.z
40
40
  .array(zod_1.z.object({
41
41
  name: zod_1.z.string(),
42
42
  }))
43
- .describe("ERPNextDispatcherPresetList");
43
+ .describe("DispatcherPresetList");
@@ -88,9 +88,9 @@ export declare const FulfillerShippingSettingsWithSkus: z.ZodArray<z.ZodObject<z
88
88
  shipping_provider: string;
89
89
  fulfiller: string;
90
90
  is_active: boolean;
91
- skus: string[];
92
91
  is_ship_individually: boolean;
93
92
  bundle_size: number;
93
+ skus: string[];
94
94
  can_be_bundled_with?: string | null | undefined;
95
95
  bundle_type?: "Inside box" | "Outside box" | null | undefined;
96
96
  max_bundle_with_amount?: number | null | undefined;
@@ -100,9 +100,9 @@ export declare const FulfillerShippingSettingsWithSkus: z.ZodArray<z.ZodObject<z
100
100
  shipping_provider: string;
101
101
  fulfiller: string;
102
102
  is_active: number;
103
- skus: string[];
104
103
  is_ship_individually: number;
105
104
  bundle_size: number;
105
+ skus: string[];
106
106
  can_be_bundled_with?: string | null | undefined;
107
107
  bundle_type?: "Inside box" | "Outside box" | null | undefined;
108
108
  max_bundle_with_amount?: number | null | undefined;
@@ -75,7 +75,7 @@ function request(options) {
75
75
  ? { body: stringifiedBody !== null && stringifiedBody !== void 0 ? stringifiedBody : validatedBody }
76
76
  : {}));
77
77
  // Log requests
78
- logger_1.lg.info(`${options.method}${url}`);
78
+ logger_1.lg.info(`${options.method}: ${url}`);
79
79
  // Wrap fetch
80
80
  const response = yield fetch(url, convertedOptions);
81
81
  const { status, url: requestUrl, statusText, ok } = response;
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "winston": "^3.15.0",
26
26
  "zod": "3.24.1"
27
27
  },
28
- "version": "1.11.1",
28
+ "version": "1.12.0",
29
29
  "devDependencies": {
30
30
  "@types/crypto-js": "^4.2.2",
31
31
  "@types/lodash": "^4.17.13",