erpnext-queue-client 1.38.0 → 2.0.0-beta.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.
- package/dist/client.js +2 -2
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +16 -2
- package/dist/erpnext/doctypeResourceRequest.d.ts +12 -11
- package/dist/erpnext/doctypeResourceRequest.js +3 -2
- package/dist/erpnext/doctypeSubmittableResourceRequest.d.ts +121 -4
- package/dist/erpnext/doctypeSubmittableResourceRequest.js +14 -1
- package/dist/erpnext/doctypes/address.d.ts +154 -219
- package/dist/erpnext/doctypes/address.js +0 -2
- package/dist/erpnext/doctypes/contact.d.ts +151 -308
- package/dist/erpnext/doctypes/contact.js +1 -1
- package/dist/erpnext/doctypes/deliveryNote.d.ts +644 -455
- package/dist/erpnext/doctypes/deliveryNote.js +4 -10
- package/dist/erpnext/doctypes/item.d.ts +215 -308
- package/dist/erpnext/doctypes/productBundle.d.ts +43 -53
- package/dist/erpnext/doctypes/purchaseInvoice.d.ts +669 -697
- package/dist/erpnext/doctypes/purchaseReceipt.d.ts +265 -314
- package/dist/erpnext/doctypes/salesInvoice.d.ts +3332 -0
- package/dist/erpnext/doctypes/salesInvoice.js +72 -0
- package/dist/erpnext/doctypes/servicecase.d.ts +197 -140
- package/dist/erpnext/doctypes/servicecase.js +4 -6
- package/dist/erpnext/doctypes/shipment.d.ts +168 -258
- package/dist/erpnext/doctypes/tags.d.ts +10 -0
- package/dist/erpnext/doctypes/tags.js +102 -0
- package/dist/erpnext/model/Account.d.ts +0 -33
- package/dist/erpnext/model/Account.js +0 -11
- package/dist/erpnext/model/Address.d.ts +112 -233
- package/dist/erpnext/model/Address.js +11 -49
- package/dist/erpnext/model/Attachment.d.ts +0 -3
- package/dist/erpnext/model/Attachment.js +0 -1
- package/dist/erpnext/model/Boolean.d.ts +4 -0
- package/dist/erpnext/model/Boolean.js +9 -0
- package/dist/erpnext/model/Compliance.d.ts +0 -112
- package/dist/erpnext/model/Compliance.js +0 -19
- package/dist/erpnext/model/Contact.d.ts +166 -416
- package/dist/erpnext/model/Contact.js +16 -69
- package/dist/erpnext/model/Country.d.ts +0 -64
- package/dist/erpnext/model/Country.js +0 -10
- package/dist/erpnext/model/Customer.d.ts +39 -64
- package/dist/erpnext/model/Customer.js +11 -25
- package/dist/erpnext/model/DeliveryNote.d.ts +124 -1170
- package/dist/erpnext/model/DeliveryNote.js +5 -52
- package/dist/erpnext/model/DispatchRun.d.ts +7 -113
- package/dist/erpnext/model/DispatchRun.js +2 -31
- package/dist/erpnext/model/DispatcherPreset.d.ts +0 -119
- package/dist/erpnext/model/DispatcherPreset.js +1 -27
- package/dist/erpnext/model/DocInfo.d.ts +41 -339
- package/dist/erpnext/model/DocInfo.js +5 -6
- package/dist/erpnext/model/DocTypeHelpers.d.ts +141 -2
- package/dist/erpnext/model/DocTypeHelpers.js +132 -1
- package/dist/erpnext/model/ERPNextDocTypeMeta.d.ts +124 -0
- package/dist/erpnext/model/ERPNextDocTypeMeta.js +37 -0
- package/dist/erpnext/model/ERPNextRequest.d.ts +5 -5
- package/dist/erpnext/model/File.d.ts +0 -48
- package/dist/erpnext/model/File.js +0 -8
- package/dist/erpnext/model/Fulfiller.d.ts +0 -121
- package/dist/erpnext/model/Fulfiller.js +1 -56
- package/dist/erpnext/model/FulfillerSettings.d.ts +0 -39
- package/dist/erpnext/model/FulfillerSettings.js +0 -6
- package/dist/erpnext/model/InternalReasons.d.ts +0 -3
- package/dist/erpnext/model/InternalReasons.js +0 -1
- package/dist/erpnext/model/Item.d.ts +478 -1847
- package/dist/erpnext/model/Item.js +18 -142
- package/dist/erpnext/model/Logs.d.ts +0 -9
- package/dist/erpnext/model/Logs.js +0 -3
- package/dist/erpnext/model/PartList.d.ts +0 -15
- package/dist/erpnext/model/PartList.js +0 -5
- package/dist/erpnext/model/PaymentEntry.d.ts +141 -128
- package/dist/erpnext/model/PaymentEntry.js +46 -47
- package/dist/erpnext/model/Permissions.d.ts +3 -3
- package/dist/erpnext/model/Permissions.js +1 -1
- package/dist/erpnext/model/ProductBundle.d.ts +6 -107
- package/dist/erpnext/model/ProductBundle.js +0 -17
- package/dist/erpnext/model/PurchaseInvoice.d.ts +290 -362
- package/dist/erpnext/model/PurchaseInvoice.js +5 -23
- package/dist/erpnext/model/PurchaseOrder.d.ts +34 -180
- package/dist/erpnext/model/PurchaseOrder.js +0 -34
- package/dist/erpnext/model/Receipt.d.ts +30 -121
- package/dist/erpnext/model/Receipt.js +2 -25
- package/dist/erpnext/model/ReceiptDraft.d.ts +28 -67
- package/dist/erpnext/model/ReceiptDraft.js +2 -11
- package/dist/erpnext/model/Report.d.ts +0 -40
- package/dist/erpnext/model/Report.js +0 -8
- package/dist/erpnext/model/SalesInvoice.d.ts +2441 -0
- package/dist/erpnext/model/SalesInvoice.js +326 -0
- package/dist/erpnext/model/SalesOrder.d.ts +1043 -0
- package/dist/erpnext/model/SalesOrder.js +271 -0
- package/dist/erpnext/model/SalesTaxesAndCharges.d.ts +47 -0
- package/dist/erpnext/model/SalesTaxesAndCharges.js +30 -0
- package/dist/erpnext/model/Servicecase.d.ts +295 -740
- package/dist/erpnext/model/Servicecase.js +31 -116
- package/dist/erpnext/model/ServicecaseReason.d.ts +0 -8
- package/dist/erpnext/model/ServicecaseReason.js +0 -2
- package/dist/erpnext/model/ServicecaseSolution.d.ts +0 -3
- package/dist/erpnext/model/ServicecaseSolution.js +0 -1
- package/dist/erpnext/model/ServiceportalProductConfiguration.d.ts +0 -575
- package/dist/erpnext/model/ServiceportalProductConfiguration.js +5 -50
- package/dist/erpnext/model/Shipment.d.ts +18 -729
- package/dist/erpnext/model/Shipment.js +1 -82
- package/dist/erpnext/model/ShippingLabel.d.ts +0 -32
- package/dist/erpnext/model/ShippingLabel.js +0 -8
- package/dist/erpnext/model/ShippingProvider.d.ts +6 -87
- package/dist/erpnext/model/ShippingProvider.js +3 -6
- package/dist/erpnext/model/Stock.d.ts +6 -46
- package/dist/erpnext/model/Stock.js +0 -8
- package/dist/erpnext/model/StockEntry.d.ts +12 -45
- package/dist/erpnext/model/StockEntry.js +0 -11
- package/dist/erpnext/model/StockReconciliation.d.ts +5 -32
- package/dist/erpnext/model/StockReconciliation.js +0 -10
- package/dist/erpnext/model/Supplier.d.ts +0 -79
- package/dist/erpnext/model/Supplier.js +0 -8
- package/dist/erpnext/model/Version.d.ts +0 -9
- package/dist/erpnext/model/Version.js +0 -3
- package/dist/erpnext/model/Waitlist.d.ts +0 -3
- package/dist/erpnext/model/Waitlist.js +0 -1
- package/dist/erpnext/model/WarehouseCategory.d.ts +0 -11
- package/dist/erpnext/model/WarehouseCategory.js +1 -7
- package/dist/erpnext/reports.js +3 -7
- package/dist/erpnext/resourceRequest.d.ts +13 -11
- package/dist/erpnext/resourceRequest.js +23 -18
- package/dist/index.d.ts +16 -10
- package/dist/index.js +24 -12
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +227 -0
- package/dist/utils/utils.d.ts +3 -0
- package/dist/utils/zodContextOptionals.d.ts +14 -0
- package/dist/utils/zodContextOptionals.js +42 -0
- package/dist/utils/zodUtils.js +2 -1
- package/package.json +2 -2
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.d.ts +0 -433
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.js +0 -102
- package/dist/erpnext/model/ShippingFees.d.ts +0 -36
- package/dist/erpnext/model/ShippingFees.js +0 -18
|
@@ -1,108 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Contact = exports.DynamicLinkPostBody = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const Boolean_1 = require("./Boolean");
|
|
6
|
+
const zodContextOptionals_1 = require("../../utils/zodContextOptionals");
|
|
5
7
|
exports.DynamicLinkPostBody = zod_1.z
|
|
6
8
|
.object({
|
|
7
9
|
link_doctype: zod_1.z.string(),
|
|
8
10
|
link_name: zod_1.z.string(),
|
|
9
11
|
})
|
|
10
12
|
.describe("Contact DynamicLinkPostBody");
|
|
11
|
-
exports.ContactPostBody = zod_1.z
|
|
12
|
-
.object({
|
|
13
|
-
first_name: zod_1.z.string(),
|
|
14
|
-
last_name: zod_1.z.string().optional().nullable(),
|
|
15
|
-
email_ids: zod_1.z.array(zod_1.z.object({
|
|
16
|
-
email_id: zod_1.z.string(),
|
|
17
|
-
is_primary: zod_1.z.number(),
|
|
18
|
-
})),
|
|
19
|
-
links: zod_1.z.array(exports.DynamicLinkPostBody).optional().nullable(),
|
|
20
|
-
})
|
|
21
|
-
.describe("Contact ContactPostBody");
|
|
22
13
|
const Link = zod_1.z
|
|
23
14
|
.object({
|
|
24
|
-
name: zod_1.z.string(),
|
|
25
|
-
owner: zod_1.z.string(),
|
|
26
|
-
creation: zod_1.z.string(),
|
|
27
|
-
modified: zod_1.z.string(),
|
|
28
|
-
modified_by: zod_1.z.string(),
|
|
29
|
-
parent: zod_1.z.string(),
|
|
30
|
-
parentfield: zod_1.z.string(),
|
|
31
|
-
parenttype: zod_1.z.string(),
|
|
32
|
-
idx: zod_1.z.number(),
|
|
33
|
-
docstatus: zod_1.z.number(),
|
|
34
15
|
link_doctype: zod_1.z.string(),
|
|
35
16
|
link_name: zod_1.z.string(),
|
|
36
17
|
link_title: zod_1.z.string(),
|
|
37
|
-
doctype: zod_1.z.string(),
|
|
38
18
|
})
|
|
39
19
|
.describe("Contact Link");
|
|
40
20
|
const EmailId = zod_1.z
|
|
41
21
|
.object({
|
|
42
|
-
name: zod_1.z.string(),
|
|
43
|
-
owner: zod_1.z.string(),
|
|
44
|
-
creation: zod_1.z.string(),
|
|
45
|
-
modified: zod_1.z.string(),
|
|
46
|
-
modified_by: zod_1.z.string(),
|
|
47
|
-
parent: zod_1.z.string(),
|
|
48
|
-
parentfield: zod_1.z.string(),
|
|
49
|
-
parenttype: zod_1.z.string(),
|
|
50
|
-
idx: zod_1.z.number(),
|
|
51
|
-
docstatus: zod_1.z.number(),
|
|
52
22
|
email_id: zod_1.z.string(),
|
|
53
|
-
is_primary:
|
|
54
|
-
doctype: zod_1.z.string(),
|
|
23
|
+
is_primary: Boolean_1.ERPNextBoolean,
|
|
55
24
|
})
|
|
56
25
|
.describe("Contact EmailId");
|
|
57
26
|
const Phone = zod_1.z
|
|
58
27
|
.object({
|
|
59
|
-
name: zod_1.z.string(),
|
|
60
|
-
owner: zod_1.z.string(),
|
|
61
|
-
creation: zod_1.z.string(),
|
|
62
|
-
modified: zod_1.z.string(),
|
|
63
|
-
modified_by: zod_1.z.string(),
|
|
64
|
-
parent: zod_1.z.string(),
|
|
65
|
-
parentfield: zod_1.z.string(),
|
|
66
|
-
parenttype: zod_1.z.string(),
|
|
67
|
-
idx: zod_1.z.number(),
|
|
68
|
-
docstatus: zod_1.z.number(),
|
|
69
28
|
phone: zod_1.z.string(),
|
|
70
|
-
is_primary_phone:
|
|
71
|
-
is_primary_mobile_no:
|
|
72
|
-
doctype: zod_1.z.string(),
|
|
29
|
+
is_primary_phone: Boolean_1.ERPNextBoolean,
|
|
30
|
+
is_primary_mobile_no: Boolean_1.ERPNextBoolean,
|
|
73
31
|
})
|
|
74
32
|
.describe("Contact Phone");
|
|
75
33
|
exports.Contact = zod_1.z
|
|
76
34
|
.object({
|
|
77
|
-
|
|
78
|
-
owner: zod_1.z.string(),
|
|
79
|
-
creation: zod_1.z.string(),
|
|
80
|
-
modified: zod_1.z.string(),
|
|
81
|
-
modified_by: zod_1.z.string(),
|
|
82
|
-
idx: zod_1.z.number(),
|
|
83
|
-
docstatus: zod_1.z.number(),
|
|
84
|
-
first_name: zod_1.z.string(),
|
|
35
|
+
first_name: zod_1.z.string().optional().nullable(),
|
|
85
36
|
middle_name: zod_1.z.string().optional().nullable(),
|
|
86
37
|
company: zod_1.z.string().optional().nullable(),
|
|
87
38
|
last_name: zod_1.z.string().optional().nullable(),
|
|
88
|
-
email_id: zod_1.z.string(),
|
|
89
|
-
|
|
39
|
+
email_id: zod_1.z.string().optional().nullable(),
|
|
40
|
+
address: zod_1.z.string().optional().nullable(),
|
|
41
|
+
sync_with_google_contacts: Boolean_1.ERPNextBoolean,
|
|
90
42
|
status: zod_1.z.string().optional().nullable(),
|
|
91
43
|
phone: zod_1.z.string().optional().nullable(),
|
|
92
44
|
mobile_no: zod_1.z.string().optional().nullable(),
|
|
93
45
|
image: zod_1.z.string().optional().nullable(),
|
|
94
|
-
pulled_from_google_contacts:
|
|
95
|
-
is_primary_contact:
|
|
96
|
-
is_billing_contact:
|
|
97
|
-
unsubscribed:
|
|
98
|
-
|
|
99
|
-
email_ids: zod_1.z.array(EmailId),
|
|
46
|
+
pulled_from_google_contacts: Boolean_1.ERPNextBoolean,
|
|
47
|
+
is_primary_contact: Boolean_1.ERPNextBoolean,
|
|
48
|
+
is_billing_contact: Boolean_1.ERPNextBoolean,
|
|
49
|
+
unsubscribed: Boolean_1.ERPNextBoolean,
|
|
50
|
+
email_ids: zod_1.z.array(EmailId).optional().nullable(),
|
|
100
51
|
phone_nos: zod_1.z.array(Phone).optional().nullable(),
|
|
101
52
|
links: zod_1.z.array(Link).optional().nullable(),
|
|
102
53
|
})
|
|
103
54
|
.describe("Contact");
|
|
104
|
-
|
|
105
|
-
.array(exports.Contact.pick({
|
|
106
|
-
name: true,
|
|
107
|
-
}))
|
|
108
|
-
.describe("ContactListName");
|
|
55
|
+
const ContactInput = (0, zodContextOptionals_1.ResourceInput)(exports.Contact).describe("ContactInput");
|
|
@@ -1,39 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const Country: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
creation: z.ZodString;
|
|
5
|
-
modified: z.ZodString;
|
|
6
|
-
modified_by: z.ZodString;
|
|
7
|
-
idx: z.ZodNumber;
|
|
8
|
-
docstatus: z.ZodNumber;
|
|
9
3
|
country_name: z.ZodString;
|
|
10
4
|
date_format: z.ZodString;
|
|
11
5
|
time_format: z.ZodString;
|
|
12
6
|
time_zones: z.ZodString;
|
|
13
7
|
code: z.ZodString;
|
|
14
|
-
doctype: z.ZodString;
|
|
15
8
|
}, "strip", z.ZodTypeAny, {
|
|
16
9
|
code: string;
|
|
17
|
-
name: string;
|
|
18
|
-
doctype: string;
|
|
19
|
-
creation: string;
|
|
20
|
-
modified: string;
|
|
21
|
-
modified_by: string;
|
|
22
|
-
idx: number;
|
|
23
|
-
docstatus: number;
|
|
24
10
|
country_name: string;
|
|
25
11
|
date_format: string;
|
|
26
12
|
time_format: string;
|
|
27
13
|
time_zones: string;
|
|
28
14
|
}, {
|
|
29
15
|
code: string;
|
|
30
|
-
name: string;
|
|
31
|
-
doctype: string;
|
|
32
|
-
creation: string;
|
|
33
|
-
modified: string;
|
|
34
|
-
modified_by: string;
|
|
35
|
-
idx: number;
|
|
36
|
-
docstatus: number;
|
|
37
16
|
country_name: string;
|
|
38
17
|
date_format: string;
|
|
39
18
|
time_format: string;
|
|
@@ -41,65 +20,22 @@ export declare const Country: z.ZodObject<{
|
|
|
41
20
|
}>;
|
|
42
21
|
export type CountryType = z.infer<typeof Country>;
|
|
43
22
|
export declare const CountryList: <T extends keyof CountryType>(fields: T[]) => z.ZodArray<z.ZodObject<Pick<{
|
|
44
|
-
name: z.ZodString;
|
|
45
|
-
creation: z.ZodString;
|
|
46
|
-
modified: z.ZodString;
|
|
47
|
-
modified_by: z.ZodString;
|
|
48
|
-
idx: z.ZodNumber;
|
|
49
|
-
docstatus: z.ZodNumber;
|
|
50
23
|
country_name: z.ZodString;
|
|
51
24
|
date_format: z.ZodString;
|
|
52
25
|
time_format: z.ZodString;
|
|
53
26
|
time_zones: z.ZodString;
|
|
54
27
|
code: z.ZodString;
|
|
55
|
-
doctype: z.ZodString;
|
|
56
28
|
}, T>, z.UnknownKeysParam, z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<Pick<{
|
|
57
|
-
name: z.ZodString;
|
|
58
|
-
creation: z.ZodString;
|
|
59
|
-
modified: z.ZodString;
|
|
60
|
-
modified_by: z.ZodString;
|
|
61
|
-
idx: z.ZodNumber;
|
|
62
|
-
docstatus: z.ZodNumber;
|
|
63
29
|
country_name: z.ZodString;
|
|
64
30
|
date_format: z.ZodString;
|
|
65
31
|
time_format: z.ZodString;
|
|
66
32
|
time_zones: z.ZodString;
|
|
67
33
|
code: z.ZodString;
|
|
68
|
-
doctype: z.ZodString;
|
|
69
34
|
}, T>>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<Pick<{
|
|
70
|
-
name: z.ZodString;
|
|
71
|
-
creation: z.ZodString;
|
|
72
|
-
modified: z.ZodString;
|
|
73
|
-
modified_by: z.ZodString;
|
|
74
|
-
idx: z.ZodNumber;
|
|
75
|
-
docstatus: z.ZodNumber;
|
|
76
35
|
country_name: z.ZodString;
|
|
77
36
|
date_format: z.ZodString;
|
|
78
37
|
time_format: z.ZodString;
|
|
79
38
|
time_zones: z.ZodString;
|
|
80
39
|
code: z.ZodString;
|
|
81
|
-
doctype: z.ZodString;
|
|
82
40
|
}, T>> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>, "many">;
|
|
83
|
-
declare const CountryListNameCode: z.ZodArray<z.ZodObject<Pick<{
|
|
84
|
-
name: z.ZodString;
|
|
85
|
-
creation: z.ZodString;
|
|
86
|
-
modified: z.ZodString;
|
|
87
|
-
modified_by: z.ZodString;
|
|
88
|
-
idx: z.ZodNumber;
|
|
89
|
-
docstatus: z.ZodNumber;
|
|
90
|
-
country_name: z.ZodString;
|
|
91
|
-
date_format: z.ZodString;
|
|
92
|
-
time_format: z.ZodString;
|
|
93
|
-
time_zones: z.ZodString;
|
|
94
|
-
code: z.ZodString;
|
|
95
|
-
doctype: z.ZodString;
|
|
96
|
-
}, "code" | "name">, "strip", z.ZodTypeAny, {
|
|
97
|
-
code: string;
|
|
98
|
-
name: string;
|
|
99
|
-
}, {
|
|
100
|
-
code: string;
|
|
101
|
-
name: string;
|
|
102
|
-
}>, "many">;
|
|
103
41
|
export declare const CountryEnum: z.ZodEnum<["Afghanistan", "Åland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia, Plurinational State of", "Bonaire, Sint Eustatius and Saba", "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, The Democratic Republic of the", "Cook Islands", "Costa Rica", "Croatia", "Cuba", "Curaçao", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guernsey", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard Island and McDonald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Isle of Man", "Israel", "Italy", "Ivory Coast", "Jamaica", "Japan", "Jersey", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic Peoples Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao Peoples Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macao", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montenegro", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Palestinian Territory, Occupied", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Réunion", "Romania", "Russian Federation", "Rwanda", "Saint Barthélemy", "Saint Helena, Ascension and Tristan da Cunha", "Saint Kitts and Nevis", "Saint Lucia", "Saint Martin (French part)", "Saint Pierre and Miquelon", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Sint Maarten (Dutch part)", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Sudan", "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Timor-Leste", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela, Bolivarian Republic of", "Vietnam", "Virgin Islands, British", "Virgin Islands, U.S.", "Wallis and Futuna", "Western Sahara", "Yemen", "Zambia", "Zimbabwe"]>;
|
|
104
|
-
export type CountryListNameCodeType = z.infer<typeof CountryListNameCode>;
|
|
105
|
-
export {};
|
|
@@ -5,25 +5,15 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const zodUtils_1 = require("../../utils/zodUtils");
|
|
6
6
|
exports.Country = zod_1.z
|
|
7
7
|
.object({
|
|
8
|
-
name: zod_1.z.string(),
|
|
9
|
-
creation: zod_1.z.string(),
|
|
10
|
-
modified: zod_1.z.string(),
|
|
11
|
-
modified_by: zod_1.z.string(),
|
|
12
|
-
idx: zod_1.z.number(),
|
|
13
|
-
docstatus: zod_1.z.number(),
|
|
14
8
|
country_name: zod_1.z.string(),
|
|
15
9
|
date_format: zod_1.z.string(),
|
|
16
10
|
time_format: zod_1.z.string(),
|
|
17
11
|
time_zones: zod_1.z.string(),
|
|
18
12
|
code: zod_1.z.string(),
|
|
19
|
-
doctype: zod_1.z.string(),
|
|
20
13
|
})
|
|
21
14
|
.describe("Country");
|
|
22
15
|
const CountryList = (fields) => zod_1.z.array((0, zodUtils_1.pickFromSchema)(exports.Country, fields)).describe("CountryList");
|
|
23
16
|
exports.CountryList = CountryList;
|
|
24
|
-
const CountryListNameCode = zod_1.z
|
|
25
|
-
.array(exports.Country.pick({ name: true, code: true }))
|
|
26
|
-
.describe("CountryListNameCode");
|
|
27
17
|
exports.CountryEnum = zod_1.z
|
|
28
18
|
.enum([
|
|
29
19
|
"Afghanistan",
|
|
@@ -1,96 +1,71 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const Customer: z.ZodObject<{
|
|
3
|
+
naming_series: z.ZodOptional<z.ZodString>;
|
|
3
4
|
customer_name: z.ZodString;
|
|
4
5
|
customer_type: z.ZodOptional<z.ZodString>;
|
|
5
6
|
customer_group: z.ZodOptional<z.ZodString>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
creation: z.ZodString;
|
|
20
|
-
modified: z.ZodString;
|
|
21
|
-
modified_by: z.ZodString;
|
|
22
|
-
idx: z.ZodNumber;
|
|
23
|
-
docstatus: z.ZodNumber;
|
|
24
|
-
naming_series: z.ZodString;
|
|
25
|
-
customer_name: z.ZodString;
|
|
26
|
-
customer_type: z.ZodString;
|
|
27
|
-
customer_group: z.ZodString;
|
|
28
|
-
territory: z.ZodString;
|
|
29
|
-
so_required: z.ZodEffects<z.ZodDefault<z.ZodNumber>, boolean, number | undefined>;
|
|
30
|
-
dn_required: z.ZodEffects<z.ZodDefault<z.ZodNumber>, boolean, number | undefined>;
|
|
31
|
-
disabled: z.ZodEffects<z.ZodDefault<z.ZodNumber>, boolean, number | undefined>;
|
|
32
|
-
is_internal_customer: z.ZodEffects<z.ZodDefault<z.ZodNumber>, boolean, number | undefined>;
|
|
7
|
+
territory: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
8
|
+
so_required: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
|
|
9
|
+
__optionalForInput: true;
|
|
10
|
+
};
|
|
11
|
+
dn_required: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
|
|
12
|
+
__optionalForInput: true;
|
|
13
|
+
};
|
|
14
|
+
disabled: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
|
|
15
|
+
__optionalForInput: true;
|
|
16
|
+
};
|
|
17
|
+
is_internal_customer: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
|
|
18
|
+
__optionalForInput: true;
|
|
19
|
+
};
|
|
33
20
|
customer_primary_address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
customer_primary_contact: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
34
22
|
primary_address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
35
23
|
language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
36
|
-
is_frozen: z.ZodEffects<z.
|
|
24
|
+
is_frozen: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
|
|
25
|
+
__optionalForInput: true;
|
|
26
|
+
};
|
|
37
27
|
default_commission_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
38
|
-
doctype: z.ZodString;
|
|
39
28
|
companies: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodOptional<z.ZodString>, "many">>>;
|
|
40
29
|
accounts: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodOptional<z.ZodString>, "many">>>;
|
|
41
30
|
credit_limits: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodOptional<z.ZodString>, "many">>>;
|
|
42
31
|
sales_team: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodOptional<z.ZodString>, "many">>>;
|
|
43
32
|
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
owner: string;
|
|
47
|
-
creation: string;
|
|
48
|
-
modified: string;
|
|
49
|
-
modified_by: string;
|
|
50
|
-
idx: number;
|
|
51
|
-
docstatus: number;
|
|
52
|
-
disabled: boolean;
|
|
53
|
-
naming_series: string;
|
|
54
|
-
is_frozen: boolean;
|
|
33
|
+
disabled: 0 | 1;
|
|
34
|
+
is_frozen: 0 | 1;
|
|
55
35
|
customer_name: string;
|
|
56
|
-
is_internal_customer:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
so_required: boolean;
|
|
61
|
-
dn_required: boolean;
|
|
36
|
+
is_internal_customer: 0 | 1;
|
|
37
|
+
so_required: 0 | 1;
|
|
38
|
+
dn_required: 0 | 1;
|
|
39
|
+
naming_series?: string | undefined;
|
|
62
40
|
language?: string | null | undefined;
|
|
63
41
|
companies?: (string | undefined)[] | null | undefined;
|
|
64
42
|
accounts?: (string | undefined)[] | null | undefined;
|
|
43
|
+
customer_group?: string | undefined;
|
|
44
|
+
territory?: string | null | undefined;
|
|
65
45
|
sales_team?: (string | undefined)[] | null | undefined;
|
|
46
|
+
customer_type?: string | undefined;
|
|
66
47
|
customer_primary_address?: string | null | undefined;
|
|
48
|
+
customer_primary_contact?: string | null | undefined;
|
|
67
49
|
primary_address?: string | null | undefined;
|
|
68
50
|
default_commission_rate?: number | null | undefined;
|
|
69
51
|
credit_limits?: (string | undefined)[] | null | undefined;
|
|
70
52
|
}, {
|
|
71
|
-
name: string;
|
|
72
|
-
doctype: string;
|
|
73
|
-
owner: string;
|
|
74
|
-
creation: string;
|
|
75
|
-
modified: string;
|
|
76
|
-
modified_by: string;
|
|
77
|
-
idx: number;
|
|
78
|
-
docstatus: number;
|
|
79
|
-
naming_series: string;
|
|
80
53
|
customer_name: string;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
customer_type: string;
|
|
84
|
-
disabled?: number | undefined;
|
|
54
|
+
disabled?: unknown;
|
|
55
|
+
naming_series?: string | undefined;
|
|
85
56
|
language?: string | null | undefined;
|
|
86
|
-
is_frozen?:
|
|
57
|
+
is_frozen?: unknown;
|
|
87
58
|
companies?: (string | undefined)[] | null | undefined;
|
|
88
59
|
accounts?: (string | undefined)[] | null | undefined;
|
|
89
|
-
is_internal_customer?:
|
|
60
|
+
is_internal_customer?: unknown;
|
|
61
|
+
customer_group?: string | undefined;
|
|
62
|
+
territory?: string | null | undefined;
|
|
90
63
|
sales_team?: (string | undefined)[] | null | undefined;
|
|
91
|
-
|
|
92
|
-
|
|
64
|
+
customer_type?: string | undefined;
|
|
65
|
+
so_required?: unknown;
|
|
66
|
+
dn_required?: unknown;
|
|
93
67
|
customer_primary_address?: string | null | undefined;
|
|
68
|
+
customer_primary_contact?: string | null | undefined;
|
|
94
69
|
primary_address?: string | null | undefined;
|
|
95
70
|
default_commission_rate?: number | null | undefined;
|
|
96
71
|
credit_limits?: (string | undefined)[] | null | undefined;
|
|
@@ -1,39 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Customer =
|
|
3
|
+
exports.Customer = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
const Boolean_1 = require("./Boolean");
|
|
6
|
+
exports.Customer = zod_1.z
|
|
6
7
|
.object({
|
|
8
|
+
naming_series: zod_1.z.string().optional(),
|
|
7
9
|
customer_name: zod_1.z.string(),
|
|
8
10
|
customer_type: zod_1.z.string().optional(),
|
|
9
11
|
customer_group: zod_1.z.string().optional(),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
name: zod_1.z.string(),
|
|
16
|
-
owner: zod_1.z.string(),
|
|
17
|
-
creation: zod_1.z.string(),
|
|
18
|
-
modified: zod_1.z.string(),
|
|
19
|
-
modified_by: zod_1.z.string(),
|
|
20
|
-
idx: zod_1.z.number(),
|
|
21
|
-
docstatus: zod_1.z.number(),
|
|
22
|
-
naming_series: zod_1.z.string(),
|
|
23
|
-
customer_name: zod_1.z.string(),
|
|
24
|
-
customer_type: zod_1.z.string(),
|
|
25
|
-
customer_group: zod_1.z.string(),
|
|
26
|
-
territory: zod_1.z.string(),
|
|
27
|
-
so_required: zod_1.z.number().default(0).transform(Boolean),
|
|
28
|
-
dn_required: zod_1.z.number().default(0).transform(Boolean),
|
|
29
|
-
disabled: zod_1.z.number().default(0).transform(Boolean),
|
|
30
|
-
is_internal_customer: zod_1.z.number().default(0).transform(Boolean),
|
|
12
|
+
territory: zod_1.z.string().optional().nullable(),
|
|
13
|
+
so_required: Boolean_1.ERPNextBoolean,
|
|
14
|
+
dn_required: Boolean_1.ERPNextBoolean,
|
|
15
|
+
disabled: Boolean_1.ERPNextBoolean,
|
|
16
|
+
is_internal_customer: Boolean_1.ERPNextBoolean,
|
|
31
17
|
customer_primary_address: zod_1.z.string().optional().nullable(),
|
|
18
|
+
customer_primary_contact: zod_1.z.string().optional().nullable(),
|
|
32
19
|
primary_address: zod_1.z.string().optional().nullable(),
|
|
33
20
|
language: zod_1.z.string().optional().nullable(),
|
|
34
|
-
is_frozen:
|
|
21
|
+
is_frozen: Boolean_1.ERPNextBoolean,
|
|
35
22
|
default_commission_rate: zod_1.z.number().optional().nullable(),
|
|
36
|
-
doctype: zod_1.z.string(),
|
|
37
23
|
companies: zod_1.z.array(zod_1.z.string().optional()).optional().nullable(),
|
|
38
24
|
accounts: zod_1.z.array(zod_1.z.string().optional()).optional().nullable(),
|
|
39
25
|
credit_limits: zod_1.z.array(zod_1.z.string().optional()).optional().nullable(),
|