erpnext-queue-client 2.9.4 → 2.9.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/client.js CHANGED
@@ -35,7 +35,7 @@ class TemporalClient {
35
35
  else
36
36
  throw new Error("No client or connection details provided");
37
37
  }
38
- async tryConnect(temporalHost, temporalCert, temporalKey) {
38
+ async tryConnect(temporalHost, temporalCert, temporalKey, temporalApiKey) {
39
39
  try {
40
40
  return await client_1.Connection.connect({
41
41
  address: temporalHost,
@@ -49,21 +49,23 @@ class TemporalClient {
49
49
  },
50
50
  }
51
51
  : {}),
52
+ ...(temporalApiKey ? { apiKey: temporalApiKey } : {}),
52
53
  });
53
54
  }
54
55
  catch (err) {
56
+ console.error("Error connecting to temporal", err);
55
57
  return undefined;
56
58
  }
57
59
  }
58
60
  async createClient(options) {
59
- const { temporalCert, temporalHost, temporalKey, temporalNamespace } = options;
61
+ const { temporalCert, temporalHost, temporalKey, temporalApiKey, temporalNamespace, } = options;
60
62
  if (!temporalHost)
61
63
  throw new Error("No temporal credentials provided");
62
- const connection = await this.tryConnect(temporalHost, temporalCert, temporalKey);
63
- console.log("Create new client", options.temporalHost);
64
+ const connection = await this.tryConnect(temporalHost, temporalCert, temporalKey, temporalApiKey);
65
+ console.log("Create new client", temporalHost, temporalNamespace);
64
66
  this.client = new client_1.Client({
65
67
  ...(connection ? { connection } : {}),
66
- namespace: options.temporalNamespace || "default",
68
+ namespace: temporalNamespace || "default",
67
69
  dataConverter: dataConverter_1.dataConverter,
68
70
  });
69
71
  return this.client;
@@ -56,12 +56,12 @@ export declare class ERPNextPaymentEntry extends ERPNextDoctypeSubmittableResour
56
56
  reference_doctype: string;
57
57
  reference_name: string;
58
58
  allocated_amount: number;
59
- account_type?: string | null | undefined;
59
+ account?: string | null | undefined;
60
60
  payment_term?: string | null | undefined;
61
+ account_type?: string | null | undefined;
61
62
  payment_type?: string | null | undefined;
62
63
  total_amount?: number | null | undefined;
63
64
  outstanding_amount?: number | null | undefined;
64
- account?: string | null | undefined;
65
65
  payment_request?: string | null | undefined;
66
66
  }[] | undefined;
67
67
  deductions?: unknown[] | undefined;
@@ -117,12 +117,12 @@ export declare class ERPNextPaymentEntry extends ERPNextDoctypeSubmittableResour
117
117
  reference_doctype: string;
118
118
  reference_name: string;
119
119
  allocated_amount: number;
120
- account_type?: string | null | undefined;
120
+ account?: string | null | undefined;
121
121
  payment_term?: string | null | undefined;
122
+ account_type?: string | null | undefined;
122
123
  payment_type?: string | null | undefined;
123
124
  total_amount?: number | null | undefined;
124
125
  outstanding_amount?: number | null | undefined;
125
- account?: string | null | undefined;
126
126
  payment_request?: string | null | undefined;
127
127
  }[] | undefined;
128
128
  deductions?: unknown[] | undefined;
@@ -199,12 +199,12 @@ export declare class ERPNextPaymentEntry extends ERPNextDoctypeSubmittableResour
199
199
  reference_name: string;
200
200
  allocated_amount: number;
201
201
  _user_tags?: string | null | undefined;
202
- account_type?: string | null | undefined;
202
+ account?: string | null | undefined;
203
203
  payment_term?: string | null | undefined;
204
+ account_type?: string | null | undefined;
204
205
  payment_type?: string | null | undefined;
205
206
  total_amount?: number | null | undefined;
206
207
  outstanding_amount?: number | null | undefined;
207
- account?: string | null | undefined;
208
208
  payment_request?: string | null | undefined;
209
209
  }[] | undefined;
210
210
  deductions?: unknown[] | undefined;
@@ -281,12 +281,12 @@ export declare class ERPNextPaymentEntry extends ERPNextDoctypeSubmittableResour
281
281
  reference_name: string;
282
282
  allocated_amount: number;
283
283
  _user_tags?: string | null | undefined;
284
- account_type?: string | null | undefined;
284
+ account?: string | null | undefined;
285
285
  payment_term?: string | null | undefined;
286
+ account_type?: string | null | undefined;
286
287
  payment_type?: string | null | undefined;
287
288
  total_amount?: number | null | undefined;
288
289
  outstanding_amount?: number | null | undefined;
289
- account?: string | null | undefined;
290
290
  payment_request?: string | null | undefined;
291
291
  }[] | undefined;
292
292
  deductions?: unknown[] | undefined;
@@ -30,7 +30,6 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
30
30
  parentfield: string;
31
31
  description?: string | null | undefined;
32
32
  _user_tags?: string | null | undefined;
33
- account_currency?: string | null | undefined;
34
33
  rate?: number | null | undefined;
35
34
  base_total?: number | null | undefined;
36
35
  total?: number | null | undefined;
@@ -38,6 +37,7 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
38
37
  account_head?: string | null | undefined;
39
38
  included_in_print_rate?: number | null | undefined;
40
39
  cost_center?: string | null | undefined;
40
+ account_currency?: string | null | undefined;
41
41
  base_tax_amount?: number | null | undefined;
42
42
  tax_amount?: number | null | undefined;
43
43
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -247,7 +247,6 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
247
247
  parentfield: string;
248
248
  description?: string | null | undefined;
249
249
  _user_tags?: string | null | undefined;
250
- account_currency?: string | null | undefined;
251
250
  rate?: number | null | undefined;
252
251
  base_total?: number | null | undefined;
253
252
  total?: number | null | undefined;
@@ -255,6 +254,7 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
255
254
  account_head?: string | null | undefined;
256
255
  included_in_print_rate?: number | null | undefined;
257
256
  cost_center?: string | null | undefined;
257
+ account_currency?: string | null | undefined;
258
258
  base_tax_amount?: number | null | undefined;
259
259
  tax_amount?: number | null | undefined;
260
260
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -464,7 +464,6 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
464
464
  parentfield: string;
465
465
  description?: string | null | undefined;
466
466
  _user_tags?: string | null | undefined;
467
- account_currency?: string | null | undefined;
468
467
  rate?: number | null | undefined;
469
468
  base_total?: number | null | undefined;
470
469
  total?: number | null | undefined;
@@ -472,6 +471,7 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
472
471
  account_head?: string | null | undefined;
473
472
  included_in_print_rate?: number | null | undefined;
474
473
  cost_center?: string | null | undefined;
474
+ account_currency?: string | null | undefined;
475
475
  base_tax_amount?: number | null | undefined;
476
476
  tax_amount?: number | null | undefined;
477
477
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -681,7 +681,6 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
681
681
  parentfield: string;
682
682
  description?: string | null | undefined;
683
683
  _user_tags?: string | null | undefined;
684
- account_currency?: string | null | undefined;
685
684
  rate?: number | null | undefined;
686
685
  base_total?: number | null | undefined;
687
686
  total?: number | null | undefined;
@@ -689,6 +688,7 @@ export declare class ERPNextPurchaseInvoice extends ERPNextDoctypeSubmittableRes
689
688
  account_head?: string | null | undefined;
690
689
  included_in_print_rate?: number | null | undefined;
691
690
  cost_center?: string | null | undefined;
691
+ account_currency?: string | null | undefined;
692
692
  base_tax_amount?: number | null | undefined;
693
693
  tax_amount?: number | null | undefined;
694
694
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -174,12 +174,12 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
174
174
  account_head: string;
