erpnext-queue-client 2.0.0-beta.0 → 2.0.0-beta.2

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.
Files changed (68) hide show
  1. package/dist/client.js +1 -4
  2. package/dist/constants.d.ts +1 -1
  3. package/dist/constants.js +4 -4
  4. package/dist/erpnext/doctypeResourceRequest.d.ts +1 -1
  5. package/dist/erpnext/doctypeSubmittableResourceRequest.d.ts +56 -16
  6. package/dist/erpnext/doctypeSubmittableResourceRequest.js +10 -8
  7. package/dist/erpnext/doctypes/address.d.ts +18 -18
  8. package/dist/erpnext/doctypes/contact.d.ts +18 -18
  9. package/dist/erpnext/doctypes/deliveryNote.d.ts +44 -33
  10. package/dist/erpnext/doctypes/item.d.ts +49 -49
  11. package/dist/erpnext/doctypes/paymentEntry.d.ts +820 -0
  12. package/dist/erpnext/doctypes/paymentEntry.js +72 -0
  13. package/dist/erpnext/doctypes/productBundle.d.ts +16 -16
  14. package/dist/erpnext/doctypes/purchaseInvoice.d.ts +99 -99
  15. package/dist/erpnext/doctypes/purchaseReceipt.d.ts +48 -49
  16. package/dist/erpnext/doctypes/salesInvoice.d.ts +2205 -2203
  17. package/dist/erpnext/doctypes/servicecase.d.ts +56 -56
  18. package/dist/erpnext/doctypes/shipment.d.ts +76 -44
  19. package/dist/erpnext/doctypes/stock.d.ts +2 -0
  20. package/dist/erpnext/doctypes/stock.js +19 -3
  21. package/dist/erpnext/model/ConsolidatedCustomsInvoice.d.ts +321 -0
  22. package/dist/erpnext/model/ConsolidatedCustomsInvoice.js +83 -0
  23. package/dist/erpnext/model/DeliveryNote.d.ts +3 -0
  24. package/dist/erpnext/model/DeliveryNote.js +1 -0
  25. package/dist/erpnext/model/DispatchRun.d.ts +3 -3
  26. package/dist/erpnext/model/DispatchRun.js +1 -1
  27. package/dist/erpnext/model/DocTypeHelpers.d.ts +26 -7
  28. package/dist/erpnext/model/DocTypeHelpers.js +0 -8
  29. package/dist/erpnext/model/ERPNextDocTypeMeta.d.ts +28 -15
  30. package/dist/erpnext/model/ERPNextDocTypeMeta.js +12 -7
  31. package/dist/erpnext/model/FulfillmentStation.d.ts +3 -0
  32. package/dist/erpnext/model/FulfillmentStation.js +1 -0
  33. package/dist/erpnext/model/Item.d.ts +35 -25
  34. package/dist/erpnext/model/ItemTaxTemplate.d.ts +57 -0
  35. package/dist/erpnext/model/ItemTaxTemplate.js +25 -0
  36. package/dist/erpnext/model/PaymentEntry.d.ts +183 -16
  37. package/dist/erpnext/model/PaymentEntry.js +6 -1
  38. package/dist/erpnext/model/PurchaseInvoice.d.ts +49 -47
  39. package/dist/erpnext/model/PurchaseInvoice.js +0 -1
  40. package/dist/erpnext/model/PurchaseOrder.d.ts +10 -10
  41. package/dist/erpnext/model/Receipt.d.ts +2 -2
  42. package/dist/erpnext/model/ReceiptDraft.d.ts +0 -3
  43. package/dist/erpnext/model/ReceiptDraft.js +0 -1
  44. package/dist/erpnext/model/SalesInvoice.d.ts +1530 -1526
  45. package/dist/erpnext/model/SalesInvoice.js +182 -178
  46. package/dist/erpnext/model/SalesOrder.d.ts +778 -748
  47. package/dist/erpnext/model/SalesOrder.js +151 -149
  48. package/dist/erpnext/model/Servicecase.d.ts +30 -30
  49. package/dist/erpnext/model/Servicecase.js +8 -1
  50. package/dist/erpnext/model/ServiceportalProductConfiguration.d.ts +128 -3
  51. package/dist/erpnext/model/ServiceportalProductConfiguration.js +34 -2
  52. package/dist/erpnext/model/Shipment.d.ts +14 -0
  53. package/dist/erpnext/model/Shipment.js +14 -1
  54. package/dist/erpnext/model/ShippingFees.d.ts +36 -0
  55. package/dist/erpnext/model/ShippingFees.js +18 -0
  56. package/dist/erpnext/model/ShippingProvider.d.ts +2 -2
  57. package/dist/erpnext/model/Stock.d.ts +6 -6
  58. package/dist/erpnext/model/StockEntry.d.ts +2 -2
  59. package/dist/erpnext/model/TaxCategory.d.ts +20 -0
  60. package/dist/erpnext/model/TaxCategory.js +16 -0
  61. package/dist/erpnext/resourceRequest.d.ts +1 -1
  62. package/dist/erpnext/resourceRequest.js +11 -5
  63. package/dist/index.d.ts +8 -2
  64. package/dist/index.js +9 -2
  65. package/dist/index.test.js +104 -70
  66. package/dist/utils/zodContextOptionals.js +7 -4
  67. package/dist/utils/zodUtils.js +14 -2
  68. package/package.json +7 -2
