erpnext-queue-client 2.5.1 → 2.5.3
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.
package/dist/client.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.TemporalClient = void 0;
|
|
7
4
|
const client_1 = require("@temporalio/client");
|
|
8
|
-
const zod_1 = __importDefault(require("zod"));
|
|
9
5
|
const logger_1 = require("./utils/logger");
|
|
10
6
|
const zodUtils_1 = require("./utils/zodUtils");
|
|
11
7
|
const nanoid_1 = require("nanoid");
|
|
@@ -123,9 +119,12 @@ class TemporalClient {
|
|
|
123
119
|
throw err;
|
|
124
120
|
});
|
|
125
121
|
logger_1.lg.info(`Started workflow ${runId}`);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
if (responseValidationModel) {
|
|
123
|
+
return (0, zodUtils_1.validateData)(data, responseValidationModel);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return data;
|
|
127
|
+
}
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
exports.TemporalClient = TemporalClient;
|
|
@@ -7,7 +7,6 @@ export declare class ERPNextShipment extends ERPNextDoctypeSubmittableResourceRe
|
|
|
7
7
|
constructor(temporalClient: TemporalClient);
|
|
8
8
|
createShipmentDraft(deliveryNoteName: string): Promise<{
|
|
9
9
|
status: string;
|
|
10
|
-
incoterm: string;
|
|
11
10
|
shipment_id: string;
|
|
12
11
|
delivery_address_name: string;
|
|
13
12
|
delivery_address: string;
|
|
@@ -43,6 +42,7 @@ export declare class ERPNextShipment extends ERPNextDoctypeSubmittableResourceRe
|
|
|
43
42
|
tracking_status: string;
|
|
44
43
|
value_of_goods: number;
|
|
45
44
|
docstatus?: number | undefined;
|
|
45
|
+
incoterm?: string | null | undefined;
|
|
46
46
|
shipping_provider?: string | null | undefined;
|
|
47
47
|
awb_number?: string | null | undefined;
|
|
48
48
|
carrier_service?: string | null | undefined;
|
|
@@ -94,7 +94,6 @@ export declare class ERPNextShipment extends ERPNextDoctypeSubmittableResourceRe
|
|
|
94
94
|
modified_by: string;
|
|
95
95
|
idx: number;
|
|
96
96
|
doctype: string;
|
|
97
|
-
incoterm: string;
|
|
98
97
|
shipment_id: string;
|
|
99
98
|
delivery_address_name: string;
|
|
100
99
|
delivery_address: string;
|
|
@@ -156,6 +155,7 @@ export declare class ERPNextShipment extends ERPNextDoctypeSubmittableResourceRe
|
|
|
156
155
|
custom_delivery_country: string;
|
|
157
156
|
amended_from?: string | null | undefined;
|
|
158
157
|
_user_tags?: string | null | undefined;
|
|
158
|
+
incoterm?: string | null | undefined;
|
|
159
159
|
shipping_provider?: string | null | undefined;
|
|
160
160
|
awb_number?: string | null | undefined;
|
|
161
161
|
carrier_service?: string | null | undefined;
|
|
@@ -35,7 +35,7 @@ export declare const Shipment: z.ZodObject<{
|
|
|
35
35
|
delivery_to_type: z.ZodString;
|
|
36
36
|
delivery_to: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
37
37
|
description_of_content: z.ZodString;
|
|
38
|
-
incoterm: z.ZodString
|
|
38
|
+
incoterm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
39
|
pallets: z.ZodString;
|
|
40
40
|
parcel_template: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
41
41
|
pickup_address_name: z.ZodString;
|
|
@@ -107,7 +107,6 @@ export declare const Shipment: z.ZodObject<{
|
|
|
107
107
|
custom_export_status: z.ZodNullable<z.ZodOptional<z.ZodDefault<z.ZodEnum<["Open", "Customs Declaration in Progress", "Customs Declaration Submitted", "Customs Declaration Confirmed"]>>>>;
|
|
108
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
109
|
status: string;
|
|
110
|
-
incoterm: string;
|
|
111
110
|
shipment_id: string;
|
|
112
111
|
delivery_address_name: string;
|
|
113
112
|
delivery_address: string;
|
|
@@ -143,6 +142,7 @@ export declare const Shipment: z.ZodObject<{
|
|
|
143
142
|
tracking_status: string;
|
|
144
143
|
value_of_goods: number;
|
|
145
144
|
custom_delivery_country: string;
|
|
145
|
+
incoterm?: string | null | undefined;
|
|
146
146
|
shipping_provider?: string | null | undefined;
|
|
147
147
|
awb_number?: string | null | undefined;
|
|
148
148
|
carrier_service?: string | null | undefined;
|
|
@@ -168,7 +168,6 @@ export declare const Shipment: z.ZodObject<{
|
|
|
168
168
|
custom_export_status?: "Open" | "Customs Declaration in Progress" | "Customs Declaration Submitted" | "Customs Declaration Confirmed" | null | undefined;
|
|
169
169
|
}, {
|
|
170
170
|
status: string;
|
|
171
|
-
incoterm: string;
|
|
172
171
|
shipment_id: string;
|
|
173
172
|
delivery_address_name: string;
|
|
174
173
|
delivery_address: string;
|
|
@@ -204,6 +203,7 @@ export declare const Shipment: z.ZodObject<{
|
|
|
204
203
|
tracking_status: string;
|
|
205
204
|
value_of_goods: number;
|
|
206
205
|
custom_delivery_country: string;
|
|
206
|
+
incoterm?: string | null | undefined;
|
|
207
207
|
shipping_provider?: string | null | undefined;
|
|
208
208
|
awb_number?: string | null | undefined;
|
|
209
209
|
carrier_service?: string | null | undefined;
|
|
@@ -244,7 +244,7 @@ export declare const ShipmentAddShippingLabelAndSubmitBody: z.ZodObject<Pick<{
|
|
|
244
244
|
delivery_to_type: z.ZodString;
|
|
245
245
|
delivery_to: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
246
246
|
description_of_content: z.ZodString;
|
|
247
|
-
incoterm: z.ZodString
|
|
247
|
+
incoterm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
248
248
|
pallets: z.ZodString;
|
|
249
249
|
parcel_template: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
250
250
|
pickup_address_name: z.ZodString;
|
|
@@ -59,7 +59,7 @@ exports.Shipment = zod_1.z
|
|
|
59
59
|
delivery_to_type: zod_1.z.string(),
|
|
60
60
|
delivery_to: zod_1.z.string().optional().nullable(),
|
|
61
61
|
description_of_content: zod_1.z.string(),
|
|
62
|
-
incoterm: zod_1.z.string(),
|
|
62
|
+
incoterm: zod_1.z.string().nullish(),
|
|
63
63
|
pallets: zod_1.z.string(),
|
|
64
64
|
parcel_template: zod_1.z.string().optional().nullable(),
|
|
65
65
|
pickup_address_name: zod_1.z.string(),
|