erpnext-queue-client 1.17.0 → 1.18.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.
@@ -0,0 +1,154 @@
1
+ import { z } from "zod";
2
+ export declare const ShippingLabel: z.ZodObject<{
3
+ name: z.ZodString;
4
+ owner: z.ZodString;
5
+ creation: z.ZodString;
6
+ modified: z.ZodString;
7
+ modified_by: z.ZodString;
8
+ idx: z.ZodNumber;
9
+ docstatus: z.ZodNumber;
10
+ shipping_provider: z.ZodString;
11
+ label_id: z.ZodString;
12
+ tracking_code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
13
+ label_type: z.ZodNullable<z.ZodOptional<z.ZodDefault<z.ZodEnum<["Shipping Label", "Return Label"]>>>>;
14
+ customer: z.ZodNullable<z.ZodOptional<z.ZodString>>;
15
+ address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
16
+ contact: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17
+ doctype: z.ZodString;
18
+ document_name: z.ZodOptional<z.ZodString>;
19
+ document_url: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ name: string;
22
+ doctype: string;
23
+ owner: string;
24
+ creation: string;
25
+ modified: string;
26
+ modified_by: string;
27
+ idx: number;
28
+ docstatus: number;
29
+ shipping_provider: string;
30
+ label_id: string;
31
+ address?: string | null | undefined;
32
+ customer?: string | null | undefined;
33
+ tracking_code?: string | null | undefined;
34
+ label_type?: "Shipping Label" | "Return Label" | null | undefined;
35
+ contact?: string | null | undefined;
36
+ document_name?: string | undefined;
37
+ document_url?: string | undefined;
38
+ }, {
39
+ name: string;
40
+ doctype: string;
41
+ owner: string;
42
+ creation: string;
43
+ modified: string;
44
+ modified_by: string;
45
+ idx: number;
46
+ docstatus: number;
47
+ shipping_provider: string;
48
+ label_id: string;
49
+ address?: string | null | undefined;
50
+ customer?: string | null | undefined;
51
+ tracking_code?: string | null | undefined;
52
+ label_type?: "Shipping Label" | "Return Label" | null | undefined;
53
+ contact?: string | null | undefined;
54
+ document_name?: string | undefined;
55
+ document_url?: string | undefined;
56
+ }>;
57
+ export declare const ShippingLabelPostBody: z.ZodObject<Pick<{
58
+ name: z.ZodString;
59
+ owner: z.ZodString;
60
+ creation: z.ZodString;
61
+ modified: z.ZodString;
62
+ modified_by: z.ZodString;
63
+ idx: z.ZodNumber;
64
+ docstatus: z.ZodNumber;
65
+ shipping_provider: z.ZodString;
66
+ label_id: z.ZodString;
67
+ tracking_code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
68
+ label_type: z.ZodNullable<z.ZodOptional<z.ZodDefault<z.ZodEnum<["Shipping Label", "Return Label"]>>>>;
69
+ customer: z.ZodNullable<z.ZodOptional<z.ZodString>>;
70
+ address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
71
+ contact: z.ZodNullable<z.ZodOptional<z.ZodString>>;
72
+ doctype: z.ZodString;
73
+ document_name: z.ZodOptional<z.ZodString>;
74
+ document_url: z.ZodOptional<z.ZodString>;
75
+ }, "address" | "customer" | "shipping_provider" | "label_id" | "tracking_code" | "label_type" | "contact">, "strip", z.ZodTypeAny, {
76
+ shipping_provider: string;
77
+ label_id: string;
78
+ address?: string | null | undefined;
79
+ customer?: string | null | undefined;
80
+ tracking_code?: string | null | undefined;
81
+ label_type?: "Shipping Label" | "Return Label" | null | undefined;
82
+ contact?: string | null | undefined;
83
+ }, {
84
+ shipping_provider: string;
85
+ label_id: string;
86
+ address?: string | null | undefined;
87
+ customer?: string | null | undefined;
88
+ tracking_code?: string | null | undefined;
89
+ label_type?: "Shipping Label" | "Return Label" | null | undefined;
90
+ contact?: string | null | undefined;
91
+ }>;
92
+ export type ShippingLabelPostBodyType = z.infer<typeof ShippingLabelPostBody>;
93
+ export type ShippingLabelType = z.infer<typeof ShippingLabel>;
94
+ export declare const LabelInfo: z.ZodObject<{
95
+ labelData: z.ZodString;
96
+ labelId: z.ZodString;
97
+ trackingId: z.ZodOptional<z.ZodString>;
98
+ trackingUrl: z.ZodOptional<z.ZodString>;
99
+ qrLabel: z.ZodOptional<z.ZodString>;
100
+ qrLink: z.ZodOptional<z.ZodString>;
101
+ shippingProvider: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"GLS Germany">, z.ZodLiteral<"GLS ADE-plus">]>, z.ZodLiteral<"DHL">]>, z.ZodLiteral<"DHL-2-Mann">]>, z.ZodLiteral<"Deutsche Post">]>, z.ZodLiteral<"Billbee">]>, z.ZodLiteral<"Billbee Amazon MCF">]>;
102
+ shouldNotifyCustomer: z.ZodOptional<z.ZodBoolean>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ labelData: string;
105
+ labelId: string;
106
+ shippingProvider: "DHL" | "Deutsche Post" | "GLS Germany" | "GLS ADE-plus" | "DHL-2-Mann" | "Billbee" | "Billbee Amazon MCF";
107
+ trackingId?: string | undefined;
108
+ trackingUrl?: string | undefined;
109
+ qrLabel?: string | undefined;
110
+ qrLink?: string | undefined;
111
+ shouldNotifyCustomer?: boolean | undefined;
112
+ }, {
113
+ labelData: string;
114
+ labelId: string;
115
+ shippingProvider: "DHL" | "Deutsche Post" | "GLS Germany" | "GLS ADE-plus" | "DHL-2-Mann" | "Billbee" | "Billbee Amazon MCF";
116
+ trackingId?: string | undefined;
117
+ trackingUrl?: string | undefined;
118
+ qrLabel?: string | undefined;
119
+ qrLink?: string | undefined;
120
+ shouldNotifyCustomer?: boolean | undefined;
121
+ }>;
122
+ export type LabelInfoType = z.infer<typeof LabelInfo>;
123
+ export declare const UploadedLabelInfo: z.ZodObject<{
124
+ fileName: z.ZodString;
125
+ fileUrl: z.ZodString;
126
+ labelId: z.ZodString;
127
+ trackingId: z.ZodOptional<z.ZodString>;
128
+ trackingUrl: z.ZodOptional<z.ZodString>;
129
+ shippingProvider: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"GLS Germany">, z.ZodLiteral<"GLS ADE-plus">]>, z.ZodLiteral<"DHL">]>, z.ZodLiteral<"DHL-2-Mann">]>, z.ZodLiteral<"Deutsche Post">]>, z.ZodLiteral<"Billbee">]>, z.ZodLiteral<"Billbee Amazon MCF">]>;
130
+ erpNextFileName: z.ZodString;
131
+ s3FileKey: z.ZodNullable<z.ZodOptional<z.ZodString>>;
132
+ shouldNotifyCustomer: z.ZodOptional<z.ZodBoolean>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ labelId: string;
135
+ shippingProvider: "DHL" | "Deutsche Post" | "GLS Germany" | "GLS ADE-plus" | "DHL-2-Mann" | "Billbee" | "Billbee Amazon MCF";
136
+ fileName: string;
137
+ fileUrl: string;
138
+ erpNextFileName: string;
139
+ trackingId?: string | undefined;
140
+ trackingUrl?: string | undefined;
141
+ shouldNotifyCustomer?: boolean | undefined;
142
+ s3FileKey?: string | null | undefined;
143
+ }, {
144
+ labelId: string;
145
+ shippingProvider: "DHL" | "Deutsche Post" | "GLS Germany" | "GLS ADE-plus" | "DHL-2-Mann" | "Billbee" | "Billbee Amazon MCF";
146
+ fileName: string;
147
+ fileUrl: string;
148
+ erpNextFileName: string;
149
+ trackingId?: string | undefined;
150
+ trackingUrl?: string | undefined;
151
+ shouldNotifyCustomer?: boolean | undefined;
152
+ s3FileKey?: string | null | undefined;
153
+ }>;
154
+ export type UploadedLabelInfoType = z.infer<typeof UploadedLabelInfo>;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadedLabelInfo = exports.LabelInfo = exports.ShippingLabelPostBody = exports.ShippingLabel = void 0;
4
+ const zod_1 = require("zod");
5
+ const ShippingProvider_1 = require("./ShippingProvider");
6
+ exports.ShippingLabel = zod_1.z
7
+ .object({
8
+ name: zod_1.z.string(),
9
+ owner: zod_1.z.string(),
10
+ creation: zod_1.z.string(),
11
+ modified: zod_1.z.string(),
12
+ modified_by: zod_1.z.string(),
13
+ idx: zod_1.z.number(),
14
+ docstatus: zod_1.z.number(),
15
+ shipping_provider: zod_1.z.string(),
16
+ label_id: zod_1.z.string(),
17
+ tracking_code: zod_1.z.string().optional().nullable(),
18
+ label_type: zod_1.z
19
+ .enum(["Shipping Label", "Return Label"])
20
+ .default("Shipping Label")
21
+ .optional()
22
+ .nullable(),
23
+ customer: zod_1.z.string().optional().nullable(),
24
+ address: zod_1.z.string().optional().nullable(),
25
+ contact: zod_1.z.string().optional().nullable(),
26
+ doctype: zod_1.z.string(),
27
+ document_name: zod_1.z.string().optional(),
28
+ document_url: zod_1.z.string().optional(),
29
+ })
30
+ .describe("Shipping Label");
31
+ exports.ShippingLabelPostBody = exports.ShippingLabel.pick({
32
+ shipping_provider: true,
33
+ label_id: true,
34
+ tracking_code: true,
35
+ customer: true,
36
+ address: true,
37
+ contact: true,
38
+ label_type: true,
39
+ }).describe("Shipping Label Post Body");
40
+ exports.LabelInfo = zod_1.z
41
+ .object({
42
+ labelData: zod_1.z.string(), // base64 encoded PDF
43
+ labelId: zod_1.z.string(),
44
+ trackingId: zod_1.z.string().optional(),
45
+ trackingUrl: zod_1.z.string().url().optional(),
46
+ qrLabel: zod_1.z.string().optional(),
47
+ qrLink: zod_1.z.string().optional(),
48
+ shippingProvider: ShippingProvider_1.LabelService,
49
+ shouldNotifyCustomer: zod_1.z.boolean().optional(),
50
+ })
51
+ .describe("Label Info");
52
+ exports.UploadedLabelInfo = zod_1.z
53
+ .object({
54
+ fileName: zod_1.z.string(),
55
+ fileUrl: zod_1.z.string(),
56
+ labelId: zod_1.z.string(),
57
+ trackingId: zod_1.z.string().optional(),
58
+ trackingUrl: zod_1.z.string().url().optional(),
59
+ shippingProvider: ShippingProvider_1.LabelService,
60
+ erpNextFileName: zod_1.z.string(),
61
+ s3FileKey: zod_1.z.string().optional().nullable(),
62
+ shouldNotifyCustomer: zod_1.z.boolean().optional(),
63
+ })
64
+ .describe("UploadedLabelInfo");
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ import { ERPNextReports } from "./erpnext/reports";
28
28
  import { ERPNextResourceRequest } from "./erpnext/resourceRequest";
