erpnext-queue-client 1.9.2 → 1.10.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.
@@ -86,7 +86,9 @@ class ERPNextItem {
86
86
  body: {
87
87
  skus: aStockSkus,
88
88
  },
89
- responseValidationModel: zod_1.z.array(zod_1.z.string()),
89
+ responseValidationModel: zod_1.z
90
+ .array(zod_1.z.string())
91
+ .describe("Created B-Stock Item Response"),
90
92
  });
91
93
  return result;
92
94
  });
@@ -207,7 +207,7 @@ const ItemDimensionsInfo = ItemListModel.pick({
207
207
  shipping_length: true,
208
208
  shipping_height: true,
209
209
  shipping_dimensions_unit: true,
210
- });
210
+ }).describe("Item Dimensions Info");
211
211
  // for getItemsByShippingTemplate
212
212
  exports.ItemListName = zod_1.z
213
213
  .array(ItemListModel.pick({
@@ -233,6 +233,8 @@ const ItemSupplier = zod_1.z
233
233
  exports.ItemSupplierResponse = zod_1.z
234
234
  .array(ItemSupplier)
235
235
  .describe("ItemSupplierResponse");
236
- const ItemSupplierValidated = ItemSupplier.omit({ parent: true }).extend({
236
+ const ItemSupplierValidated = ItemSupplier.omit({ parent: true })
237
+ .extend({
237
238
  item_code: zod_1.z.string(),
238
- });
239
+ })
240
+ .describe("Item Supplier Validated");
@@ -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.2",
28
+ "version": "1.10.0",
29
29
  "devDependencies": {
30
30
  "@types/crypto-js": "^4.2.2",
31
31
  "@types/lodash": "^4.17.13",