package/dist/client.js CHANGED
@@ -135,11 +135,8 @@ class TemporalClient {
135
135
  }
136
136
  throw err;
137
137
  });
138
- const validatedData = responseValidationModel
139
- ? (0, zodUtils_1.validateData)(data, responseValidationModel)
140
- : data;
141
138
  logger_1.lg.info(`Started workflow ${runId}`);
142
- return validatedData;
139
+ return data;
143
140
  });
144
141
  }
145
142
  }
@@ -2,5 +2,5 @@ export declare const getEnvVar: (varName: string) => string;
2
2
  type ConstantsMap<K extends string> = {
3
3
  [key in K]: string;
4
4
  };
5
- export declare const constants: ConstantsMap<"DEBUG_MODE" | "TEMPORAL_ERPNEXT_QUEUE_HOST" | "TEMPORAL_ERPNEXT_QUEUE_NAMESPACE" | "TEMPORAL_CRT" | "TEMPORAL_KEY" | "RUN_IN_TEST_ENV">;
5
+ export declare const constants: ConstantsMap<"DEBUG_MODE" | "TEMPORAL_HOST" | "TEMPORAL_NAMESPACE" | "TEMPORAL_CRT" | "TEMPORAL_KEY" | "RUN_IN_TEST_ENV">;
6
6
  export {};
package/dist/constants.js CHANGED
@@ -24,16 +24,16 @@ class ConstantsManager {
24
24
  }
25
25
  const optionalConstants = [
26
26
  "DEBUG_MODE",
27
- "TEMPORAL_ERPNEXT_QUEUE_HOST",
28
- "TEMPORAL_ERPNEXT_QUEUE_NAMESPACE",
27
+ "TEMPORAL_HOST",
28
+ "TEMPORAL_NAMESPACE",
29
29
  "TEMPORAL_CRT",
30
30
  "TEMPORAL_KEY",
31
31
  "RUN_IN_TEST_ENV",
32
32
  ];
