erpnext-queue-client 2.3.1 → 2.3.6
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/doctypes/address.d.ts +1 -0
- package/dist/erpnext/doctypes/consolidatedCustomsInvoice.d.ts +1 -1
- package/dist/erpnext/doctypes/contact.d.ts +1 -0
- package/dist/erpnext/doctypes/deliveryNote.d.ts +2 -2
- package/dist/erpnext/doctypes/item.d.ts +2 -0
- package/dist/erpnext/doctypes/paymentEntry.d.ts +4 -2
- package/dist/erpnext/doctypes/productBundle.d.ts +1 -0
- package/dist/erpnext/doctypes/purchaseInvoice.d.ts +1 -1
- package/dist/erpnext/doctypes/purchaseReceipt.d.ts +1 -1
- package/dist/erpnext/doctypes/salesInvoice.d.ts +2 -2
- package/dist/erpnext/doctypes/shipment.d.ts +2 -2
- package/dist/erpnext/model/DocTypeHelpers.d.ts +1 -1
- package/dist/erpnext/model/DocTypeHelpers.js +5 -3
- package/dist/erpnext/model/ERPNextDocTypeMeta.d.ts +1 -1
- package/dist/erpnext/model/PaymentEntry.d.ts +3 -0
- package/dist/erpnext/model/SalesInvoice.d.ts +1 -1
- package/dist/erpnext/resourceRequest.d.ts +1 -1
- package/dist/utils/zodContextOptionals.d.ts +2 -0
- package/dist/utils/zodContextOptionals.js +1 -1
- package/package.json +1 -1
|
@@ -125,6 +125,7 @@ export declare class ERPNextAddress {
|
|
|
125
125
|
pincode: string;
|
|
126
126
|
city: string;
|
|
127
127
|
country: string;
|
|
128
|
+
docstatus?: number | undefined;
|
|
128
129
|
import_reference?: string | null | undefined;
|
|
129
130
|
address_title?: string | null | undefined;
|
|
130
131
|
address_line2?: string | null | undefined;
|
|
@@ -213,8 +213,8 @@ export declare class ERPNextConsolidatedCustomsInvoice {
|
|
|
213
213
|
customs_tariff_number?: string | null | undefined;
|
|
214
214
|
country_of_origin?: string | null | undefined;
|
|
215
215
|
}[];
|
|
216
|
-
amended_from?: string | null | undefined;
|
|
217
216
|
docstatus?: number | undefined;
|
|
217
|
+
amended_from?: string | null | undefined;
|
|
218
218
|
company?: string | null | undefined;
|
|
219
219
|
naming_series?: string | null | undefined;
|
|
220
220
|
posting_time?: string | null | undefined;
|
|
@@ -137,6 +137,7 @@ export declare class ERPNextContact {
|
|
|
137
137
|
updateById: <TInput extends TInputModel extends undefined ? Partial<{
|
|
138
138
|
status?: string | null | undefined;
|
|
139
139
|
address?: string | null | undefined;
|
|
140
|
+
docstatus?: number | undefined;
|
|
140
141
|
phone?: string | null | undefined;
|
|
141
142
|
email_id?: string | null | undefined;
|
|
142
143
|
links?: {
|
|
@@ -129,8 +129,8 @@ export declare class ERPNextDeliveryNote {
|
|
|
129
129
|
packed_items: string[];
|
|
130
130
|
taxes: string[];
|
|
131
131
|
sales_team: string[];
|
|
132
|
-
amended_from?: string | null | undefined;
|
|
133
132
|
docstatus?: number | undefined;
|
|
133
|
+
amended_from?: string | null | undefined;
|
|
134
134
|
dispatch_address_name?: string | null | undefined;
|
|
135
135
|
dispatch_address?: string | null | undefined;
|
|
136
136
|
tax_id?: string | null | undefined;
|
|
@@ -931,8 +931,8 @@ export declare class ERPNextDeliveryNote {
|
|
|
931
931
|
packed_items: string[];
|
|
932
932
|
taxes: string[];
|
|
933
933
|
sales_team: string[];
|
|
934
|
-
amended_from?: string | null | undefined;
|
|
935
934
|
docstatus?: number | undefined;
|
|
935
|
+
amended_from?: string | null | undefined;
|
|
936
936
|
dispatch_address_name?: string | null | undefined;
|
|
937
937
|
dispatch_address?: string | null | undefined;
|
|
938
938
|
tax_id?: string | null | undefined;
|
|
@@ -487,6 +487,7 @@ export declare class ERPNextItem {
|
|
|
487
487
|
}[];
|
|
488
488
|
custom_oversell_amount: number | null;
|
|
489
489
|
length?: number | null | undefined;
|
|
490
|
+
docstatus?: number | undefined;
|
|
490
491
|
disabled?: 0 | 1 | undefined;
|
|
491
492
|
image?: string | null | undefined;
|
|
492
493
|
weight_per_unit?: number | null | undefined;
|
|
@@ -791,6 +792,7 @@ export declare class ERPNextItem {
|
|
|
791
792
|
}[];
|
|
792
793
|
custom_oversell_amount: number | null;
|
|
793
794
|
length?: number | null | undefined;
|
|
795
|
+
docstatus?: number | undefined;
|
|
794
796
|
disabled?: 0 | 1 | undefined;
|
|
795
797
|
image?: string | null | undefined;
|
|
796
798
|
weight_per_unit?: number | null | undefined;
|
|
@@ -236,8 +236,8 @@ export declare class ERPNextPaymentEntry {
|
|
|
236
236
|
reference_no: string;
|
|
237
237
|
reference_date: string;
|
|
238
238
|
status?: string | undefined;
|
|
239
|
-
amended_from?: string | null | undefined;
|
|
240
239
|
docstatus?: number | undefined;
|
|
240
|
+
amended_from?: string | null | undefined;
|
|
241
241
|
company?: string | undefined;
|
|
242
242
|
posting_date?: string | undefined;
|
|
243
243
|
title?: string | undefined;
|
|
@@ -372,8 +372,8 @@ export declare class ERPNextPaymentEntry {
|
|
|
372
372
|
reference_no: string;
|
|
373
373
|
reference_date: string;
|
|
374
374
|
status?: string | undefined;
|
|
375
|
-
amended_from?: string | null | undefined;
|
|
376
375
|
docstatus?: number | undefined;
|
|
376
|
+
amended_from?: string | null | undefined;
|
|
377
377
|
company?: string | undefined;
|
|
378
378
|
posting_date?: string | undefined;
|
|
379
379
|
title?: string | undefined;
|
|
@@ -656,6 +656,7 @@ export declare class ERPNextPaymentEntry {
|
|
|
656
656
|
paid_amount: number;
|
|
657
657
|
reference_date: string;
|
|
658
658
|
status?: string | undefined;
|
|
659
|
+
docstatus?: number | undefined;
|
|
659
660
|
company?: string | undefined;
|
|
660
661
|
posting_date?: string | undefined;
|
|
661
662
|
title?: string | undefined;
|
|
@@ -716,6 +717,7 @@ export declare class ERPNextPaymentEntry {
|
|
|
716
717
|
paid_amount: number;
|
|
717
718
|
reference_date: string;
|
|
718
719
|
status?: string | undefined;
|
|
720
|
+
docstatus?: number | undefined;
|
|
719
721
|
company?: string | undefined;
|
|
720
722
|
posting_date?: string | undefined;
|
|
721
723
|
title?: string | undefined;
|
|
@@ -94,6 +94,7 @@ export declare class ERPNextProductBundle {
|
|
|
94
94
|
}[];
|
|
95
95
|
new_item_code: string;
|
|
96
96
|
description?: string | null | undefined;
|
|
97
|
+
docstatus?: number | undefined;
|
|
97
98
|
custom_image?: string | null | undefined;
|
|
98
99
|
custom_parent_item_name?: string | null | undefined;
|
|
99
100
|
about?: string | null | undefined;
|
|
@@ -554,8 +554,8 @@ export declare class ERPNextPurchaseInvoice {
|
|
|
554
554
|
__islocal?: number | null | undefined;
|
|
555
555
|
}[];
|
|
556
556
|
status?: string | null | undefined;
|
|
557
|
-
amended_from?: string | null | undefined;
|
|
558
557
|
docstatus?: number | undefined;
|
|
558
|
+
amended_from?: string | null | undefined;
|
|
559
559
|
__onload?: {
|
|
560
560
|
make_payment_via_journal_entry?: number | null | undefined;
|
|
561
561
|
backflush_based_on?: string | null | undefined;
|
|
@@ -515,8 +515,8 @@ export declare class ERPNextPurchaseReceipt {
|
|
|
515
515
|
supplier: string;
|
|
516
516
|
is_subcontracted: number;
|
|
517
517
|
supplied_items: any[];
|
|
518
|
-
amended_from?: string | null | undefined;
|
|
519
518
|
docstatus?: number | undefined;
|
|
519
|
+
amended_from?: string | null | undefined;
|
|
520
520
|
__onload?: {
|
|
521
521
|
load_after_mapping: boolean;
|
|
522
522
|
ignore_price_list?: boolean | null | undefined;
|
|
@@ -744,8 +744,8 @@ export declare class ERPNextSalesInvoice {
|
|
|
744
744
|
custom_invoice_no: string;
|
|
745
745
|
debit_to: string;
|
|
746
746
|
status?: "Internal Transfer" | "Draft" | "Return" | "Credit Note Issued" | "Submitted" | "Paid" | "Partly Paid" | "Unpaid" | "Unpaid and Discounted" | "Partly Paid and Discounted" | "Overdue and Discounted" | "Overdue" | "Cancelled" | undefined;
|
|
747
|
-
amended_from?: string | null | undefined;
|
|
748
747
|
docstatus?: number | undefined;
|
|
748
|
+
amended_from?: string | null | undefined;
|
|
749
749
|
tax_category?: string | null | undefined;
|
|
750
750
|
naming_series?: "INV-.#" | "INV-.#-GS" | undefined;
|
|
751
751
|
language?: string | null | undefined;
|
|
@@ -1273,8 +1273,8 @@ export declare class ERPNextSalesInvoice {
|
|
|
1273
1273
|
custom_invoice_no: string;
|
|
1274
1274
|
debit_to: string;
|
|
1275
1275
|
status?: "Internal Transfer" | "Draft" | "Return" | "Credit Note Issued" | "Submitted" | "Paid" | "Partly Paid" | "Unpaid" | "Unpaid and Discounted" | "Partly Paid and Discounted" | "Overdue and Discounted" | "Overdue" | "Cancelled" | undefined;
|
|
1276
|
-
amended_from?: string | null | undefined;
|
|
1277
1276
|
docstatus?: number | undefined;
|
|
1277
|
+
amended_from?: string | null | undefined;
|
|
1278
1278
|
tax_category?: string | null | undefined;
|
|
1279
1279
|
naming_series?: "INV-.#" | "INV-.#-GS" | undefined;
|
|
1280
1280
|
language?: string | null | undefined;
|
|
@@ -278,8 +278,8 @@ export declare class ERPNextShipment {
|
|
|
278
278
|
value_of_goods: number;
|
|
279
279
|
description_of_content: string;
|
|
280
280
|
pickup_date: string;
|
|
281
|
-
amended_from?: string | null | undefined;
|
|
282
281
|
docstatus?: number | undefined;
|
|
282
|
+
amended_from?: string | null | undefined;
|
|
283
283
|
__onload?: {
|
|
284
284
|
load_after_mapping: boolean;
|
|
285
285
|
} | null | undefined;
|
|
@@ -451,8 +451,8 @@ export declare class ERPNextShipment {
|
|
|
451
451
|
value_of_goods: number;
|
|
452
452
|
description_of_content: string;
|
|
453
453
|
pickup_date: string;
|
|
454
|
-
amended_from?: string | null | undefined;
|
|
455
454
|
docstatus?: number | undefined;
|
|
455
|
+
amended_from?: string | null | undefined;
|
|
456
456
|
__onload?: {
|
|
457
457
|
load_after_mapping: boolean;
|
|
458
458
|
} | null | undefined;
|
|
@@ -66,7 +66,7 @@ type OmitArrayFields<T extends AnyZodObject> = ZodObject<{
|
|
|
66
66
|
}>;
|
|
67
67
|
export type DocModelListEntryType<T extends AnyZodObject> = OmitArrayFields<DocModelType<T>>;
|
|
68
68
|
export declare const DocModelListEntry: <T extends ZodRawShape>(BaseModel: ZodObject<T>) => DocModelListEntryType<ZodObject<T>>;
|
|
69
|
-
export declare const DocTypeList: <T extends AnyZodObject>(BaseModel: T) => z.ZodArray<
|
|
69
|
+
export declare const DocTypeList: <T extends AnyZodObject, F extends keyof DocModelListEntryType<T>["shape"]>(BaseModel: T, fields: F[] | readonly ["*"]) => z.ZodArray<z.ZodObject<Pick<DocModelListEntryType<T>["shape"], F>>>;
|
|
70
70
|
/**
|
|
71
71
|
* Augments all array fields in a Zod object schema that contain object schemas
|
|
72
72
|
* with DocTypeChildTableEntry metadata fields (name, owner, creation, etc.)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateChildTableEntrySchema = exports.AugmentChildTableArrays = exports.DocTypeList = exports.DocModelListEntry = exports.DocModel = exports.LoadDocumentWrapper = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const zodUtils_1 = require("../../utils/zodUtils");
|
|
5
6
|
const ERPNextDocTypeMeta_1 = require("./ERPNextDocTypeMeta");
|
|
6
7
|
const LoadDocumentWrapper = (BaseModel) => BaseModel.extend({ __onload: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()) }).describe(BaseModel.description + " with __onload");
|
|
7
8
|
exports.LoadDocumentWrapper = LoadDocumentWrapper;
|
|
@@ -51,10 +52,11 @@ const DocModelListEntry = (BaseModel) => {
|
|
|
51
52
|
.describe(`${BaseModel.description || "DocType"} List Item`);
|
|
52
53
|
};
|
|
53
54
|
exports.DocModelListEntry = DocModelListEntry;
|
|
54
|
-
const DocTypeList = (BaseModel) => {
|
|
55
|
+
const DocTypeList = (BaseModel, fields) => {
|
|
56
|
+
const listEntry = (0, exports.DocModelListEntry)(BaseModel);
|
|
55
57
|
return zod_1.z
|
|
56
|
-
.array(
|
|
57
|
-
.describe(`${BaseModel.description || "DocType
|
|
58
|
+
.array((0, zodUtils_1.pickFromSchema)(listEntry, fields))
|
|
59
|
+
.describe(`${BaseModel.description || "DocType"} List`);
|
|
58
60
|
};
|
|
59
61
|
exports.DocTypeList = DocTypeList;
|
|
60
62
|
/**
|
|
@@ -10,8 +10,8 @@ export declare const SubmittableMeta: z.ZodObject<{
|
|
|
10
10
|
docstatus: number;
|
|
11
11
|
amended_from?: string | null | undefined;
|
|
12
12
|
}, {
|
|
13
|
-
amended_from?: string | null | undefined;
|
|
14
13
|
docstatus?: number | undefined;
|
|
14
|
+
amended_from?: string | null | undefined;
|
|
15
15
|
}>;
|
|
16
16
|
export declare const DocTypeMeta: z.ZodObject<{
|
|
17
17
|
name: z.ZodString;
|
|
@@ -343,6 +343,7 @@ export declare const PaymentEntryDraft: z.ZodObject<{
|
|
|
343
343
|
}>, "many">>;
|
|
344
344
|
taxes: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
345
345
|
deductions: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
346
|
+
docstatus: z.ZodOptional<z.ZodNumber>;
|
|
346
347
|
} & {
|
|
347
348
|
reference_no: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
348
349
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
@@ -353,6 +354,7 @@ export declare const PaymentEntryDraft: z.ZodObject<{
|
|
|
353
354
|
paid_amount: number;
|
|
354
355
|
reference_date: string;
|
|
355
356
|
status?: string | undefined;
|
|
357
|
+
docstatus?: number | undefined;
|
|
356
358
|
company?: string | undefined;
|
|
357
359
|
posting_date?: string | undefined;
|
|
358
360
|
title?: string | undefined;
|
|
@@ -410,6 +412,7 @@ export declare const PaymentEntryDraft: z.ZodObject<{
|
|
|
410
412
|
paid_amount: number;
|
|
411
413
|
reference_date: string;
|
|
412
414
|
status?: string | undefined;
|
|
415
|
+
docstatus?: number | undefined;
|
|
413
416
|
company?: string | undefined;
|
|
414
417
|
naming_series?: "PAY-.#" | "CART-.#" | undefined;
|
|
415
418
|
posting_date?: string | undefined;
|
|
@@ -2300,8 +2300,8 @@ export declare const SalesInvoiceDraft: z.ZodObject<Omit<{
|
|
|
2300
2300
|
custom_invoice_no: string;
|
|
2301
2301
|
debit_to: string;
|
|
2302
2302
|
status?: "Internal Transfer" | "Draft" | "Return" | "Credit Note Issued" | "Submitted" | "Paid" | "Partly Paid" | "Unpaid" | "Unpaid and Discounted" | "Partly Paid and Discounted" | "Overdue and Discounted" | "Overdue" | "Cancelled" | undefined;
|
|
2303
|
-
amended_from?: string | null | undefined;
|
|
2304
2303
|
docstatus?: number | undefined;
|
|
2304
|
+
amended_from?: string | null | undefined;
|
|
2305
2305
|
_user_tags?: string | null | undefined;
|
|
2306
2306
|
tax_category?: string | null | undefined;
|
|
2307
2307
|
naming_series?: "INV-.#" | "INV-.#-GS" | undefined;
|
|
@@ -40,7 +40,7 @@ export declare class ERPNextResourceRequest {
|
|
|
40
40
|
priority?: number;
|
|
41
41
|
params?: Record<string, string>;
|
|
42
42
|
body: TInput;
|
|
43
|
-
}): Promise<z.
|
|
43
|
+
}): Promise<Prettify<z.infer<DocModelType<TModel>>>>;
|
|
44
44
|
deleteById<TModel extends AnyZodObject>({ resourceName, resourceId, resourceModel, priority, }: {
|
|
45
45
|
resourceName: string;
|
|
46
46
|
resourceId: string;
|
|
@@ -9,6 +9,8 @@ type TransformInnerShape<S extends ZodRawShape> = {
|
|
|
9
9
|
type TransformOneLevel<V> = V extends MarkedInputOptional<infer U> ? z.ZodOptional<U> : V extends ZodObject<infer S extends ZodRawShape> ? ZodObject<TransformInnerShape<S>> : V extends ZodArray<infer Elem> ? Elem extends ZodObject<infer S2 extends ZodRawShape> ? ZodArray<ZodObject<TransformInnerShape<S2>>> : V : V;
|
|
10
10
|
export type ResourceInputType<T extends AnyZodObject> = ZodObject<{
|
|
11
11
|
[K in keyof T["shape"]]: TransformOneLevel<T["shape"][K]>;
|
|
12
|
+
} & {
|
|
13
|
+
docstatus: z.ZodOptional<z.ZodNumber>;
|
|
12
14
|
}>;
|
|
13
15
|
export declare function ResourceInput<T extends ZodRawShape>(schema: z.ZodObject<T>): ResourceInputType<z.ZodObject<T>>;
|
|
14
16
|
export {};
|
|
@@ -16,7 +16,7 @@ function isMarkedOptionalForInput(schema) {
|
|
|
16
16
|
// schema transformation
|
|
17
17
|
function ResourceInput(schema) {
|
|
18
18
|
var _a;
|
|
19
|
-
const shape = schema.shape;
|
|
19
|
+
const shape = Object.assign(Object.assign({}, schema.shape), { docstatus: zod_1.z.number().optional().default(0) });
|
|
20
20
|
function makeMarkedKeysOptional(shape) {
|
|
21
21
|
const newShape = zod_1.z.object({}).shape;
|
|
22
22
|
for (const [key, value] of Object.entries(shape)) {
|