erpnext-queue-client 2.5.8 → 2.5.11
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 +22 -3
- package/dist/client.test.d.ts +1 -0
- package/dist/client.test.js +41 -0
- package/dist/dataConverter.js +7 -17
- package/dist/erpnext/doctypes/address.d.ts +49 -5
- package/dist/erpnext/doctypes/contact.d.ts +83 -9
- package/dist/erpnext/doctypes/paymentEntry.d.ts +4 -4
- package/dist/erpnext/doctypes/purchaseInvoice.d.ts +18 -18
- package/dist/erpnext/doctypes/purchaseReceipt.d.ts +8 -8
- package/dist/erpnext/doctypes/salesInvoice.d.ts +22 -22
- package/dist/erpnext/doctypes/servicecase.d.ts +7 -7
- package/dist/erpnext/doctypes/shipment.d.ts +4 -4
- package/dist/erpnext/fileRequests.d.ts +1 -1
- package/dist/erpnext/methodRequest.d.ts +1 -1
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.d.ts +8 -0
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.js +1 -0
- package/dist/erpnext/model/Country.d.ts +14 -2
- package/dist/erpnext/model/DeliveryNote.d.ts +4 -4
- package/dist/erpnext/model/DocInfo.d.ts +10 -10
- package/dist/erpnext/model/DocTypeHelpers.d.ts +34 -2
- package/dist/erpnext/model/ERPNextDocTypeMeta.d.ts +3 -3
- package/dist/erpnext/model/Item.d.ts +9 -9
- package/dist/erpnext/model/Permissions.d.ts +2 -2
- package/dist/erpnext/model/PurchaseInvoice.d.ts +16 -16
- package/dist/erpnext/model/PurchaseOrder.d.ts +4 -4
- package/dist/erpnext/model/Receipt.d.ts +4 -4
- package/dist/erpnext/model/ReceiptDraft.d.ts +4 -4
- package/dist/erpnext/model/SalesInvoice.d.ts +18 -18
- package/dist/erpnext/model/SalesOrder.d.ts +6 -6
- package/dist/erpnext/model/Servicecase.d.ts +6 -6
- package/dist/erpnext/model/ServiceportalProductConfiguration.d.ts +17 -4
- package/dist/erpnext/model/ServiceportalProductConfiguration.js +4 -0
- package/dist/erpnext/model/Shipment.d.ts +4 -4
- package/dist/erpnext/model/ShippingFees.d.ts +2 -2
- package/dist/erpnext/model/ShippingProvider.d.ts +1 -1
- package/dist/erpnext/model/Stock.d.ts +12 -12
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -7,6 +7,22 @@ const zodUtils_1 = require("./utils/zodUtils");
|
|
|
7
7
|
const nanoid_1 = require("nanoid");
|
|
8
8
|
const dataConverter_1 = require("./dataConverter");
|
|
9
9
|
const nanoid = (0, nanoid_1.customAlphabet)("1234567890", 4);
|
|
10
|
+
function formatResponsePreview(data) {
|
|
11
|
+
const maxLength = 1200;
|
|
12
|
+
const preview = typeof data === "string"
|
|
13
|
+
? data
|
|
14
|
+
: (() => {
|
|
15
|
+
try {
|
|
16
|
+
return JSON.stringify(data, null, 2) ?? String(data);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return String(data);
|
|
20
|
+
}
|
|
21
|
+
})();
|
|
22
|
+
if (preview.length <= maxLength)
|
|
23
|
+
return preview;
|
|
24
|
+
return `${preview.slice(0, maxLength)}\n... [truncated]`;
|
|
25
|
+
}
|
|
10
26
|
class TemporalClient {
|
|
11
27
|
client;
|
|
12
28
|
options;
|
|
@@ -119,11 +135,14 @@ class TemporalClient {
|
|
|
119
135
|
throw err;
|
|
120
136
|
});
|
|
121
137
|
logger_1.lg.info(`Started workflow ${runId}`);
|
|
122
|
-
if (responseValidationModel)
|
|
138
|
+
if (!responseValidationModel)
|
|
139
|
+
return data;
|
|
140
|
+
try {
|
|
123
141
|
return (0, zodUtils_1.validateData)(data, responseValidationModel);
|
|
124
142
|
}
|
|
125
|
-
|
|
126
|
-
|
|
143
|
+
catch (err) {
|
|
144
|
+
const message = err instanceof Error ? err.message : "Response validation failed";
|
|
145
|
+
throw new Error(`${message}\n\nResponse preview:\n${formatResponsePreview(data)}`);
|
|
127
146
|
}
|
|
128
147
|
}
|
|
129
148
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_1 = require("./client");
|
|
6
|
+
const responseSchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
data: zod_1.z.array(zod_1.z.object({
|
|
9
|
+
name: zod_1.z.string(),
|
|
10
|
+
})),
|
|
11
|
+
})
|
|
12
|
+
.describe('Dispatcher Preset List with fields ["name"]');
|
|
13
|
+
(0, vitest_1.describe)("TemporalClient.executeERPNextRequestWorkflow", () => {
|
|
14
|
+
const originalNodeEnv = process.env.NODE_ENV;
|
|
15
|
+
const originalRunInTestEnv = process.env.RUN_IN_TEST_ENV;
|
|
16
|
+
(0, vitest_1.afterEach)(() => {
|
|
17
|
+
process.env.NODE_ENV = originalNodeEnv;
|
|
18
|
+
process.env.RUN_IN_TEST_ENV = originalRunInTestEnv;
|
|
19
|
+
});
|
|
20
|
+
(0, vitest_1.test)("includes a preview of invalid string responses in validation errors", async () => {
|
|
21
|
+
process.env.NODE_ENV = "test";
|
|
22
|
+
process.env.RUN_IN_TEST_ENV = "true";
|
|
23
|
+
const temporalClient = new client_1.TemporalClient({
|
|
24
|
+
client: {
|
|
25
|
+
workflow: {
|
|
26
|
+
execute: async () => "<html>Cloudflare Access denied</html>",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const error = await temporalClient
|
|
31
|
+
.executeERPNextRequestWorkflow("GET-dispatcher preset-List", {
|
|
32
|
+
requestMethod: "GET",
|
|
33
|
+
resourceName: "Dispatcher Preset",
|
|
34
|
+
responseValidationModel: responseSchema,
|
|
35
|
+
}, "erpnext")
|
|
36
|
+
.catch((err) => err);
|
|
37
|
+
(0, vitest_1.expect)(error).toBeInstanceOf(Error);
|
|
38
|
+
(0, vitest_1.expect)(error.message).toContain("Response preview:");
|
|
39
|
+
(0, vitest_1.expect)(error.message).toContain("<html>Cloudflare Access denied</html>");
|
|
40
|
+
});
|
|
41
|
+
});
|
package/dist/dataConverter.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.dataConverter = void 0;
|
|
37
27
|
const common_1 = require("@temporalio/common");
|
|
@@ -7,8 +7,8 @@ export declare class ERPNextAddress extends ERPNextDoctypeResourceRequest<typeof
|
|
|
7
7
|
constructor(temporalClient: TemporalClient);
|
|
8
8
|
/** Create an address linked to a customer. */
|
|
9
9
|
createForCustomer(address: AddressInputType, customerName: string): Promise<{
|
|
10
|
-
docstatus: number;
|
|
11
10
|
name: string;
|
|
11
|
+
docstatus: number;
|
|
12
12
|
owner: string;
|
|
13
13
|
creation: string;
|
|
14
14
|
modified: string;
|
|
@@ -35,8 +35,8 @@ export declare class ERPNextAddress extends ERPNextDoctypeResourceRequest<typeof
|
|
|
35
35
|
county?: string | null | undefined;
|
|
36
36
|
email_id?: string | null | undefined;
|
|
37
37
|
links?: {
|
|
38
|
-
docstatus: number;
|
|
39
38
|
name: string;
|
|
39
|
+
docstatus: number;
|
|
40
40
|
owner: string;
|
|
41
41
|
creation: string;
|
|
42
42
|
modified: string;
|
|
@@ -52,9 +52,9 @@ export declare class ERPNextAddress extends ERPNextDoctypeResourceRequest<typeof
|
|
|
52
52
|
link_title?: string | null | undefined;
|
|
53
53
|
}[] | undefined;
|
|
54
54
|
}>;
|
|
55
|
-
getAddressesByEmail: <K extends keyof (typeof Address)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends readonly (("
|
|
56
|
-
docstatus: number;
|
|
55
|
+
getAddressesByEmail: <K extends keyof (typeof Address)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends readonly (("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "address_type" | "address_line1" | "pincode" | "city" | "country" | "is_primary_address" | "is_shipping_address" | "is_your_company_address" | "disabled") | ("_user_tags" | "import_reference" | "address_title" | "address_line2" | "state" | "phone" | "fax" | "tax_category" | "county" | "email_id" | "links"))[] ? { [K_2 in T_1[number] as K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2]: (K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2) extends ("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "address_type" | "address_line1" | "pincode" | "city" | "country" | "is_primary_address" | "is_shipping_address" | "is_your_company_address" | "disabled") | ("_user_tags" | "import_reference" | "address_title" | "address_line2" | "state" | "phone" | "fax" | "tax_category" | "county" | "email_id" | "links") ? {
|
|
57
56
|
name: string;
|
|
57
|
+
docstatus: number;
|
|
58
58
|
owner: string;
|
|
59
59
|
creation: string;
|
|
60
60
|
modified: string;
|
|
@@ -80,8 +80,52 @@ export declare class ERPNextAddress extends ERPNextDoctypeResourceRequest<typeof
|
|
|
80
80
|
county?: string | null | undefined;
|
|
81
81
|
email_id?: string | null | undefined;
|
|
82
82
|
links?: {
|
|
83
|
+
name: string;
|
|
83
84
|
docstatus: number;
|
|
85
|
+
owner: string;
|
|
86
|
+
creation: string;
|
|
87
|
+
modified: string;
|
|
88
|
+
modified_by: string;
|
|
89
|
+
idx: number;
|
|
90
|
+
doctype: string;
|
|
91
|
+
parent: string;
|
|
92
|
+
parenttype: string;
|
|
93
|
+
parentfield: string;
|
|
94
|
+
link_doctype: string;
|
|
95
|
+
link_name: string;
|
|
96
|
+
_user_tags?: string | null | undefined;
|
|
97
|
+
link_title?: string | null | undefined;
|
|
98
|
+
}[] | undefined;
|
|
99
|
+
}[(("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "address_type" | "address_line1" | "pincode" | "city" | "country" | "is_primary_address" | "is_shipping_address" | "is_your_company_address" | "disabled") | ("_user_tags" | "import_reference" | "address_title" | "address_line2" | "state" | "phone" | "fax" | "tax_category" | "county" | "email_id" | "links")) & (K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2)] : never; }[] : any : never : never) extends infer T ? { [K_1 in keyof T]: (K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends readonly (("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "address_type" | "address_line1" | "pincode" | "city" | "country" | "is_primary_address" | "is_shipping_address" | "is_your_company_address" | "disabled") | ("_user_tags" | "import_reference" | "address_title" | "address_line2" | "state" | "phone" | "fax" | "tax_category" | "county" | "email_id" | "links"))[] ? { [K_2 in T_1[number] as K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2]: (K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2) extends ("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "address_type" | "address_line1" | "pincode" | "city" | "country" | "is_primary_address" | "is_shipping_address" | "is_your_company_address" | "disabled") | ("_user_tags" | "import_reference" | "address_title" | "address_line2" | "state" | "phone" | "fax" | "tax_category" | "county" | "email_id" | "links") ? {
|
|
100
|
+
name: string;
|
|
101
|
+
docstatus: number;
|
|
102
|
+
owner: string;
|
|
103
|
+
creation: string;
|
|
104
|
+
modified: string;
|
|
105
|
+
modified_by: string;
|
|
106
|
+
idx: number;
|
|
107
|
+
address_type: string;
|
|
108
|
+
address_line1: string;
|
|
109
|
+
pincode: string;
|
|
110
|
+
city: string;
|
|
111
|
+
country: string;
|
|
112
|
+
is_primary_address: 0 | 1;
|
|
113
|
+
is_shipping_address: 0 | 1;
|
|
114
|
+
is_your_company_address: 0 | 1;
|
|
115
|
+
disabled: 0 | 1;
|
|
116
|
+
_user_tags?: string | null | undefined;
|
|
117
|
+
import_reference?: string | null | undefined;
|
|
118
|
+
address_title?: string | null | undefined;
|
|
119
|
+
address_line2?: string | null | undefined;
|
|
120
|
+
state?: string | null | undefined;
|
|
121
|
+
phone?: string | null | undefined;
|
|
122
|
+
fax?: string | null | undefined;
|
|
123
|
+
tax_category?: string | null | undefined;
|
|
124
|
+
county?: string | null | undefined;
|
|
125
|
+
email_id?: string | null | undefined;
|
|
126
|
+
links?: {
|
|
84
127
|
name: string;
|
|
128
|
+
docstatus: number;
|
|
85
129
|
owner: string;
|
|
86
130
|
creation: string;
|
|
87
131
|
modified: string;
|
|
@@ -96,7 +140,7 @@ export declare class ERPNextAddress extends ERPNextDoctypeResourceRequest<typeof
|
|
|
96
140
|
_user_tags?: string | null | undefined;
|
|
97
141
|
link_title?: string | null | undefined;
|
|
98
142
|
}[] | undefined;
|
|
99
|
-
}[(("
|
|
143
|
+
}[(("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "address_type" | "address_line1" | "pincode" | "city" | "country" | "is_primary_address" | "is_shipping_address" | "is_your_company_address" | "disabled") | ("_user_tags" | "import_reference" | "address_title" | "address_line2" | "state" | "phone" | "fax" | "tax_category" | "county" | "email_id" | "links")) & (K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2)] : never; }[] : any : never : never)[K_1]; } : never>;
|
|
100
144
|
getAddressesBySupplier: (supplierName: string) => Promise<{
|
|
101
145
|
address_type: string;
|
|
102
146
|
address_line1: string;
|
|
@@ -3,9 +3,9 @@ import { ERPNextDoctypeResourceRequest } from "../doctypeResourceRequest";
|
|
|
3
3
|
import { Contact, ContactInputType } from "../model/Contact";
|
|
4
4
|
export declare class ERPNextContact extends ERPNextDoctypeResourceRequest<typeof Contact> {
|
|
5
5
|
constructor(temporalClient: TemporalClient);
|
|
6
|
-
getContactsByAddressEmail: <K extends keyof (typeof Contact)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends readonly (("
|
|
7
|
-
docstatus: number;
|
|
6
|
+
getContactsByAddressEmail: <K extends keyof (typeof Contact)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends readonly (("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "sync_with_google_contacts" | "pulled_from_google_contacts" | "is_primary_contact" | "is_billing_contact" | "unsubscribed") | ("status" | "address" | "_user_tags" | "phone" | "email_id" | "links" | "image" | "company" | "first_name" | "middle_name" | "last_name" | "mobile_no" | "email_ids" | "phone_nos"))[] ? { [K_2 in T_1[number] as K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2]: (K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2) extends ("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "sync_with_google_contacts" | "pulled_from_google_contacts" | "is_primary_contact" | "is_billing_contact" | "unsubscribed") | ("status" | "address" | "_user_tags" | "phone" | "email_id" | "links" | "image" | "company" | "first_name" | "middle_name" | "last_name" | "mobile_no" | "email_ids" | "phone_nos") ? {
|
|
8
7
|
name: string;
|
|
8
|
+
docstatus: number;
|
|
9
9
|
owner: string;
|
|
10
10
|
creation: string;
|
|
11
11
|
modified: string;
|
|
@@ -22,8 +22,8 @@ export declare class ERPNextContact extends ERPNextDoctypeResourceRequest<typeof
|
|
|
22
22
|
phone?: string | null | undefined;
|
|
23
23
|
email_id?: string | null | undefined;
|
|
24
24
|
links?: {
|
|
25
|
-
docstatus: number;
|
|
26
25
|
name: string;
|
|
26
|
+
docstatus: number;
|
|
27
27
|
owner: string;
|
|
28
28
|
creation: string;
|
|
29
29
|
modified: string;
|
|
@@ -45,8 +45,8 @@ export declare class ERPNextContact extends ERPNextDoctypeResourceRequest<typeof
|
|
|
45
45
|
last_name?: string | null | undefined;
|
|
46
46
|
mobile_no?: string | null | undefined;
|
|
47
47
|
email_ids?: {
|
|
48
|
-
docstatus: number;
|
|
49
48
|
name: string;
|
|
49
|
+
docstatus: number;
|
|
50
50
|
owner: string;
|
|
51
51
|
creation: string;
|
|
52
52
|
modified: string;
|
|
@@ -61,8 +61,82 @@ export declare class ERPNextContact extends ERPNextDoctypeResourceRequest<typeof
|
|
|
61
61
|
_user_tags?: string | null | undefined;
|
|
62
62
|
}[] | null | undefined;
|
|
63
63
|
phone_nos?: {
|
|
64
|
+
name: string;
|
|
64
65
|
docstatus: number;
|
|
66
|
+
owner: string;
|
|
67
|
+
creation: string;
|
|
68
|
+
modified: string;
|
|
69
|
+
modified_by: string;
|
|
70
|
+
idx: number;
|
|
71
|
+
doctype: string;
|
|
72
|
+
parent: string;
|
|
73
|
+
parenttype: string;
|
|
74
|
+
parentfield: string;
|
|
75
|
+
phone: string;
|
|
76
|
+
is_primary_phone: 0 | 1;
|
|
77
|
+
is_primary_mobile_no: 0 | 1;
|
|
78
|
+
_user_tags?: string | null | undefined;
|
|
79
|
+
}[] | null | undefined;
|
|
80
|
+
}[(("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "sync_with_google_contacts" | "pulled_from_google_contacts" | "is_primary_contact" | "is_billing_contact" | "unsubscribed") | ("status" | "address" | "_user_tags" | "phone" | "email_id" | "links" | "image" | "company" | "first_name" | "middle_name" | "last_name" | "mobile_no" | "email_ids" | "phone_nos")) & (K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2)] : never; }[] : any : never : never) extends infer T ? { [K_1 in keyof T]: (K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends readonly (("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "sync_with_google_contacts" | "pulled_from_google_contacts" | "is_primary_contact" | "is_billing_contact" | "unsubscribed") | ("status" | "address" | "_user_tags" | "phone" | "email_id" | "links" | "image" | "company" | "first_name" | "middle_name" | "last_name" | "mobile_no" | "email_ids" | "phone_nos"))[] ? { [K_2 in T_1[number] as K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2]: (K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2) extends ("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "sync_with_google_contacts" | "pulled_from_google_contacts" | "is_primary_contact" | "is_billing_contact" | "unsubscribed") | ("status" | "address" | "_user_tags" | "phone" | "email_id" | "links" | "image" | "company" | "first_name" | "middle_name" | "last_name" | "mobile_no" | "email_ids" | "phone_nos") ? {
|
|
81
|
+
name: string;
|
|
82
|
+
docstatus: number;
|
|
83
|
+
owner: string;
|
|
84
|
+
creation: string;
|
|
85
|
+
modified: string;
|
|
86
|
+
modified_by: string;
|
|
87
|
+
idx: number;
|
|
88
|
+
sync_with_google_contacts: 0 | 1;
|
|
89
|
+
pulled_from_google_contacts: 0 | 1;
|
|
90
|
+
is_primary_contact: 0 | 1;
|
|
91
|
+
is_billing_contact: 0 | 1;
|
|
92
|
+
unsubscribed: 0 | 1;
|
|
93
|
+
status?: string | null | undefined;
|
|
94
|
+
address?: string | null | undefined;
|
|
95
|
+
_user_tags?: string | null | undefined;
|
|
96
|
+
phone?: string | null | undefined;
|
|
97
|
+
email_id?: string | null | undefined;
|
|
98
|
+
links?: {
|
|
65
99
|
name: string;
|
|
100
|
+
docstatus: number;
|
|
101
|
+
owner: string;
|
|
102
|
+
creation: string;
|
|
103
|
+
modified: string;
|
|
104
|
+
modified_by: string;
|
|
105
|
+
idx: number;
|
|
106
|
+
doctype: string;
|
|
107
|
+
parent: string;
|
|
108
|
+
parenttype: string;
|
|
109
|
+
parentfield: string;
|
|
110
|
+
link_doctype: string;
|
|
111
|
+
link_name: string;
|
|
112
|
+
link_title: string;
|
|
113
|
+
_user_tags?: string | null | undefined;
|
|
114
|
+
}[] | null | undefined;
|
|
115
|
+
image?: string | null | undefined;
|
|
116
|
+
company?: string | null | undefined;
|
|
117
|
+
first_name?: string | null | undefined;
|
|
118
|
+
middle_name?: string | null | undefined;
|
|
119
|
+
last_name?: string | null | undefined;
|
|
120
|
+
mobile_no?: string | null | undefined;
|
|
121
|
+
email_ids?: {
|
|
122
|
+
name: string;
|
|
123
|
+
docstatus: number;
|
|
124
|
+
owner: string;
|
|
125
|
+
creation: string;
|
|
126
|
+
modified: string;
|
|
127
|
+
modified_by: string;
|
|
128
|
+
idx: number;
|
|
129
|
+
doctype: string;
|
|
130
|
+
parent: string;
|
|
131
|
+
parenttype: string;
|
|
132
|
+
parentfield: string;
|
|
133
|
+
email_id: string;
|
|
134
|
+
is_primary: 0 | 1;
|
|
135
|
+
_user_tags?: string | null | undefined;
|
|
136
|
+
}[] | null | undefined;
|
|
137
|
+
phone_nos?: {
|
|
138
|
+
name: string;
|
|
139
|
+
docstatus: number;
|
|
66
140
|
owner: string;
|
|
67
141
|
creation: string;
|
|
68
142
|
modified: string;
|
|
@@ -77,11 +151,11 @@ export declare class ERPNextContact extends ERPNextDoctypeResourceRequest<typeof
|
|
|
77
151
|
is_primary_mobile_no: 0 | 1;
|
|
78
152
|
_user_tags?: string | null | undefined;
|
|
79
153
|
}[] | null | undefined;
|
|
80
|
-
}[(("
|
|
154
|
+
}[(("name" | "docstatus" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "sync_with_google_contacts" | "pulled_from_google_contacts" | "is_primary_contact" | "is_billing_contact" | "unsubscribed") | ("status" | "address" | "_user_tags" | "phone" | "email_id" | "links" | "image" | "company" | "first_name" | "middle_name" | "last_name" | "mobile_no" | "email_ids" | "phone_nos")) & (K_2 extends `${infer _Before} as ${infer Alias}` ? Alias : K_2)] : never; }[] : any : never : never)[K_1]; } : never>;
|
|
81
155
|
/** Create a contact linked to a customer. */
|
|
82
156
|
createForCustomer(contact: Omit<ContactInputType, "links">, customerName: string): Promise<{
|
|
83
|
-
docstatus: number;
|
|
84
157
|
name: string;
|
|
158
|
+
docstatus: number;
|
|
85
159
|
owner: string;
|
|
86
160
|
creation: string;
|
|
87
161
|
modified: string;
|
|
@@ -99,8 +173,8 @@ export declare class ERPNextContact extends ERPNextDoctypeResourceRequest<typeof
|
|
|
99
173
|
phone?: string | null | undefined;
|
|
100
174
|
email_id?: string | null | undefined;
|
|
101
175
|
links?: {
|
|
102
|
-
docstatus: number;
|
|
103
176
|
name: string;
|
|
177
|
+
docstatus: number;
|
|
104
178
|
owner: string;
|
|
105
179
|
creation: string;
|
|
106
180
|
modified: string;
|
|
@@ -122,8 +196,8 @@ export declare class ERPNextContact extends ERPNextDoctypeResourceRequest<typeof
|
|
|
122
196
|
last_name?: string | null | undefined;
|
|
123
197
|
mobile_no?: string | null | undefined;
|
|
124
198
|
email_ids?: {
|
|
125
|
-
docstatus: number;
|
|
126
199
|
name: string;
|
|
200
|
+
docstatus: number;
|
|
127
201
|
owner: string;
|
|
128
202
|
creation: string;
|
|
129
203
|
modified: string;
|
|
@@ -138,8 +212,8 @@ export declare class ERPNextContact extends ERPNextDoctypeResourceRequest<typeof
|
|
|
138
212
|
_user_tags?: string | null | undefined;
|
|
139
213
|
}[] | null | undefined;
|
|
140
214
|
phone_nos?: {
|
|
141
|
-
docstatus: number;
|
|
142
215
|
name: string;
|
|
216
|
+
docstatus: number;
|
|
143
217
|
owner: string;
|
|
144
218
|
creation: string;
|
|
145
219
|
modified: string;
|
|
@@ -128,8 +128,8 @@ export declare class ERPNextPaymentEntry extends ERPNextDoctypeSubmittableResour
|
|
|
128
128
|
deductions?: unknown[] | undefined;
|
|
129
129
|
}>;
|
|
130
130
|
createFromSalesOrder(salesOrderName: string, submit?: boolean): Promise<{
|
|
131
|
-
docstatus: number;
|
|
132
131
|
name: string;
|
|
132
|
+
docstatus: number;
|
|
133
133
|
owner: string;
|
|
134
134
|
creation: string;
|
|
135
135
|
modified: string;
|
|
@@ -184,8 +184,8 @@ export declare class ERPNextPaymentEntry extends ERPNextDoctypeSubmittableResour
|
|
|
184
184
|
custom_remarks?: number | undefined;
|
|
185
185
|
remarks?: string | undefined;
|
|
186
186
|
references?: {
|
|
187
|
-
docstatus: number;
|
|
188
187
|
name: string;
|
|
188
|
+
docstatus: number;
|
|
189
189
|
owner: string;
|
|
190
190
|
creation: string;
|
|
191
191
|
modified: string;
|
|
@@ -210,8 +210,8 @@ export declare class ERPNextPaymentEntry extends ERPNextDoctypeSubmittableResour
|
|
|
210
210
|
deductions?: unknown[] | undefined;
|
|
211
211
|
}>;
|
|
212
212
|
createFromSalesInvoice(salesInvoiceName: string, submit?: boolean): Promise<{
|
|
213
|
-
docstatus: number;
|
|
214
213
|
name: string;
|
|
214
|
+
docstatus: number;
|
|
215
215
|
owner: string;
|
|
216
216
|
creation: string;
|
|
217
217
|
modified: string;
|
|
@@ -266,8 +266,8 @@ export declare class ERPNextPaymentEntry extends ERPNextDoctypeSubmittableResour
|
|
|
266
266
|
custom_remarks?: number | undefined;
|
|
267
267
|
remarks?: string | undefined;
|
|
268
268
|
references?: {
|
|
269
|
-
docstatus: number;
|
|
270
269
|
name: string;
|
|
270
|
+
docstatus: number;
|
|
271
271
|
owner: string;
|
|
272
272
|
creation: string;
|
|
273
273
|
modified: string;
|
|
@@ -17,8 +17,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
17
17
|
idx: number;
|
|
18
18
|
doctype: string;
|
|
19
19
|
taxes: {
|
|
20
|
-
docstatus: number;
|
|
21
20
|
name: string;
|
|
21
|
+
docstatus: number;
|
|
22
22
|
owner: string;
|
|
23
23
|
creation: string;
|
|
24
24
|
modified: string;
|
|
@@ -50,8 +50,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
50
50
|
item_wise_tax_detail?: string | null | undefined;
|
|
51
51
|
}[];
|
|
52
52
|
payment_schedule: {
|
|
53
|
-
docstatus: number;
|
|
54
53
|
name: string;
|
|
54
|
+
docstatus: number;
|
|
55
55
|
owner: string;
|
|
56
56
|
creation: string;
|
|
57
57
|
modified: string;
|
|
@@ -100,8 +100,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
100
100
|
total?: number | null | undefined;
|
|
101
101
|
net_total?: number | null | undefined;
|
|
102
102
|
items?: {
|
|
103
|
-
docstatus: number;
|
|
104
103
|
name: string;
|
|
104
|
+
docstatus: number;
|
|
105
105
|
owner: string;
|
|
106
106
|
creation: string;
|
|
107
107
|
modified: string;
|
|
@@ -119,6 +119,7 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
119
119
|
description?: string | null | undefined;
|
|
120
120
|
_user_tags?: string | null | undefined;
|
|
121
121
|
image?: string | null | undefined;
|
|
122
|
+
item_name?: string | null | undefined;
|
|
122
123
|
rate?: number | null | undefined;
|
|
123
124
|
amount?: number | null | undefined;
|
|
124
125
|
base_amount?: number | null | undefined;
|
|
@@ -129,7 +130,6 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
129
130
|
weight_per_unit?: number | null | undefined;
|
|
130
131
|
total_weight?: number | null | undefined;
|
|
131
132
|
weight_uom?: string | null | undefined;
|
|
132
|
-
item_name?: string | null | undefined;
|
|
133
133
|
item_group?: string | null | undefined;
|
|
134
134
|
stock_uom?: string | null | undefined;
|
|
135
135
|
uom?: string | null | undefined;
|
|
@@ -225,8 +225,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
225
225
|
advance_tax?: string[] | null | undefined;
|
|
226
226
|
}>;
|
|
227
227
|
createFromPurchaseOrder(purchaseOrderName: string, submit?: boolean): Promise<{
|
|
228
|
-
docstatus: number;
|
|
229
228
|
name: string;
|
|
229
|
+
docstatus: number;
|
|
230
230
|
owner: string;
|
|
231
231
|
creation: string;
|
|
232
232
|
modified: string;
|
|
@@ -234,8 +234,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
234
234
|
idx: number;
|
|
235
235
|
doctype: string;
|
|
236
236
|
taxes: {
|
|
237
|
-
docstatus: number;
|
|
238
237
|
name: string;
|
|
238
|
+
docstatus: number;
|
|
239
239
|
owner: string;
|
|
240
240
|
creation: string;
|
|
241
241
|
modified: string;
|
|
@@ -267,8 +267,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
267
267
|
item_wise_tax_detail?: string | null | undefined;
|
|
268
268
|
}[];
|
|
269
269
|
payment_schedule: {
|
|
270
|
-
docstatus: number;
|
|
271
270
|
name: string;
|
|
271
|
+
docstatus: number;
|
|
272
272
|
owner: string;
|
|
273
273
|
creation: string;
|
|
274
274
|
modified: string;
|
|
@@ -318,8 +318,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
318
318
|
total?: number | null | undefined;
|
|
319
319
|
net_total?: number | null | undefined;
|
|
320
320
|
items?: {
|
|
321
|
-
docstatus: number;
|
|
322
321
|
name: string;
|
|
322
|
+
docstatus: number;
|
|
323
323
|
owner: string;
|
|
324
324
|
creation: string;
|
|
325
325
|
modified: string;
|
|
@@ -337,6 +337,7 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
337
337
|
description?: string | null | undefined;
|
|
338
338
|
_user_tags?: string | null | undefined;
|
|
339
339
|
image?: string | null | undefined;
|
|
340
|
+
item_name?: string | null | undefined;
|
|
340
341
|
rate?: number | null | undefined;
|
|
341
342
|
amount?: number | null | undefined;
|
|
342
343
|
base_amount?: number | null | undefined;
|
|
@@ -347,7 +348,6 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
347
348
|
weight_per_unit?: number | null | undefined;
|
|
348
349
|
total_weight?: number | null | undefined;
|
|
349
350
|
weight_uom?: string | null | undefined;
|
|
350
|
-
item_name?: string | null | undefined;
|
|
351
351
|
item_group?: string | null | undefined;
|
|
352
352
|
stock_uom?: string | null | undefined;
|
|
353
353
|
uom?: string | null | undefined;
|
|
@@ -451,8 +451,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
451
451
|
idx: number;
|
|
452
452
|
doctype: string;
|
|
453
453
|
taxes: {
|
|
454
|
-
docstatus: number;
|
|
455
454
|
name: string;
|
|
455
|
+
docstatus: number;
|
|
456
456
|
owner: string;
|
|
457
457
|
creation: string;
|
|
458
458
|
modified: string;
|
|
@@ -484,8 +484,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
484
484
|
item_wise_tax_detail?: string | null | undefined;
|
|
485
485
|
}[];
|
|
486
486
|
payment_schedule: {
|
|
487
|
-
docstatus: number;
|
|
488
487
|
name: string;
|
|
488
|
+
docstatus: number;
|
|
489
489
|
owner: string;
|
|
490
490
|
creation: string;
|
|
491
491
|
modified: string;
|
|
@@ -534,8 +534,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
534
534
|
total?: number | null | undefined;
|
|
535
535
|
net_total?: number | null | undefined;
|
|
536
536
|
items?: {
|
|
537
|
-
docstatus: number;
|
|
538
537
|
name: string;
|
|
538
|
+
docstatus: number;
|
|
539
539
|
owner: string;
|
|
540
540
|
creation: string;
|
|
541
541
|
modified: string;
|
|
@@ -553,6 +553,7 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
553
553
|
description?: string | null | undefined;
|
|
554
554
|
_user_tags?: string | null | undefined;
|
|
555
555
|
image?: string | null | undefined;
|
|
556
|
+
item_name?: string | null | undefined;
|
|
556
557
|
rate?: number | null | undefined;
|
|
557
558
|
amount?: number | null | undefined;
|
|
558
559
|
base_amount?: number | null | undefined;
|
|
@@ -563,7 +564,6 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
563
564
|
weight_per_unit?: number | null | undefined;
|
|
564
565
|
total_weight?: number | null | undefined;
|
|
565
566
|
weight_uom?: string | null | undefined;
|
|
566
|
-
item_name?: string | null | undefined;
|
|
567
567
|
item_group?: string | null | undefined;
|
|
568
568
|
stock_uom?: string | null | undefined;
|
|
569
569
|
uom?: string | null | undefined;
|
|
@@ -659,8 +659,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
659
659
|
advance_tax?: string[] | null | undefined;
|
|
660
660
|
}>;
|
|
661
661
|
createFromPurchaseInvoice(purchaseInvoiceName: string, submit?: boolean): Promise<{
|
|
662
|
-
docstatus: number;
|
|
663
662
|
name: string;
|
|
663
|
+
docstatus: number;
|
|
664
664
|
owner: string;
|
|
665
665
|
creation: string;
|
|
666
666
|
modified: string;
|
|
@@ -668,8 +668,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
668
668
|
idx: number;
|
|
669
669
|
doctype: string;
|
|
670
670
|
taxes: {
|
|
671
|
-
docstatus: number;
|
|
672
671
|
name: string;
|
|
672
|
+
docstatus: number;
|
|
673
673
|
owner: string;
|
|
674
674
|
creation: string;
|
|
675
675
|
modified: string;
|
|
@@ -701,8 +701,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
701
701
|
item_wise_tax_detail?: string | null | undefined;
|
|
702
702
|
}[];
|
|
703
703
|
payment_schedule: {
|
|
704
|
-
docstatus: number;
|
|
705
704
|
name: string;
|
|
705
|
+
docstatus: number;
|
|
706
706
|
owner: string;
|
|
707
707
|
creation: string;
|
|
708
708
|
modified: string;
|
|
@@ -752,8 +752,8 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
752
752
|
total?: number | null | undefined;
|
|
753
753
|
net_total?: number | null | undefined;
|
|
754
754
|
items?: {
|
|
755
|
-
docstatus: number;
|
|
756
755
|
name: string;
|
|
756
|
+
docstatus: number;
|
|
757
757
|
owner: string;
|
|
758
758
|
creation: string;
|
|
759
759
|
modified: string;
|
|
@@ -771,6 +771,7 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
771
771
|
description?: string | null | undefined;
|
|
772
772
|
_user_tags?: string | null | undefined;
|
|
773
773
|
image?: string | null | undefined;
|
|
774
|
+
item_name?: string | null | undefined;
|
|
774
775
|
rate?: number | null | undefined;
|
|
775
776
|
amount?: number | null | undefined;
|
|
776
777
|
base_amount?: number | null | undefined;
|
|
@@ -781,7 +782,6 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
|
|
|
781
782
|
weight_per_unit?: number | null | undefined;
|
|
782
783
|
total_weight?: number | null | undefined;
|
|
783
784
|
weight_uom?: string | null | undefined;
|
|
784
|
-
item_name?: string | null | undefined;
|
|
785
785
|
item_group?: string | null | undefined;
|
|
786
786
|
stock_uom?: string | null | undefined;
|
|
787
787
|
uom?: string | null | undefined;
|