33
33
  exports.constants = new ConstantsManager([
34
34
  "DEBUG_MODE",
35
- "TEMPORAL_ERPNEXT_QUEUE_HOST",
36
- "TEMPORAL_ERPNEXT_QUEUE_NAMESPACE",
35
+ "TEMPORAL_HOST",
36
+ "TEMPORAL_NAMESPACE",
37
37
  "TEMPORAL_CRT",
38
38
  "TEMPORAL_KEY",
39
39
  "RUN_IN_TEST_ENV",
@@ -22,7 +22,7 @@ export declare class ERPNextDoctypeResourceRequest<TModel extends AnyZodObject>
22
22
  getById({ resourceId, priority, }: {
23
23
  resourceId: string;
24
24
  priority?: number;
25
- }): Promise<z.infer<DocModelType<TModel>>>;
25
+ }): Promise<z.infer<DocModelType<TModel>> | undefined>;
26
26
  updateById<TInput extends TInputModel extends undefined ? Partial<z.TypeOf<ResourceInputType<TModel>>> : TInputModel extends ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends ZodTypeAny | undefined = undefined>({ resourceId, inputValidationModel, body, priority, }: {
27
27
  resourceId: string;
28
28
  inputValidationModel?: TInputModel;
@@ -9,8 +9,14 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
9
9
  resourceId: string;
10
10
  }): Promise<z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{ [K in keyof (TModel["shape"] & {
11
11
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
12
+ docstatus: z.ZodDefault<z.ZodNumber> & {
13
+ __optionalForInput: true;
14
+ };
12
15
  })]: (TModel["shape"] & {
13
16
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17
+ docstatus: z.ZodDefault<z.ZodNumber> & {
18
+ __optionalForInput: true;
19
+ };
14
20
  })[K] extends z.ZodArray<infer Element extends z.ZodTypeAny, "many"> ? Element extends z.ZodObject<infer ElementShape extends z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<infer ElementShape extends z.ZodRawShape>, any> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never, z.baseObjectInputType<infer ElementShape extends z.ZodRawShape> extends infer T_2 ? { [k_2 in keyof T_2]: T_2[k_2]; } : never> ? z.ZodArray<z.ZodObject<ElementShape & {
15
21
  name: z.ZodString;
16
22
  owner: z.ZodString;
@@ -18,9 +24,11 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
18
24
  modified: z.ZodString;
19
25
  modified_by: z.ZodString;
20
26
  idx: z.ZodNumber;
21
- docstatus: z.ZodDefault<z.ZodNumber>;
27
+ docstatus: z.ZodDefault<z.ZodNumber> & {
28
+ __optionalForInput: true;
29
+ };
22
30
  doctype: z.ZodString;
23
- _user_tags: z.ZodOptional<z.ZodString>;
31
+ _user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
24
32
  } & {
25
33
  parenttype: z.ZodString;
26
34
  parentfield: z.ZodString;
@@ -31,9 +39,11 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
31
39
  modified: z.ZodString;
32
40
  modified_by: z.ZodString;
33
41
  idx: z.ZodNumber;
34
- docstatus: z.ZodDefault<z.ZodNumber>;
42
+ docstatus: z.ZodDefault<z.ZodNumber> & {
43
+ __optionalForInput: true;
44
+ };
35
45
  doctype: z.ZodString;
36
- _user_tags: z.ZodOptional<z.ZodString>;
46
+ _user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
37
47
  } & {
38
48
  parenttype: z.ZodString;
39
49
  parentfield: z.ZodString;
@@ -44,16 +54,24 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
44
54
  modified: z.ZodString;
45
55
  modified_by: z.ZodString;
46
56
  idx: z.ZodNumber;
47
- docstatus: z.ZodDefault<z.ZodNumber>;
57
+ docstatus: z.ZodDefault<z.ZodNumber> & {
58
+ __optionalForInput: true;
59
+ };
48
60
  doctype: z.ZodString;
49
- _user_tags: z.ZodOptional<z.ZodString>;
61
+ _user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
50
62
  } & {
51
63
  parenttype: z.ZodString;
52
64
  parentfield: z.ZodString;
53
65
  }> extends infer T_4 ? { [k_4 in keyof T_4]: T_4[k_4]; } : never>, "many"> : (TModel["shape"] & {
54
66
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
67
+ docstatus: z.ZodDefault<z.ZodNumber> & {
68
+ __optionalForInput: true;
69
+ };
55
70
  })[K] : (TModel["shape"] & {
56
71
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
72
+ docstatus: z.ZodDefault<z.ZodNumber> & {
73
+ __optionalForInput: true;
74
+ };
57
75
  })[K]; } & {
58
76
  name: z.ZodString;
59
77
  owner: z.ZodString;
@@ -61,16 +79,24 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
61
79
  modified: z.ZodString;
62
80
  modified_by: z.ZodString;
63
81
  idx: z.ZodNumber;
64
- docstatus: z.ZodDefault<z.ZodNumber>;
82
+ docstatus: z.ZodDefault<z.ZodNumber> & {
83
+ __optionalForInput: true;
84
+ };
65
85
  doctype: z.ZodString;
66
- _user_tags: z.ZodOptional<z.ZodString>;
86
+ _user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
67
87
  }>, any> extends infer T ? { [k in keyof T]: T[k]; } : never>;
