erpnext-queue-client 1.26.3 → 1.26.5

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.
@@ -144,7 +144,7 @@ export declare class ERPNextServicecase {
144
144
  customer_message?: string | null | undefined;
145
145
  agreed_terms?: string | null | undefined;
146
146
  }>;
147
- updateById: (resourceId: string, servicecase: ServicecaseInputType, options?: {
147
+ updateById: (resourceId: string, servicecase: Partial<ServicecaseInputType>, options?: {
148
148
  priority: number;
149
149
  }) => Promise<{
150
150
  status: "EDITING" | "SUBMITTED" | "COMPLETED";
@@ -235,7 +235,7 @@ export declare class ERPNextServicecase {
235
235
  customer_message?: string | null | undefined;
236
236
  agreed_terms?: string | null | undefined;
237
237
  }>;
238
- updateServicecase(resourceId: string, servicecase: ServicecaseInputType, options?: {
238
+ updateServicecase(resourceId: string, servicecase: Partial<ServicecaseInputType>, options?: {
239
239
  priority: number;
240
240
  }): Promise<{
241
241
  status: "EDITING" | "SUBMITTED" | "COMPLETED";
@@ -110,11 +110,15 @@ class ERPNextResourceRequest {
110
110
  return __awaiter(this, arguments, void 0, function* ({ resourceName, resourceId, inputValidationModel, resourceModel, body, priority = 5, }) {
111
111
  if (resourceModel && !resourceModel.description)
112
112
  throw new Error("Resource model must have a description");
113
+ // accept partial input while enforcing allowed keys
114
+ const partialInputValidationModel = inputValidationModel && inputValidationModel instanceof zod_1.ZodObject
115
+ ? inputValidationModel.partial().strict()
116
+ : inputValidationModel;
113
117
  const result = yield this.temporalClient.executeERPNextRequestWorkflow(`PUT-${resourceName}-${resourceId}`, {
114
118
  requestMethod: "PUT",
115
119
  resourceId,
116
120
  resourceName,
117
- inputValidationModel,
121
+ inputValidationModel: partialInputValidationModel,
118
122
  responseValidationModel: resourceModel
119
123
  ? zod_1.z
120
124
  .object({ data: resourceModel })
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.26.3",
28
+ "version": "1.26.5",
29
29
  "devDependencies": {
30
30
  "@types/crypto-js": "^4.2.2",
31
31
  "@types/lodash": "^4.17.13",