29
29
  import { ERPNextServicecase } from "./erpnext/doctypes/servicecase";
30
30
  import { ServiceportalProductConfiguration } from "./erpnext/model/ServiceportalProductConfiguration";
31
+ import { ShippingLabel } from "./erpnext/model/ShippingLabel";
31
32
  export declare class ERPNextQueueClient {
32
33
  temporalClient: TemporalClient;
33
34
  private credentials?;
@@ -57,6 +58,7 @@ export declare class ERPNextQueueClient {
57
58
  partList: ERPNextDoctypeResourceRequest<typeof PartList>;
58
59
  servicecase: ERPNextServicecase;
59
60
  serviceportalProductConfiguration: ERPNextDoctypeResourceRequest<typeof ServiceportalProductConfiguration>;
61
+ shippingLabel: ERPNextDoctypeResourceRequest<typeof ShippingLabel>;
60
62
  /**
61
63
  * @description Provide either a temporal client or connection details to create a new client
62
64
  */
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ const reports_1 = require("./erpnext/reports");
31
31
  const resourceRequest_1 = require("./erpnext/resourceRequest");
32
32
  const servicecase_1 = require("./erpnext/doctypes/servicecase");
33
33
  const ServiceportalProductConfiguration_1 = require("./erpnext/model/ServiceportalProductConfiguration");
34
+ const ShippingLabel_1 = require("./erpnext/model/ShippingLabel");
34
35
  class ERPNextQueueClient {
35
36
  /**
36
37
  * @description Provide either a temporal client or connection details to create a new client
@@ -68,6 +69,7 @@ class ERPNextQueueClient {
68
69
  this.partList = new doctypeResourceRequest_1.ERPNextDoctypeResourceRequest(this.temporalClient, "Part List", PartList_1.PartList);
69
70
  this.servicecase = new servicecase_1.ERPNextServicecase(this.temporalClient);
70
71
  this.serviceportalProductConfiguration = new doctypeResourceRequest_1.ERPNextDoctypeResourceRequest(this.temporalClient, "Serviceportal Product Configuration", ServiceportalProductConfiguration_1.ServiceportalProductConfiguration);
72
+ this.shippingLabel = new doctypeResourceRequest_1.ERPNextDoctypeResourceRequest(this.temporalClient, "Shipping Label", ShippingLabel_1.ShippingLabel);
71
73
  }
72
74
  }
73
75
  exports.ERPNextQueueClient = ERPNextQueueClient;
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.17.0",
28
+ "version": "1.18.0",
29
29
  "devDependencies": {
30
30
  "@types/crypto-js": "^4.2.2",
31
31
  "@types/lodash": "^4.17.13",