68
88
  submit({ resourceId }: {
69
89
  resourceId: string;
70
90
  }): Promise<z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{ [K in keyof (TModel["shape"] & {
71
91
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
92
+ docstatus: z.ZodDefault<z.ZodNumber> & {
93
+ __optionalForInput: true;
94
+ };
72
95
  })]: (TModel["shape"] & {
73
96
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
97
+ docstatus: z.ZodDefault<z.ZodNumber> & {
98
+ __optionalForInput: true;
99
+ };
74
100
  })[K] extends z.ZodArray<infer Element extends z.ZodTypeAny, "many"> ? Element extends z.ZodObject<infer ElementShape extends z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<infer ElementShape extends z.ZodRawShape>, any> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never, z.baseObjectInputType<infer ElementShape extends z.ZodRawShape> extends infer T_2 ? { [k_2 in keyof T_2]: T_2[k_2]; } : never> ? z.ZodArray<z.ZodObject<ElementShape & {
75
101
  name: z.ZodString;
76
102
  owner: z.ZodString;
@@ -78,9 +104,11 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
78
104
  modified: z.ZodString;
79
105
  modified_by: z.ZodString;
80
106
  idx: z.ZodNumber;
81
- docstatus: z.ZodDefault<z.ZodNumber>;
107
+ docstatus: z.ZodDefault<z.ZodNumber> & {
108
+ __optionalForInput: true;
109
+ };
82
110
  doctype: z.ZodString;
83
- _user_tags: z.ZodOptional<z.ZodString>;
111
+ _user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
84
112
  } & {
85
113
  parenttype: z.ZodString;
86
114
  parentfield: z.ZodString;
@@ -91,9 +119,11 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
91
119
  modified: z.ZodString;
92
120
  modified_by: z.ZodString;
93
121
  idx: z.ZodNumber;
94
- docstatus: z.ZodDefault<z.ZodNumber>;
122
+ docstatus: z.ZodDefault<z.ZodNumber> & {
123
+ __optionalForInput: true;
124
+ };
95
125
  doctype: z.ZodString;
96
- _user_tags: z.ZodOptional<z.ZodString>;
126
+ _user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
97
127
  } & {
98
128
  parenttype: z.ZodString;
99
129
  parentfield: z.ZodString;
@@ -104,16 +134,24 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
104
134
  modified: z.ZodString;
105
135
  modified_by: z.ZodString;
106
136
  idx: z.ZodNumber;
107
- docstatus: z.ZodDefault<z.ZodNumber>;
137
+ docstatus: z.ZodDefault<z.ZodNumber> & {
138
+ __optionalForInput: true;
139
+ };
108
140
  doctype: z.ZodString;
109
- _user_tags: z.ZodOptional<z.ZodString>;
141
+ _user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
110
142
  } & {
111
143
  parenttype: z.ZodString;
112
144
  parentfield: z.ZodString;
113
145
  }> extends infer T_4 ? { [k_4 in keyof T_4]: T_4[k_4]; } : never>, "many"> : (TModel["shape"] & {
114
146
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
147
+ docstatus: z.ZodDefault<z.ZodNumber> & {
148
+ __optionalForInput: true;
149
+ };
115
150
  })[K] : (TModel["shape"] & {
116
151
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
152
+ docstatus: z.ZodDefault<z.ZodNumber> & {
153
+ __optionalForInput: true;
154
+ };
117
155
  })[K]; } & {
118
156
  name: z.ZodString;
119
157
  owner: z.ZodString;
@@ -121,9 +159,11 @@ export declare class ERPNextDoctypeSubmittableResourceRequest<TModel extends Any
121
159
  modified: z.ZodString;
122
160
  modified_by: z.ZodString;
123
161
  idx: z.ZodNumber;
124
- docstatus: z.ZodDefault<z.ZodNumber>;
162
+ docstatus: z.ZodDefault<z.ZodNumber> & {
163
+ __optionalForInput: true;
164
+ };
125
165
  doctype: z.ZodString;
126
- _user_tags: z.ZodOptional<z.ZodString>;
166
+ _user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
127
167
  }>, any> extends infer T ? { [k in keyof T]: T[k]; } : never>;
128
168
  }
129
169
  export {};
@@ -16,21 +16,21 @@ exports.ERPNextDoctypeSubmittableResourceRequest = void 0;
16
16
  const zod_1 = __importDefault(require("zod"));
17
17
  const doctypeResourceRequest_1 = require("./doctypeResourceRequest");
18
18
  const ERPNextDocTypeMeta_1 = require("./model/ERPNextDocTypeMeta");