175
175
  included_in_print_rate: 0 | 1;
176
176
  description?: string | undefined;
177
- account_currency?: string | undefined;
178
177
  rate?: number | undefined;
179
178
  base_total?: number | undefined;
180
179
  total?: number | undefined;
181
180
  cost_center?: string | undefined;
182
181
  project?: string | undefined;
182
+ account_currency?: string | undefined;
183
183
  base_tax_amount?: number | undefined;
184
184
  tax_amount?: number | undefined;
185
185
  tax_amount_after_discount_amount?: number | undefined;
@@ -229,8 +229,8 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
229
229
  payments?: {
230
230
  amount: number;
231
231
  mode_of_payment: string;
232
- base_amount?: number | null | undefined;
233
232
  account?: string | null | undefined;
233
+ base_amount?: number | null | undefined;
234
234
  reference_no?: string | null | undefined;
235
235
  clearance_date?: string | null | undefined;
236
236
  }[] | null | undefined;
@@ -478,12 +478,12 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
478
478
  included_in_print_rate: 0 | 1;
479
479
  description?: string | undefined;
480
480
  _user_tags?: string | null | undefined;
481
- account_currency?: string | undefined;
482
481
  rate?: number | undefined;
483
482
  base_total?: number | undefined;
484
483
  total?: number | undefined;
485
484
  cost_center?: string | undefined;
486
485
  project?: string | undefined;
486
+ account_currency?: string | undefined;
487
487
  base_tax_amount?: number | undefined;
488
488
  tax_amount?: number | undefined;
489
489
  tax_amount_after_discount_amount?: number | undefined;
@@ -543,8 +543,8 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
543
543
  amount: number;
544
544
  mode_of_payment: string;
545
545
  _user_tags?: string | null | undefined;
546
- base_amount?: number | null | undefined;
547
546
  account?: string | null | undefined;
547
+ base_amount?: number | null | undefined;
548
548
  reference_no?: string | null | undefined;
549
549
  clearance_date?: string | null | undefined;
550
550
  }[] | null | undefined;
@@ -735,12 +735,12 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
735
735
  account_head: string;
736
736
  included_in_print_rate: 0 | 1;
737
737
  description?: string | undefined;
738
- account_currency?: string | undefined;
739
738
  rate?: number | undefined;
740
739
  base_total?: number | undefined;
741
740
  total?: number | undefined;
742
741
  cost_center?: string | undefined;
743
742
  project?: string | undefined;
743
+ account_currency?: string | undefined;
744
744
  base_tax_amount?: number | undefined;
745
745
  tax_amount?: number | undefined;
746
746
  tax_amount_after_discount_amount?: number | undefined;
@@ -790,8 +790,8 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
790
790
  payments?: {
791
791
  amount: number;
792
792
  mode_of_payment: string;
793
- base_amount?: number | null | undefined;
794
793
  account?: string | null | undefined;
794
+ base_amount?: number | null | undefined;
795
795
  reference_no?: string | null | undefined;
796
796
  clearance_date?: string | null | undefined;
797
797
  }[] | null | undefined;
@@ -1039,12 +1039,12 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
1039
1039
  included_in_print_rate: 0 | 1;
1040
1040
  description?: string | undefined;
1041
1041
  _user_tags?: string | null | undefined;
1042
- account_currency?: string | undefined;
1043
1042
  rate?: number | undefined;
1044
1043
  base_total?: number | undefined;
1045
1044
  total?: number | undefined;
1046
1045
  cost_center?: string | undefined;
1047
1046
  project?: string | undefined;
1047
+ account_currency?: string | undefined;
1048
1048
  base_tax_amount?: number | undefined;
1049
1049
  tax_amount?: number | undefined;
1050
1050
  tax_amount_after_discount_amount?: number | undefined;
@@ -1104,8 +1104,8 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
1104
1104
  amount: number;
1105
1105
  mode_of_payment: string;
1106
1106
  _user_tags?: string | null | undefined;
1107
- base_amount?: number | null | undefined;
1108
1107
  account?: string | null | undefined;
1108
+ base_amount?: number | null | undefined;
1109
1109
  reference_no?: string | null | undefined;
1110
1110
  clearance_date?: string | null | undefined;
1111
1111
  }[] | null | undefined;
