erpnext-queue-client 2.3.6 → 2.4.1
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/erpnext/doctypeResourceRequest.d.ts +1 -1
- package/dist/erpnext/doctypeSubmittableResourceRequest.d.ts +6 -159
- package/dist/erpnext/doctypeSubmittableResourceRequest.js +2 -2
- package/dist/erpnext/doctypes/address.d.ts +75 -3
- package/dist/erpnext/doctypes/consolidatedCustomsInvoice.d.ts +64 -54
- package/dist/erpnext/doctypes/contact.d.ts +219 -3
- package/dist/erpnext/doctypes/deliveryNote.d.ts +205 -200
- package/dist/erpnext/doctypes/item.d.ts +17 -2
- package/dist/erpnext/doctypes/paymentEntry.d.ts +112 -4
- package/dist/erpnext/doctypes/productBundle.d.ts +4 -2
- package/dist/erpnext/doctypes/purchaseInvoice.d.ts +140 -4
- package/dist/erpnext/doctypes/purchaseReceipt.d.ts +10 -4
- package/dist/erpnext/doctypes/salesInvoice.d.ts +398 -4
- package/dist/erpnext/doctypes/servicecase.d.ts +38 -2
- package/dist/erpnext/doctypes/shipment.d.ts +98 -91
- package/dist/erpnext/doctypes/shipment.js +2 -1
- package/dist/erpnext/erpnextRequestWrapper.d.ts +4 -2
- package/dist/erpnext/erpnextRequestWrapper.js +1 -1
- package/dist/erpnext/fileRequests.d.ts +2 -2
- package/dist/erpnext/fileRequests.js +2 -1
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.d.ts +61 -23
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.js +20 -11
- package/dist/erpnext/model/Contact.d.ts +29 -0
- package/dist/erpnext/model/Contact.js +5 -5
- package/dist/erpnext/model/DeliveryNote.d.ts +300 -100
- package/dist/erpnext/model/DeliveryNote.js +101 -100
- package/dist/erpnext/model/DispatchRun.d.ts +3 -0
- package/dist/erpnext/model/DispatchRun.js +1 -0
- package/dist/erpnext/model/DocTypeHelpers.d.ts +12 -7
- package/dist/erpnext/model/DocTypeHelpers.js +43 -19
- package/dist/erpnext/model/ERPNextDocTypeMeta.d.ts +3 -0
- package/dist/erpnext/model/ERPNextDocTypeMeta.js +3 -2
- package/dist/erpnext/model/File.d.ts +50 -0
- package/dist/erpnext/model/File.js +3 -1
- package/dist/erpnext/model/FulfillerSettings.d.ts +52 -24
- package/dist/erpnext/model/FulfillerSettings.js +19 -7
- package/dist/erpnext/model/Item.d.ts +43 -0
- package/dist/erpnext/model/Item.js +2 -1
- package/dist/erpnext/model/PurchaseInvoice.d.ts +75 -1
- package/dist/erpnext/model/PurchaseOrder.d.ts +52 -63
- package/dist/erpnext/model/PurchaseOrder.js +20 -38
- package/dist/erpnext/model/SalesInvoice.d.ts +196 -3
- package/dist/erpnext/model/Servicecase.d.ts +8 -0
- package/dist/erpnext/model/Shipment.d.ts +119 -162
- package/dist/erpnext/model/Shipment.js +17 -47
- package/dist/erpnext/model/ShippingProvider.d.ts +55 -65
- package/dist/erpnext/model/ShippingProvider.js +6 -10
- package/dist/erpnext/resourceRequest.d.ts +1 -1
- package/dist/utils/zodContextOptionals.js +7 -3
- package/dist/utils/zodUtils.js +3 -2
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ exports.ERPNextShipment = void 0;
|
|
|
13
13
|
const doctypeSubmittableResourceRequest_1 = require("../doctypeSubmittableResourceRequest");
|
|
14
14
|
const methodRequest_1 = require("../methodRequest");
|
|
15
15
|
const Shipment_1 = require("../model/Shipment");
|
|
16
|
+
const zodContextOptionals_1 = require("../../utils/zodContextOptionals");
|
|
16
17
|
class ERPNextShipment {
|
|
17
18
|
constructor(temporalClient) {
|
|
18
19
|
this.temporalClient = temporalClient;
|
|
@@ -31,7 +32,7 @@ class ERPNextShipment {
|
|
|
31
32
|
const draft = yield this.methodRequest.request({
|
|
32
33
|
methodName: "erpnext.stock.doctype.delivery_note.delivery_note.make_shipment",
|
|
33
34
|
requestMethod: "POST",
|
|
34
|
-
responseValidationModel: Shipment_1.
|
|
35
|
+
responseValidationModel: (0, zodContextOptionals_1.ResourceInput)(Shipment_1.Shipment),
|
|
35
36
|
params: { source_name: deliveryNoteName },
|
|
36
37
|
});
|
|
37
38
|
return draft;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { type z } from "zod";
|
|
1
|
+
import { AnyZodObject, ZodTypeAny, type z } from "zod";
|
|
2
2
|
import { ERPNextCredentials } from "./model/ERPNextQueue";
|
|
3
3
|
import { ERPNextRequestOptions } from "./model/ERPNextRequest";
|
|
4
|
-
|
|
4
|
+
import { DocModelType } from "./model/DocTypeHelpers";
|
|
5
|
+
import { Prettify } from "../utils/utils";
|
|
6
|
+
export declare function erpnextRequest<T extends ZodTypeAny, K extends ZodTypeAny>(credentials: ERPNextCredentials, options: ERPNextRequestOptions<T, K>): Promise<Prettify<z.infer<DocModelType<T extends AnyZodObject ? T : never>>>>;
|
|
5
7
|
export declare function erpNextDownloadFile(credentials: ERPNextCredentials, url: string): Promise<Buffer>;
|
|
@@ -33,7 +33,7 @@ function erpnextRequest(credentials, options) {
|
|
|
33
33
|
? `${credentials.erpnextUrl}/api/method/${options.methodName}`
|
|
34
34
|
: "resourceName" in options && options.resourceName
|
|
35
35
|
? `${credentials.erpnextUrl}/api/resource/${options.resourceName}`
|
|
36
|
-
: (_a = ("url" in options && options.url)) !== null && _a !== void 0 ? _a : undefined;
|
|
36
|
+
: ((_a = ("url" in options && options.url)) !== null && _a !== void 0 ? _a : undefined);
|
|
37
37
|
if (!baseUrl)
|
|
38
38
|
throw new Error("No resource or method name provided");
|
|
39
39
|
const inputUrl = `${baseUrl.startsWith("/api/method") ? `${credentials.erpnextUrl}` : ""}${baseUrl}${"resourceId" in options && options.resourceId
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TemporalClient } from "../client";
|
|
2
2
|
import { ERPNextCredentials } from "./model/ERPNextQueue";
|
|
3
|
-
import {
|
|
3
|
+
import { ERPNextValidatedFileDocModelType } from "./model/File";
|
|
4
4
|
export declare class ERPNextFileRequests {
|
|
5
5
|
private client;
|
|
6
6
|
private credentials;
|
|
7
7
|
constructor(client: TemporalClient, credentials?: ERPNextCredentials);
|
|
8
8
|
fileDownload: (url: string) => Promise<Buffer<ArrayBufferLike>>;
|
|
9
|
-
fileUpload: (file: Buffer, filename: string, doctypeToLinkTo?: string, docnameToLinkTo?: string, isPrivate?: boolean, priority?: number) => Promise<
|
|
9
|
+
fileUpload: (file: Buffer, filename: string, doctypeToLinkTo?: string, docnameToLinkTo?: string, isPrivate?: boolean, priority?: number) => Promise<ERPNextValidatedFileDocModelType>;
|
|
10
10
|
}
|
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ERPNextFileRequests = void 0;
|
|
13
13
|
const erpnextRequestWrapper_1 = require("./erpnextRequestWrapper");
|
|
14
|
+
const DocTypeHelpers_1 = require("./model/DocTypeHelpers");
|
|
14
15
|
const File_1 = require("./model/File");
|
|
15
16
|
class ERPNextFileRequests {
|
|
16
17
|
constructor(client, credentials) {
|
|
@@ -29,7 +30,7 @@ class ERPNextFileRequests {
|
|
|
29
30
|
}));
|
|
30
31
|
const result = yield (0, erpnextRequestWrapper_1.erpnextRequest)(this.credentials, {
|
|
31
32
|
requestMethod: "POST",
|
|
32
|
-
responseValidationModel: File_1.ERPNextValidatedFile,
|
|
33
|
+
responseValidationModel: (0, DocTypeHelpers_1.DocModel)(File_1.ERPNextValidatedFile),
|
|
33
34
|
methodName: "uploadfile",
|
|
34
35
|
body,
|
|
35
36
|
});
|
|
@@ -82,7 +82,7 @@ export declare const ConsolidatedCustomsInvoiceItem: z.ZodObject<{
|
|
|
82
82
|
country_of_origin?: string | null | undefined;
|
|
83
83
|
}>;
|
|
84
84
|
export type ConsolidatedCustomsInvoiceItemType = z.infer<typeof ConsolidatedCustomsInvoiceItem>;
|
|
85
|
-
export declare const ConsolidatedCustomsInvoiceExportApprovalStatus: z.
|
|
85
|
+
export declare const ConsolidatedCustomsInvoiceExportApprovalStatus: z.ZodEnum<["", "Waiting for Approval", "Approved", "Declined"]>;
|
|
86
86
|
export type ConsolidatedCustomsInvoiceExportApprovalStatusType = z.infer<typeof ConsolidatedCustomsInvoiceExportApprovalStatus>;
|
|
87
87
|
export declare const ConsolidatedCustomsInvoice: z.ZodObject<{
|
|
88
88
|
posting_date: z.ZodString;
|
|
@@ -92,16 +92,30 @@ export declare const ConsolidatedCustomsInvoice: z.ZodObject<{
|
|
|
92
92
|
company: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
93
93
|
company_tax_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
94
94
|
amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
95
|
-
export_approval_status: z.
|
|
95
|
+
export_approval_status: z.ZodEnum<["", "Waiting for Approval", "Approved", "Declined"]> & {
|
|
96
|
+
__optionalForInput: true;
|
|
97
|
+
};
|
|
96
98
|
mrn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
97
99
|
currency: z.ZodString;
|
|
98
100
|
conversion_rate: z.ZodNumber;
|
|
99
|
-
total_qty: z.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
total_qty: z.ZodNumber & {
|
|
102
|
+
__optionalForInput: true;
|
|
103
|
+
};
|
|
104
|
+
total_net_weight: z.ZodNumber & {
|
|
105
|
+
__optionalForInput: true;
|
|
106
|
+
};
|
|
107
|
+
base_total: z.ZodNumber & {
|
|
108
|
+
__optionalForInput: true;
|
|
109
|
+
};
|
|
110
|
+
base_net_total: z.ZodNumber & {
|
|
111
|
+
__optionalForInput: true;
|
|
112
|
+
};
|
|
113
|
+
total: z.ZodNumber & {
|
|
114
|
+
__optionalForInput: true;
|
|
115
|
+
};
|
|
116
|
+
net_total: z.ZodNumber & {
|
|
117
|
+
__optionalForInput: true;
|
|
118
|
+
};
|
|
105
119
|
dispatch_address_name: z.ZodString;
|
|
106
120
|
dispatch_address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
107
121
|
importer_address: z.ZodString;
|
|
@@ -199,8 +213,15 @@ export declare const ConsolidatedCustomsInvoice: z.ZodObject<{
|
|
|
199
213
|
}, "strip", z.ZodTypeAny, {
|
|
200
214
|
posting_date: string;
|
|
201
215
|
set_posting_time: boolean;
|
|
216
|
+
export_approval_status: "" | "Waiting for Approval" | "Approved" | "Declined";
|
|
202
217
|
currency: string;
|
|
203
218
|
conversion_rate: number;
|
|
219
|
+
total_qty: number;
|
|
220
|
+
total_net_weight: number;
|
|
221
|
+
base_total: number;
|
|
222
|
+
base_net_total: number;
|
|
223
|
+
total: number;
|
|
224
|
+
net_total: number;
|
|
204
225
|
dispatch_address_name: string;
|
|
205
226
|
importer_address: string;
|
|
206
227
|
importer_contact: string;
|
|
@@ -239,14 +260,7 @@ export declare const ConsolidatedCustomsInvoice: z.ZodObject<{
|
|
|
239
260
|
naming_series?: string | null | undefined;
|
|
240
261
|
posting_time?: string | null | undefined;
|
|
241
262
|
company_tax_id?: string | null | undefined;
|
|
242
|
-
export_approval_status?: "" | "Waiting for Approval" | "Approved" | "Declined" | null | undefined;
|
|
243
263
|
mrn?: string | null | undefined;
|
|
244
|
-
total_qty?: number | null | undefined;
|
|
245
|
-
total_net_weight?: number | null | undefined;
|
|
246
|
-
base_total?: number | null | undefined;
|
|
247
|
-
base_net_total?: number | null | undefined;
|
|
248
|
-
total?: number | null | undefined;
|
|
249
|
-
net_total?: number | null | undefined;
|
|
250
264
|
dispatch_address?: string | null | undefined;
|
|
251
265
|
importer_address_display?: string | null | undefined;
|
|
252
266
|
importer_contact_phone?: string | null | undefined;
|
|
@@ -257,8 +271,15 @@ export declare const ConsolidatedCustomsInvoice: z.ZodObject<{
|
|
|
257
271
|
}, {
|
|
258
272
|
posting_date: string;
|
|
259
273
|
set_posting_time: number;
|
|
274
|
+
export_approval_status: "" | "Waiting for Approval" | "Approved" | "Declined";
|
|
260
275
|
currency: string;
|
|
261
276
|
conversion_rate: number;
|
|
277
|
+
total_qty: number;
|
|
278
|
+
total_net_weight: number;
|
|
279
|
+
base_total: number;
|
|
280
|
+
base_net_total: number;
|
|
281
|
+
total: number;
|
|
282
|
+
net_total: number;
|
|
262
283
|
dispatch_address_name: string;
|
|
263
284
|
importer_address: string;
|
|
264
285
|
importer_contact: string;
|
|
@@ -297,14 +318,7 @@ export declare const ConsolidatedCustomsInvoice: z.ZodObject<{
|
|
|
297
318
|
naming_series?: string | null | undefined;
|
|
298
319
|
posting_time?: string | null | undefined;
|
|
299
320
|
company_tax_id?: string | null | undefined;
|
|
300
|
-
export_approval_status?: "" | "Waiting for Approval" | "Approved" | "Declined" | null | undefined;
|
|
301
321
|
mrn?: string | null | undefined;
|
|
302
|
-
total_qty?: number | null | undefined;
|
|
303
|
-
total_net_weight?: number | null | undefined;
|
|
304
|
-
base_total?: number | null | undefined;
|
|
305
|
-
base_net_total?: number | null | undefined;
|
|
306
|
-
total?: number | null | undefined;
|
|
307
|
-
net_total?: number | null | undefined;
|
|
308
322
|
dispatch_address?: string | null | undefined;
|
|
309
323
|
importer_address_display?: string | null | undefined;
|
|
310
324
|
importer_contact_phone?: string | null | undefined;
|
|
@@ -364,32 +378,56 @@ export declare const ConsolidatedCustomsInvoiceCreateMethodResponseSchema: z.Zod
|
|
|
364
378
|
link_name: string;
|
|
365
379
|
link_title?: string | null | undefined;
|
|
366
380
|
}>, "many">>;
|
|
367
|
-
}, "address_title" | "phone" | "email_id"> & {
|
|
381
|
+
}, "address_title" | "address_line1" | "address_line2" | "pincode" | "state" | "phone" | "city" | "country" | "email_id"> & {
|
|
368
382
|
tax_id: z.ZodString;
|
|
369
383
|
}, "strip", z.ZodTypeAny, {
|
|
384
|
+
address_line1: string;
|
|
385
|
+
pincode: string;
|
|
386
|
+
city: string;
|
|
387
|
+
country: string;
|
|
370
388
|
tax_id: string;
|
|
371
389
|
address_title?: string | null | undefined;
|
|
390
|
+
address_line2?: string | null | undefined;
|
|
391
|
+
state?: string | null | undefined;
|
|
372
392
|
phone?: string | null | undefined;
|
|
373
393
|
email_id?: string | null | undefined;
|
|
374
394
|
}, {
|
|
395
|
+
address_line1: string;
|
|
396
|
+
city: string;
|
|
397
|
+
country: string;
|
|
375
398
|
tax_id: string;
|
|
376
399
|
address_title?: string | null | undefined;
|
|
400
|
+
address_line2?: string | null | undefined;
|
|
401
|
+
pincode?: unknown;
|
|
402
|
+
state?: string | null | undefined;
|
|
377
403
|
phone?: string | null | undefined;
|
|
378
404
|
email_id?: string | null | undefined;
|
|
379
405
|
}>;
|
|
380
406
|
}, "strip", z.ZodTypeAny, {
|
|
381
407
|
name: string;
|
|
382
408
|
importer_info: {
|
|
409
|
+
address_line1: string;
|
|
410
|
+
pincode: string;
|
|
411
|
+
city: string;
|
|
412
|
+
country: string;
|
|
383
413
|
tax_id: string;
|
|
384
414
|
address_title?: string | null | undefined;
|
|
415
|
+
address_line2?: string | null | undefined;
|
|
416
|
+
state?: string | null | undefined;
|
|
385
417
|
phone?: string | null | undefined;
|
|
386
418
|
email_id?: string | null | undefined;
|
|
387
419
|
};
|
|
388
420
|
}, {
|
|
389
421
|
name: string;
|
|
390
422
|
importer_info: {
|
|
423
|
+
address_line1: string;
|
|
424
|
+
city: string;
|
|
425
|
+
country: string;
|
|
391
426
|
tax_id: string;
|
|
392
427
|
address_title?: string | null | undefined;
|
|
428
|
+
address_line2?: string | null | undefined;
|
|
429
|
+
pincode?: unknown;
|
|
430
|
+
state?: string | null | undefined;
|
|
393
431
|
phone?: string | null | undefined;
|
|
394
432
|
email_id?: string | null | undefined;
|
|
395
433
|
};
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ConsolidatedCustomsInvoiceCreateMethodResponseSchema = exports.ConsolidatedCustomsInvoiceCreateMethodInput = exports.ConsolidatedCustomsInvoice = exports.ConsolidatedCustomsInvoiceExportApprovalStatus = exports.ConsolidatedCustomsInvoiceItem = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const Address_1 = require("./Address");
|
|
6
|
+
const zodContextOptionals_1 = require("../../utils/zodContextOptionals");
|
|
6
7
|
// Child table: Consolidated Customs Invoice Item
|
|
7
8
|
exports.ConsolidatedCustomsInvoiceItem = zod_1.z
|
|
8
9
|
.object({
|
|
@@ -40,10 +41,12 @@ exports.ConsolidatedCustomsInvoiceItem = zod_1.z
|
|
|
40
41
|
country_of_origin: zod_1.z.string().optional().nullable(),
|
|
41
42
|
})
|
|
42
43
|
.describe("Consolidated Customs Invoice Item");
|
|
43
|
-
exports.ConsolidatedCustomsInvoiceExportApprovalStatus = zod_1.z
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
exports.ConsolidatedCustomsInvoiceExportApprovalStatus = zod_1.z.enum([
|
|
45
|
+
"",
|
|
46
|
+
"Waiting for Approval",
|
|
47
|
+
"Approved",
|
|
48
|
+
"Declined",
|
|
49
|
+
]);
|
|
47
50
|
exports.ConsolidatedCustomsInvoice = zod_1.z
|
|
48
51
|
.object({
|
|
49
52
|
posting_date: zod_1.z.string(),
|
|
@@ -53,16 +56,16 @@ exports.ConsolidatedCustomsInvoice = zod_1.z
|
|
|
53
56
|
company: zod_1.z.string().optional().nullable(),
|
|
54
57
|
company_tax_id: zod_1.z.string().optional().nullable(),
|
|
55
58
|
amended_from: zod_1.z.string().optional().nullable(),
|
|
56
|
-
export_approval_status: exports.ConsolidatedCustomsInvoiceExportApprovalStatus,
|
|
59
|
+
export_approval_status: (0, zodContextOptionals_1.optionalForInput)(exports.ConsolidatedCustomsInvoiceExportApprovalStatus),
|
|
57
60
|
mrn: zod_1.z.string().optional().nullable(),
|
|
58
61
|
currency: zod_1.z.string(),
|
|
59
62
|
conversion_rate: zod_1.z.number(),
|
|
60
|
-
total_qty: zod_1.z.number()
|
|
61
|
-
total_net_weight: zod_1.z.number()
|
|
62
|
-
base_total: zod_1.z.number()
|
|
63
|
-
base_net_total: zod_1.z.number()
|
|
64
|
-
total: zod_1.z.number()
|
|
65
|
-
net_total: zod_1.z.number()
|
|
63
|
+
total_qty: (0, zodContextOptionals_1.optionalForInput)(zod_1.z.number()),
|
|
64
|
+
total_net_weight: (0, zodContextOptionals_1.optionalForInput)(zod_1.z.number()),
|
|
65
|
+
base_total: (0, zodContextOptionals_1.optionalForInput)(zod_1.z.number()),
|
|
66
|
+
base_net_total: (0, zodContextOptionals_1.optionalForInput)(zod_1.z.number()),
|
|
67
|
+
total: (0, zodContextOptionals_1.optionalForInput)(zod_1.z.number()),
|
|
68
|
+
net_total: (0, zodContextOptionals_1.optionalForInput)(zod_1.z.number()),
|
|
66
69
|
dispatch_address_name: zod_1.z.string(),
|
|
67
70
|
dispatch_address: zod_1.z.string().optional().nullable(),
|
|
68
71
|
importer_address: zod_1.z.string(),
|
|
@@ -88,6 +91,12 @@ exports.ConsolidatedCustomsInvoiceCreateMethodResponseSchema = zod_1.z
|
|
|
88
91
|
name: zod_1.z.string().min(1),
|
|
89
92
|
importer_info: Address_1.Address.pick({
|
|
90
93
|
address_title: true,
|
|
94
|
+
address_line1: true,
|
|
95
|
+
address_line2: true,
|
|
96
|
+
city: true,
|
|
97
|
+
pincode: true,
|
|
98
|
+
state: true,
|
|
99
|
+
country: true,
|
|
91
100
|
email_id: true,
|
|
92
101
|
phone: true,
|
|
93
102
|
}).extend({
|
|
@@ -9,6 +9,35 @@ export declare const DynamicLinkPostBody: z.ZodObject<{
|
|
|
9
9
|
link_doctype: string;
|
|
10
10
|
link_name: string;
|
|
11
11
|
}>;
|
|
12
|
+
export declare const EmailId: z.ZodObject<{
|
|
13
|
+
email_id: z.ZodString;
|
|
14
|
+
is_primary: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
|
|
15
|
+
__optionalForInput: true;
|
|
16
|
+
};
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
email_id: string;
|
|
19
|
+
is_primary: 0 | 1;
|
|
20
|
+
}, {
|
|
21
|
+
email_id: string;
|
|
22
|
+
is_primary?: unknown;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const Phone: z.ZodObject<{
|
|
25
|
+
phone: z.ZodString;
|
|
26
|
+
is_primary_phone: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
|
|
27
|
+
__optionalForInput: true;
|
|
28
|
+
};
|
|
29
|
+
is_primary_mobile_no: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
|
|
30
|
+
__optionalForInput: true;
|
|
31
|
+
};
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
phone: string;
|
|
34
|
+
is_primary_phone: 0 | 1;
|
|
35
|
+
is_primary_mobile_no: 0 | 1;
|
|
36
|
+
}, {
|
|
37
|
+
phone: string;
|
|
38
|
+
is_primary_phone?: unknown;
|
|
39
|
+
is_primary_mobile_no?: unknown;
|
|
40
|
+
}>;
|
|
12
41
|
export declare const Contact: z.ZodObject<{
|
|
13
42
|
first_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
14
43
|
middle_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Contact = exports.DynamicLinkPostBody = void 0;
|
|
3
|
+
exports.Contact = exports.Phone = exports.EmailId = exports.DynamicLinkPostBody = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const Boolean_1 = require("./Boolean");
|
|
6
6
|
const zodContextOptionals_1 = require("../../utils/zodContextOptionals");
|
|
@@ -17,13 +17,13 @@ const Link = zod_1.z
|
|
|
17
17
|
link_title: zod_1.z.string(),
|
|
18
18
|
})
|
|
19
19
|
.describe("Contact Link");
|
|
20
|
-
|
|
20
|
+
exports.EmailId = zod_1.z
|
|
21
21
|
.object({
|
|
22
22
|
email_id: zod_1.z.string(),
|
|
23
23
|
is_primary: Boolean_1.ERPNextBoolean,
|
|
24
24
|
})
|
|
25
25
|
.describe("Contact EmailId");
|
|
26
|
-
|
|
26
|
+
exports.Phone = zod_1.z
|
|
27
27
|
.object({
|
|
28
28
|
phone: zod_1.z.string(),
|
|
29
29
|
is_primary_phone: Boolean_1.ERPNextBoolean,
|
|
@@ -47,8 +47,8 @@ exports.Contact = zod_1.z
|
|
|
47
47
|
is_primary_contact: Boolean_1.ERPNextBoolean,
|
|
48
48
|
is_billing_contact: Boolean_1.ERPNextBoolean,
|
|
49
49
|
unsubscribed: Boolean_1.ERPNextBoolean,
|
|
50
|
-
email_ids: zod_1.z.array(EmailId).optional().nullable(),
|
|
51
|
-
phone_nos: zod_1.z.array(Phone).optional().nullable(),
|
|
50
|
+
email_ids: zod_1.z.array(exports.EmailId).optional().nullable(),
|
|
51
|
+
phone_nos: zod_1.z.array(exports.Phone).optional().nullable(),
|
|
52
52
|
links: zod_1.z.array(Link).optional().nullable(),
|
|
53
53
|
})
|
|
54
54
|
.describe("Contact");
|