19
- const docstatusSchema = zod_1.default
20
- .object({
21
- docstatus: zod_1.default.number(),
22
- })
23
- .describe("Docstatus Schema");
24
19
  class ERPNextDoctypeSubmittableResourceRequest extends doctypeResourceRequest_1.ERPNextDoctypeResourceRequest {
25
20
  constructor(temporalClient, resourceName, resourceModel) {
26
- const mergedModel = resourceModel.merge(ERPNextDocTypeMeta_1.SubmittableMeta);
21
+ var _a;
22
+ const mergedModel = resourceModel
23
+ .merge(ERPNextDocTypeMeta_1.SubmittableMeta)
24
+ .describe((_a = resourceModel.description) !== null && _a !== void 0 ? _a : "Unknown Model");
27
25
  super(temporalClient, resourceName, mergedModel);
28
26
  }
29
27
  cancel(_a) {
30
28
  return __awaiter(this, arguments, void 0, function* ({ resourceId }) {
31
29
  return this.updateById({
32
30
  resourceId,
33
- inputValidationModel: docstatusSchema,
31
+ inputValidationModel: zod_1.default
32
+ .object({ docstatus: ERPNextDocTypeMeta_1.Docstatus })
33
+ .describe("Cancel Input"),
34
34
  body: {
35
35
  docstatus: 2,
36
36
  },
@@ -41,7 +41,9 @@ class ERPNextDoctypeSubmittableResourceRequest extends doctypeResourceRequest_1.
41
41
  return __awaiter(this, arguments, void 0, function* ({ resourceId }) {
42
42
  return this.updateById({
43
43
  resourceId,
44
- inputValidationModel: docstatusSchema,
44
+ inputValidationModel: zod_1.default
45
+ .object({ docstatus: ERPNextDocTypeMeta_1.Docstatus })
46
+ .describe("Submit Input"),
45
47
  body: {
46
48
  docstatus: 1,
47
49
  },
@@ -7,7 +7,7 @@ export declare class ERPNextAddress {
7
7
  protected temporalClient: TemporalClient;
8
8
  protected baseRequest: ERPNextDoctypeResourceRequest<typeof Address>;
9
9
  protected methodRequest: ERPNextMethodRequest;
10
- getList: <TFieldOptions extends ("name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "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"), TSelectedFields extends readonly ["*"] | TFieldOptions[] | undefined = undefined, TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
10
+ getList: <TFieldOptions extends ("docstatus" | "name" | "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"), TSelectedFields extends readonly ["*"] | TFieldOptions[] | undefined = undefined, TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
11
11
  fields?: TSelectedFields;
12
12
  filters?: (string | string[])[][];
13
13
  skip?: number;
@@ -18,13 +18,13 @@ export declare class ERPNextAddress {
18
18
  }) => Promise<(TAsDict extends false ? string[][] : TSelectedFields extends undefined ? {
19
19
  name: string;
20
20
  }[] : TSelectedFields extends readonly ["*"] ? {
21
+ docstatus: number;
21
22
  name: string;
22
23
  owner: string;
23
24
  creation: string;
24
25
  modified: string;
25
26
  modified_by: string;
26
27
  idx: number;
27
- docstatus: number;
28
28
  address_type: string;
29
29
  address_line1: string;
30
30
  pincode: string;
@@ -34,7 +34,7 @@ export declare class ERPNextAddress {
34
34
  is_shipping_address: 0 | 1;
35
35
  is_your_company_address: 0 | 1;
36
36
  disabled: 0 | 1;
37
- _user_tags?: string | undefined;
37
+ _user_tags?: string | null | undefined;
38
38
  import_reference?: string | null | undefined;
39
39
  address_title?: string | null | undefined;
40
40
  address_line2?: string | null | undefined;
@@ -49,14 +49,14 @@ export declare class ERPNextAddress {
49
49
  link_name: string;
50
50
  link_title?: string | null | undefined;
51
51
  }[] | undefined;
52
- }[] : TSelectedFields extends TFieldOptions[] ? Pick<{
52
+ }[] : TSelectedFields extends TFieldOptions[] ? { [K_1 in TSelectedFields[number] as K_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1]: (K_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1) extends ("docstatus" | "name" | "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") ? {
53
+ docstatus: number;
53
54
  name: string;
54
55
  owner: string;
55
56
  creation: string;
56
57
  modified: string;
57
58
  modified_by: string;
58
59
  idx: number;
59
- docstatus: number;
60
60
  address_type: string;
61
61
  address_line1: string;
62
62
  pincode: string;
@@ -66,7 +66,7 @@ export declare class ERPNextAddress {
66
66
  is_shipping_address: 0 | 1;
67
67
  is_your_company_address: 0 | 1;
68
68
  disabled: 0 | 1;
69
- _user_tags?: string | undefined;
69
+ _user_tags?: string | null | undefined;
70
70
  import_reference?: string | null | undefined;
71
71
  address_title?: string | null | undefined;
72
72
  address_line2?: string | null | undefined;
@@ -81,18 +81,18 @@ export declare class ERPNextAddress {
81
81
  link_name: string;
82
82
  link_title?: string | null | undefined;
83
83
  }[] | undefined;
84
- }, TSelectedFields[number]>[] : any) extends infer T ? { [K in keyof T]: T[K]; } : never>;
84
+ }[(("docstatus" | "name" | "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_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1)] : never; }[] : any) extends infer T ? { [K in keyof T]: T[K]; } : never>;
85
85
  getById: ({ resourceId, priority, }: {
86
86
  resourceId: string;
87
87
  priority?: number;
88
88
  }) => Promise<{
89
+ docstatus: number;
89
90
  name: string;
90
91
  owner: string;
91
92
  creation: string;
92
93
  modified: string;
93
94
  modified_by: string;
94
95
  idx: number;
95
- docstatus: number;
96
96
  doctype: string;
97
97
  address_type: string;
98
98
  address_line1: string;
@@ -103,7 +103,7 @@ export declare class ERPNextAddress {
103
103
  is_shipping_address: 0 | 1;
104
104
  is_your_company_address: 0 | 1;
105
105
  disabled: 0 | 1;
106
- _user_tags?: string | undefined;
106
+ _user_tags?: string | null | undefined;
107
107
  import_reference?: string | null | undefined;
108
108
  address_title?: string | null | undefined;
109
109
  address_line2?: string | null | undefined;
@@ -118,7 +118,7 @@ export declare class ERPNextAddress {
118
118
  link_name: string;
119
119
  link_title?: string | null | undefined;
120
120
  }[] | undefined;
121
- }>;
121
+ } | undefined>;
122
122
  updateById: <TInput extends TInputModel extends undefined ? Partial<{
123
123
  address_type: string;
124
124
  address_line1: string;
@@ -149,13 +149,13 @@ export declare class ERPNextAddress {
149
149
  priority?: number;
150
150
  body: TInput;
151
151
  }) => Promise<{
152
+ docstatus: number;
152
153
  name: string;
153
154
  owner: string;
154
155
  creation: string;
155
156
  modified: string;
156
157
  modified_by: string;
157
158
  idx: number;
158
- docstatus: number;
159
159
  doctype: string;
160
160
  address_type: string;
161
161
  address_line1: string;
@@ -166,7 +166,7 @@ export declare class ERPNextAddress {
166
166
  is_shipping_address: 0 | 1;
167
167
  is_your_company_address: 0 | 1;
168
168
  disabled: 0 | 1;
169
- _user_tags?: string | undefined;
169
+ _user_tags?: string | null | undefined;
170
170
  import_reference?: string | null | undefined;
171
171
  address_title?: string | null | undefined;
172
172
  address_line2?: string | null | undefined;
@@ -188,13 +188,13 @@ export declare class ERPNextAddress {
188
188
  }) => Promise<z.TypeOf<typeof import("../model/ERPNextResponse").DeleteResponseModel>>;
189
189
  constructor(temporalClient: TemporalClient);
190
190
  create(address: AddressInputType, customerName: string): Promise<{
191
+ docstatus: number;
191
192
  name: string;
192
193
  owner: string;
193
194
  creation: string;
194
195
  modified: string;
195
196
  modified_by: string;
196
197
  idx: number;
197
- docstatus: number;
198
198
  doctype: string;
199
199
  address_type: string;
200
200
  address_line1: string;
@@ -205,7 +205,7 @@ export declare class ERPNextAddress {
205
205
  is_shipping_address: 0 | 1;
206
206
  is_your_company_address: 0 | 1;
207
207
  disabled: 0 | 1;
208
- _user_tags?: string | undefined;
208
+ _user_tags?: string | null | undefined;
209
209
  import_reference?: string | null | undefined;
210
210
  address_title?: string | null | undefined;
211
211
  address_line2?: string | null | undefined;
@@ -221,14 +221,14 @@ export declare class ERPNextAddress {
221
221
  link_title?: string | null | undefined;
222
222
  }[] | undefined;
223
223
  }>;
224
- getAddressesByEmail: <K extends keyof (typeof Address)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends (("name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "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"))[] ? Pick<{
224
+ getAddressesByEmail: <K extends keyof (typeof Address)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends (("docstatus" | "name" | "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 ("docstatus" | "name" | "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") ? {
225
+ docstatus: number;
225
226
  name: string;
226
227
  owner: string;
227
228
  creation: string;
228
229
  modified: string;
229
230
  modified_by: string;
230
231
  idx: number;
231
- docstatus: number;
232
232
  address_type: string;
233
233
  address_line1: string;
234
234
  pincode: string;
@@ -238,7 +238,7 @@ export declare class ERPNextAddress {
238
238
  is_shipping_address: 0 | 1;
239
239
  is_your_company_address: 0 | 1;
240
240
  disabled: 0 | 1;
241
- _user_tags?: string | undefined;
241
+ _user_tags?: string | null | undefined;
242
242
  import_reference?: string | null | undefined;
243
243
  address_title?: string | null | undefined;
244
244
  address_line2?: string | null | undefined;
@@ -253,7 +253,7 @@ export declare class ERPNextAddress {
253
253
  link_name: string;
254
254
  link_title?: string | null | undefined;
255
255
  }[] | undefined;
256
- }, T_1[number]>[] : any : never : never) extends infer T ? { [K_1 in keyof T]: T[K_1]; } : never>;
256
+ }[(("docstatus" | "name" | "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]: T[K_1]; } : never>;
257
257
  getAddressesBySupplier: (supplierName: string) => Promise<{
258
258
  address_type: string;
259
259
  address_line1: string;
@@ -4,7 +4,7 @@ import { Contact, ContactInputType } from "../model/Contact";
4
4
  export declare class ERPNextContact {
5
5
  protected temporalClient: TemporalClient;
6
6
  protected baseRequest: ERPNextDoctypeResourceRequest<typeof Contact>;
7
- getList: <TFieldOptions extends ("name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "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"), TSelectedFields extends readonly ["*"] | TFieldOptions[] | undefined = undefined, TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
7
+ getList: <TFieldOptions extends ("docstatus" | "name" | "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"), TSelectedFields extends readonly ["*"] | TFieldOptions[] | undefined = undefined, TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
8
8
  fields?: TSelectedFields;
9
9
  filters?: (string | string[])[][];
10
10
  skip?: number;
@@ -15,13 +15,13 @@ export declare class ERPNextContact {
15
15
  }) => Promise<(TAsDict extends false ? string[][] : TSelectedFields extends undefined ? {
16
16
  name: string;
17
17
  }[] : TSelectedFields extends readonly ["*"] ? {
18
+ docstatus: number;
18
19
  name: string;
19
20
  owner: string;
20
21
  creation: string;
21
22
  modified: string;
22
23
  modified_by: string;
23
24
  idx: number;
24
- docstatus: number;
25
25
  sync_with_google_contacts: 0 | 1;
26
26
  pulled_from_google_contacts: 0 | 1;
27
27
  is_primary_contact: 0 | 1;
@@ -29,7 +29,7 @@ export declare class ERPNextContact {
29
29
  unsubscribed: 0 | 1;
30
30
  status?: string | null | undefined;
31
31
  address?: string | null | undefined;
32
- _user_tags?: string | undefined;
32
+ _user_tags?: string | null | undefined;
33
33
  phone?: string | null | undefined;
34
34
  email_id?: string | null | undefined;
35
35
  links?: {
@@ -52,14 +52,14 @@ export declare class ERPNextContact {
52
52
  is_primary_phone: 0 | 1;
53
53
  is_primary_mobile_no: 0 | 1;
54
54
  }[] | null | undefined;
55
- }[] : TSelectedFields extends TFieldOptions[] ? Pick<{
55
+ }[] : TSelectedFields extends TFieldOptions[] ? { [K_1 in TSelectedFields[number] as K_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1]: (K_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1) extends ("docstatus" | "name" | "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") ? {
56
+ docstatus: number;
56
57
  name: string;
57
58
  owner: string;
58
59
  creation: string;
59
60
  modified: string;
60
61
  modified_by: string;
61
62
  idx: number;
62
- docstatus: number;
63
63
  sync_with_google_contacts: 0 | 1;
64
64
  pulled_from_google_contacts: 0 | 1;
65
65
  is_primary_contact: 0 | 1;
@@ -67,7 +67,7 @@ export declare class ERPNextContact {
67
67
  unsubscribed: 0 | 1;
68
68
  status?: string | null | undefined;
69
69
  address?: string | null | undefined;
70
- _user_tags?: string | undefined;
70
+ _user_tags?: string | null | undefined;
71
71
  phone?: string | null | undefined;
72
72
  email_id?: string | null | undefined;
73
73
  links?: {
@@ -90,18 +90,18 @@ export declare class ERPNextContact {
90
90
  is_primary_phone: 0 | 1;
91
91
  is_primary_mobile_no: 0 | 1;
92
92
  }[] | null | undefined;
93
- }, TSelectedFields[number]>[] : any) extends infer T ? { [K in keyof T]: T[K]; } : never>;
93
+ }[(("docstatus" | "name" | "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_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1)] : never; }[] : any) extends infer T ? { [K in keyof T]: T[K]; } : never>;
94
94
  getById: ({ resourceId, priority, }: {
95
95
  resourceId: string;
96
96
  priority?: number;
97
97
  }) => Promise<{
98
+ docstatus: number;
98
99
  name: string;
99
100
  owner: string;
100
101
  creation: string;
101
102
  modified: string;
102
103
  modified_by: string;
103
104
  idx: number;
104
- docstatus: number;
105
105
  doctype: string;
106
106
  sync_with_google_contacts: 0 | 1;
107
107
  pulled_from_google_contacts: 0 | 1;
@@ -110,7 +110,7 @@ export declare class ERPNextContact {
110
110
  unsubscribed: 0 | 1;
111
111
  status?: string | null | undefined;
112
112
  address?: string | null | undefined;
113
- _user_tags?: string | undefined;
113
+ _user_tags?: string | null | undefined;
114
114
  phone?: string | null | undefined;
115
115
  email_id?: string | null | undefined;
116
116
  links?: {
@@ -133,7 +133,7 @@ export declare class ERPNextContact {
133
133
  is_primary_phone: 0 | 1;
134
134
  is_primary_mobile_no: 0 | 1;
135
135
  }[] | null | undefined;
136
- }>;
136
+ } | undefined>;
137
137
  updateById: <TInput extends TInputModel extends undefined ? Partial<{
138
138
  status?: string | null | undefined;
139
139
  address?: string | null | undefined;
@@ -170,13 +170,13 @@ export declare class ERPNextContact {
170
170
  priority?: number;
171
171
  body: TInput;
172
172
  }) => Promise<{
173
+ docstatus: number;
173
174
  name: string;
174
175
  owner: string;
175
176
  creation: string;
176
177
  modified: string;
177
178
  modified_by: string;
178
179
  idx: number;
179
- docstatus: number;
180
180
  doctype: string;
181
181
  sync_with_google_contacts: 0 | 1;
182
182
  pulled_from_google_contacts: 0 | 1;
@@ -185,7 +185,7 @@ export declare class ERPNextContact {
185
185
  unsubscribed: 0 | 1;
186
186
  status?: string | null | undefined;
187
187
  address?: string | null | undefined;
188
- _user_tags?: string | undefined;
188
+ _user_tags?: string | null | undefined;
189
189
  phone?: string | null | undefined;
190
190
  email_id?: string | null | undefined;
191
191
  links?: {
@@ -214,14 +214,14 @@ export declare class ERPNextContact {
214
214
  priority?: number;
215
215
  }) => Promise<import("zod").TypeOf<typeof import("../model/ERPNextResponse").DeleteResponseModel>>;
216
216
  constructor(temporalClient: TemporalClient);
217
- getContactsByAddressEmail: <K extends keyof (typeof Contact)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends (("name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "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"))[] ? Pick<{
217
+ getContactsByAddressEmail: <K extends keyof (typeof Contact)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends (("docstatus" | "name" | "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 ("docstatus" | "name" | "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") ? {
218
+ docstatus: number;
218
219
  name: string;
219
220
  owner: string;
220
221
  creation: string;
221
222
  modified: string;
222
223
  modified_by: string;
223
224
  idx: number;
224
- docstatus: number;
225
225
  sync_with_google_contacts: 0 | 1;
226
226
  pulled_from_google_contacts: 0 | 1;
227
227
  is_primary_contact: 0 | 1;
@@ -229,7 +229,7 @@ export declare class ERPNextContact {
229
229
  unsubscribed: 0 | 1;
230
230
  status?: string | null | undefined;
231
231
  address?: string | null | undefined;
232
- _user_tags?: string | undefined;
232
+ _user_tags?: string | null | undefined;
233
233
  phone?: string | null | undefined;
234
234
  email_id?: string | null | undefined;
235
235
  links?: {
@@ -252,15 +252,15 @@ export declare class ERPNextContact {
252
252
  is_primary_phone: 0 | 1;
253
253
  is_primary_mobile_no: 0 | 1;
254
254
  }[] | null | undefined;
255
- }, T_1[number]>[] : any : never : never) extends infer T ? { [K_1 in keyof T]: T[K_1]; } : never>;
255
+ }[(("docstatus" | "name" | "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]: T[K_1]; } : never>;
256
256
  create: (contact: Omit<ContactInputType, "links">, customerName: string) => Promise<{
257
+ docstatus: number;
257
258
  name: string;
258
259
  owner: string;
259
260
  creation: string;
260
261
  modified: string;
261
262
  modified_by: string;
262
263
  idx: number;
263
- docstatus: number;
264
264
  doctype: string;
265
265
  sync_with_google_contacts: 0 | 1;
266
266
  pulled_from_google_contacts: 0 | 1;
@@ -269,7 +269,7 @@ export declare class ERPNextContact {
269
269
  unsubscribed: 0 | 1;
270
270
  status?: string | null | undefined;
271
271
  address?: string | null | undefined;
272
- _user_tags?: string | undefined;
272
+ _user_tags?: string | null | undefined;
273
273
  phone?: string | null | undefined;
274
274
  email_id?: string | null | undefined;
275
275
  links?: {