@@ -5,6 +5,7 @@ import { ERPNextReports } from "../reports";
5
5
  export declare class ERPNextStock extends ERPNextReports {
6
6
  protected methodRequest: ERPNextMethodRequest;
7
7
  constructor(temporalClient: TemporalClient);
8
+ getValuationRateBySku(sku: string): Promise<number>;
8
9
  getStockBalanceAtDate(date: Date, warehouse?: string): Promise<StockBalanceReportItemType[]>;
9
10
  getStockProjectedQuantityReport(warehouse?: string, sku?: string): Promise<StockProjectedQuantityReportItemType[]>;
10
11
  getStockFromBin(topLevelWarehouse: string): Promise<any>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const stock_1 = require("./stock");
4
+ function makeStock(response) {
5
+ const executeERPNextRequestWorkflow = vi.fn().mockResolvedValue(response);
6
+ const stock = new stock_1.ERPNextStock({ executeERPNextRequestWorkflow });
7
+ return { stock, executeERPNextRequestWorkflow };
8
+ }
9
+ describe("ERPNextStock.getValuationRateBySku", () => {
10
+ test("returns the valuation rate from the getValuationBySKU endpoint", async () => {
11
+ const { stock } = makeStock({ valuation_rate: 2.87625, origin: "TabStock" });
12
+ expect(await stock.getValuationRateBySku("SKU-1")).toBe(2.87625);
13
+ });
14
+ test("returns 0 when the endpoint reports no valuation rate", async () => {
15
+ const { stock } = makeStock({
16
+ message: "Unable to determine valuation rate for SKU: SKU-1",
17
+ });
18
+ expect(await stock.getValuationRateBySku("SKU-1")).toBe(0);
19
+ });
20
+ test("calls the getValuationBySKU method with the sku as query param", async () => {
21
+ const { stock, executeERPNextRequestWorkflow } = makeStock({
22
+ valuation_rate: 5,
23
+ });
24
+ await stock.getValuationRateBySku("SKU-XYZ");
25
+ const [workflowName, payload] = executeERPNextRequestWorkflow.mock.calls[0];
26
+ expect(workflowName).toBe("GET-getValuationBySKU");
27
+ expect(payload.methodName).toBe("getValuationBySKU");
28
+ expect(payload.params).toContain("SKU-XYZ");
29
+ });
30
+ });
@@ -4,6 +4,7 @@ exports.ERPNextStock = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const methodRequest_1 = require("../methodRequest");
6
6
  const Stock_1 = require("../model/Stock");
7
+ const ValuationRate_1 = require("../model/ValuationRate");
7
8
  const reports_1 = require("../reports");
8
9
  class ERPNextStock extends reports_1.ERPNextReports {
9
10
  methodRequest;
@@ -11,6 +12,16 @@ class ERPNextStock extends reports_1.ERPNextReports {
11
12
  super(temporalClient);
12
13
  this.methodRequest = new methodRequest_1.ERPNextMethodRequest(temporalClient);
13
14
  }
15
+ async getValuationRateBySku(sku) {
16
+ const result = await this.methodRequest.request({
17
+ methodName: "getValuationBySKU",
18
+ requestMethod: "GET",
19
+ params: { sku },
20
+ responseValidationModel: ValuationRate_1.ValuationRateResponse,
21
+ isAutoWrapResponseValidationWithMessage: false,
22
+ });
23
+ return result.valuation_rate ?? 0;
24
+ }
14
25
  async getStockBalanceAtDate(date, warehouse = "") {
15
26
  const dateString = date.toISOString().substring(0, 10);
16
27
  const result = await this.getReport("Stock Balance", {
@@ -23,29 +23,29 @@ export declare const Account: z.ZodObject<{
23
23
  }, "strip", z.ZodTypeAny, {
24
24
  is_group: 0 | 1;
25
25
  disabled: 0 | 1;
26
- account_name: string;
27
26
  company: string;
27
+ account_name: string;
28
28
  parent_account: string;
29
29
  include_in_gross: 0 | 1;
30
+ account_currency?: string | null | undefined;
31
+ account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
30
32
  account_number?: string | null | undefined;
31
33
  root_type?: "Asset" | "Liability" | "Income" | "Expense" | "Equity" | null | undefined;
32
34
  report_type?: "Balance Sheet" | "Profit and Loss" | null | undefined;
33
- account_currency?: string | null | undefined;
34
- account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
35
35
  tax_rate?: number | null | undefined;
36
36
  freeze_account?: "No" | "Yes" | null | undefined;
37
37
  balance_must_be?: "Debit" | "Credit" | null | undefined;
38
38
  }, {
39
- account_name: string;
40
39
  company: string;
40
+ account_name: string;
41
41
  parent_account: string;
42
42
  is_group?: unknown;
43
43
  disabled?: unknown;
44
+ account_currency?: string | null | undefined;
45
+ account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
44
46
  account_number?: string | null | undefined;
45
47
  root_type?: "Asset" | "Liability" | "Income" | "Expense" | "Equity" | null | undefined;
46
48
  report_type?: "Balance Sheet" | "Profit and Loss" | null | undefined;
47
- account_currency?: string | null | undefined;
48
- account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
49
49
  tax_rate?: number | null | undefined;
50
50
  freeze_account?: "No" | "Yes" | null | undefined;
51
51
  balance_must_be?: "Debit" | "Credit" | null | undefined;
@@ -76,29 +76,29 @@ declare const AccountInput: import("../../utils/zodContextOptionals").ResourceIn
76
76
  }, z.UnknownKeysParam, z.ZodTypeAny, {
77
77
  is_group: 0 | 1;
78
78
  disabled: 0 | 1;
79
- account_name: string;
80
79
  company: string;
80
+ account_name: string;
81
81
  parent_account: string;
82
82
  include_in_gross: 0 | 1;
83
+ account_currency?: string | null | undefined;
84
+ account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
83
85
  account_number?: string | null | undefined;
84
86
  root_type?: "Asset" | "Liability" | "Income" | "Expense" | "Equity" | null | undefined;
85
87
  report_type?: "Balance Sheet" | "Profit and Loss" | null | undefined;
86
- account_currency?: string | null | undefined;
87
- account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
88
88
  tax_rate?: number | null | undefined;
89
89
  freeze_account?: "No" | "Yes" | null | undefined;
90
90
  balance_must_be?: "Debit" | "Credit" | null | undefined;
91
91
  }, {
92
- account_name: string;
93
92
  company: string;
93
+ account_name: string;
94
94
  parent_account: string;
95
95
  is_group?: unknown;
96
96
  disabled?: unknown;
97
+ account_currency?: string | null | undefined;
98
+ account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
97
99
  account_number?: string | null | undefined;
98
100
  root_type?: "Asset" | "Liability" | "Income" | "Expense" | "Equity" | null | undefined;
99
101
  report_type?: "Balance Sheet" | "Profit and Loss" | null | undefined;
100
- account_currency?: string | null | undefined;
101
- account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
102
102
  tax_rate?: number | null | undefined;
103
103
  freeze_account?: "No" | "Yes" | null | undefined;
104
104
  balance_must_be?: "Debit" | "Credit" | null | undefined;
@@ -35,13 +35,13 @@ export declare const Customer: z.ZodObject<{
35
35
  }, "strip", z.ZodTypeAny, {
36
36
  company: string;
37
37
  account?: string | null | undefined;
38
- debtor_creditor_number?: string | null | undefined;
39
38
  advance_account?: string | null | undefined;
39
+ debtor_creditor_number?: string | null | undefined;
40
40
  }, {
41
41
  company: string;
42
42
  account?: string | null | undefined;
43
- debtor_creditor_number?: string | null | undefined;
44
43
  advance_account?: string | null | undefined;
44
+ debtor_creditor_number?: string | null | undefined;
45
45
  }>, "many"> & {
46
46
  __optionalForInput: true;
47
47
  };
@@ -53,8 +53,8 @@ export declare const Customer: z.ZodObject<{
53
53
  accounts: {
54
54
  company: string;
55
55
  account?: string | null | undefined;
56
- debtor_creditor_number?: string | null | undefined;
57
56
  advance_account?: string | null | undefined;
57
+ debtor_creditor_number?: string | null | undefined;
58
58
  }[];
59
59
  customer_name: string;
60
60
  is_internal_customer: 0 | 1;
@@ -77,8 +77,8 @@ export declare const Customer: z.ZodObject<{
77
77
  accounts: {
78
78
  company: string;
79
79
  account?: string | null | undefined;
80
- debtor_creditor_number?: string | null | undefined;
81
80
  advance_account?: string | null | undefined;
81
+ debtor_creditor_number?: string | null | undefined;
82
82
  }[];
83
83
  customer_name: string;
84
84
  disabled?: unknown;
@@ -509,12 +509,12 @@ export declare const DeliveryNote: z.ZodObject<{
509
509
  account_head: string;
510
510
  included_in_print_rate: 0 | 1;
511
511
  description?: string | undefined;
512
- account_currency?: string | undefined;
513
512
  rate?: number | undefined;
514
513
  base_total?: number | undefined;
515
514
  total?: number | undefined;
516
515
  cost_center?: string | undefined;
517
516
  project?: string | undefined;
517
+ account_currency?: string | undefined;
518
518
  base_tax_amount?: number | undefined;
519
519
  tax_amount?: number | undefined;
520
520
  tax_amount_after_discount_amount?: number | undefined;
@@ -522,13 +522,13 @@ export declare const DeliveryNote: z.ZodObject<{
522
522
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
523
523
  account_head: string;
524
524
  description?: string | undefined;
525
- account_currency?: string | undefined;
526
525
  rate?: number | undefined;
527
526
  base_total?: number | undefined;
528
527
  total?: number | undefined;
529
528
  included_in_print_rate?: unknown;
530
529
  cost_center?: string | undefined;
531
530
  project?: string | undefined;
531
+ account_currency?: string | undefined;
532
532
  base_tax_amount?: number | undefined;
533
533
  tax_amount?: number | undefined;
534
534
  tax_amount_after_discount_amount?: number | undefined;
@@ -668,12 +668,12 @@ export declare const DeliveryNote: z.ZodObject<{
668
668
  account_head: string;
669
669
  included_in_print_rate: 0 | 1;
670
670
  description?: string | undefined;
671
- account_currency?: string | undefined;
672
671
  rate?: number | undefined;
673
672
  base_total?: number | undefined;
674
673
  total?: number | undefined;
675
674
  cost_center?: string | undefined;
676
675
  project?: string | undefined;
676
+ account_currency?: string | undefined;
677
677
  base_tax_amount?: number | undefined;
678
678
  tax_amount?: number | undefined;
679
679
  tax_amount_after_discount_amount?: number | undefined;
@@ -850,13 +850,13 @@ export declare const DeliveryNote: z.ZodObject<{
850
850
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
851
851
  account_head: string;
852
852
  description?: string | undefined;
853
- account_currency?: string | undefined;
854
853
  rate?: number | undefined;
855
854
  base_total?: number | undefined;
856
855
  total?: number | undefined;
857
856
  included_in_print_rate?: unknown;
858
857
  cost_center?: string | undefined;
859
858
  project?: string | undefined;
859
+ account_currency?: string | undefined;
860
860
  base_tax_amount?: number | undefined;
861
861
  tax_amount?: number | undefined;
862
862
  tax_amount_after_discount_amount?: number | undefined;
@@ -6,9 +6,10 @@ export interface TemporalClientContructorOptions {
6
6
  */
7
7
  client?: Client;
8
8
  temporalHost?: string;
9
+ temporalNamespace?: string;
9
10
  temporalCert?: string;
10
11
  temporalKey?: string;
11
- temporalNamespace?: string;
12
+ temporalApiKey?: string;
12
13
  }
13
14
  export interface ERPNextQueueClientContructorOptions {
14
15
  /**
@@ -41,6 +42,7 @@ export interface ERPNextCredentials {
41
42
  }
42
43
  export interface TemporalClientOptions {
43
44
  temporalHost?: string;
45
+ temporalApiKey?: string;
44
46
  temporalCert?: string;
45
47
  temporalKey?: string;
46
48
  temporalNamespace?: string;
@@ -14,23 +14,23 @@ declare const PaymentEntryReference: z.ZodObject<{
14
14
  reference_doctype: string;
15
15
  reference_name: string;
16
16
  allocated_amount: number;
17
- account_type?: string | null | undefined;
17
+ account?: string | null | undefined;
18
18
  payment_term?: string | null | undefined;
19
+ account_type?: string | null | undefined;
19
20
  payment_type?: string | null | undefined;
20
21
  total_amount?: number | null | undefined;
21
22
  outstanding_amount?: number | null | undefined;
22
- account?: string | null | undefined;
23
23
  payment_request?: string | null | undefined;
24
24
  }, {
25
25
  reference_doctype: string;
26
26
  reference_name: string;
27
27
  allocated_amount: number;
28
- account_type?: string | null | undefined;
28
+ account?: string | null | undefined;
29
29
  payment_term?: string | null | undefined;
30
+ account_type?: string | null | undefined;
30
31
  payment_type?: string | null | undefined;
31
32
  total_amount?: number | null | undefined;
32
33
  outstanding_amount?: number | null | undefined;
33
- account?: string | null | undefined;
34
34
  payment_request?: string | null | undefined;
35
35
  }>;
36
36
  export type PaymentEntryReferenceType = z.infer<typeof PaymentEntryReference>;
@@ -122,23 +122,23 @@ export declare const PaymentEntry: z.ZodObject<{
122
122
  reference_doctype: string;
123
123
  reference_name: string;
124
124
  allocated_amount: number;
125
- account_type?: string | null | undefined;
125
+ account?: string | null | undefined;
126
126
  payment_term?: string | null | undefined;
127
+ account_type?: string | null | undefined;
127
128
  payment_type?: string | null | undefined;
128
129
  total_amount?: number | null | undefined;
129
130
  outstanding_amount?: number | null | undefined;
130
- account?: string | null | undefined;
131
131
  payment_request?: string | null | undefined;
132
132
  }, {
133
133
  reference_doctype: string;
134
134
  reference_name: string;
135
135
  allocated_amount: number;
136
- account_type?: string | null | undefined;
136
+ account?: string | null | undefined;
137
137
  payment_term?: string | null | undefined;
138
+ account_type?: string | null | undefined;
138
139
  payment_type?: string | null | undefined;
139
140
  total_amount?: number | null | undefined;
140
141
  outstanding_amount?: number | null | undefined;
141
- account?: string | null | undefined;
142
142
  payment_request?: string | null | undefined;
143
143
  }>, "many">>;
144
144
  taxes: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
@@ -193,12 +193,12 @@ export declare const PaymentEntry: z.ZodObject<{
193
193
  reference_doctype: string;
194
194
  reference_name: string;
195
195
  allocated_amount: number;
196
- account_type?: string | null | undefined;
196
+ account?: string | null | undefined;
197
197
  payment_term?: string | null | undefined;
198
+ account_type?: string | null | undefined;
198
199
  payment_type?: string | null | undefined;
199
200
  total_amount?: number | null | undefined;
200
201
  outstanding_amount?: number | null | undefined;
201
- account?: string | null | undefined;
202
202
  payment_request?: string | null | undefined;
203
203
  }[] | undefined;
204
204
  deductions?: unknown[] | undefined;
@@ -252,12 +252,12 @@ export declare const PaymentEntry: z.ZodObject<{
252
252
  reference_doctype: string;
253
253
  reference_name: string;
254
254
  allocated_amount: number;
255
- account_type?: string | null | undefined;
255
+ account?: string | null | undefined;
256
256
  payment_term?: string | null | undefined;
257
+ account_type?: string | null | undefined;
257
258
  payment_type?: string | null | undefined;
258
259
  total_amount?: number | null | undefined;
259
260
  outstanding_amount?: number | null | undefined;
260
- account?: string | null | undefined;
261
261
  payment_request?: string | null | undefined;
262
262
  }[] | undefined;
263
263
  deductions?: unknown[] | undefined;
@@ -322,23 +322,23 @@ export declare const PaymentEntryDraft: z.ZodObject<{
322
322
  reference_doctype: string;
323
323
  reference_name: string;
324
324
  allocated_amount: number;
325
- account_type?: string | null | undefined;
325
+ account?: string | null | undefined;
326
326
  payment_term?: string | null | undefined;
327
+ account_type?: string | null | undefined;
327
328
  payment_type?: string | null | undefined;
328
329
  total_amount?: number | null | undefined;
329
330
  outstanding_amount?: number | null | undefined;
330
- account?: string | null | undefined;
331
331
  payment_request?: string | null | undefined;
332
332
  }, {
333
333
  reference_doctype: string;
334
334
  reference_name: string;
335
335
  allocated_amount: number;
336
- account_type?: string | null | undefined;
336
+ account?: string | null | undefined;
337
337
  payment_term?: string | null | undefined;
338
+ account_type?: string | null | undefined;
338
339
  payment_type?: string | null | undefined;
339
340
  total_amount?: number | null | undefined;
340
341
  outstanding_amount?: number | null | undefined;
341
- account?: string | null | undefined;
342
342
  payment_request?: string | null | undefined;
343
343
  }>, "many">>;
344
344
  taxes: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
@@ -397,12 +397,12 @@ export declare const PaymentEntryDraft: z.ZodObject<{
397
397
  reference_doctype: string;
398
398
  reference_name: string;
399
399
  allocated_amount: number;
400
- account_type?: string | null | undefined;
400
+ account?: string | null | undefined;
401
401
  payment_term?: string | null | undefined;
402
+ account_type?: string | null | undefined;
402
403
  payment_type?: string | null | undefined;
403
404
  total_amount?: number | null | undefined;
404
405
  outstanding_amount?: number | null | undefined;
405
- account?: string | null | undefined;
406
406
  payment_request?: string | null | undefined;
407
407
  }[] | undefined;
408
408
  deductions?: unknown[] | undefined;
@@ -457,12 +457,12 @@ export declare const PaymentEntryDraft: z.ZodObject<{
457
457
  reference_doctype: string;
458
458
  reference_name: string;
459
459
  allocated_amount: number;
460
- account_type?: string | null | undefined;
460
+ account?: string | null | undefined;
461
461
  payment_term?: string | null | undefined;
462
+ account_type?: string | null | undefined;
462
463
  payment_type?: string | null | undefined;
463
464
  total_amount?: number | null | undefined;
464
465
  outstanding_amount?: number | null | undefined;
465
- account?: string | null | undefined;
466
466
  payment_request?: string | null | undefined;
467
467
  }[] | undefined;
468
468
  deductions?: unknown[] | undefined;
@@ -419,7 +419,6 @@ export declare const PurchaseInvoice: z.ZodObject<{
419
419
  __unsaved: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
420
420
  }, "strip", z.ZodTypeAny, {
421
421
  description?: string | null | undefined;
422
- account_currency?: string | null | undefined;
423
422
  rate?: number | null | undefined;
424
423
  base_total?: number | null | undefined;
425
424
  total?: number | null | undefined;
@@ -427,6 +426,7 @@ export declare const PurchaseInvoice: z.ZodObject<{
427
426
  account_head?: string | null | undefined;
428
427
  included_in_print_rate?: number | null | undefined;
429
428
  cost_center?: string | null | undefined;
429
+ account_currency?: string | null | undefined;
430
430
  base_tax_amount?: number | null | undefined;
431
431
  tax_amount?: number | null | undefined;
432
432
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -439,7 +439,6 @@ export declare const PurchaseInvoice: z.ZodObject<{
439
439
  item_wise_tax_detail?: string | null | undefined;
440
440
  }, {
441
441
  description?: string | null | undefined;
442
- account_currency?: string | null | undefined;
443
442
  rate?: number | null | undefined;
444
443
  base_total?: number | null | undefined;
445
444
  total?: number | null | undefined;
@@ -447,6 +446,7 @@ export declare const PurchaseInvoice: z.ZodObject<{
447
446
  account_head?: string | null | undefined;
448
447
  included_in_print_rate?: number | null | undefined;
449
448
  cost_center?: string | null | undefined;
449
+ account_currency?: string | null | undefined;
450
450
  base_tax_amount?: number | null | undefined;
451
451
  tax_amount?: number | null | undefined;
452
452
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -516,7 +516,6 @@ export declare const PurchaseInvoice: z.ZodObject<{
516
516
  }, "strip", z.ZodTypeAny, {
517
517
  taxes: {
518
518
  description?: string | null | undefined;
519
- account_currency?: string | null | undefined;
520
519
  rate?: number | null | undefined;
521
520
  base_total?: number | null | undefined;
522
521
  total?: number | null | undefined;
@@ -524,6 +523,7 @@ export declare const PurchaseInvoice: z.ZodObject<{
524
523
  account_head?: string | null | undefined;
525
524
  included_in_print_rate?: number | null | undefined;
526
525
  cost_center?: string | null | undefined;
526
+ account_currency?: string | null | undefined;
527
527
  base_tax_amount?: number | null | undefined;
528
528
  tax_amount?: number | null | undefined;
529
529
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -687,7 +687,6 @@ export declare const PurchaseInvoice: z.ZodObject<{
687
687
  }, {
688
688
  taxes: {
689
689
  description?: string | null | undefined;
690
- account_currency?: string | null | undefined;
691
690
  rate?: number | null | undefined;
692
691
  base_total?: number | null | undefined;
693
692
  total?: number | null | undefined;
@@ -695,6 +694,7 @@ export declare const PurchaseInvoice: z.ZodObject<{
695
694
  account_head?: string | null | undefined;
696
695
  included_in_print_rate?: number | null | undefined;
697
696
  cost_center?: string | null | undefined;
697
+ account_currency?: string | null | undefined;
698
698
  base_tax_amount?: number | null | undefined;
699
699
  tax_amount?: number | null | undefined;
700
700
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -1179,7 +1179,6 @@ export declare const PurchaseInvoiceDraft: z.ZodObject<Omit<{
1179
1179
  parentfield: string;
1180
1180
  description?: string | null | undefined;
1181
1181
  _user_tags?: string | null | undefined;
1182
- account_currency?: string | null | undefined;
1183
1182
  rate?: number | null | undefined;
1184
1183
  base_total?: number | null | undefined;
1185
1184
  total?: number | null | undefined;
@@ -1187,6 +1186,7 @@ export declare const PurchaseInvoiceDraft: z.ZodObject<Omit<{
1187
1186
  account_head?: string | null | undefined;
1188
1187
  included_in_print_rate?: number | null | undefined;
1189
1188
  cost_center?: string | null | undefined;
1189
+ account_currency?: string | null | undefined;
1190
1190
  base_tax_amount?: number | null | undefined;
1191
1191
  tax_amount?: number | null | undefined;
1192
1192
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -1211,7 +1211,6 @@ export declare const PurchaseInvoiceDraft: z.ZodObject<Omit<{
1211
1211
  description?: string | null | undefined;
1212
1212
  docstatus?: number | undefined;
1213
1213
  _user_tags?: string | null | undefined;
1214
- account_currency?: string | null | undefined;
1215
1214
  rate?: number | null | undefined;
1216
1215
  base_total?: number | null | undefined;
1217
1216
  total?: number | null | undefined;
@@ -1219,6 +1218,7 @@ export declare const PurchaseInvoiceDraft: z.ZodObject<Omit<{
1219
1218
  account_head?: string | null | undefined;
1220
1219
  included_in_print_rate?: number | null | undefined;
1221
1220
  cost_center?: string | null | undefined;
1221
+ account_currency?: string | null | undefined;
1222
1222
  base_tax_amount?: number | null | undefined;
1223
1223
  tax_amount?: number | null | undefined;
1224
1224
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -1359,7 +1359,6 @@ export declare const PurchaseInvoiceDraft: z.ZodObject<Omit<{
1359
1359
  parentfield: string;
1360
1360
  description?: string | null | undefined;
1361
1361
  _user_tags?: string | null | undefined;
1362
- account_currency?: string | null | undefined;
1363
1362
  rate?: number | null | undefined;
1364
1363
  base_total?: number | null | undefined;
1365
1364
  total?: number | null | undefined;
@@ -1367,6 +1366,7 @@ export declare const PurchaseInvoiceDraft: z.ZodObject<Omit<{
1367
1366
  account_head?: string | null | undefined;
1368
1367
  included_in_print_rate?: number | null | undefined;
1369
1368
  cost_center?: string | null | undefined;
1369
+ account_currency?: string | null | undefined;
1370
1370
  base_tax_amount?: number | null | undefined;
1371
1371
  tax_amount?: number | null | undefined;
1372
1372
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -1573,7 +1573,6 @@ export declare const PurchaseInvoiceDraft: z.ZodObject<Omit<{
1573
1573
  description?: string | null | undefined;
1574
1574
  docstatus?: number | undefined;
1575
1575
  _user_tags?: string | null | undefined;
1576
- account_currency?: string | null | undefined;
1577
1576
  rate?: number | null | undefined;
1578
1577
  base_total?: number | null | undefined;
1579
1578
  total?: number | null | undefined;
@@ -1581,6 +1580,7 @@ export declare const PurchaseInvoiceDraft: z.ZodObject<Omit<{
1581
1580
  account_head?: string | null | undefined;
1582
1581
  included_in_print_rate?: number | null | undefined;
1583
1582
  cost_center?: string | null | undefined;
1583
+ account_currency?: string | null | undefined;
1584
1584
  base_tax_amount?: number | null | undefined;
1585
1585
  tax_amount?: number | null | undefined;
1586
1586
  tax_amount_after_discount_amount?: number | null | undefined;
@@ -281,15 +281,15 @@ export declare const SalesInvoicePayment: z.ZodObject<{
281
281
  }, "strip", z.ZodTypeAny, {
282
282
  amount: number;
283
283
  mode_of_payment: string;
284
- base_amount?: number | null | undefined;
285
284
  account?: string | null | undefined;
285
+ base_amount?: number | null | undefined;
286
286
  reference_no?: string | null | undefined;
287
287
  clearance_date?: string | null | undefined;
288
288
  }, {
289
289
  amount: number;
290
290
  mode_of_payment: string;
291
- base_amount?: number | null | undefined;
292
291
  account?: string | null | undefined;
292
+ base_amount?: number | null | undefined;
293
293
  reference_no?: string | null | undefined;
294
294
  clearance_date?: string | null | undefined;
295
295
  }>;
@@ -634,12 +634,12 @@ export declare const SalesInvoice: z.ZodObject<{
634
634
  account_head: string;
635
635
  included_in_print_rate: 0 | 1;
636
636
  description?: string | undefined;
637
- account_currency?: string | undefined;
638
637
  rate?: number | undefined;
639
638
  base_total?: number | undefined;
640
639
  total?: number | undefined;
641
640
  cost_center?: string | undefined;
642
641
  project?: string | undefined;
642
+ account_currency?: string | undefined;
643
643
  base_tax_amount?: number | undefined;
644
644
  tax_amount?: number | undefined;
645
645
  tax_amount_after_discount_amount?: number | undefined;
@@ -647,13 +647,13 @@ export declare const SalesInvoice: z.ZodObject<{
647
647
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
648
648
  account_head: string;
649
649
  description?: string | undefined;
650
- account_currency?: string | undefined;
651
650
  rate?: number | undefined;
652
651
  base_total?: number | undefined;
653
652
  total?: number | undefined;
654
653
  included_in_print_rate?: unknown;
655
654
  cost_center?: string | undefined;
656
655
  project?: string | undefined;
656
+ account_currency?: string | undefined;
657
657
  base_tax_amount?: number | undefined;
658
658
  tax_amount?: number | undefined;
659
659
  tax_amount_after_discount_amount?: number | undefined;
@@ -724,15 +724,15 @@ export declare const SalesInvoice: z.ZodObject<{
724
724
  }, "strip", z.ZodTypeAny, {
725
725
  amount: number;
726
726
  mode_of_payment: string;
727
- base_amount?: number | null | undefined;
728
727
  account?: string | null | undefined;
728
+ base_amount?: number | null | undefined;
729
729
  reference_no?: string | null | undefined;
730
730
  clearance_date?: string | null | undefined;
731
731
  }, {
732
732
  amount: number;
733
733
  mode_of_payment: string;
734
- base_amount?: number | null | undefined;
735
734
  account?: string | null | undefined;
735
+ base_amount?: number | null | undefined;
736
736
  reference_no?: string | null | undefined;
737
737
  clearance_date?: string | null | undefined;
738
738
  }>, "many">>>;
@@ -1022,12 +1022,12 @@ export declare const SalesInvoice: z.ZodObject<{
1022
1022
  account_head: string;
1023
1023
  included_in_print_rate: 0 | 1;
1024
1024
  description?: string | undefined;
1025
- account_currency?: string | undefined;
1026
1025
  rate?: number | undefined;
1027
1026
  base_total?: number | undefined;
1028
1027
  total?: number | undefined;
1029
1028
  cost_center?: string | undefined;
1030
1029
  project?: string | undefined;
1030
+ account_currency?: string | undefined;
1031
1031
  base_tax_amount?: number | undefined;
1032
1032
  tax_amount?: number | undefined;
1033
1033
  tax_amount_after_discount_amount?: number | undefined;
@@ -1064,8 +1064,8 @@ export declare const SalesInvoice: z.ZodObject<{
1064
1064
  payments?: {
1065
1065
  amount: number;
1066
1066
  mode_of_payment: string;
1067
- base_amount?: number | null | undefined;
1068
1067
  account?: string | null | undefined;
1068
+ base_amount?: number | null | undefined;
1069
1069
  reference_no?: string | null | undefined;
1070
1070
  clearance_date?: string | null | undefined;
1071
1071
  }[] | null | undefined;
@@ -1254,13 +1254,13 @@ export declare const SalesInvoice: z.ZodObject<{
1254
1254
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
1255
1255
  account_head: string;
1256
1256
  description?: string | undefined;
1257
- account_currency?: string | undefined;
1258
1257
  rate?: number | undefined;
1259
1258
  base_total?: number | undefined;
1260
1259
  total?: number | undefined;
1261
1260
  included_in_print_rate?: unknown;
1262
1261
  cost_center?: string | undefined;
1263
1262
  project?: string | undefined;
1263
+ account_currency?: string | undefined;
1264
1264
  base_tax_amount?: number | undefined;
1265
1265
  tax_amount?: number | undefined;
1266
1266
  tax_amount_after_discount_amount?: number | undefined;
@@ -1309,8 +1309,8 @@ export declare const SalesInvoice: z.ZodObject<{
1309
1309
  payments?: {
1310
1310
  amount: number;
1311
1311
  mode_of_payment: string;
1312
- base_amount?: number | null | undefined;
1313
1312
  account?: string | null | undefined;
1313
+ base_amount?: number | null | undefined;
1314
1314
  reference_no?: string | null | undefined;
1315
1315
  clearance_date?: string | null | undefined;
1316
1316
  }[] | null | undefined;
@@ -1628,12 +1628,12 @@ export declare const SalesInvoiceDraft: z.ZodObject<{
1628
1628
  account_head: string;
1629
1629
  included_in_print_rate: 0 | 1;
1630
1630
  description?: string | undefined;
1631
- account_currency?: string | undefined;
1632
1631
  rate?: number | undefined;
1633
1632
  base_total?: number | undefined;
1634
1633
  total?: number | undefined;
1635
1634
  cost_center?: string | undefined;
1636
1635
  project?: string | undefined;
1636
+ account_currency?: string | undefined;
1637
1637
  base_tax_amount?: number | undefined;
1638
1638
  tax_amount?: number | undefined;
1639
1639
  tax_amount_after_discount_amount?: number | undefined;
@@ -1641,13 +1641,13 @@ export declare const SalesInvoiceDraft: z.ZodObject<{
1641
1641
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
1642
1642
  account_head: string;
1643
1643
  description?: string | undefined;
1644
- account_currency?: string | undefined;
1645
1644
  rate?: number | undefined;
1646
1645
  base_total?: number | undefined;
1647
1646
  total?: number | undefined;
1648
1647
  included_in_print_rate?: unknown;
1649
1648
  cost_center?: string | undefined;
1650
1649
  project?: string | undefined;
1650
+ account_currency?: string | undefined;
1651
1651
  base_tax_amount?: number | undefined;
1652
1652
  tax_amount?: number | undefined;
1653
1653
  tax_amount_after_discount_amount?: number | undefined;
@@ -1708,15 +1708,15 @@ export declare const SalesInvoiceDraft: z.ZodObject<{
1708
1708
  }, "strip", z.ZodTypeAny, {
1709
1709
  amount: number;
1710
1710
  mode_of_payment: string;
1711
- base_amount?: number | null | undefined;
1712
1711
  account?: string | null | undefined;
1712
+ base_amount?: number | null | undefined;
1713
1713
  reference_no?: string | null | undefined;
1714
1714
  clearance_date?: string | null | undefined;
1715
1715
  }, {
1716
1716
  amount: number;
1717
1717
  mode_of_payment: string;
1718
- base_amount?: number | null | undefined;
1719
1718
  account?: string | null | undefined;
1719
+ base_amount?: number | null | undefined;
1720
1720
  reference_no?: string | null | undefined;
1721
1721
  clearance_date?: string | null | undefined;
1722
1722
  }>, "many">>>;
@@ -1969,12 +1969,12 @@ export declare const SalesInvoiceDraft: z.ZodObject<{
1969
1969
  account_head: string;
1970
1970
  included_in_print_rate: 0 | 1;
1971
1971
  description?: string | undefined;
1972
- account_currency?: string | undefined;
1973
1972
  rate?: number | undefined;
1974
1973
  base_total?: number | undefined;
1975
1974
  total?: number | undefined;
1976
1975
  cost_center?: string | undefined;
1977
1976
  project?: string | undefined;
1977
+ account_currency?: string | undefined;
1978
1978
  base_tax_amount?: number | undefined;
1979
1979
  tax_amount?: number | undefined;
1980
1980
  tax_amount_after_discount_amount?: number | undefined;
@@ -2024,8 +2024,8 @@ export declare const SalesInvoiceDraft: z.ZodObject<{
2024
2024
  payments?: {
2025
2025
  amount: number;
2026
2026
  mode_of_payment: string;
2027
- base_amount?: number | null | undefined;
2028
2027
  account?: string | null | undefined;
2028
+ base_amount?: number | null | undefined;
2029
2029
  reference_no?: string | null | undefined;
2030
2030
  clearance_date?: string | null | undefined;
2031
2031
  }[] | null | undefined;
@@ -2220,13 +2220,13 @@ export declare const SalesInvoiceDraft: z.ZodObject<{
2220
2220
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
2221
2221
  account_head: string;
2222
2222
  description?: string | undefined;
2223
- account_currency?: string | undefined;
2224
2223
  rate?: number | undefined;
2225
2224
  base_total?: number | undefined;
2226
2225
  total?: number | undefined;
2227
2226
  included_in_print_rate?: unknown;
2228
2227
  cost_center?: string | undefined;
2229
2228
  project?: string | undefined;
2229
+ account_currency?: string | undefined;
2230
2230
  base_tax_amount?: number | undefined;
2231
2231
  tax_amount?: number | undefined;
2232
2232
  tax_amount_after_discount_amount?: number | undefined;
@@ -2276,8 +2276,8 @@ export declare const SalesInvoiceDraft: z.ZodObject<{
2276
2276
  payments?: {
2277
2277
  amount: number;
2278
2278
  mode_of_payment: string;
2279
- base_amount?: number | null | undefined;
2280
2279
  account?: string | null | undefined;
2280
+ base_amount?: number | null | undefined;
2281
2281
  reference_no?: string | null | undefined;
2282
2282
  clearance_date?: string | null | undefined;
2283
2283
  }[] | null | undefined;
@@ -568,12 +568,12 @@ export declare const SalesOrder: z.ZodObject<{
568
568
  account_head: string;
569
569
  included_in_print_rate: 0 | 1;
570
570
  description?: string | undefined;
571
- account_currency?: string | undefined;
572
571
  rate?: number | undefined;
573
572
  base_total?: number | undefined;
574
573
  total?: number | undefined;
575
574
  cost_center?: string | undefined;
576
575
  project?: string | undefined;
576
+ account_currency?: string | undefined;
577
577
  base_tax_amount?: number | undefined;
578
578
  tax_amount?: number | undefined;
579
579
  tax_amount_after_discount_amount?: number | undefined;
@@ -581,13 +581,13 @@ export declare const SalesOrder: z.ZodObject<{
581
581
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
582
582
  account_head: string;
583
583
  description?: string | undefined;
584
- account_currency?: string | undefined;
585
584
  rate?: number | undefined;
586
585
  base_total?: number | undefined;
587
586
  total?: number | undefined;
588
587
  included_in_print_rate?: unknown;
589
588
  cost_center?: string | undefined;
590
589
  project?: string | undefined;
590
+ account_currency?: string | undefined;
591
591
  base_tax_amount?: number | undefined;
592
592
  tax_amount?: number | undefined;
593
593
  tax_amount_after_discount_amount?: number | undefined;
@@ -841,12 +841,12 @@ export declare const SalesOrder: z.ZodObject<{
841
841
  account_head: string;
842
842
  included_in_print_rate: 0 | 1;
843
843
  description?: string | undefined;
844
- account_currency?: string | undefined;
845
844
  rate?: number | undefined;
846
845
  base_total?: number | undefined;
847
846
  total?: number | undefined;
848
847
  cost_center?: string | undefined;
849
848
  project?: string | undefined;
849
+ account_currency?: string | undefined;
850
850
  base_tax_amount?: number | undefined;
851
851
  tax_amount?: number | undefined;
852
852
  tax_amount_after_discount_amount?: number | undefined;
@@ -1036,13 +1036,13 @@ export declare const SalesOrder: z.ZodObject<{
1036
1036
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
1037
1037
  account_head: string;
1038
1038
  description?: string | undefined;
1039
- account_currency?: string | undefined;
1040
1039
  rate?: number | undefined;
1041
1040
  base_total?: number | undefined;
1042
1041
  total?: number | undefined;
1043
1042
  included_in_print_rate?: unknown;
1044
1043
  cost_center?: string | undefined;
1045
1044
  project?: string | undefined;
1045
+ account_currency?: string | undefined;
1046
1046
  base_tax_amount?: number | undefined;
1047
1047
  tax_amount?: number | undefined;
1048
1048
  tax_amount_after_discount_amount?: number | undefined;
@@ -20,12 +20,12 @@ export declare const SalesTaxesAndCharges: z.ZodObject<{
20
20
  account_head: string;
21
21
  included_in_print_rate: 0 | 1;
22
22
  description?: string | undefined;
23
- account_currency?: string | undefined;
24
23
  rate?: number | undefined;
25
24
  base_total?: number | undefined;
26
25
  total?: number | undefined;
27
26
  cost_center?: string | undefined;
28
27
  project?: string | undefined;
28
+ account_currency?: string | undefined;
29
29
  base_tax_amount?: number | undefined;
30
30
  tax_amount?: number | undefined;
31
31
  tax_amount_after_discount_amount?: number | undefined;
@@ -33,13 +33,13 @@ export declare const SalesTaxesAndCharges: z.ZodObject<{
33
33
  charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
34
34
  account_head: string;
35
35
  description?: string | undefined;
36
- account_currency?: string | undefined;
37
36
  rate?: number | undefined;
38
37
  base_total?: number | undefined;
39
38
  total?: number | undefined;
40
39
  included_in_print_rate?: unknown;
41
40
  cost_center?: string | undefined;
42
41
  project?: string | undefined;
42
+ account_currency?: string | undefined;
43
43
  base_tax_amount?: number | undefined;
44
44
  tax_amount?: number | undefined;
45
45
  tax_amount_after_discount_amount?: number | undefined;
@@ -24,57 +24,20 @@ export declare const Supplier: z.ZodObject<{
24
24
  is_frozen: z.ZodNumber;
25
25
  companies: z.ZodArray<z.ZodString, "many">;
26
26
  accounts: z.ZodArray<z.ZodObject<{
27
- account_name: z.ZodString;
28
- account_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
29
- is_group: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
30
- __optionalForInput: true;
31
- };
32
27
  company: z.ZodString;
33
- root_type: z.ZodNullable<z.ZodOptional<z.ZodEnum<["Asset", "Liability", "Income", "Expense", "Equity"]>>>;
34
- report_type: z.ZodNullable<z.ZodOptional<z.ZodEnum<["Balance Sheet", "Profit and Loss"]>>>;
35
- account_currency: z.ZodNullable<z.ZodOptional<z.ZodString>>;
36
- parent_account: z.ZodString;
37
- account_type: z.ZodNullable<z.ZodOptional<z.ZodEnum<["Accumulated Depreciation", "Asset Received But Not Billed", "Bank", "Cash", "Chargeable", "Capital Work in Progress", "Cost of Goods Sold", "Current Asset", "Current Liability", "Depreciation", "Direct Expense", "Direct Income", "Equity", "Expense Account", "Expenses Included In Asset Valuation", "Expenses Included In Valuation", "Fixed Asset", "Income Account", "Indirect Expense", "Indirect Income", "Liability", "Payable", "Receivable", "Round Off", "Stock", "Stock Adjustment", "Stock Received But Not Billed", "Service Received But Not Billed", "Tax", "Temporary"]>>>;
38
- tax_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
39
- freeze_account: z.ZodNullable<z.ZodOptional<z.ZodEnum<["No", "Yes"]>>>;
40
- balance_must_be: z.ZodNullable<z.ZodOptional<z.ZodEnum<["Debit", "Credit"]>>>;
41
- include_in_gross: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
42
- __optionalForInput: true;
43
- };
44
- disabled: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>, 0 | 1, unknown>> & {
45
- __optionalForInput: true;
46
- };
28
+ account: z.ZodNullable<z.ZodOptional<z.ZodString>>;
29
+ advance_account: z.ZodNullable<z.ZodOptional<z.ZodString>>;
47
30
  }, "strip", z.ZodTypeAny, {
48
- is_group: 0 | 1;
49
- disabled: 0 | 1;
50
- account_name: string;
51
31
  company: string;
52
- parent_account: string;
53
- include_in_gross: 0 | 1;
54
- account_number?: string | null | undefined;
55
- root_type?: "Asset" | "Liability" | "Income" | "Expense" | "Equity" | null | undefined;
56
- report_type?: "Balance Sheet" | "Profit and Loss" | null | undefined;
57
- account_currency?: string | null | undefined;
58
- account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
59
- tax_rate?: number | null | undefined;
60
- freeze_account?: "No" | "Yes" | null | undefined;
61
- balance_must_be?: "Debit" | "Credit" | null | undefined;
32
+ account?: string | null | undefined;
33
+ advance_account?: string | null | undefined;
62
34
  }, {
63
- account_name: string;
64
35
  company: string;
65
- parent_account: string;
66
- is_group?: unknown;
67
- disabled?: unknown;
68
- account_number?: string | null | undefined;
69
- root_type?: "Asset" | "Liability" | "Income" | "Expense" | "Equity" | null | undefined;
70
- report_type?: "Balance Sheet" | "Profit and Loss" | null | undefined;
71
- account_currency?: string | null | undefined;
72
- account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
73
- tax_rate?: number | null | undefined;
74
- freeze_account?: "No" | "Yes" | null | undefined;
75
- balance_must_be?: "Debit" | "Credit" | null | undefined;
76
- include_in_gross?: unknown;
77
- }>, "many">;
36
+ account?: string | null | undefined;
37
+ advance_account?: string | null | undefined;
38
+ }>, "many"> & {
39
+ __optionalForInput: true;
40
+ };
78
41
  supplier_number_code: z.ZodOptional<z.ZodString>;
79
42
  }, "strip", z.ZodTypeAny, {
80
43
  country: string;
@@ -96,20 +59,9 @@ export declare const Supplier: z.ZodObject<{
96
59
  is_frozen: number;
97
60
  companies: string[];
98
61
  accounts: {
99
- is_group: 0 | 1;
100
- disabled: 0 | 1;
101
- account_name: string;
102
62
  company: string;
103
- parent_account: string;
104
- include_in_gross: 0 | 1;
105
- account_number?: string | null | undefined;
106
- root_type?: "Asset" | "Liability" | "Income" | "Expense" | "Equity" | null | undefined;
107
- report_type?: "Balance Sheet" | "Profit and Loss" | null | undefined;
108
- account_currency?: string | null | undefined;
109
- account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
110
- tax_rate?: number | null | undefined;
111
- freeze_account?: "No" | "Yes" | null | undefined;
112
- balance_must_be?: "Debit" | "Credit" | null | undefined;
63
+ account?: string | null | undefined;
64
+ advance_account?: string | null | undefined;
113
65
  }[];
114
66
  import_reference?: string | null | undefined;
115
67
  supplier_contact?: string | null | undefined;
@@ -137,20 +89,9 @@ export declare const Supplier: z.ZodObject<{
137
89
  is_frozen: number;
138
90
  companies: string[];
139
91
  accounts: {
140
- account_name: string;
141
92
  company: string;
142
- parent_account: string;
143
- is_group?: unknown;
144
- disabled?: unknown;
145
- account_number?: string | null | undefined;
146
- root_type?: "Asset" | "Liability" | "Income" | "Expense" | "Equity" | null | undefined;
147
- report_type?: "Balance Sheet" | "Profit and Loss" | null | undefined;
148
- account_currency?: string | null | undefined;
149
- account_type?: "Liability" | "Equity" | "Accumulated Depreciation" | "Asset Received But Not Billed" | "Bank" | "Cash" | "Chargeable" | "Capital Work in Progress" | "Cost of Goods Sold" | "Current Asset" | "Current Liability" | "Depreciation" | "Direct Expense" | "Direct Income" | "Expense Account" | "Expenses Included In Asset Valuation" | "Expenses Included In Valuation" | "Fixed Asset" | "Income Account" | "Indirect Expense" | "Indirect Income" | "Payable" | "Receivable" | "Round Off" | "Stock" | "Stock Adjustment" | "Stock Received But Not Billed" | "Service Received But Not Billed" | "Tax" | "Temporary" | null | undefined;
150
- tax_rate?: number | null | undefined;
151
- freeze_account?: "No" | "Yes" | null | undefined;
152
- balance_must_be?: "Debit" | "Credit" | null | undefined;
153
- include_in_gross?: unknown;
93
+ account?: string | null | undefined;
94
+ advance_account?: string | null | undefined;
154
95
  }[];
155
96
  import_reference?: string | null | undefined;
156
97
  supplier_contact?: string | null | undefined;
@@ -2,7 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Supplier = void 0;
4
4
  const zod_1 = require("zod");
5
- const Account_1 = require("./Account");
5
+ const zodContextOptionals_1 = require("../../utils/zodContextOptionals");
6
+ const AccountListEntry = zod_1.z.object({
7
+ company: zod_1.z.string(),
8
+ account: zod_1.z.string().optional().nullable(),
9
+ advance_account: zod_1.z.string().optional().nullable(),
10
+ });
6
11
  exports.Supplier = zod_1.z
7
12
  .object({
8
13
  import_reference: zod_1.z.string().optional().nullable(),
@@ -28,7 +33,7 @@ exports.Supplier = zod_1.z
28
33
  language: zod_1.z.string(),
29
34
  is_frozen: zod_1.z.number(),
30
35
  companies: zod_1.z.array(zod_1.z.string()),
31
- accounts: zod_1.z.array(Account_1.Account),
36
+ accounts: (0, zodContextOptionals_1.optionalForInput)(zod_1.z.array(AccountListEntry)),
32
37
  supplier_number_code: zod_1.z.string().optional(),
33
38
  })
34
39
  .describe("Supplier");
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ export declare const ValuationRateResponse: z.ZodObject<{
3
+ valuation_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
4
+ origin: z.ZodNullable<z.ZodOptional<z.ZodString>>;
5
+ message: z.ZodNullable<z.ZodOptional<z.ZodString>>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ message?: string | null | undefined;
8
+ valuation_rate?: number | null | undefined;
9
+ origin?: string | null | undefined;
10
+ }, {
11
+ message?: string | null | undefined;
12
+ valuation_rate?: number | null | undefined;
13
+ origin?: string | null | undefined;
14
+ }>;
15
+ export type ValuationRateResponseType = z.infer<typeof ValuationRateResponse>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValuationRateResponse = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ValuationRateResponse = zod_1.z
6
+ .object({
7
+ valuation_rate: zod_1.z.number().optional().nullable(),
8
+ origin: zod_1.z.string().optional().nullable(),
9
+ message: zod_1.z.string().optional().nullable(),
10
+ })
11
+ .describe("ValuationRateResponse");
package/package.json CHANGED
@@ -12,8 +12,8 @@
12
12
  },
13
13
  "license": "ISC",
14
14
  "dependencies": {
15
- "@temporalio/client": "^1.11.3",
16
- "@temporalio/common": "1.11.3",
15
+ "@temporalio/client": "^1.18.0",
16
+ "@temporalio/common": "^1.18.0",
17
17
  "crypto-js": "^4.2.0",
18
18
  "lodash": "^4.17.21",
19
19
  "nanoid": "^3.3.7",
@@ -22,7 +22,7 @@
22
22
  "winston": "^3.15.0",
23
23
  "zod": "3.25.76"
24
24
  },
25
- "version": "2.9.4",
25
+ "version": "2.9.6",
26
26
  "engines": {
27
27
  "node": ">=22"
28
28
  },