erpnext-queue-client 1.34.2 → 1.34.4

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.
@@ -14,6 +14,7 @@ const zod_1 = require("zod");
14
14
  const doctypeResourceRequest_1 = require("../doctypeResourceRequest");
15
15
  const methodRequest_1 = require("../methodRequest");
16
16
  const Servicecase_1 = require("../model/Servicecase");
17
+ const logger_1 = require("../../utils/logger");
17
18
  class ERPNextServicecase {
18
19
  constructor(temporalClient) {
19
20
  this.methodRequest = new methodRequest_1.ERPNextMethodRequest(temporalClient);
@@ -31,11 +32,25 @@ class ERPNextServicecase {
31
32
  return __awaiter(this, arguments, void 0, function* (servicecase, options = { priority: 5 }) {
32
33
  var _a;
33
34
  for (const returnItem of (_a = servicecase.return_items) !== null && _a !== void 0 ? _a : []) {
35
+ logger_1.lg.info("Creating attachment collection for return item", {
36
+ returnItem,
37
+ });
34
38
  const attachmentCollection = yield this.attachmentCollectionRequest.create({
35
- body: {},
39
+ body: {
40
+ attachments: [],
41
+ },
42
+ });
43
+ logger_1.lg.info("Created attachment collection for return item", {
44
+ attachmentCollection,
36
45
  });
37
46
  returnItem.attachments = attachmentCollection.name;
47
+ logger_1.lg.info("Creating internal reasons collection for return item", {
48
+ returnItem,
49
+ });
38
50
  const internalReasonsCollection = yield this.internalReasonCollectionRequest.create({ body: {} });
51
+ logger_1.lg.info("Created internal reasons collection for return item", {
52
+ internalReasonsCollection,
53
+ });
39
54
  returnItem.internal_reasons = internalReasonsCollection.name;
40
55
  }
41
56
  const newServicecase = yield this.baseRequest.create({
@@ -17,6 +17,7 @@ export declare const ShippingLabel: z.ZodObject<{
17
17
  doctype: z.ZodString;
18
18
  document_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
19
19
  document_url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
20
+ order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
20
21
  }, "strip", z.ZodTypeAny, {
21
22
  name: string;
22
23
  doctype: string;
@@ -29,6 +30,7 @@ export declare const ShippingLabel: z.ZodObject<{
29
30
  shipping_provider: string;
30
31
  label_id: string;
31
32
  address?: string | null | undefined;
33
+ order_number?: string | null | undefined;
32
34
  customer?: string | null | undefined;
33
35
  tracking_code?: string | null | undefined;
34
36
  label_type?: "Shipping Label" | "Return Label" | null | undefined;
@@ -47,6 +49,7 @@ export declare const ShippingLabel: z.ZodObject<{
47
49
  shipping_provider: string;
48
50
  label_id: string;
49
51
  address?: string | null | undefined;
52
+ order_number?: string | null | undefined;
50
53
  customer?: string | null | undefined;
51
54
  tracking_code?: string | null | undefined;
52
55
  label_type?: "Shipping Label" | "Return Label" | null | undefined;
@@ -72,10 +75,12 @@ export declare const ShippingLabelPostBody: z.ZodObject<Pick<{
72
75
  doctype: z.ZodString;
73
76
  document_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
74
77
  document_url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
75
- }, "address" | "customer" | "shipping_provider" | "label_id" | "tracking_code" | "label_type" | "contact" | "document_name" | "document_url">, "strip", z.ZodTypeAny, {
78
+ order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
79
+ }, "address" | "order_number" | "customer" | "shipping_provider" | "label_id" | "tracking_code" | "label_type" | "contact" | "document_name" | "document_url">, "strip", z.ZodTypeAny, {
76
80
  shipping_provider: string;
77
81
  label_id: string;
78
82
  address?: string | null | undefined;
83
+ order_number?: string | null | undefined;
79
84
  customer?: string | null | undefined;
80
85
  tracking_code?: string | null | undefined;
81
86
  label_type?: "Shipping Label" | "Return Label" | null | undefined;
@@ -86,6 +91,7 @@ export declare const ShippingLabelPostBody: z.ZodObject<Pick<{
86
91
  shipping_provider: string;
87
92
  label_id: string;
88
93
  address?: string | null | undefined;
94
+ order_number?: string | null | undefined;
89
95
  customer?: string | null | undefined;
90
96
  tracking_code?: string | null | undefined;
91
97
  label_type?: "Shipping Label" | "Return Label" | null | undefined;
@@ -25,6 +25,7 @@ exports.ShippingLabel = zod_1.z
25
25
  doctype: zod_1.z.string(),
26
26
  document_name: zod_1.z.string().optional().nullable(),
27
27
  document_url: zod_1.z.string().optional().nullable(),
28
+ order_number: zod_1.z.string().optional().nullable(),
28
29
  })
29
30
  .describe("Shipping Label");
30
31
  exports.ShippingLabelPostBody = exports.ShippingLabel.pick({
@@ -37,6 +38,7 @@ exports.ShippingLabelPostBody = exports.ShippingLabel.pick({
37
38
  label_type: true,
38
39
  document_url: true,
39
40
  document_name: true,
41
+ order_number: true,
40
42
  }).describe("Shipping Label Post Body");
41
43
  exports.UploadedLabelInfo = zod_1.z
42
44
  .object({
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "winston": "^3.15.0",
26
26
  "zod": "3.25.76"
27
27
  },
28
- "version": "1.34.2",
28
+ "version": "1.34.4",
29
29
  "devDependencies": {
30
30
  "@types/crypto-js": "^4.2.2",
31
31
  "@types/lodash": "^4.17.13",