erpnext-queue-client 1.9.3 → 1.10.1

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;
@@ -31,11 +31,12 @@ export declare class ERPNextResourceRequest {
31
31
  priority?: number;
32
32
  body: TInput;
33
33
  }): Promise<z.TypeOf<TModel>>;
34
- create<TModel extends ZodTypeAny, TInput extends TInputModel extends undefined ? Partial<z.TypeOf<TModel>> : TInputModel extends ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends ZodTypeAny | undefined = undefined>({ resourceName, inputValidationModel, resourceModel, body, priority, }: {
34
+ create<TModel extends ZodTypeAny, TInput extends TInputModel extends undefined ? Partial<z.TypeOf<TModel>> : TInputModel extends ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends ZodTypeAny | undefined = undefined>({ resourceName, inputValidationModel, resourceModel, body, params, priority, }: {
35
35
  resourceName: string;
36
36
  inputValidationModel?: TInputModel;
37
37
  resourceModel?: TModel;
38
38
  priority?: number;
39
+ params?: Record<string, string>;
39
40
  body: TInput;
40
41
  }): Promise<z.TypeOf<TModel>>;
41
42
  deleteById<TModel extends ZodTypeAny>({ resourceName, resourceId, resourceModel, priority, }: {
@@ -126,7 +126,7 @@ class ERPNextResourceRequest {
126
126
  });
127
127
  }
128
128
  create(_a) {
129
- return __awaiter(this, arguments, void 0, function* ({ resourceName, inputValidationModel, resourceModel, body, priority = 5, }) {
129
+ return __awaiter(this, arguments, void 0, function* ({ resourceName, inputValidationModel, resourceModel, body, params, priority = 5, }) {
130
130
  if (resourceModel && !resourceModel.description)
131
131
  throw new Error("Resource model must have a description");
132
132
  const result = yield this.temporalClient.executeERPNextRequestWorkflow(`POST-${resourceName}`, {
@@ -138,6 +138,7 @@ class ERPNextResourceRequest {
138
138
  .object({ data: resourceModel })
139
139
  .describe(resourceModel.description)
140
140
  : undefined,
141
+ params: (0, utils_1.paramsToString)(params),
141
142
  body,
142
143
  }, "erpnext", priority);
143
144
  return result.data;
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.9.3",
28
+ "version": "1.10.1",
29
29
  "devDependencies": {
30
30
  "@types/crypto-js": "^4.2.2",
31
31
  "@types/lodash": "^4.17.13",