erpnext-queue-client 1.10.0 → 1.10.2

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.
@@ -28,10 +28,11 @@ export declare class ERPNextDoctypeResourceRequest<TModel extends ZodObject<any>
28
28
  priority?: number;
29
29
  body: TInput;
30
30
  }): Promise<z.TypeOf<TModel>>;
31
- create<TInput extends TInputModel extends undefined ? Partial<z.TypeOf<TModel>> : TInputModel extends ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends ZodTypeAny | undefined = undefined>({ inputValidationModel, body, priority, }: {
31
+ create<TInput extends TInputModel extends undefined ? Partial<z.TypeOf<TModel>> : TInputModel extends ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends ZodTypeAny | undefined = undefined>({ inputValidationModel, body, params, priority, }: {
32
32
  inputValidationModel?: TInputModel;
33
- priority?: number;
34
33
  body: TInput;
34
+ params?: Record<string, string>;
35
+ priority?: number;
35
36
  }): Promise<z.TypeOf<TModel>>;
36
37
  deleteById({ resourceId, priority, }: {
37
38
  resourceId: string;
@@ -40,9 +40,9 @@ class ERPNextDoctypeResourceRequest {
40
40
  });
41
41
  }
42
42
  create(_a) {
43
- return __awaiter(this, arguments, void 0, function* ({ inputValidationModel, body, priority = 5, }) {
44
- return yield this.baseRequest.create(Object.assign(Object.assign({ resourceName: this.resourceName }, (inputValidationModel ? { inputValidationModel } : {})), { resourceModel: this.resourceModel, body,
45
- priority }));
43
+ return __awaiter(this, arguments, void 0, function* ({ inputValidationModel, body, params, priority = 5, }) {
44
+ return yield this.baseRequest.create(Object.assign(Object.assign(Object.assign({ resourceName: this.resourceName }, (inputValidationModel ? { inputValidationModel } : {})), { resourceModel: this.resourceModel, body,
45
+ priority }), (params ? { params } : {})));
46
46
  });
47
47
  }
48
48
  deleteById(_a) {
@@ -195,10 +195,11 @@ export declare class ERPNextDeliveryNote {
195
195
  auto_repeat?: string | null | undefined;
196
196
  sales_partner?: string | null | undefined;
197
197
  dispatch_run?: string | null | undefined;
198
- }> : TInputModel extends import("zod").ZodTypeAny ? import("zod").TypeOf<TInputModel> : any, TInputModel extends import("zod").ZodTypeAny | undefined = undefined>({ inputValidationModel, body, priority, }: {
198
+ }> : TInputModel extends import("zod").ZodTypeAny ? import("zod").TypeOf<TInputModel> : any, TInputModel extends import("zod").ZodTypeAny | undefined = undefined>({ inputValidationModel, body, params, priority, }: {
199
199
  inputValidationModel?: TInputModel;
200
- priority?: number;
201
200
  body: TInput;
201
+ params?: Record<string, string>;
202
+ priority?: number;
202
203
  }) => Promise<{
203
204
  status: string;
204
205
  name: string;
@@ -686,10 +686,11 @@ export declare class ERPNextItem {
686
686
  custom_product_version?: string | null | undefined;
687
687
  custom_supplier?: string | null | undefined;
688
688
  custom_stock_reserve?: number | null | undefined;
689
- }> : TInputModel extends z.ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends z.ZodTypeAny | undefined = undefined>({ inputValidationModel, body, priority, }: {
689
+ }> : TInputModel extends z.ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends z.ZodTypeAny | undefined = undefined>({ inputValidationModel, body, params, priority, }: {
690
690
  inputValidationModel?: TInputModel;
691
- priority?: number;
692
691
  body: TInput;
692
+ params?: Record<string, string>;
693
+ priority?: number;
693
694
  }) => Promise<{
694
695
  description: string;
695
696
  name: string;
@@ -504,10 +504,11 @@ export declare class ERPNextShipment {
504
504
  custom_return_shipping_provider?: string | null | undefined;
505
505
  tracking_status_info?: string | null | undefined;
506
506
  tracking_url?: string | null | undefined;
507
- }> : TInputModel extends import("zod").ZodTypeAny ? import("zod").TypeOf<TInputModel> : any, TInputModel extends import("zod").ZodTypeAny | undefined = undefined>({ inputValidationModel, body, priority, }: {
507
+ }> : TInputModel extends import("zod").ZodTypeAny ? import("zod").TypeOf<TInputModel> : any, TInputModel extends import("zod").ZodTypeAny | undefined = undefined>({ inputValidationModel, body, params, priority, }: {
508
508
  inputValidationModel?: TInputModel;
509
- priority?: number;
510
509
  body: TInput;
510
+ params?: Record<string, string>;
511
+ priority?: number;
511
512
  }) => Promise<{
512
513
  status: string;
513
514
  name: string;
@@ -520,26 +520,3 @@ export declare const ContactListName: z.ZodArray<z.ZodObject<Pick<{
520
520
  }>, "many">;
521
521
  export type ContactType = z.infer<typeof Contact>;
522
522
  export type ContactListNameType = z.infer<typeof ContactListName>;
523
- export declare const ShipstormContact: z.ZodObject<{
524
- first_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
525
- last_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
526
- company: z.ZodNullable<z.ZodOptional<z.ZodString>>;
527
- email_id: z.ZodString;
528
- phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
529
- mobile_no: z.ZodNullable<z.ZodOptional<z.ZodString>>;
530
- }, "strip", z.ZodTypeAny, {
531
- email_id: string;
532
- phone?: string | null | undefined;
533
- company?: string | null | undefined;
534
- first_name?: string | null | undefined;
535
- last_name?: string | null | undefined;
536
- mobile_no?: string | null | undefined;
537
- }, {
538
- email_id: string;
539
- phone?: string | null | undefined;
540
- company?: string | null | undefined;
541
- first_name?: string | null | undefined;
542
- last_name?: string | null | undefined;
543
- mobile_no?: string | null | undefined;
544
- }>;
545
- export type ShipstormContactType = z.infer<typeof ShipstormContact>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShipstormContact = exports.ContactListName = exports.Contact = exports.ContactPostBody = exports.DynamicLinkPostBody = void 0;
3
+ exports.ContactListName = exports.Contact = exports.ContactPostBody = exports.DynamicLinkPostBody = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.DynamicLinkPostBody = zod_1.z
6
6
  .object({
@@ -106,13 +106,3 @@ exports.ContactListName = zod_1.z
106
106
  name: true,
107
107
  }))
108
108
  .describe("ContactListName");
109
- exports.ShipstormContact = zod_1.z
110
- .object({
111
- first_name: zod_1.z.string().optional().nullable(),
112
- last_name: zod_1.z.string().optional().nullable(),
113
- company: zod_1.z.string().optional().nullable(),
114
- email_id: zod_1.z.string(),
115
- phone: zod_1.z.string().optional().nullable(),
116
- mobile_no: zod_1.z.string().optional().nullable(),
117
- })
118
- .describe("Contact ShipstormContact");
@@ -235,7 +235,13 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
235
235
  }>, "many">;
236
236
  }, "is_active">, {
237
237
  dispatch_run_id: z.ZodString;
238
- warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
238
+ warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
239
+ warehouse_category: z.ZodString;
240
+ }, "strip", z.ZodTypeAny, {
241
+ warehouse_category: string;
242
+ }, {
243
+ warehouse_category: string;
244
+ }>, "many">>>;
239
245
  fulfillment_station: z.ZodNullable<z.ZodOptional<z.ZodString>>;
240
246
  items: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
241
247
  limit: z.ZodOptional<z.ZodNumber>;
@@ -278,7 +284,9 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
278
284
  limit?: number | undefined;
279
285
  items?: string[] | undefined;
280
286
  is_simulation_mode?: number | null | undefined;
281
- warehouse_categories?: string[] | null | undefined;
287
+ warehouse_categories?: {
288
+ warehouse_category: string;
289
+ }[] | null | undefined;
282
290
  fulfillment_station?: string | null | undefined;
283
291
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
284
292
  order_number?: string | null | undefined;
@@ -315,7 +323,9 @@ export declare const ERPNextShipstormRun: z.ZodObject<z.objectUtil.extendShape<O
315
323
  modified?: unknown;
316
324
  items?: string[] | undefined;
317
325
  is_simulation_mode?: number | null | undefined;
318
- warehouse_categories?: string[] | null | undefined;
326
+ warehouse_categories?: {
327
+ warehouse_category: string;
328
+ }[] | null | undefined;
319
329
  fulfillment_station?: string | null | undefined;
320
330
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
321
331
  order_number?: string | null | undefined;
@@ -376,7 +386,13 @@ export declare const ShipstormRun: z.ZodObject<z.objectUtil.extendShape<Omit<z.o
376
386
  }>, "many">;
377
387
  }, "is_active">, {
378
388
  dispatch_run_id: z.ZodString;
379
- warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
389
+ warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
390
+ warehouse_category: z.ZodString;
391
+ }, "strip", z.ZodTypeAny, {
392
+ warehouse_category: string;
393
+ }, {
394
+ warehouse_category: string;
395
+ }>, "many">>>;
380
396
  fulfillment_station: z.ZodNullable<z.ZodOptional<z.ZodString>>;
381
397
  items: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
382
398
  limit: z.ZodOptional<z.ZodNumber>;
@@ -408,7 +424,9 @@ export declare const ShipstormRun: z.ZodObject<z.objectUtil.extendShape<Omit<z.o
408
424
  limit?: number | undefined;
409
425
  items?: string[] | undefined;
410
426
  is_simulation_mode?: number | null | undefined;
411
- warehouse_categories?: string[] | null | undefined;
427
+ warehouse_categories?: {
428
+ warehouse_category: string;
429
+ }[] | null | undefined;
412
430
  fulfillment_station?: string | null | undefined;
413
431
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
414
432
  order_number?: string | null | undefined;
@@ -426,7 +444,9 @@ export declare const ShipstormRun: z.ZodObject<z.objectUtil.extendShape<Omit<z.o
426
444
  limit?: number | undefined;
427
445
  items?: string[] | undefined;
428
446
  is_simulation_mode?: number | null | undefined;
429
- warehouse_categories?: string[] | null | undefined;
447
+ warehouse_categories?: {
448
+ warehouse_category: string;
449
+ }[] | null | undefined;
430
450
  fulfillment_station?: string | null | undefined;
431
451
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
432
452
  order_number?: string | null | undefined;
@@ -487,7 +507,13 @@ export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extend
487
507
  }>, "many">;
488
508
  }, "is_active">, {
489
509
  dispatch_run_id: z.ZodString;
490
- warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
510
+ warehouse_categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
511
+ warehouse_category: z.ZodString;
512
+ }, "strip", z.ZodTypeAny, {
513
+ warehouse_category: string;
514
+ }, {
515
+ warehouse_category: string;
516
+ }>, "many">>>;
491
517
  fulfillment_station: z.ZodNullable<z.ZodOptional<z.ZodString>>;
492
518
  items: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
493
519
  limit: z.ZodOptional<z.ZodNumber>;
@@ -497,7 +523,7 @@ export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extend
497
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">]>;
498
524
  order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
499
525
  status: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"Processing">, z.ZodLiteral<"Failed">]>, z.ZodLiteral<"Completed">]>;
500
- }>, "limit" | "items" | "title" | "fulfiller" | "warehouse_categories" | "is_auto_bundling" | "dispatcher_preset" | "picking_strategy" | "trigger">, {
526
+ }>, "limit" | "items" | "title" | "fulfiller" | "is_auto_bundling" | "dispatcher_preset" | "picking_strategy" | "trigger">, {
501
527
  fulfiller_priority: z.ZodArray<z.ZodObject<{
502
528
  fulfiller: z.ZodString;
503
529
  }, "strip", z.ZodTypeAny, {
@@ -505,6 +531,20 @@ export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extend
505
531
  }, {
506
532
  fulfiller: string;
507
533
  }>, "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">>>;
508
548
  }>, "strip", z.ZodTypeAny, {
509
549
  title: string;
510
550
  fulfiller: string;
@@ -515,8 +555,12 @@ export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extend
515
555
  dispatcher_preset: string;
516
556
  trigger: "UI" | "API" | "API-TEST" | "REAL-DATA-TEST" | "SCHEDULE";
517
557
  limit?: number | undefined;
518
- items?: string[] | undefined;
519
- warehouse_categories?: string[] | null | undefined;
558
+ items?: {
559
+ item: string;
560
+ }[] | null | undefined;
561
+ warehouse_categories?: {
562
+ warehouse_category: string;
563
+ }[] | null | undefined;
520
564
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
521
565
  }, {
522
566
  title: string;
@@ -528,10 +572,15 @@ export declare const ERPNextDispatchRunPostBody: z.ZodObject<z.objectUtil.extend
528
572
  dispatcher_preset: string;
529
573
  trigger: "UI" | "API" | "API-TEST" | "REAL-DATA-TEST" | "SCHEDULE";
530
574
  limit?: number | undefined;
531
- items?: string[] | undefined;
532
- warehouse_categories?: string[] | null | undefined;
575
+ items?: {
576
+ item: string;
577
+ }[] | null | undefined;
578
+ warehouse_categories?: {
579
+ warehouse_category: string;
580
+ }[] | null | undefined;
533
581
  picking_strategy?: "Single Order" | "Multi Order" | null | undefined;
534
582
  }>;
583
+ export type ERPNextDispatchRunPostBodyType = z.infer<typeof ERPNextDispatchRunPostBody>;
535
584
  export declare const DispatchRunPostFilteredResponse: z.ZodObject<{
536
585
  name: z.ZodString;
537
586
  }, "strip", z.ZodTypeAny, {
@@ -62,10 +62,14 @@ exports.ERPNextShipstormRun = exports.ERPNextDispatcherPreset.omit({
62
62
  })
63
63
  .merge(zod_1.z.object({
64
64
  dispatch_run_id: zod_1.z.string(),
65
- warehouse_categories: zod_1.z.array(zod_1.z.string()).min(0).optional().nullable(),
65
+ warehouse_categories: zod_1.z
66
+ .array(zod_1.z.object({ warehouse_category: zod_1.z.string() }))
67
+ .min(0)
68
+ .optional()
69
+ .nullable(),
66
70
  fulfillment_station: zod_1.z.string().optional().nullable(),
67
71
  items: zod_1.z.array(zod_1.z.string()).min(0).optional(),
68
- limit: zod_1.z.number().min(1).optional(),
72
+ limit: zod_1.z.number().optional(),
69
73
  is_auto_bundling: zod_1.z.number(),
70
74
  dispatcher_preset: zod_1.z.string(),
71
75
  picking_strategy: zod_1.z
@@ -100,7 +104,6 @@ exports.ERPNextDispatchRunPostBody = exports.ERPNextShipstormRun.pick({
100
104
  trigger: true,
101
105
  picking_strategy: true,
102
106
  is_auto_bundling: true,
103
- warehouse_categories: true,
104
107
  items: true,
105
108
  limit: true,
106
109
  title: true,
@@ -110,6 +113,18 @@ exports.ERPNextDispatchRunPostBody = exports.ERPNextShipstormRun.pick({
110
113
  fulfiller_priority: zod_1.z.array(zod_1.z.object({
111
114
  fulfiller: zod_1.z.string(),
112
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(),
113
128
  }))
114
129
  .describe("ERPNextDispatchRunPostBody");
115
130
  exports.DispatchRunPostFilteredResponse = zod_1.z
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.10.0",
28
+ "version": "1.10.2",
29
29
  "devDependencies": {
30
30
  "@types/crypto-js": "^4.2.2",
31
31
  "@types/lodash": "^4.17.13",