@nominalso/vibe-bridge 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3990 @@
1
+ type AccountingAccountDimensionValues = {
2
+ account_id: string;
3
+ assignments?: {
4
+ [key: string]: Array<AccountingDimensionValue>;
5
+ };
6
+ };
7
+ type AccountingAccountReportCategory = 'Balance Sheet' | 'P&L';
8
+ type AccountingAccountType = 'Bank' | 'Current Asset' | 'Non-current Asset' | 'Fixed Asset' | 'Depreciation' | 'Inventory' | 'Prepayment' | 'Undeposited Funds' | 'Other Assets' | 'Accounts Receivable' | 'CTA' | 'Equity' | 'Retained Earnings' | 'Other Equity' | 'Expense' | 'Other Expense' | 'Cost of Goods Sold' | 'Wages Expense' | 'Interest Expense' | 'Taxes Expense' | 'Depreciation Expense' | 'Amortization Expense' | 'Overhead' | 'Accounts Payable' | 'Credit Card' | 'Non-current Liability' | 'Current Liability' | 'Deferred Revenue' | 'Other Liability' | 'Revenue' | 'Sales' | 'Other Income' | 'Other Revenue' | 'Statistical';
9
+ type AccountingAccountingClass = 'Asset' | 'Equity' | 'Liability' | 'Revenue' | 'Expense' | 'Statistical';
10
+ type AccountingBalanceOutput = {
11
+ balance?: number;
12
+ currency?: AccountingCurrency | null;
13
+ };
14
+ type AccountingCerPaginationOutput = {
15
+ results?: Array<AccountingConsolidationExchangeRate>;
16
+ pagination?: AccountingPaginationOutput | null;
17
+ };
18
+ type AccountingCoAGroupBy = 'nominal_account' | 'accounting_class' | 'account_type' | 'report_category';
19
+ type AccountingCoaPaginationOutput = {
20
+ results: Array<AccountingTAccountOutput>;
21
+ pagination?: AccountingPaginationOutput | null;
22
+ };
23
+ type AccountingConsolidationExchangeRate = {
24
+ id: string;
25
+ from_subsidiary: number;
26
+ to_subsidiary: number;
27
+ current_default_rate: number;
28
+ current_rate: number;
29
+ average_default_rate: number;
30
+ average_rate: number;
31
+ historical_default_rate: number;
32
+ historical_rate: number;
33
+ by_provider: boolean;
34
+ for_cash_flows: boolean;
35
+ month: string;
36
+ period?: AccountingConsolidationExchangeRatePeriod | null;
37
+ readonly period_id: string;
38
+ };
39
+ type AccountingConsolidationExchangeRatePeriod = {
40
+ id: string;
41
+ period_type: AccountingPeriod;
42
+ start_date: string;
43
+ is_locked?: boolean;
44
+ };
45
+ type AccountingConsolidationExchangeRateType = 'current' | 'average' | 'historical';
46
+ type AccountingCurrency = 'United States Dollar' | 'Euro' | 'British Pound Sterling' | 'Indian Rupee' | 'Australian Dollar' | 'Canadian Dollar' | 'New Israeli Shekel' | 'Japanese Yen' | 'Sri Lankan Rupee' | 'New Zealand Dollar' | 'Swedish Krona' | 'South African Rand' | 'Singapore Dollar' | 'Indonesian Rupiah' | 'Danish Krone' | 'Hong Kong Dollar' | 'United Arab Emirates Dirham' | 'Argentine Peso' | 'Brazilian Real' | 'Bulgarian Lev' | 'Chinese Yuan' | 'Colombian Peso' | 'Czech Koruna' | 'Malaysian Ringgit' | 'Mexican Peso' | 'Myanmar Kyat' | 'New Taiwan Dollar' | 'Norwegian Krone' | 'Omani Rial' | 'Philippine Peso' | 'Polish Zloty' | 'Romanian Leu' | 'Swiss Franc' | 'Turkish Lira' | 'Serbian Dinar' | 'Hungarian Forint' | 'South Korean Won' | 'Armenian Dram' | 'Azerbaijani Manat' | 'Bahraini Dinar' | 'Chilean Peso' | 'Fijian Dollar' | 'Georgian Lari' | 'Guatemalan Quetzal' | 'Croatian Kuna' | 'Icelandic Krona' | 'Jordanian Dinar' | 'Kyrgyzstani Som' | 'Kuwaiti Dinar' | 'Kazakhstani Tenge' | 'Moroccan Dirham' | 'Papua New Guinean Kina' | 'Qatari Rial' | 'Russian Ruble' | 'Saudi Riyal' | 'Thai Baht' | 'Somali Shilling' | 'Tunisian Dinar' | 'Ukrainian Hryvnia' | 'Uzbekistani Som' | 'Vietnamese Dong' | 'Central African CFA Franc' | 'Afghani' | 'Lek' | 'Kwanza' | 'Aruban Florin' | 'Convertible Mark' | 'Barbados Dollar' | 'Taka' | 'Burundi Franc' | 'Bermudian Dollar' | 'Brunei Dollar' | 'Boliviano' | 'Mvdol' | 'Bahamian Dollar' | 'Ngultrum' | 'Pula' | 'Belarusian Ruble' | 'Belize Dollar' | 'Congolese Franc' | 'WIR Euro' | 'WIR Franc' | 'Unidad de Fomento' | 'Unidad de Valor Real' | 'Costa Rican Colon' | 'Cuban Peso' | 'Cabo Verde Escudo' | 'Djibouti Franc' | 'Dominican Peso' | 'Algerian Dinar' | 'Egyptian Pound' | 'Nakfa' | 'Ethiopian Birr' | 'Falkland Islands Pound' | 'Ghana Cedi' | 'Gibraltar Pound' | 'Dalasi' | 'Guinean Franc' | 'Guyana Dollar' | 'Lempira' | 'Gourde' | 'Iraqi Dinar' | 'Iranian Rial' | 'Jamaican Dollar' | 'Kenyan Shilling' | 'Riel' | 'Comorian Franc' | 'North Korean Won' | 'Cayman Islands Dollar' | 'Lao Kip' | 'Lebanese Pound' | 'Liberian Dollar' | 'Loti' | 'Libyan Dinar' | 'Moldovan Leu' | 'Malagasy Ariary' | 'Denar' | 'Tugrik' | 'Pataca' | 'Ouguiya' | 'Mauritius Rupee' | 'Rufiyaa' | 'Malawi Kwacha' | 'Mexican Unidad de Inversion (UDI)' | 'Mozambique Metical' | 'Namibia Dollar' | 'Naira' | 'Cordoba Oro' | 'Nepalese Rupee' | 'Balboa' | 'Sol' | 'Pakistan Rupee' | 'Guarani' | 'Rwanda Franc' | 'Solomon Islands Dollar' | 'Seychelles Rupee' | 'Sudanese Pound' | 'Saint Helena Pound' | 'Leone' | 'Surinam Dollar' | 'South Sudanese Pound' | 'Dobra' | 'El Salvador Colon' | 'Syrian Pound' | 'Lilangeni' | 'Somoni' | 'Turkmenistan New Manat' | "Pa'anga" | 'Trinidad and Tobago Dollar' | 'Tanzanian Shilling' | 'Uganda Shilling' | 'US Dollar (Next day)' | 'Uruguay Peso en Unidades Indexadas (UI)' | 'Peso Uruguayo' | 'Unidad Previsional' | 'Bolivar Digital' | 'Bolivar Soberano' | 'Vatu' | 'Tala' | 'Arab Accounting Dinar' | 'Silver' | 'Gold' | 'Bond Markets Unit European Composite Unit (EURCO)' | 'Bond Markets Unit European Monetary Unit (E.M.U.-6)' | 'Bond Markets Unit European Unit of Account 9 (E.U.A.-9)' | 'Bond Markets Unit European Unit of Account 17 (E.U.A.-17)' | 'East Caribbean Dollar' | 'Caribbean Guilder' | 'SDR (Special Drawing Right)' | 'CFA Franc BCEAO' | 'Palladium' | 'CFP Franc' | 'Platinum' | 'Sucre' | 'Codes specifically reserved for testing purposes' | 'ADB Unit of Account' | 'The codes assigned for transactions where no currency is involved' | 'Yemeni Rial' | 'Zambian Kwacha' | 'Zimbabwe Gold';
47
+ type AccountingDimension = {
48
+ name: string;
49
+ description?: string | null;
50
+ id: string;
51
+ is_default?: boolean;
52
+ values?: Array<AccountingDimensionValue>;
53
+ };
54
+ type AccountingDimensionRuleCreateUpdate = {
55
+ dimension_id: string;
56
+ order: number;
57
+ dimension_value_id: string;
58
+ name: string;
59
+ subsidiary_id?: number | null;
60
+ by_account_code?: Array<string> | null;
61
+ by_account_name?: string | null;
62
+ by_account_ids?: Array<string> | null;
63
+ by_account_types?: Array<AccountingAccountType> | null;
64
+ by_journal_entry_memo?: string | null;
65
+ by_journal_entry_created_from?: string | null;
66
+ by_journal_entry_line_memo?: string | null;
67
+ by_journal_entry_line_property?: string | null;
68
+ by_dimension_value_ids?: Array<string> | null;
69
+ by_empty_dimension_id_values?: Array<string> | null;
70
+ };
71
+ type AccountingDimensionValue = {
72
+ id?: string | null;
73
+ value: string;
74
+ subsidiary_id?: number | null;
75
+ provider_uid?: string | null;
76
+ parent_id?: string | null;
77
+ dimension_id: string;
78
+ is_default: boolean;
79
+ effective_rule_id?: number | null;
80
+ has_children?: boolean;
81
+ };
82
+ type AccountingDimensionValueOverrideSource = 'user' | 'provider';
83
+ type AccountingDimensionValueSlim = {
84
+ id: string;
85
+ value: string;
86
+ dimension_id: string;
87
+ has_children?: boolean;
88
+ };
89
+ type AccountingDimensionValueWithChildren = {
90
+ id?: string | null;
91
+ value: string;
92
+ subsidiary_id?: number | null;
93
+ provider_uid?: string | null;
94
+ parent_id?: string | null;
95
+ dimension_id: string;
96
+ is_default: boolean;
97
+ effective_rule_id?: number | null;
98
+ has_children?: boolean;
99
+ children?: Array<AccountingDimensionValueWithChildren>;
100
+ };
101
+ type AccountingDimensionValueWithRules = {
102
+ id?: string | null;
103
+ value: string;
104
+ subsidiary_id?: number | null;
105
+ provider_uid?: string | null;
106
+ parent_id?: string | null;
107
+ dimension_id: string;
108
+ is_default: boolean;
109
+ effective_rule_id?: number | null;
110
+ has_children?: boolean;
111
+ rules?: Array<AccountingDimensionRuleCreateUpdate>;
112
+ };
113
+ type AccountingDimensionValueWithRulesAndChildren = {
114
+ id?: string | null;
115
+ value: string;
116
+ subsidiary_id?: number | null;
117
+ provider_uid?: string | null;
118
+ parent_id?: string | null;
119
+ dimension_id: string;
120
+ is_default: boolean;
121
+ effective_rule_id?: number | null;
122
+ has_children?: boolean;
123
+ children?: Array<AccountingDimensionValueWithChildren>;
124
+ rules?: Array<AccountingDimensionRuleCreateUpdate>;
125
+ };
126
+ type AccountingDimensionWithRules = {
127
+ name: string;
128
+ description?: string | null;
129
+ id: string;
130
+ is_default?: boolean;
131
+ values?: Array<AccountingDimensionValueWithRules>;
132
+ };
133
+ type AccountingExchangeRate = {
134
+ from_currency: AccountingCurrency;
135
+ to_currency: AccountingCurrency;
136
+ rate: number;
137
+ };
138
+ type AccountingExchangeRates = {
139
+ base_currency: AccountingCurrency;
140
+ rates: {
141
+ [key: string]: number;
142
+ };
143
+ exchange_date?: string;
144
+ };
145
+ type AccountingGroupTransaction = {
146
+ transaction_id: number;
147
+ journal_entry_id: string;
148
+ elimination_entry_id?: string | null;
149
+ id: number;
150
+ };
151
+ type AccountingGroupedAccounts = {
152
+ group_id: string;
153
+ group_name: string;
154
+ group_type: AccountingCoAGroupBy;
155
+ primary_balance?: AccountingBalanceOutput;
156
+ credit_primary_balance?: AccountingBalanceOutput;
157
+ debit_primary_balance?: AccountingBalanceOutput;
158
+ accounts: Array<AccountingTAccountOutput>;
159
+ };
160
+ type AccountingJeWriteBackStatus = 'syncing' | 'synced' | 'partial_success' | 'success' | 'failure';
161
+ type AccountingJournalEntry = {
162
+ created_from: string;
163
+ currency: AccountingCurrency;
164
+ memo?: string | null;
165
+ create_time?: string;
166
+ transaction_date?: string | null;
167
+ posting_date?: string | null;
168
+ is_adjustment?: boolean;
169
+ transaction_id?: number | null;
170
+ status?: AccountingJournalEntryStatus;
171
+ exchange_rates?: Array<AccountingExchangeRate>;
172
+ id: string;
173
+ subsidiary_id: number;
174
+ provider_uid: string;
175
+ ref_number?: string | null;
176
+ insert_time?: string;
177
+ clearing_group_id?: number | null;
178
+ is_nominal_ledger?: boolean;
179
+ sub_ledger?: AccountingSubLedger | null;
180
+ gl_entry_id?: string | null;
181
+ reconciled?: boolean | null;
182
+ source_entity?: AccountingJournalEntrySource | null;
183
+ provider_url?: string | null;
184
+ posting_period_id?: string | null;
185
+ syncing_status?: AccountingWriteBackStatusOutput | null;
186
+ group_transaction?: AccountingGroupTransaction | null;
187
+ reverse_entry_id?: string | null;
188
+ };
189
+ type AccountingJournalEntryDimensionsWithOperationCtx = {
190
+ lines?: Array<AccountingJournalEntryLineWithDimensionValuesOutput>;
191
+ created_from: string;
192
+ currency: AccountingCurrency;
193
+ memo?: string | null;
194
+ create_time?: string;
195
+ transaction_date?: string | null;
196
+ posting_date?: string | null;
197
+ is_adjustment?: boolean;
198
+ transaction_id?: number | null;
199
+ status?: AccountingJournalEntryStatus;
200
+ exchange_rates?: Array<AccountingExchangeRate>;
201
+ id: string;
202
+ subsidiary_id: number;
203
+ provider_uid: string;
204
+ ref_number?: string | null;
205
+ insert_time?: string;
206
+ clearing_group_id?: number | null;
207
+ is_nominal_ledger?: boolean;
208
+ sub_ledger?: AccountingSubLedger | null;
209
+ gl_entry_id?: string | null;
210
+ reconciled?: boolean | null;
211
+ source_entity?: AccountingJournalEntrySource | null;
212
+ provider_url?: string | null;
213
+ posting_period_id?: string | null;
214
+ syncing_status?: AccountingWriteBackStatusOutput | null;
215
+ group_transaction?: AccountingGroupTransaction | null;
216
+ reverse_entry_id?: string | null;
217
+ can_sync_to_provider?: boolean;
218
+ sync_to_provider_reason?: string | null;
219
+ can_edit?: boolean;
220
+ };
221
+ type AccountingJournalEntryLinePaginationOutput = {
222
+ results?: Array<AccountingJournalEntryLineWithJournalEntryWithDimensionsWithOperationCtx>;
223
+ pagination: AccountingPaginationOutput | null;
224
+ };
225
+ type AccountingJournalEntryLineWithDimensionValuesOutput = {
226
+ id: string;
227
+ account_id: string;
228
+ journal_entry_id: string;
229
+ line_num: number;
230
+ is_debit: boolean;
231
+ account_provider_id?: string | null;
232
+ account?: AccountingTAccountWithoutSubsidiaryMappingOutput | null;
233
+ total_amount?: number;
234
+ primary_currency_amount?: number;
235
+ secondary_currency_amount?: number;
236
+ tertiary_currency_amount?: number;
237
+ subsidiary_id?: number | null;
238
+ create_time?: string | null;
239
+ transaction_date?: string | null;
240
+ memo?: string | null;
241
+ provider_property?: string | null;
242
+ is_for_elimination?: boolean;
243
+ recurring_transaction_id?: string | null;
244
+ transaction_number?: string | null;
245
+ po_number?: string | null;
246
+ sales_order_ref?: string | null;
247
+ invoice_ref?: string | null;
248
+ extra_reference?: string | null;
249
+ assignment_ref?: string | null;
250
+ dimension_values?: Array<AccountingLineDimensionEffectiveAssignmentOutput | AccountingDimensionValue>;
251
+ };
252
+ type AccountingJournalEntryLineWithJournalEntryWithDimensionsWithOperationCtx = {
253
+ id: string;
254
+ account_id: string;
255
+ journal_entry_id: string;
256
+ line_num: number;
257
+ is_debit: boolean;
258
+ account_provider_id?: string | null;
259
+ account?: AccountingTAccountWithoutSubsidiaryMappingOutput | null;
260
+ total_amount?: number;
261
+ primary_currency_amount?: number;
262
+ secondary_currency_amount?: number;
263
+ tertiary_currency_amount?: number;
264
+ subsidiary_id?: number | null;
265
+ create_time?: string | null;
266
+ transaction_date?: string | null;
267
+ memo?: string | null;
268
+ provider_property?: string | null;
269
+ is_for_elimination?: boolean;
270
+ recurring_transaction_id?: string | null;
271
+ transaction_number?: string | null;
272
+ po_number?: string | null;
273
+ sales_order_ref?: string | null;
274
+ invoice_ref?: string | null;
275
+ extra_reference?: string | null;
276
+ assignment_ref?: string | null;
277
+ journal_entry?: AccountingJournalEntry | null;
278
+ dimension_values?: Array<AccountingLineDimensionEffectiveAssignmentOutput | AccountingDimensionValue>;
279
+ can_sync_to_provider?: boolean;
280
+ sync_to_provider_reason?: string | null;
281
+ can_edit?: boolean;
282
+ };
283
+ type AccountingJournalEntryPaginationOutput = {
284
+ results?: Array<AccountingJournalEntryDimensionsWithOperationCtx>;
285
+ pagination: AccountingPaginationOutput | null;
286
+ };
287
+ type AccountingJournalEntrySource = 'Elimination' | 'Journal Entry' | 'Bill' | 'Lease' | 'Invoice' | 'Bill Payment';
288
+ type AccountingJournalEntryStatus = 'Posted' | 'Draft' | 'Submitted';
289
+ type AccountingJournalEntryType = 'adjustment' | 'elimination' | 'book_entry' | 'ic_transaction';
290
+ type AccountingLineDimensionEffectiveAssignmentOutput = {
291
+ journal_line_id: string;
292
+ dimension_id?: string | null;
293
+ dimension_value_id?: string | null;
294
+ effective_rule_id?: number | null;
295
+ dimension_value_override_id?: number | null;
296
+ dimension_value?: AccountingDimensionValue | null;
297
+ effective_rule?: AccountingLibcommonModelsAccountingDimensionsDimensionRuleOutput | null;
298
+ dimension_value_override?: AccountingLineDimensionValueOverride | null;
299
+ };
300
+ type AccountingLineDimensionValueOverride = {
301
+ dimension_id: string;
302
+ dimension_value_id: string;
303
+ journal_line_id: string;
304
+ override_source?: AccountingDimensionValueOverrideSource;
305
+ id: number;
306
+ dimension_value?: AccountingDimensionValue | null;
307
+ };
308
+ type AccountingMappedNominalAccount = {
309
+ id: string;
310
+ name: string;
311
+ hierarchy_account_name: string;
312
+ account_type: AccountingAccountType;
313
+ account_number?: string | null;
314
+ };
315
+ type AccountingPaginationOutput = {
316
+ page?: number | null;
317
+ per_page?: number | null;
318
+ include_total?: boolean;
319
+ position?: AccountingPaginationPositionInput | null;
320
+ pages?: number | null;
321
+ total?: number | null;
322
+ };
323
+ type AccountingPaginationPositionInput = {
324
+ start: number;
325
+ end: number;
326
+ };
327
+ type AccountingPeriod = 'Annual' | 'Quarterly' | 'Monthly';
328
+ type AccountingProviderOperationErrorType = 'Connection Error' | 'Authentication Error' | 'Data Operation Error' | 'Server Error' | 'Not Ready For Sync';
329
+ type AccountingSimpleCoAPaginationOutput = {
330
+ results: Array<AccountingSimpleTAccount>;
331
+ pagination?: AccountingPaginationOutput | null;
332
+ };
333
+ type AccountingSimpleTAccount = {
334
+ id: string;
335
+ name: string;
336
+ subsidiary_id: number;
337
+ accounting_class: AccountingAccountingClass;
338
+ account_type: AccountingAccountType;
339
+ account_number?: string | null;
340
+ };
341
+ type AccountingSortableFieldsCer = 'month' | 'from_subsidiary' | 'to_subsidiary';
342
+ type AccountingSortableFieldsCoa = 'name' | 'create_time' | 'account_number';
343
+ type AccountingSortingOrder = 'asc' | 'desc';
344
+ type AccountingSubLedger = 'lease' | 'prepaid_expense';
345
+ type AccountingTAccountOutput = {
346
+ id: string;
347
+ name: string;
348
+ report_category?: AccountingAccountReportCategory | null;
349
+ accounting_class: AccountingAccountingClass;
350
+ account_type: AccountingAccountType;
351
+ account_rate_type?: AccountingConsolidationExchangeRateType | null;
352
+ account_number?: string | null;
353
+ parent_account_id?: string | null;
354
+ active?: boolean;
355
+ summary?: boolean;
356
+ read_only?: boolean;
357
+ is_manually_created?: boolean;
358
+ provider_id: string;
359
+ subsidiary_id: number;
360
+ currency?: AccountingCurrency;
361
+ sourced_account_id?: string | null;
362
+ account_balance?: AccountingBalanceOutput;
363
+ primary_balance?: AccountingBalanceOutput;
364
+ secondary_balance?: AccountingBalanceOutput;
365
+ cta_balance?: AccountingBalanceOutput;
366
+ credit_account_balance?: AccountingBalanceOutput;
367
+ debit_account_balance?: AccountingBalanceOutput;
368
+ credit_primary_balance?: AccountingBalanceOutput;
369
+ debit_primary_balance?: AccountingBalanceOutput;
370
+ credit_secondary_balance?: AccountingBalanceOutput;
371
+ debit_secondary_balance?: AccountingBalanceOutput;
372
+ credit_cta_balance?: AccountingBalanceOutput;
373
+ debit_cta_balance?: AccountingBalanceOutput;
374
+ tertiary_debit?: AccountingBalanceOutput | null;
375
+ tertiary_credit?: AccountingBalanceOutput | null;
376
+ create_time?: string;
377
+ last_update_time?: string;
378
+ description?: string | null;
379
+ meta?: {
380
+ [key: string]: unknown;
381
+ } | null;
382
+ nominal_account?: AccountingMappedNominalAccount | null;
383
+ account_subsidiaries_ids?: Array<number>;
384
+ };
385
+ type AccountingTAccountWithSubAccounts = {
386
+ id: string;
387
+ name: string;
388
+ report_category?: AccountingAccountReportCategory | null;
389
+ accounting_class: AccountingAccountingClass;
390
+ account_type: AccountingAccountType;
391
+ account_rate_type?: AccountingConsolidationExchangeRateType | null;
392
+ account_number?: string | null;
393
+ parent_account_id?: string | null;
394
+ active?: boolean;
395
+ summary?: boolean;
396
+ read_only?: boolean;
397
+ is_manually_created?: boolean;
398
+ provider_id: string;
399
+ subsidiary_id: number;
400
+ currency?: AccountingCurrency;
401
+ sourced_account_id?: string | null;
402
+ account_balance?: AccountingBalanceOutput;
403
+ primary_balance?: AccountingBalanceOutput;
404
+ secondary_balance?: AccountingBalanceOutput;
405
+ cta_balance?: AccountingBalanceOutput;
406
+ credit_account_balance?: AccountingBalanceOutput;
407
+ debit_account_balance?: AccountingBalanceOutput;
408
+ credit_primary_balance?: AccountingBalanceOutput;
409
+ debit_primary_balance?: AccountingBalanceOutput;
410
+ credit_secondary_balance?: AccountingBalanceOutput;
411
+ debit_secondary_balance?: AccountingBalanceOutput;
412
+ credit_cta_balance?: AccountingBalanceOutput;
413
+ debit_cta_balance?: AccountingBalanceOutput;
414
+ tertiary_debit?: AccountingBalanceOutput | null;
415
+ tertiary_credit?: AccountingBalanceOutput | null;
416
+ create_time?: string;
417
+ last_update_time?: string;
418
+ description?: string | null;
419
+ meta?: {
420
+ [key: string]: unknown;
421
+ } | null;
422
+ nominal_account?: AccountingMappedNominalAccount | null;
423
+ account_subsidiaries_ids?: Array<number>;
424
+ sub_accounts?: Array<AccountingTAccountWithSubAccounts>;
425
+ };
426
+ type AccountingTAccountWithoutSubsidiaryMappingOutput = {
427
+ id: string;
428
+ name: string;
429
+ report_category?: AccountingAccountReportCategory | null;
430
+ accounting_class: AccountingAccountingClass;
431
+ account_type: AccountingAccountType;
432
+ account_rate_type?: AccountingConsolidationExchangeRateType | null;
433
+ account_number?: string | null;
434
+ parent_account_id?: string | null;
435
+ active?: boolean;
436
+ summary?: boolean;
437
+ read_only?: boolean;
438
+ is_manually_created?: boolean;
439
+ provider_id: string;
440
+ subsidiary_id: number;
441
+ currency?: AccountingCurrency;
442
+ sourced_account_id?: string | null;
443
+ account_balance?: AccountingBalanceOutput;
444
+ primary_balance?: AccountingBalanceOutput;
445
+ secondary_balance?: AccountingBalanceOutput;
446
+ cta_balance?: AccountingBalanceOutput;
447
+ credit_account_balance?: AccountingBalanceOutput;
448
+ debit_account_balance?: AccountingBalanceOutput;
449
+ credit_primary_balance?: AccountingBalanceOutput;
450
+ debit_primary_balance?: AccountingBalanceOutput;
451
+ credit_secondary_balance?: AccountingBalanceOutput;
452
+ debit_secondary_balance?: AccountingBalanceOutput;
453
+ credit_cta_balance?: AccountingBalanceOutput;
454
+ debit_cta_balance?: AccountingBalanceOutput;
455
+ tertiary_debit?: AccountingBalanceOutput | null;
456
+ tertiary_credit?: AccountingBalanceOutput | null;
457
+ create_time?: string;
458
+ last_update_time?: string;
459
+ description?: string | null;
460
+ meta?: {
461
+ [key: string]: unknown;
462
+ } | null;
463
+ nominal_account?: AccountingMappedNominalAccount | null;
464
+ };
465
+ type AccountingWriteBackStatusOutput = {
466
+ id: string;
467
+ transaction_id: string;
468
+ journal_entry_id: string;
469
+ status: AccountingJeWriteBackStatus;
470
+ provider_uid?: string | null;
471
+ error_message?: string | null;
472
+ error_type?: AccountingProviderOperationErrorType | null;
473
+ last_modified_time?: string | null;
474
+ readonly display_error_message: string;
475
+ };
476
+ type AccountingLibcommonModelsAccountingDimensionsDimensionRuleOutput = {
477
+ dimension_id: string;
478
+ order: number;
479
+ dimension_value_id: string;
480
+ name: string;
481
+ subsidiary_id?: number | null;
482
+ by_account_code?: Array<string> | null;
483
+ by_account_name?: string | null;
484
+ by_account_ids?: Array<string> | null;
485
+ by_account_types?: Array<AccountingAccountType> | null;
486
+ by_journal_entry_memo?: string | null;
487
+ by_journal_entry_created_from?: string | null;
488
+ by_journal_entry_line_memo?: string | null;
489
+ by_journal_entry_line_property?: string | null;
490
+ by_dimension_value_ids?: Array<string> | null;
491
+ by_empty_dimension_id_values?: Array<string> | null;
492
+ id: number;
493
+ dimension: AccountingDimension;
494
+ dimension_value: AccountingDimensionValue;
495
+ accounts?: Array<AccountingTAccountWithoutSubsidiaryMappingOutput>;
496
+ };
497
+ /**
498
+ * API representation of EnrichedActivityInstance.
499
+ *
500
+ * Uses APIPeriodInstanceCreate instead of PeriodInstanceCreate to avoid
501
+ * dependency on TenantContext during serialization.
502
+ */
503
+ type ActivityApiEnrichedActivityInstance = {
504
+ last_manually_updated?: string | null;
505
+ created_at?: string | null;
506
+ last_modified_at?: string | null;
507
+ id: string;
508
+ name: string;
509
+ due_date: string;
510
+ period_instance_id: string;
511
+ activity_definition_id: string;
512
+ is_deleted?: boolean;
513
+ description?: string | null;
514
+ reconciliation_status?: ActivityReconciliationStatus;
515
+ preparer_id?: string | null;
516
+ reviewer_id?: string | null;
517
+ task_instances?: Array<ActivityTaskInstanceWithAction>;
518
+ period_instance: ActivityApiPeriodInstanceCreate;
519
+ activity_definition: ActivityActivityDefinitionCreateWithType;
520
+ readonly assignees: Array<string>;
521
+ progress: ActivityTasksProgress;
522
+ readonly ready_to_reconcile: boolean;
523
+ status: ActivityActivityStatus;
524
+ };
525
+ type ActivityApiJournalEntryInput = {
526
+ lines?: Array<ActivityApiJournalEntryLineInput>;
527
+ currency: ActivityCurrency;
528
+ exchange_rates?: Array<ActivityExchangeRate>;
529
+ create_time: string;
530
+ subsidiary_id?: number | null;
531
+ sub_ledger?: ActivitySubLedger | null;
532
+ entry_type?: ActivityJournalEntryType | null;
533
+ memo?: string | null;
534
+ is_adjustment?: boolean | null;
535
+ clearing_group_id?: number | null;
536
+ transaction_id?: number | null;
537
+ status?: ActivityJournalEntryStatus | null;
538
+ reverse_date?: string | null;
539
+ id?: string | null;
540
+ };
541
+ type ActivityApiJournalEntryOutput = {
542
+ lines?: Array<ActivityApiJournalEntryLineOutput>;
543
+ currency: ActivityCurrency;
544
+ exchange_rates?: Array<ActivityExchangeRate>;
545
+ create_time: string;
546
+ subsidiary_id?: number | null;
547
+ sub_ledger?: ActivitySubLedger | null;
548
+ entry_type?: ActivityJournalEntryType | null;
549
+ memo?: string | null;
550
+ is_adjustment?: boolean | null;
551
+ clearing_group_id?: number | null;
552
+ transaction_id?: number | null;
553
+ status?: ActivityJournalEntryStatus | null;
554
+ reverse_date?: string | null;
555
+ id?: string | null;
556
+ };
557
+ type ActivityApiJournalEntryLineInput = {
558
+ account_id: string;
559
+ amount: number;
560
+ is_debit: boolean;
561
+ memo?: string | null;
562
+ dimension_values?: Array<ActivityLineDimensionEffectiveAssignmentInput | ActivityDimensionValue>;
563
+ is_for_elimination?: boolean | null;
564
+ subsidiary_id?: number | null;
565
+ };
566
+ type ActivityApiJournalEntryLineOutput = {
567
+ account_id: string;
568
+ amount: number;
569
+ is_debit: boolean;
570
+ memo?: string | null;
571
+ dimension_values?: Array<ActivityLineDimensionEffectiveAssignmentOutput | ActivityDimensionValue>;
572
+ is_for_elimination?: boolean | null;
573
+ subsidiary_id?: number | null;
574
+ };
575
+ /**
576
+ * API representation of PeriodInstanceCreate.
577
+ *
578
+ * Uses a plain 'display_id' field instead of a computed property to avoid
579
+ * dependency on TenantContext during serialization.
580
+ */
581
+ type ActivityApiPeriodInstanceCreate = {
582
+ id: string;
583
+ period: ActivityPeriod;
584
+ start_date: string;
585
+ end_date: string;
586
+ name: string;
587
+ display_id: string;
588
+ };
589
+ type ActivityAccountReconciliationParams = {
590
+ reconciliation_type?: 'account_reconciliation';
591
+ gl_account_id: string;
592
+ };
593
+ type ActivityAccountReportCategory = 'Balance Sheet' | 'P&L';
594
+ type ActivityAccountType = 'Bank' | 'Current Asset' | 'Non-current Asset' | 'Fixed Asset' | 'Depreciation' | 'Inventory' | 'Prepayment' | 'Undeposited Funds' | 'Other Assets' | 'Accounts Receivable' | 'CTA' | 'Equity' | 'Retained Earnings' | 'Other Equity' | 'Expense' | 'Other Expense' | 'Cost of Goods Sold' | 'Wages Expense' | 'Interest Expense' | 'Taxes Expense' | 'Depreciation Expense' | 'Amortization Expense' | 'Overhead' | 'Accounts Payable' | 'Credit Card' | 'Non-current Liability' | 'Current Liability' | 'Deferred Revenue' | 'Other Liability' | 'Revenue' | 'Sales' | 'Other Income' | 'Other Revenue' | 'Statistical';
595
+ type ActivityAccountingClass = 'Asset' | 'Equity' | 'Liability' | 'Revenue' | 'Expense' | 'Statistical';
596
+ type ActivityActivityDefinitionCreateWithType = {
597
+ created_at?: string | null;
598
+ last_modified_at?: string | null;
599
+ name: string;
600
+ due_date: ActivityDueDate;
601
+ enabled?: boolean;
602
+ description?: string | null;
603
+ preparer_id?: string | null;
604
+ reviewer_id?: string | null;
605
+ frequency: ActivityPeriod;
606
+ id?: string;
607
+ predefined?: boolean;
608
+ from_date_override?: string | null;
609
+ type?: ActivityActivityType | null;
610
+ is_deleted?: boolean;
611
+ };
612
+ type ActivityActivityInstance = {
613
+ last_manually_updated?: string | null;
614
+ created_at?: string | null;
615
+ last_modified_at?: string | null;
616
+ id: string;
617
+ name: string;
618
+ due_date: string;
619
+ period_instance_id: string;
620
+ activity_definition_id: string;
621
+ is_deleted?: boolean;
622
+ description?: string | null;
623
+ reconciliation_status?: ActivityReconciliationStatus;
624
+ preparer_id?: string | null;
625
+ reviewer_id?: string | null;
626
+ };
627
+ type ActivityActivityInstanceWithTaskInstances = {
628
+ last_manually_updated?: string | null;
629
+ created_at?: string | null;
630
+ last_modified_at?: string | null;
631
+ id: string;
632
+ name: string;
633
+ due_date: string;
634
+ period_instance_id: string;
635
+ activity_definition_id: string;
636
+ is_deleted?: boolean;
637
+ description?: string | null;
638
+ reconciliation_status?: ActivityReconciliationStatus;
639
+ preparer_id?: string | null;
640
+ reviewer_id?: string | null;
641
+ task_instances?: Array<ActivityTaskInstanceWithAction>;
642
+ readonly assignees: Array<string>;
643
+ progress: ActivityTasksProgress;
644
+ readonly ready_to_reconcile: boolean;
645
+ status: ActivityActivityStatus;
646
+ };
647
+ type ActivityActivityStatus = 'OPEN' | 'CLOSED';
648
+ /**
649
+ * Progress for an activity broken down by subsidiaries.
650
+ */
651
+ type ActivityActivitySubsidiaryProgress = {
652
+ activity_instance_id: string;
653
+ activity_name: string;
654
+ progress: ActivityTasksProgress;
655
+ subsidiaries?: Array<ActivitySubsidiaryProgress>;
656
+ };
657
+ type ActivityActivityType = 'Leases' | 'Prepaid Expenses';
658
+ type ActivityBalanceInput = {
659
+ round_balance?: boolean;
660
+ balance?: number;
661
+ currency?: ActivityCurrency | null;
662
+ };
663
+ type ActivityBalanceOutput = {
664
+ balance?: number;
665
+ currency?: ActivityCurrency | null;
666
+ };
667
+ type ActivityBaseTaskInstanceWithAction = {
668
+ last_manually_updated?: string | null;
669
+ created_at?: string | null;
670
+ last_modified_at?: string | null;
671
+ id: string;
672
+ name: string;
673
+ due_date: string;
674
+ preparer_due_date: string;
675
+ status: ActivityTaskStatus;
676
+ description?: string | null;
677
+ task_definition_id: string;
678
+ activity_instance_id: string;
679
+ subsidiary_id: number;
680
+ is_deleted?: boolean;
681
+ preparer_id?: string | null;
682
+ assignee_id?: string | null;
683
+ reconciled?: boolean | null;
684
+ creator?: ActivityTaskCreator | null;
685
+ decline_reason?: string | null;
686
+ trigger_execution_id?: string | null;
687
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
688
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
689
+ is_currently_blocked?: boolean | null;
690
+ is_blocking_manually_set?: boolean;
691
+ task_type?: ActivityTaskType | null;
692
+ attachments_count?: number;
693
+ task_action?: ActivityTaskActionOutput | null;
694
+ task_action_type?: string | null;
695
+ is_manual_task?: boolean | null;
696
+ activity_name?: string | null;
697
+ period_display_id?: string | null;
698
+ activity_definition_id?: string | null;
699
+ task_action_execution_errors?: Array<ActivityTaskActionExecutionError> | null;
700
+ };
701
+ type ActivityBillCreate = {
702
+ subsidiary_id: number;
703
+ create_time: string;
704
+ posting_date: string;
705
+ due_date: string;
706
+ amount: number;
707
+ currency?: ActivityCurrency;
708
+ vendor_id: string;
709
+ status: ActivityBillStatus;
710
+ reference_number?: string | null;
711
+ bill_number?: string | null;
712
+ memo?: string | null;
713
+ id: string;
714
+ provider_uid: string;
715
+ source_entity?: ActivityBillSourceEntity | null;
716
+ source_entity_id?: string | null;
717
+ original_id?: string | null;
718
+ journal_entry_id?: string | null;
719
+ is_nominal?: boolean;
720
+ };
721
+ type ActivityBillData = {
722
+ bill: ActivityBillCreate;
723
+ bill_items: Array<ActivityBillItemCreate>;
724
+ dimension_value_ids?: Array<string>;
725
+ };
726
+ type ActivityBillItemCreate = {
727
+ subsidiary_id: number;
728
+ amount: number;
729
+ account_id: string;
730
+ ap_account_id: string;
731
+ memo?: string | null;
732
+ id: string;
733
+ provider_uid: string;
734
+ bill_id: string;
735
+ item_number: number;
736
+ is_nominal?: boolean;
737
+ };
738
+ type ActivityBillSourceEntity = 'lease';
739
+ type ActivityBillStatus = 'draft' | 'posted' | 'submitted';
740
+ type ActivityBillUpdateBase = {
741
+ posting_date?: string | null;
742
+ due_date?: string | null;
743
+ amount?: number | null;
744
+ currency?: ActivityCurrency | null;
745
+ vendor_id?: string | null;
746
+ reference_number?: string | null;
747
+ bill_number?: string | null;
748
+ memo?: string | null;
749
+ original_id?: string | null;
750
+ };
751
+ type ActivityBlockingScope = 'GLOBAL' | 'SUBSIDIARY';
752
+ type ActivityBodyGetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPost = {
753
+ due_date_timeframe?: ActivityTimeframe | null;
754
+ status?: Array<ActivityTaskStatus>;
755
+ subsidiary_ids?: Array<number>;
756
+ activity_definition_ids?: Array<string>;
757
+ preparer_ids?: Array<string> | null;
758
+ reviewer_ids?: Array<string> | null;
759
+ pagination_in?: ActivityPaginationInput | null;
760
+ search?: ActivityTaskInstanceSearch | null;
761
+ period_instance_id?: string | null;
762
+ period_display_id?: string | null;
763
+ period_instance_ids?: Array<string> | null;
764
+ period_display_ids?: Array<string> | null;
765
+ exclude_task_types?: Array<ActivityTaskType> | null;
766
+ slim?: boolean;
767
+ entity_ids?: Array<string>;
768
+ entity_type?: ActivityTaskEntityType | null;
769
+ /**
770
+ * Include the associated entity objects (provider or subsidiary details) in the response.
771
+ */
772
+ with_entities?: boolean;
773
+ };
774
+ type ActivityConsolidationExchangeRateType = 'current' | 'average' | 'historical';
775
+ type ActivityCreateBillTaskActionData = {
776
+ action_type?: 'create_bill';
777
+ bill_data: ActivityBillData;
778
+ };
779
+ type ActivityCreateIctEliminationActionTemplateInput = {
780
+ action_type?: 'create_ict_elimination_entries';
781
+ ict_elimination_data: ActivityIctEliminationDataInput;
782
+ };
783
+ type ActivityCreateIctEliminationActionTemplateOutput = {
784
+ action_type?: 'create_ict_elimination_entries';
785
+ ict_elimination_data: ActivityIctEliminationDataOutput;
786
+ };
787
+ type ActivityCreateIctEliminationTaskActionDataInput = {
788
+ action_type?: 'create_ict_elimination_entries';
789
+ ict_elimination_data: ActivityIctEliminationDataInput;
790
+ };
791
+ type ActivityCreateIctEliminationTaskActionDataOutput = {
792
+ action_type?: 'create_ict_elimination_entries';
793
+ ict_elimination_data: ActivityIctEliminationDataOutput;
794
+ };
795
+ type ActivityCreateJournalEntriesActionTemplateInput = {
796
+ action_type?: 'create_journal_entries';
797
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput>;
798
+ };
799
+ type ActivityCreateJournalEntriesActionTemplateOutput = {
800
+ action_type?: 'create_journal_entries';
801
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput>;
802
+ };
803
+ type ActivityCreateJournalEntriesBulkActionTemplateInput = {
804
+ action_type?: 'create_journal_entries_bulk';
805
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput | ActivityApiJournalEntryInput>;
806
+ };
807
+ type ActivityCreateJournalEntriesBulkActionTemplateOutput = {
808
+ action_type?: 'create_journal_entries_bulk';
809
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput | ActivityApiJournalEntryOutput>;
810
+ };
811
+ type ActivityCreateJournalEntriesBulkTaskActionDataInput = {
812
+ action_type?: 'create_journal_entries_bulk';
813
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput>;
814
+ };
815
+ type ActivityCreateJournalEntriesBulkTaskActionDataOutput = {
816
+ action_type?: 'create_journal_entries_bulk';
817
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput>;
818
+ };
819
+ type ActivityCreateJournalEntryActionTemplateInput = {
820
+ action_type?: 'create_journal_entry';
821
+ journal_entry_data: ActivityJournalEntryWithLinesWithDimensionValuesInput | ActivityApiJournalEntryInput;
822
+ reverse_date?: string | null;
823
+ };
824
+ type ActivityCreateJournalEntryActionTemplateOutput = {
825
+ action_type?: 'create_journal_entry';
826
+ journal_entry_data: ActivityJournalEntryWithLinesWithDimensionValuesOutput | ActivityApiJournalEntryOutput;
827
+ reverse_date?: string | null;
828
+ };
829
+ type ActivityCreateJournalEntryScheduleActionTemplateInput = {
830
+ action_type?: 'create_journal_entry_schedule';
831
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput>;
832
+ due_date: ActivityDueDate;
833
+ schedule_name: string;
834
+ };
835
+ type ActivityCreateJournalEntryScheduleActionTemplateOutput = {
836
+ action_type?: 'create_journal_entry_schedule';
837
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput>;
838
+ due_date: ActivityDueDate;
839
+ schedule_name: string;
840
+ };
841
+ type ActivityCreateJournalEntryTaskActionDataInput = {
842
+ action_type?: 'create_journal_entry';
843
+ journal_entry_data: ActivityJournalEntryWithLinesWithDimensionValuesInput | ActivityApiJournalEntryInput;
844
+ reverse_date?: string | null;
845
+ };
846
+ type ActivityCreateJournalEntryTaskActionDataOutput = {
847
+ action_type?: 'create_journal_entry';
848
+ journal_entry_data: ActivityJournalEntryWithLinesWithDimensionValuesOutput | ActivityApiJournalEntryOutput;
849
+ reverse_date?: string | null;
850
+ };
851
+ type ActivityCreateJournalEntryTaskScheduleActionDataInput = {
852
+ action_type?: 'create_journal_entry_schedule';
853
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput>;
854
+ due_date: ActivityDueDate;
855
+ schedule_name: string;
856
+ };
857
+ type ActivityCreateJournalEntryTaskScheduleActionDataOutput = {
858
+ action_type?: 'create_journal_entry_schedule';
859
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput>;
860
+ due_date: ActivityDueDate;
861
+ schedule_name: string;
862
+ };
863
+ type ActivityCreateLockPeriodTaskActionData = {
864
+ action_type?: 'lock_consolidation_period';
865
+ period_data: ActivityPeriodData;
866
+ };
867
+ type ActivityCurrency = 'United States Dollar' | 'Euro' | 'British Pound Sterling' | 'Indian Rupee' | 'Australian Dollar' | 'Canadian Dollar' | 'New Israeli Shekel' | 'Japanese Yen' | 'Sri Lankan Rupee' | 'New Zealand Dollar' | 'Swedish Krona' | 'South African Rand' | 'Singapore Dollar' | 'Indonesian Rupiah' | 'Danish Krone' | 'Hong Kong Dollar' | 'United Arab Emirates Dirham' | 'Argentine Peso' | 'Brazilian Real' | 'Bulgarian Lev' | 'Chinese Yuan' | 'Colombian Peso' | 'Czech Koruna' | 'Malaysian Ringgit' | 'Mexican Peso' | 'Myanmar Kyat' | 'New Taiwan Dollar' | 'Norwegian Krone' | 'Omani Rial' | 'Philippine Peso' | 'Polish Zloty' | 'Romanian Leu' | 'Swiss Franc' | 'Turkish Lira' | 'Serbian Dinar' | 'Hungarian Forint' | 'South Korean Won' | 'Armenian Dram' | 'Azerbaijani Manat' | 'Bahraini Dinar' | 'Chilean Peso' | 'Fijian Dollar' | 'Georgian Lari' | 'Guatemalan Quetzal' | 'Croatian Kuna' | 'Icelandic Krona' | 'Jordanian Dinar' | 'Kyrgyzstani Som' | 'Kuwaiti Dinar' | 'Kazakhstani Tenge' | 'Moroccan Dirham' | 'Papua New Guinean Kina' | 'Qatari Rial' | 'Russian Ruble' | 'Saudi Riyal' | 'Thai Baht' | 'Somali Shilling' | 'Tunisian Dinar' | 'Ukrainian Hryvnia' | 'Uzbekistani Som' | 'Vietnamese Dong' | 'Central African CFA Franc' | 'Afghani' | 'Lek' | 'Kwanza' | 'Aruban Florin' | 'Convertible Mark' | 'Barbados Dollar' | 'Taka' | 'Burundi Franc' | 'Bermudian Dollar' | 'Brunei Dollar' | 'Boliviano' | 'Mvdol' | 'Bahamian Dollar' | 'Ngultrum' | 'Pula' | 'Belarusian Ruble' | 'Belize Dollar' | 'Congolese Franc' | 'WIR Euro' | 'WIR Franc' | 'Unidad de Fomento' | 'Unidad de Valor Real' | 'Costa Rican Colon' | 'Cuban Peso' | 'Cabo Verde Escudo' | 'Djibouti Franc' | 'Dominican Peso' | 'Algerian Dinar' | 'Egyptian Pound' | 'Nakfa' | 'Ethiopian Birr' | 'Falkland Islands Pound' | 'Ghana Cedi' | 'Gibraltar Pound' | 'Dalasi' | 'Guinean Franc' | 'Guyana Dollar' | 'Lempira' | 'Gourde' | 'Iraqi Dinar' | 'Iranian Rial' | 'Jamaican Dollar' | 'Kenyan Shilling' | 'Riel' | 'Comorian Franc' | 'North Korean Won' | 'Cayman Islands Dollar' | 'Lao Kip' | 'Lebanese Pound' | 'Liberian Dollar' | 'Loti' | 'Libyan Dinar' | 'Moldovan Leu' | 'Malagasy Ariary' | 'Denar' | 'Tugrik' | 'Pataca' | 'Ouguiya' | 'Mauritius Rupee' | 'Rufiyaa' | 'Malawi Kwacha' | 'Mexican Unidad de Inversion (UDI)' | 'Mozambique Metical' | 'Namibia Dollar' | 'Naira' | 'Cordoba Oro' | 'Nepalese Rupee' | 'Balboa' | 'Sol' | 'Pakistan Rupee' | 'Guarani' | 'Rwanda Franc' | 'Solomon Islands Dollar' | 'Seychelles Rupee' | 'Sudanese Pound' | 'Saint Helena Pound' | 'Leone' | 'Surinam Dollar' | 'South Sudanese Pound' | 'Dobra' | 'El Salvador Colon' | 'Syrian Pound' | 'Lilangeni' | 'Somoni' | 'Turkmenistan New Manat' | "Pa'anga" | 'Trinidad and Tobago Dollar' | 'Tanzanian Shilling' | 'Uganda Shilling' | 'US Dollar (Next day)' | 'Uruguay Peso en Unidades Indexadas (UI)' | 'Peso Uruguayo' | 'Unidad Previsional' | 'Bolivar Digital' | 'Bolivar Soberano' | 'Vatu' | 'Tala' | 'Arab Accounting Dinar' | 'Silver' | 'Gold' | 'Bond Markets Unit European Composite Unit (EURCO)' | 'Bond Markets Unit European Monetary Unit (E.M.U.-6)' | 'Bond Markets Unit European Unit of Account 9 (E.U.A.-9)' | 'Bond Markets Unit European Unit of Account 17 (E.U.A.-17)' | 'East Caribbean Dollar' | 'Caribbean Guilder' | 'SDR (Special Drawing Right)' | 'CFA Franc BCEAO' | 'Palladium' | 'CFP Franc' | 'Platinum' | 'Sucre' | 'Codes specifically reserved for testing purposes' | 'ADB Unit of Account' | 'The codes assigned for transactions where no currency is involved' | 'Yemeni Rial' | 'Zambian Kwacha' | 'Zimbabwe Gold';
868
+ type ActivityDeltaUnit = 'Days' | 'Weeks' | 'Weekdays';
869
+ type ActivityDimension = {
870
+ name: string;
871
+ description?: string | null;
872
+ id: string;
873
+ is_default?: boolean;
874
+ values?: Array<ActivityDimensionValue>;
875
+ };
876
+ type ActivityDimensionRuleInput = {
877
+ dimension_id: string;
878
+ order: number;
879
+ dimension_value_id: string;
880
+ name: string;
881
+ subsidiary_id?: number | null;
882
+ by_account_code?: Array<string> | null;
883
+ by_account_name?: string | null;
884
+ by_account_ids?: Array<string> | null;
885
+ by_account_types?: Array<ActivityAccountType> | null;
886
+ by_journal_entry_memo?: string | null;
887
+ by_journal_entry_created_from?: string | null;
888
+ by_journal_entry_line_memo?: string | null;
889
+ by_journal_entry_line_property?: string | null;
890
+ by_dimension_value_ids?: Array<string> | null;
891
+ by_empty_dimension_id_values?: Array<string> | null;
892
+ id: number;
893
+ dimension: ActivityDimension;
894
+ dimension_value: ActivityDimensionValue;
895
+ accounts?: Array<ActivityTAccountWithoutSubsidiaryMappingInput>;
896
+ };
897
+ type ActivityDimensionRuleOutput = {
898
+ dimension_id: string;
899
+ order: number;
900
+ dimension_value_id: string;
901
+ name: string;
902
+ subsidiary_id?: number | null;
903
+ by_account_code?: Array<string> | null;
904
+ by_account_name?: string | null;
905
+ by_account_ids?: Array<string> | null;
906
+ by_account_types?: Array<ActivityAccountType> | null;
907
+ by_journal_entry_memo?: string | null;
908
+ by_journal_entry_created_from?: string | null;
909
+ by_journal_entry_line_memo?: string | null;
910
+ by_journal_entry_line_property?: string | null;
911
+ by_dimension_value_ids?: Array<string> | null;
912
+ by_empty_dimension_id_values?: Array<string> | null;
913
+ id: number;
914
+ dimension: ActivityDimension;
915
+ dimension_value: ActivityDimensionValue;
916
+ accounts?: Array<ActivityTAccountWithoutSubsidiaryMappingOutput>;
917
+ };
918
+ type ActivityDimensionValue = {
919
+ id?: string | null;
920
+ value: string;
921
+ subsidiary_id?: number | null;
922
+ provider_uid?: string | null;
923
+ parent_id?: string | null;
924
+ dimension_id: string;
925
+ is_default: boolean;
926
+ effective_rule_id?: number | null;
927
+ has_children?: boolean;
928
+ };
929
+ type ActivityDimensionValueOverrideSource = 'user' | 'provider';
930
+ /**
931
+ * DueDate represents the due date of a task/activity definition.
932
+ * We will use it to decide the actual due date of a task/activity instance.
933
+ *
934
+ * from_start: if True, the due date is calculated from the start date of the period.
935
+ * days_delta: the number of days/weeks/workdays to shift for start/end date.
936
+ * is_forward: if True, the due date is calculated forward from the start/end date of the period.
937
+ * delta_unit: unit of the delta (Days | Weeks | Workdays), default is Days.
938
+ * is_specific_day: if True, indicates that the due date is a specific calendar day (reserved for future use).
939
+ * should_skip_holidays: when using Workdays, whether to skip country holidays in addition to weekends.
940
+ */
941
+ type ActivityDueDate = {
942
+ from_start: boolean;
943
+ days_delta: number;
944
+ is_forward: boolean;
945
+ delta_unit?: ActivityDeltaUnit;
946
+ is_specific_day?: boolean;
947
+ should_skip_holidays?: boolean;
948
+ };
949
+ type ActivityExchangeRate = {
950
+ from_currency: ActivityCurrency;
951
+ to_currency: ActivityCurrency;
952
+ rate: number;
953
+ };
954
+ type ActivityFailureActionTemplate = {
955
+ action_type?: 'failure_task';
956
+ };
957
+ type ActivityFailureTaskActionData = {
958
+ action_type?: 'failure_task';
959
+ };
960
+ type ActivityGroupTransaction = {
961
+ transaction_id: number;
962
+ journal_entry_id: string;
963
+ elimination_entry_id?: string | null;
964
+ id: number;
965
+ };
966
+ type ActivityIctEliminationDataInput = {
967
+ ict_transaction_id: number;
968
+ eliminations: Array<ActivityIctEliminationEntryInput>;
969
+ };
970
+ type ActivityIctEliminationDataOutput = {
971
+ ict_transaction_id: number;
972
+ eliminations: Array<ActivityIctEliminationEntryOutput>;
973
+ };
974
+ type ActivityIctEliminationEntryInput = {
975
+ journal_entry: ActivityJournalEntryWithLinesWithDimensionValuesInput;
976
+ from_subsidiary_id: number;
977
+ to_subsidiary_id: number;
978
+ };
979
+ type ActivityIctEliminationEntryOutput = {
980
+ journal_entry: ActivityJournalEntryWithLinesWithDimensionValuesOutput;
981
+ from_subsidiary_id: number;
982
+ to_subsidiary_id: number;
983
+ };
984
+ type ActivityJeWriteBackStatus = 'syncing' | 'synced' | 'partial_success' | 'success' | 'failure';
985
+ type ActivityJournalEntryLineWithDimensionValuesInput = {
986
+ id: string;
987
+ account_id: string;
988
+ journal_entry_id: string;
989
+ line_num: number;
990
+ is_debit: boolean;
991
+ account_provider_id?: string | null;
992
+ account?: ActivityTAccountWithoutSubsidiaryMappingInput | null;
993
+ total_amount?: number;
994
+ primary_currency_amount?: number;
995
+ secondary_currency_amount?: number;
996
+ tertiary_currency_amount?: number;
997
+ subsidiary_id?: number | null;
998
+ create_time?: string | null;
999
+ transaction_date?: string | null;
1000
+ memo?: string | null;
1001
+ provider_property?: string | null;
1002
+ is_for_elimination?: boolean;
1003
+ recurring_transaction_id?: string | null;
1004
+ transaction_number?: string | null;
1005
+ po_number?: string | null;
1006
+ sales_order_ref?: string | null;
1007
+ invoice_ref?: string | null;
1008
+ extra_reference?: string | null;
1009
+ assignment_ref?: string | null;
1010
+ dimension_values?: Array<ActivityLineDimensionEffectiveAssignmentInput | ActivityDimensionValue>;
1011
+ };
1012
+ type ActivityJournalEntryLineWithDimensionValuesOutput = {
1013
+ id: string;
1014
+ account_id: string;
1015
+ journal_entry_id: string;
1016
+ line_num: number;
1017
+ is_debit: boolean;
1018
+ account_provider_id?: string | null;
1019
+ account?: ActivityTAccountWithoutSubsidiaryMappingOutput | null;
1020
+ total_amount?: number;
1021
+ primary_currency_amount?: number;
1022
+ secondary_currency_amount?: number;
1023
+ tertiary_currency_amount?: number;
1024
+ subsidiary_id?: number | null;
1025
+ create_time?: string | null;
1026
+ transaction_date?: string | null;
1027
+ memo?: string | null;
1028
+ provider_property?: string | null;
1029
+ is_for_elimination?: boolean;
1030
+ recurring_transaction_id?: string | null;
1031
+ transaction_number?: string | null;
1032
+ po_number?: string | null;
1033
+ sales_order_ref?: string | null;
1034
+ invoice_ref?: string | null;
1035
+ extra_reference?: string | null;
1036
+ assignment_ref?: string | null;
1037
+ dimension_values?: Array<ActivityLineDimensionEffectiveAssignmentOutput | ActivityDimensionValue>;
1038
+ };
1039
+ type ActivityJournalEntrySource = 'Elimination' | 'Journal Entry' | 'Bill' | 'Lease' | 'Invoice' | 'Bill Payment';
1040
+ type ActivityJournalEntryStatus = 'Posted' | 'Draft' | 'Submitted';
1041
+ type ActivityJournalEntryType = 'adjustment' | 'elimination' | 'book_entry' | 'ic_transaction';
1042
+ type ActivityJournalEntryWithLinesWithDimensionValuesInput = {
1043
+ lines?: Array<ActivityJournalEntryLineWithDimensionValuesInput>;
1044
+ created_from: string;
1045
+ currency: ActivityCurrency;
1046
+ memo?: string | null;
1047
+ create_time?: string;
1048
+ transaction_date?: string | null;
1049
+ posting_date?: string | null;
1050
+ is_adjustment?: boolean;
1051
+ transaction_id?: number | null;
1052
+ status?: ActivityJournalEntryStatus;
1053
+ exchange_rates?: Array<ActivityExchangeRate>;
1054
+ id: string;
1055
+ subsidiary_id: number;
1056
+ provider_uid: string;
1057
+ ref_number?: string | null;
1058
+ insert_time?: string;
1059
+ clearing_group_id?: number | null;
1060
+ is_nominal_ledger?: boolean;
1061
+ sub_ledger?: ActivitySubLedger | null;
1062
+ gl_entry_id?: string | null;
1063
+ reconciled?: boolean | null;
1064
+ source_entity?: ActivityJournalEntrySource | null;
1065
+ provider_url?: string | null;
1066
+ posting_period_id?: string | null;
1067
+ syncing_status?: ActivityWriteBackStatusInput | null;
1068
+ group_transaction?: ActivityGroupTransaction | null;
1069
+ reverse_entry_id?: string | null;
1070
+ };
1071
+ type ActivityJournalEntryWithLinesWithDimensionValuesOutput = {
1072
+ lines?: Array<ActivityJournalEntryLineWithDimensionValuesOutput>;
1073
+ created_from: string;
1074
+ currency: ActivityCurrency;
1075
+ memo?: string | null;
1076
+ create_time?: string;
1077
+ transaction_date?: string | null;
1078
+ posting_date?: string | null;
1079
+ is_adjustment?: boolean;
1080
+ transaction_id?: number | null;
1081
+ status?: ActivityJournalEntryStatus;
1082
+ exchange_rates?: Array<ActivityExchangeRate>;
1083
+ id: string;
1084
+ subsidiary_id: number;
1085
+ provider_uid: string;
1086
+ ref_number?: string | null;
1087
+ insert_time?: string;
1088
+ clearing_group_id?: number | null;
1089
+ is_nominal_ledger?: boolean;
1090
+ sub_ledger?: ActivitySubLedger | null;
1091
+ gl_entry_id?: string | null;
1092
+ reconciled?: boolean | null;
1093
+ source_entity?: ActivityJournalEntrySource | null;
1094
+ provider_url?: string | null;
1095
+ posting_period_id?: string | null;
1096
+ syncing_status?: ActivityWriteBackStatusOutput | null;
1097
+ group_transaction?: ActivityGroupTransaction | null;
1098
+ reverse_entry_id?: string | null;
1099
+ };
1100
+ type ActivityLeaseAmortizationOpeningBalanceActionTemplateInput = {
1101
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1102
+ currency: ActivityCurrency;
1103
+ subsidiary_id: number;
1104
+ rou_asset_opening_balance: number;
1105
+ liability_opening_balance: number;
1106
+ primary_start_date: string;
1107
+ lease_id: string;
1108
+ lease_name: string;
1109
+ lease_dimension_value_id: string;
1110
+ vendor_id: string;
1111
+ liability_account_id: string;
1112
+ rou_asset_account_id: string;
1113
+ lease_expense_account_id: string;
1114
+ lease_amortization: Array<ActivityLeaseAmortizationPointInput>;
1115
+ migration_date?: string | null;
1116
+ is_draft?: boolean;
1117
+ };
1118
+ type ActivityLeaseAmortizationOpeningBalanceActionTemplateOutput = {
1119
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1120
+ currency: ActivityCurrency;
1121
+ subsidiary_id: number;
1122
+ rou_asset_opening_balance: number;
1123
+ liability_opening_balance: number;
1124
+ primary_start_date: string;
1125
+ lease_id: string;
1126
+ lease_name: string;
1127
+ lease_dimension_value_id: string;
1128
+ vendor_id: string;
1129
+ liability_account_id: string;
1130
+ rou_asset_account_id: string;
1131
+ lease_expense_account_id: string;
1132
+ lease_amortization: Array<ActivityLeaseAmortizationPointOutput>;
1133
+ migration_date?: string | null;
1134
+ is_draft?: boolean;
1135
+ };
1136
+ type ActivityLeaseAmortizationPointInput = {
1137
+ date: string;
1138
+ payment: ActivityBalanceInput;
1139
+ interest_rate: ActivityBalanceInput;
1140
+ straight_line_payment: ActivityBalanceInput;
1141
+ liability: ActivityBalanceInput;
1142
+ right_of_use_asset: ActivityBalanceInput;
1143
+ term?: ActivityMinimalTerm | null;
1144
+ };
1145
+ type ActivityLeaseAmortizationPointOutput = {
1146
+ date: string;
1147
+ payment: ActivityBalanceOutput;
1148
+ interest_rate: ActivityBalanceOutput;
1149
+ straight_line_payment: ActivityBalanceOutput;
1150
+ liability: ActivityBalanceOutput;
1151
+ right_of_use_asset: ActivityBalanceOutput;
1152
+ term?: ActivityMinimalTerm | null;
1153
+ asset_reduction: ActivityBalanceOutput;
1154
+ };
1155
+ type ActivityLeaseAmortizationScheduleActionTemplateInput = {
1156
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1157
+ currency: ActivityCurrency;
1158
+ subsidiary_id: number;
1159
+ rou_asset_opening_balance: number;
1160
+ liability_opening_balance: number;
1161
+ primary_start_date: string;
1162
+ lease_id: string;
1163
+ lease_name: string;
1164
+ lease_dimension_value_id: string;
1165
+ vendor_id: string;
1166
+ liability_account_id: string;
1167
+ rou_asset_account_id: string;
1168
+ lease_expense_account_id: string;
1169
+ lease_amortization: Array<ActivityLeaseAmortizationPointInput>;
1170
+ migration_date?: string | null;
1171
+ is_draft?: boolean;
1172
+ };
1173
+ type ActivityLeaseAmortizationScheduleActionTemplateOutput = {
1174
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1175
+ currency: ActivityCurrency;
1176
+ subsidiary_id: number;
1177
+ rou_asset_opening_balance: number;
1178
+ liability_opening_balance: number;
1179
+ primary_start_date: string;
1180
+ lease_id: string;
1181
+ lease_name: string;
1182
+ lease_dimension_value_id: string;
1183
+ vendor_id: string;
1184
+ liability_account_id: string;
1185
+ rou_asset_account_id: string;
1186
+ lease_expense_account_id: string;
1187
+ lease_amortization: Array<ActivityLeaseAmortizationPointOutput>;
1188
+ migration_date?: string | null;
1189
+ is_draft?: boolean;
1190
+ };
1191
+ type ActivityLeaseEscalatorFrequency = 'monthly' | 'quarterly' | 'annually';
1192
+ type ActivityLeasePaymentFrequency = 'monthly' | 'quarterly' | 'annually' | 'once';
1193
+ type ActivityLeasePaymentScheduleActionTemplate = {
1194
+ action_type?: 'lease_payment';
1195
+ lease_id: string;
1196
+ lease_name: string;
1197
+ currency: ActivityCurrency;
1198
+ lease_dimension_value_id: string;
1199
+ vendor_id: string;
1200
+ billing_account_id: string;
1201
+ payment_terms: Array<ActivityLeasePaymentTerm>;
1202
+ migration_date?: string | null;
1203
+ is_draft?: boolean;
1204
+ };
1205
+ type ActivityLeasePaymentTerm = {
1206
+ id?: string;
1207
+ name: string;
1208
+ start_date: string;
1209
+ end_date: string;
1210
+ rent_payment: number;
1211
+ payment_frequency?: ActivityLeasePaymentFrequency;
1212
+ escalator_rate?: number;
1213
+ escalator_frequency?: ActivityLeaseEscalatorFrequency | null;
1214
+ primary_term?: boolean;
1215
+ subsidiary_id?: number | null;
1216
+ lease_id: string;
1217
+ };
1218
+ type ActivityLeaseTermReminderActionTemplate = {
1219
+ action_type?: 'lease_term_reminder';
1220
+ lease_id: string;
1221
+ lease_name: string;
1222
+ payment_terms: Array<ActivityLeasePaymentTerm>;
1223
+ migration_date?: string | null;
1224
+ is_draft?: boolean;
1225
+ };
1226
+ type ActivityLineDimensionEffectiveAssignmentInput = {
1227
+ journal_line_id: string;
1228
+ dimension_id?: string | null;
1229
+ dimension_value_id?: string | null;
1230
+ effective_rule_id?: number | null;
1231
+ dimension_value_override_id?: number | null;
1232
+ dimension_value?: ActivityDimensionValue | null;
1233
+ effective_rule?: ActivityDimensionRuleInput | null;
1234
+ dimension_value_override?: ActivityLineDimensionValueOverride | null;
1235
+ };
1236
+ type ActivityLineDimensionEffectiveAssignmentOutput = {
1237
+ journal_line_id: string;
1238
+ dimension_id?: string | null;
1239
+ dimension_value_id?: string | null;
1240
+ effective_rule_id?: number | null;
1241
+ dimension_value_override_id?: number | null;
1242
+ dimension_value?: ActivityDimensionValue | null;
1243
+ effective_rule?: ActivityDimensionRuleOutput | null;
1244
+ dimension_value_override?: ActivityLineDimensionValueOverride | null;
1245
+ };
1246
+ type ActivityLineDimensionValueOverride = {
1247
+ dimension_id: string;
1248
+ dimension_value_id: string;
1249
+ journal_line_id: string;
1250
+ override_source?: ActivityDimensionValueOverrideSource;
1251
+ id: number;
1252
+ dimension_value?: ActivityDimensionValue | null;
1253
+ };
1254
+ type ActivityLockConsolidationRateActionTemplate = {
1255
+ action_type?: 'lock_consolidation_period';
1256
+ };
1257
+ type ActivityMappedNominalAccount = {
1258
+ id: string;
1259
+ name: string;
1260
+ hierarchy_account_name: string;
1261
+ account_type: ActivityAccountType;
1262
+ account_number?: string | null;
1263
+ };
1264
+ type ActivityMatchResolutionActionTemplate = {
1265
+ action_type?: 'match_resolution';
1266
+ match_id: string;
1267
+ };
1268
+ type ActivityMatchResolutionTaskActionData = {
1269
+ action_type?: 'match_resolution';
1270
+ match_id: string;
1271
+ entity_id?: string | null;
1272
+ entity_type?: ActivityMatchedEntityType | null;
1273
+ trigger_execution_id?: string | null;
1274
+ trigger_id?: string | null;
1275
+ };
1276
+ type ActivityMatchedEntityType = 'bill' | 'bill_payment' | 'invoice' | 'journal_entry' | 'journal_entry_line' | 'bank_line';
1277
+ type ActivityMinimalTerm = {
1278
+ name: string;
1279
+ id: string;
1280
+ };
1281
+ type ActivityPaginationInput = {
1282
+ page?: number | null;
1283
+ per_page?: number | null;
1284
+ include_total?: boolean;
1285
+ position?: ActivityPaginationPositionInput | null;
1286
+ };
1287
+ type ActivityPaginationOutput = {
1288
+ page?: number | null;
1289
+ per_page?: number | null;
1290
+ include_total?: boolean;
1291
+ position?: ActivityPaginationPositionInput | null;
1292
+ pages?: number | null;
1293
+ total?: number | null;
1294
+ };
1295
+ type ActivityPaginationPositionInput = {
1296
+ start: number;
1297
+ end: number;
1298
+ };
1299
+ type ActivityPeriod = 'Annual' | 'Quarterly' | 'Monthly';
1300
+ type ActivityPeriodData = {
1301
+ id: string;
1302
+ name: string;
1303
+ start_date: string;
1304
+ frequency: ActivityPeriod;
1305
+ };
1306
+ type ActivityPeriodFilter = 'ALL_DATES' | 'TTM' | 'THIS_WEEK' | 'THIS_MONTH' | 'THIS_QUARTER' | 'THIS_YEAR' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_QUARTER' | 'LAST_YEAR' | 'LAST_30_DAYS' | 'LAST_60_DAYS' | 'LAST_90_DAYS' | 'NEXT_30_DAYS' | 'NEXT_60_DAYS' | 'NEXT_90_DAYS' | 'CUSTOM';
1307
+ /**
1308
+ * API representation of PeriodInstanceProgressBreakdown.
1309
+ *
1310
+ * Uses a plain 'display_id' field instead of a computed property to avoid
1311
+ * dependency on TenantContext during serialization.
1312
+ */
1313
+ type ActivityPeriodInstanceProgressBreakdownApi = {
1314
+ id: string;
1315
+ period: ActivityPeriod;
1316
+ start_date: string;
1317
+ end_date: string;
1318
+ name: string;
1319
+ display_id: string;
1320
+ progress: ActivityTasksProgress;
1321
+ activities?: Array<ActivityActivitySubsidiaryProgress>;
1322
+ };
1323
+ type ActivityPostBillData = {
1324
+ bill_id: string;
1325
+ bill: ActivityBillUpdateBase;
1326
+ bill_items?: Array<ActivityBillItemCreate> | null;
1327
+ dimension_value_ids?: Array<string>;
1328
+ };
1329
+ type ActivityPostBillTaskActionData = {
1330
+ action_type?: 'post_bill';
1331
+ bill_data: ActivityPostBillData;
1332
+ };
1333
+ type ActivityPostIctActionTemplate = {
1334
+ action_type?: 'post_ict';
1335
+ ict_id: number;
1336
+ };
1337
+ type ActivityPostIctTaskActionData = {
1338
+ action_type?: 'post_ict';
1339
+ ict_id: number;
1340
+ };
1341
+ type ActivityPostJournalEntryTaskActionDataInput = {
1342
+ action_type?: 'post_journal_entry';
1343
+ journal_entry: ActivityJournalEntryWithLinesWithDimensionValuesInput;
1344
+ };
1345
+ type ActivityPostJournalEntryTaskActionDataOutput = {
1346
+ action_type?: 'post_journal_entry';
1347
+ journal_entry: ActivityJournalEntryWithLinesWithDimensionValuesOutput;
1348
+ };
1349
+ type ActivityProviderOperationErrorType = 'Connection Error' | 'Authentication Error' | 'Data Operation Error' | 'Server Error' | 'Not Ready For Sync';
1350
+ type ActivityReconciliationDefinitionData = {
1351
+ type: ActivityReconciliationType;
1352
+ task_definition_id: string;
1353
+ currency?: ActivityCurrency | null;
1354
+ side_a_entity_type: ActivityReconciliationEntityType;
1355
+ side_a_entity_id: string;
1356
+ side_b_entity_type: ActivityReconciliationEntityType;
1357
+ side_b_entity_id?: string | null;
1358
+ side_a_source: ActivityReconciliationSource;
1359
+ side_b_source: ActivityReconciliationSource;
1360
+ };
1361
+ type ActivityReconciliationEntityType = 'account' | 'bank_account' | 'external_balance_capture';
1362
+ type ActivityReconciliationInstanceDataInput = {
1363
+ reconciliation_definition_id: string;
1364
+ task_instance_id: string;
1365
+ start_date: string;
1366
+ end_date: string;
1367
+ side_a_value?: number | string | null;
1368
+ side_b_value?: number | string | null;
1369
+ reconciling_items_balance?: number | string | null;
1370
+ variance?: number | string | null;
1371
+ variance_percentage?: number | string | null;
1372
+ has_post_signoff_changes?: boolean;
1373
+ event_timestamp?: string | null;
1374
+ };
1375
+ type ActivityReconciliationInstanceDataOutput = {
1376
+ reconciliation_definition_id: string;
1377
+ task_instance_id: string;
1378
+ start_date: string;
1379
+ end_date: string;
1380
+ side_a_value?: string | null;
1381
+ side_b_value?: string | null;
1382
+ reconciling_items_balance?: string | null;
1383
+ variance?: string | null;
1384
+ variance_percentage?: string | null;
1385
+ has_post_signoff_changes?: boolean;
1386
+ event_timestamp?: string | null;
1387
+ };
1388
+ type ActivityReconciliationSource = 'gl' | 'bank' | 'external';
1389
+ type ActivityReconciliationStatus = 'PENDING' | 'IN_PROGRESS' | 'DONE' | 'FAILED';
1390
+ type ActivityReconciliationSubmitActionTemplate = {
1391
+ action_type?: 'reconciliation_submit';
1392
+ reconciliation_definition_id: string;
1393
+ };
1394
+ type ActivityReconciliationSubmitTaskActionDataInput = {
1395
+ action_type?: 'reconciliation_submit';
1396
+ reconciliation_definition_id: string;
1397
+ reconciliation_definition: ActivityReconciliationDefinitionData;
1398
+ reconciliation_instance_id?: string | null;
1399
+ reconciliation_instance?: ActivityReconciliationInstanceDataInput | null;
1400
+ };
1401
+ type ActivityReconciliationSubmitTaskActionDataOutput = {
1402
+ action_type?: 'reconciliation_submit';
1403
+ reconciliation_definition_id: string;
1404
+ reconciliation_definition: ActivityReconciliationDefinitionData;
1405
+ reconciliation_instance_id?: string | null;
1406
+ reconciliation_instance?: ActivityReconciliationInstanceDataOutput | null;
1407
+ };
1408
+ type ActivityReconciliationType = 'bank_reconciliation' | 'account_reconciliation';
1409
+ type ActivitySlimTaskAction = {
1410
+ created_at?: string | null;
1411
+ last_modified_at?: string | null;
1412
+ id?: string;
1413
+ task_instance_id: string;
1414
+ status: ActivityTaskActionStatus;
1415
+ execution_start_time?: string | null;
1416
+ };
1417
+ type ActivitySlimTaskDefinitionWithInstances = {
1418
+ name: string;
1419
+ due_date: ActivityTaskDueDate;
1420
+ preparer_due_date?: ActivityDueDate | null;
1421
+ description?: string | null;
1422
+ /**
1423
+ * User ID of the person responsible for preparing this task.
1424
+ */
1425
+ preparer_id?: string | null;
1426
+ /**
1427
+ * User ID of the person assigned to complete this task. Note: task definitions use preparer_id/assignee_id for assignment; reviewer_id is set at the activity definition level, not on task definitions.
1428
+ */
1429
+ assignee_id?: string | null;
1430
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1431
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1432
+ end_date?: string | null;
1433
+ task_type?: ActivityTaskType | null;
1434
+ created_at?: string | null;
1435
+ last_modified_at?: string | null;
1436
+ is_deleted?: boolean;
1437
+ activity_definition_id: string;
1438
+ start_date: string;
1439
+ subsidiary_ids: Array<number>;
1440
+ activity_instance_id?: string | null;
1441
+ recurring: boolean;
1442
+ id?: string;
1443
+ creator_user_id?: string | null;
1444
+ is_manual_task?: boolean;
1445
+ entities?: Array<ActivityTaskEntityMapping>;
1446
+ action_template?: (({
1447
+ action_type?: 'create_journal_entry';
1448
+ } & ActivityCreateJournalEntryActionTemplateOutput) | ({
1449
+ action_type?: 'create_ict_elimination_entries';
1450
+ } & ActivityCreateIctEliminationActionTemplateOutput) | ({
1451
+ action_type?: 'post_ict';
1452
+ } & ActivityPostIctActionTemplate) | ({
1453
+ action_type?: 'test_action';
1454
+ } & ActivityTestActionTemplate) | ({
1455
+ action_type?: 'test_schedule_action';
1456
+ } & ActivityTestScheduleActionTemplate) | ({
1457
+ action_type?: 'lease_payment';
1458
+ } & ActivityLeasePaymentScheduleActionTemplate) | ({
1459
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1460
+ } & ActivityLeaseAmortizationScheduleActionTemplateOutput) | ({
1461
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1462
+ } & ActivityLeaseAmortizationOpeningBalanceActionTemplateOutput) | ({
1463
+ action_type?: 'lease_term_reminder';
1464
+ } & ActivityLeaseTermReminderActionTemplate) | ({
1465
+ action_type?: 'create_journal_entry_schedule';
1466
+ } & ActivityCreateJournalEntryScheduleActionTemplateOutput) | ({
1467
+ action_type?: 'create_journal_entries';
1468
+ } & ActivityCreateJournalEntriesActionTemplateOutput) | ({
1469
+ action_type?: 'failure_task';
1470
+ } & ActivityFailureActionTemplate) | ({
1471
+ action_type?: 'lock_consolidation_period';
1472
+ } & ActivityLockConsolidationRateActionTemplate) | ({
1473
+ action_type?: 'create_journal_entries_bulk';
1474
+ } & ActivityCreateJournalEntriesBulkActionTemplateOutput) | ({
1475
+ action_type?: 'match_resolution';
1476
+ } & ActivityMatchResolutionActionTemplate) | ({
1477
+ action_type?: 'reconciliation_submit';
1478
+ } & ActivityReconciliationSubmitActionTemplate)) | null;
1479
+ reconciliation_definition_params?: ({
1480
+ reconciliation_type?: 'account_reconciliation';
1481
+ } & ActivityAccountReconciliationParams) | null;
1482
+ trigger_id?: string | null;
1483
+ workflow_execution_id?: string | null;
1484
+ creator_task_id?: string | null;
1485
+ activity_definition: ActivityActivityDefinitionCreateWithType;
1486
+ action_type?: string | null;
1487
+ task_instances?: Array<ActivityBaseTaskInstanceWithAction>;
1488
+ creator: ActivityTaskCreator | null;
1489
+ };
1490
+ type ActivitySlimTaskInstanceWithAction = {
1491
+ last_manually_updated?: string | null;
1492
+ created_at?: string | null;
1493
+ last_modified_at?: string | null;
1494
+ id: string;
1495
+ name: string;
1496
+ due_date: string;
1497
+ preparer_due_date: string;
1498
+ status: ActivityTaskStatus;
1499
+ description?: string | null;
1500
+ task_definition_id: string;
1501
+ activity_instance_id: string;
1502
+ subsidiary_id: number;
1503
+ is_deleted?: boolean;
1504
+ preparer_id?: string | null;
1505
+ assignee_id?: string | null;
1506
+ reconciled?: boolean | null;
1507
+ creator?: ActivityTaskCreator | null;
1508
+ decline_reason?: string | null;
1509
+ trigger_execution_id?: string | null;
1510
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1511
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1512
+ is_currently_blocked?: boolean | null;
1513
+ is_blocking_manually_set?: boolean;
1514
+ task_type?: ActivityTaskType | null;
1515
+ attachments_count?: number;
1516
+ task_action?: ActivitySlimTaskAction | null;
1517
+ task_action_type?: string | null;
1518
+ is_manual_task?: boolean | null;
1519
+ activity_name?: string | null;
1520
+ period_display_id?: string | null;
1521
+ activity_definition_id?: string | null;
1522
+ };
1523
+ type ActivitySlimTaskInstanceWithActionAndEntities = {
1524
+ last_manually_updated?: string | null;
1525
+ created_at?: string | null;
1526
+ last_modified_at?: string | null;
1527
+ id: string;
1528
+ name: string;
1529
+ due_date: string;
1530
+ preparer_due_date: string;
1531
+ status: ActivityTaskStatus;
1532
+ description?: string | null;
1533
+ task_definition_id: string;
1534
+ activity_instance_id: string;
1535
+ subsidiary_id: number;
1536
+ is_deleted?: boolean;
1537
+ preparer_id?: string | null;
1538
+ assignee_id?: string | null;
1539
+ reconciled?: boolean | null;
1540
+ creator?: ActivityTaskCreator | null;
1541
+ decline_reason?: string | null;
1542
+ trigger_execution_id?: string | null;
1543
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1544
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1545
+ is_currently_blocked?: boolean | null;
1546
+ is_blocking_manually_set?: boolean;
1547
+ task_type?: ActivityTaskType | null;
1548
+ attachments_count?: number;
1549
+ task_action?: ActivitySlimTaskAction | null;
1550
+ task_action_type?: string | null;
1551
+ is_manual_task?: boolean | null;
1552
+ activity_name?: string | null;
1553
+ period_display_id?: string | null;
1554
+ activity_definition_id?: string | null;
1555
+ task_definition_entities?: Array<ActivityTaskEntityMapping> | null;
1556
+ };
1557
+ type ActivitySortableFieldsTask = 'due_date' | 'name' | 'subsidiary_id' | 'status' | 'preparer_id' | 'assignee_id' | 'activity_name' | 'closing_period';
1558
+ type ActivitySortingOrder = 'asc' | 'desc';
1559
+ type ActivitySubLedger = 'lease' | 'prepaid_expense';
1560
+ /**
1561
+ * Progress for a subsidiary within an activity.
1562
+ */
1563
+ type ActivitySubsidiaryProgress = {
1564
+ subsidiary_id: number;
1565
+ progress: ActivityTasksProgress;
1566
+ };
1567
+ type ActivityTAccountWithoutSubsidiaryMappingInput = {
1568
+ id: string;
1569
+ name: string;
1570
+ report_category?: ActivityAccountReportCategory | null;
1571
+ accounting_class: ActivityAccountingClass;
1572
+ account_type: ActivityAccountType;
1573
+ account_rate_type?: ActivityConsolidationExchangeRateType | null;
1574
+ account_number?: string | null;
1575
+ parent_account_id?: string | null;
1576
+ active?: boolean;
1577
+ summary?: boolean;
1578
+ read_only?: boolean;
1579
+ is_manually_created?: boolean;
1580
+ provider_id: string;
1581
+ subsidiary_id: number;
1582
+ currency?: ActivityCurrency;
1583
+ sourced_account_id?: string | null;
1584
+ account_balance?: ActivityBalanceInput;
1585
+ primary_balance?: ActivityBalanceInput;
1586
+ secondary_balance?: ActivityBalanceInput;
1587
+ cta_balance?: ActivityBalanceInput;
1588
+ credit_account_balance?: ActivityBalanceInput;
1589
+ debit_account_balance?: ActivityBalanceInput;
1590
+ credit_primary_balance?: ActivityBalanceInput;
1591
+ debit_primary_balance?: ActivityBalanceInput;
1592
+ credit_secondary_balance?: ActivityBalanceInput;
1593
+ debit_secondary_balance?: ActivityBalanceInput;
1594
+ credit_cta_balance?: ActivityBalanceInput;
1595
+ debit_cta_balance?: ActivityBalanceInput;
1596
+ tertiary_debit?: ActivityBalanceInput | null;
1597
+ tertiary_credit?: ActivityBalanceInput | null;
1598
+ create_time?: string;
1599
+ last_update_time?: string;
1600
+ description?: string | null;
1601
+ meta?: {
1602
+ [key: string]: unknown;
1603
+ } | null;
1604
+ nominal_account?: ActivityMappedNominalAccount | null;
1605
+ };
1606
+ type ActivityTAccountWithoutSubsidiaryMappingOutput = {
1607
+ id: string;
1608
+ name: string;
1609
+ report_category?: ActivityAccountReportCategory | null;
1610
+ accounting_class: ActivityAccountingClass;
1611
+ account_type: ActivityAccountType;
1612
+ account_rate_type?: ActivityConsolidationExchangeRateType | null;
1613
+ account_number?: string | null;
1614
+ parent_account_id?: string | null;
1615
+ active?: boolean;
1616
+ summary?: boolean;
1617
+ read_only?: boolean;
1618
+ is_manually_created?: boolean;
1619
+ provider_id: string;
1620
+ subsidiary_id: number;
1621
+ currency?: ActivityCurrency;
1622
+ sourced_account_id?: string | null;
1623
+ account_balance?: ActivityBalanceOutput;
1624
+ primary_balance?: ActivityBalanceOutput;
1625
+ secondary_balance?: ActivityBalanceOutput;
1626
+ cta_balance?: ActivityBalanceOutput;
1627
+ credit_account_balance?: ActivityBalanceOutput;
1628
+ debit_account_balance?: ActivityBalanceOutput;
1629
+ credit_primary_balance?: ActivityBalanceOutput;
1630
+ debit_primary_balance?: ActivityBalanceOutput;
1631
+ credit_secondary_balance?: ActivityBalanceOutput;
1632
+ debit_secondary_balance?: ActivityBalanceOutput;
1633
+ credit_cta_balance?: ActivityBalanceOutput;
1634
+ debit_cta_balance?: ActivityBalanceOutput;
1635
+ tertiary_debit?: ActivityBalanceOutput | null;
1636
+ tertiary_credit?: ActivityBalanceOutput | null;
1637
+ create_time?: string;
1638
+ last_update_time?: string;
1639
+ description?: string | null;
1640
+ meta?: {
1641
+ [key: string]: unknown;
1642
+ } | null;
1643
+ nominal_account?: ActivityMappedNominalAccount | null;
1644
+ };
1645
+ type ActivityTaskActionInput = {
1646
+ created_at?: string | null;
1647
+ last_modified_at?: string | null;
1648
+ id?: string;
1649
+ task_instance_id: string;
1650
+ status: ActivityTaskActionStatus;
1651
+ execution_start_time?: string | null;
1652
+ action_data: ({
1653
+ action_type?: 'create_journal_entry';
1654
+ } & ActivityCreateJournalEntryTaskActionDataInput) | ({
1655
+ action_type?: 'create_ict_elimination_entries';
1656
+ } & ActivityCreateIctEliminationTaskActionDataInput) | ({
1657
+ action_type?: 'test_action';
1658
+ } & ActivityTestActionData) | ({
1659
+ action_type?: 'create_bill';
1660
+ } & ActivityCreateBillTaskActionData) | ({
1661
+ action_type?: 'post_bill';
1662
+ } & ActivityPostBillTaskActionData) | ({
1663
+ action_type?: 'post_journal_entry';
1664
+ } & ActivityPostJournalEntryTaskActionDataInput) | ({
1665
+ action_type?: 'post_ict';
1666
+ } & ActivityPostIctTaskActionData) | ({
1667
+ action_type?: 'create_journal_entry_schedule';
1668
+ } & ActivityCreateJournalEntryTaskScheduleActionDataInput) | ({
1669
+ action_type?: 'failure_task';
1670
+ } & ActivityFailureTaskActionData) | ({
1671
+ action_type?: 'lock_consolidation_period';
1672
+ } & ActivityCreateLockPeriodTaskActionData) | ({
1673
+ action_type?: 'create_journal_entries_bulk';
1674
+ } & ActivityCreateJournalEntriesBulkTaskActionDataInput) | ({
1675
+ action_type?: 'match_resolution';
1676
+ } & ActivityMatchResolutionTaskActionData) | ({
1677
+ action_type?: 'reconciliation_submit';
1678
+ } & ActivityReconciliationSubmitTaskActionDataInput);
1679
+ original_action_data?: (({
1680
+ action_type?: 'create_journal_entry';
1681
+ } & ActivityCreateJournalEntryTaskActionDataInput) | ({
1682
+ action_type?: 'create_ict_elimination_entries';
1683
+ } & ActivityCreateIctEliminationTaskActionDataInput) | ({
1684
+ action_type?: 'test_action';
1685
+ } & ActivityTestActionData) | ({
1686
+ action_type?: 'create_bill';
1687
+ } & ActivityCreateBillTaskActionData) | ({
1688
+ action_type?: 'post_bill';
1689
+ } & ActivityPostBillTaskActionData) | ({
1690
+ action_type?: 'post_journal_entry';
1691
+ } & ActivityPostJournalEntryTaskActionDataInput) | ({
1692
+ action_type?: 'post_ict';
1693
+ } & ActivityPostIctTaskActionData) | ({
1694
+ action_type?: 'create_journal_entry_schedule';
1695
+ } & ActivityCreateJournalEntryTaskScheduleActionDataInput) | ({
1696
+ action_type?: 'failure_task';
1697
+ } & ActivityFailureTaskActionData) | ({
1698
+ action_type?: 'lock_consolidation_period';
1699
+ } & ActivityCreateLockPeriodTaskActionData) | ({
1700
+ action_type?: 'create_journal_entries_bulk';
1701
+ } & ActivityCreateJournalEntriesBulkTaskActionDataInput) | ({
1702
+ action_type?: 'match_resolution';
1703
+ } & ActivityMatchResolutionTaskActionData) | ({
1704
+ action_type?: 'reconciliation_submit';
1705
+ } & ActivityReconciliationSubmitTaskActionDataInput)) | null;
1706
+ execution_errors?: Array<ActivityTaskActionExecutionError> | null;
1707
+ };
1708
+ type ActivityTaskActionOutput = {
1709
+ created_at?: string | null;
1710
+ last_modified_at?: string | null;
1711
+ id?: string;
1712
+ task_instance_id: string;
1713
+ status: ActivityTaskActionStatus;
1714
+ execution_start_time?: string | null;
1715
+ action_data: ({
1716
+ action_type?: 'create_journal_entry';
1717
+ } & ActivityCreateJournalEntryTaskActionDataOutput) | ({
1718
+ action_type?: 'create_ict_elimination_entries';
1719
+ } & ActivityCreateIctEliminationTaskActionDataOutput) | ({
1720
+ action_type?: 'test_action';
1721
+ } & ActivityTestActionData) | ({
1722
+ action_type?: 'create_bill';
1723
+ } & ActivityCreateBillTaskActionData) | ({
1724
+ action_type?: 'post_bill';
1725
+ } & ActivityPostBillTaskActionData) | ({
1726
+ action_type?: 'post_journal_entry';
1727
+ } & ActivityPostJournalEntryTaskActionDataOutput) | ({
1728
+ action_type?: 'post_ict';
1729
+ } & ActivityPostIctTaskActionData) | ({
1730
+ action_type?: 'create_journal_entry_schedule';
1731
+ } & ActivityCreateJournalEntryTaskScheduleActionDataOutput) | ({
1732
+ action_type?: 'failure_task';
1733
+ } & ActivityFailureTaskActionData) | ({
1734
+ action_type?: 'lock_consolidation_period';
1735
+ } & ActivityCreateLockPeriodTaskActionData) | ({
1736
+ action_type?: 'create_journal_entries_bulk';
1737
+ } & ActivityCreateJournalEntriesBulkTaskActionDataOutput) | ({
1738
+ action_type?: 'match_resolution';
1739
+ } & ActivityMatchResolutionTaskActionData) | ({
1740
+ action_type?: 'reconciliation_submit';
1741
+ } & ActivityReconciliationSubmitTaskActionDataOutput);
1742
+ original_action_data?: (({
1743
+ action_type?: 'create_journal_entry';
1744
+ } & ActivityCreateJournalEntryTaskActionDataOutput) | ({
1745
+ action_type?: 'create_ict_elimination_entries';
1746
+ } & ActivityCreateIctEliminationTaskActionDataOutput) | ({
1747
+ action_type?: 'test_action';
1748
+ } & ActivityTestActionData) | ({
1749
+ action_type?: 'create_bill';
1750
+ } & ActivityCreateBillTaskActionData) | ({
1751
+ action_type?: 'post_bill';
1752
+ } & ActivityPostBillTaskActionData) | ({
1753
+ action_type?: 'post_journal_entry';
1754
+ } & ActivityPostJournalEntryTaskActionDataOutput) | ({
1755
+ action_type?: 'post_ict';
1756
+ } & ActivityPostIctTaskActionData) | ({
1757
+ action_type?: 'create_journal_entry_schedule';
1758
+ } & ActivityCreateJournalEntryTaskScheduleActionDataOutput) | ({
1759
+ action_type?: 'failure_task';
1760
+ } & ActivityFailureTaskActionData) | ({
1761
+ action_type?: 'lock_consolidation_period';
1762
+ } & ActivityCreateLockPeriodTaskActionData) | ({
1763
+ action_type?: 'create_journal_entries_bulk';
1764
+ } & ActivityCreateJournalEntriesBulkTaskActionDataOutput) | ({
1765
+ action_type?: 'match_resolution';
1766
+ } & ActivityMatchResolutionTaskActionData) | ({
1767
+ action_type?: 'reconciliation_submit';
1768
+ } & ActivityReconciliationSubmitTaskActionDataOutput)) | null;
1769
+ execution_errors?: Array<ActivityTaskActionExecutionError> | null;
1770
+ };
1771
+ type ActivityTaskActionExecutionError = {
1772
+ error_type: ActivityTaskActionExecutionErrorType;
1773
+ error_message: string;
1774
+ error_summary?: string | null;
1775
+ error_time?: string;
1776
+ required_action?: string | null;
1777
+ subsidiary_id?: number | null;
1778
+ };
1779
+ type ActivityTaskActionExecutionErrorType = 'Server Error' | 'Provider Validation Error' | 'Provider Connection Error' | 'Provider Authentication Error';
1780
+ type ActivityTaskActionStatus = 'DONE' | 'PENDING' | 'CANCELLED' | 'FAILED' | 'IN_PROGRESS' | 'RESETTING';
1781
+ /**
1782
+ * Represents a blocking relationship for a definition or instance.
1783
+ */
1784
+ type ActivityTaskBlocking = {
1785
+ id: string;
1786
+ scope: ActivityBlockingScope;
1787
+ };
1788
+ type ActivityTaskCreator = {
1789
+ type?: ActivityTaskCreatorType | null;
1790
+ entity_type?: ActivityTaskEntityType | null;
1791
+ id?: string | null;
1792
+ };
1793
+ type ActivityTaskCreatorType = 'user' | 'trigger' | 'workflow_execution' | 'task' | 'entity';
1794
+ type ActivityTaskDefinition = {
1795
+ name: string;
1796
+ due_date: ActivityTaskDueDate;
1797
+ preparer_due_date?: ActivityDueDate | null;
1798
+ description?: string | null;
1799
+ /**
1800
+ * User ID of the person responsible for preparing this task.
1801
+ */
1802
+ preparer_id?: string | null;
1803
+ /**
1804
+ * User ID of the person assigned to complete this task. Note: task definitions use preparer_id/assignee_id for assignment; reviewer_id is set at the activity definition level, not on task definitions.
1805
+ */
1806
+ assignee_id?: string | null;
1807
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1808
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1809
+ end_date?: string | null;
1810
+ task_type?: ActivityTaskType | null;
1811
+ created_at?: string | null;
1812
+ last_modified_at?: string | null;
1813
+ is_deleted?: boolean;
1814
+ activity_definition_id: string;
1815
+ start_date: string;
1816
+ subsidiary_ids: Array<number>;
1817
+ activity_instance_id?: string | null;
1818
+ recurring: boolean;
1819
+ id?: string;
1820
+ creator_user_id?: string | null;
1821
+ is_manual_task?: boolean;
1822
+ entities?: Array<ActivityTaskEntityMapping>;
1823
+ action_template?: (({
1824
+ action_type?: 'create_journal_entry';
1825
+ } & ActivityCreateJournalEntryActionTemplateOutput) | ({
1826
+ action_type?: 'create_ict_elimination_entries';
1827
+ } & ActivityCreateIctEliminationActionTemplateOutput) | ({
1828
+ action_type?: 'post_ict';
1829
+ } & ActivityPostIctActionTemplate) | ({
1830
+ action_type?: 'test_action';
1831
+ } & ActivityTestActionTemplate) | ({
1832
+ action_type?: 'test_schedule_action';
1833
+ } & ActivityTestScheduleActionTemplate) | ({
1834
+ action_type?: 'lease_payment';
1835
+ } & ActivityLeasePaymentScheduleActionTemplate) | ({
1836
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1837
+ } & ActivityLeaseAmortizationScheduleActionTemplateOutput) | ({
1838
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1839
+ } & ActivityLeaseAmortizationOpeningBalanceActionTemplateOutput) | ({
1840
+ action_type?: 'lease_term_reminder';
1841
+ } & ActivityLeaseTermReminderActionTemplate) | ({
1842
+ action_type?: 'create_journal_entry_schedule';
1843
+ } & ActivityCreateJournalEntryScheduleActionTemplateOutput) | ({
1844
+ action_type?: 'create_journal_entries';
1845
+ } & ActivityCreateJournalEntriesActionTemplateOutput) | ({
1846
+ action_type?: 'failure_task';
1847
+ } & ActivityFailureActionTemplate) | ({
1848
+ action_type?: 'lock_consolidation_period';
1849
+ } & ActivityLockConsolidationRateActionTemplate) | ({
1850
+ action_type?: 'create_journal_entries_bulk';
1851
+ } & ActivityCreateJournalEntriesBulkActionTemplateOutput) | ({
1852
+ action_type?: 'match_resolution';
1853
+ } & ActivityMatchResolutionActionTemplate) | ({
1854
+ action_type?: 'reconciliation_submit';
1855
+ } & ActivityReconciliationSubmitActionTemplate)) | null;
1856
+ reconciliation_definition_params?: ({
1857
+ reconciliation_type?: 'account_reconciliation';
1858
+ } & ActivityAccountReconciliationParams) | null;
1859
+ trigger_id?: string | null;
1860
+ workflow_execution_id?: string | null;
1861
+ creator_task_id?: string | null;
1862
+ activity_definition: ActivityActivityDefinitionCreateWithType;
1863
+ action_type?: string | null;
1864
+ creator: ActivityTaskCreator | null;
1865
+ };
1866
+ type ActivityTaskDefinitionUpdate = {
1867
+ name: string;
1868
+ due_date: ActivityTaskDueDate;
1869
+ preparer_due_date?: ActivityDueDate | null;
1870
+ description?: string | null;
1871
+ /**
1872
+ * User ID of the person responsible for preparing this task.
1873
+ */
1874
+ preparer_id?: string | null;
1875
+ /**
1876
+ * User ID of the person assigned to complete this task. Note: task definitions use preparer_id/assignee_id for assignment; reviewer_id is set at the activity definition level, not on task definitions.
1877
+ */
1878
+ assignee_id?: string | null;
1879
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1880
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1881
+ end_date?: string | null;
1882
+ task_type?: ActivityTaskType | null;
1883
+ created_at?: string | null;
1884
+ last_modified_at?: string | null;
1885
+ is_deleted?: boolean;
1886
+ activity_definition_id: string;
1887
+ start_date: string;
1888
+ subsidiary_ids: Array<number>;
1889
+ activity_instance_id?: string | null;
1890
+ recurring: boolean;
1891
+ };
1892
+ type ActivityTaskDefinitionWithActionCreateApi = {
1893
+ name: string;
1894
+ due_date: ActivityTaskDueDate;
1895
+ preparer_due_date?: ActivityDueDate | null;
1896
+ description?: string | null;
1897
+ /**
1898
+ * User ID of the person responsible for preparing this task.
1899
+ */
1900
+ preparer_id?: string | null;
1901
+ /**
1902
+ * User ID of the person assigned to complete this task. Note: task definitions use preparer_id/assignee_id for assignment; reviewer_id is set at the activity definition level, not on task definitions.
1903
+ */
1904
+ assignee_id?: string | null;
1905
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1906
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1907
+ end_date?: string | null;
1908
+ task_type?: ActivityTaskType | null;
1909
+ created_at?: string | null;
1910
+ last_modified_at?: string | null;
1911
+ is_deleted?: boolean;
1912
+ activity_definition_id: string;
1913
+ start_date: string;
1914
+ subsidiary_ids: Array<number>;
1915
+ activity_instance_id?: string | null;
1916
+ recurring: boolean;
1917
+ id?: string;
1918
+ creator_user_id?: string | null;
1919
+ is_manual_task?: boolean;
1920
+ entities?: Array<ActivityTaskEntityMappingCreate>;
1921
+ action_template?: (({
1922
+ action_type?: 'create_journal_entry';
1923
+ } & ActivityCreateJournalEntryActionTemplateInput) | ({
1924
+ action_type?: 'create_ict_elimination_entries';
1925
+ } & ActivityCreateIctEliminationActionTemplateInput) | ({
1926
+ action_type?: 'post_ict';
1927
+ } & ActivityPostIctActionTemplate) | ({
1928
+ action_type?: 'test_action';
1929
+ } & ActivityTestActionTemplate) | ({
1930
+ action_type?: 'test_schedule_action';
1931
+ } & ActivityTestScheduleActionTemplate) | ({
1932
+ action_type?: 'lease_payment';
1933
+ } & ActivityLeasePaymentScheduleActionTemplate) | ({
1934
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1935
+ } & ActivityLeaseAmortizationScheduleActionTemplateInput) | ({
1936
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1937
+ } & ActivityLeaseAmortizationOpeningBalanceActionTemplateInput) | ({
1938
+ action_type?: 'lease_term_reminder';
1939
+ } & ActivityLeaseTermReminderActionTemplate) | ({
1940
+ action_type?: 'create_journal_entry_schedule';
1941
+ } & ActivityCreateJournalEntryScheduleActionTemplateInput) | ({
1942
+ action_type?: 'create_journal_entries';
1943
+ } & ActivityCreateJournalEntriesActionTemplateInput) | ({
1944
+ action_type?: 'failure_task';
1945
+ } & ActivityFailureActionTemplate) | ({
1946
+ action_type?: 'lock_consolidation_period';
1947
+ } & ActivityLockConsolidationRateActionTemplate) | ({
1948
+ action_type?: 'create_journal_entries_bulk';
1949
+ } & ActivityCreateJournalEntriesBulkActionTemplateInput) | ({
1950
+ action_type?: 'match_resolution';
1951
+ } & ActivityMatchResolutionActionTemplate) | ({
1952
+ action_type?: 'reconciliation_submit';
1953
+ } & ActivityReconciliationSubmitActionTemplate)) | null;
1954
+ reconciliation_definition_params?: ({
1955
+ reconciliation_type?: 'account_reconciliation';
1956
+ } & ActivityAccountReconciliationParams) | null;
1957
+ };
1958
+ type ActivityTaskDefinitionWithInstances = {
1959
+ name: string;
1960
+ due_date: ActivityTaskDueDate;
1961
+ preparer_due_date?: ActivityDueDate | null;
1962
+ description?: string | null;
1963
+ /**
1964
+ * User ID of the person responsible for preparing this task.
1965
+ */
1966
+ preparer_id?: string | null;
1967
+ /**
1968
+ * User ID of the person assigned to complete this task. Note: task definitions use preparer_id/assignee_id for assignment; reviewer_id is set at the activity definition level, not on task definitions.
1969
+ */
1970
+ assignee_id?: string | null;
1971
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1972
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1973
+ end_date?: string | null;
1974
+ task_type?: ActivityTaskType | null;
1975
+ created_at?: string | null;
1976
+ last_modified_at?: string | null;
1977
+ is_deleted?: boolean;
1978
+ activity_definition_id: string;
1979
+ start_date: string;
1980
+ subsidiary_ids: Array<number>;
1981
+ activity_instance_id?: string | null;
1982
+ recurring: boolean;
1983
+ id?: string;
1984
+ creator_user_id?: string | null;
1985
+ is_manual_task?: boolean;
1986
+ entities?: Array<ActivityTaskEntityMapping>;
1987
+ action_template?: (({
1988
+ action_type?: 'create_journal_entry';
1989
+ } & ActivityCreateJournalEntryActionTemplateOutput) | ({
1990
+ action_type?: 'create_ict_elimination_entries';
1991
+ } & ActivityCreateIctEliminationActionTemplateOutput) | ({
1992
+ action_type?: 'post_ict';
1993
+ } & ActivityPostIctActionTemplate) | ({
1994
+ action_type?: 'test_action';
1995
+ } & ActivityTestActionTemplate) | ({
1996
+ action_type?: 'test_schedule_action';
1997
+ } & ActivityTestScheduleActionTemplate) | ({
1998
+ action_type?: 'lease_payment';
1999
+ } & ActivityLeasePaymentScheduleActionTemplate) | ({
2000
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
2001
+ } & ActivityLeaseAmortizationScheduleActionTemplateOutput) | ({
2002
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
2003
+ } & ActivityLeaseAmortizationOpeningBalanceActionTemplateOutput) | ({
2004
+ action_type?: 'lease_term_reminder';
2005
+ } & ActivityLeaseTermReminderActionTemplate) | ({
2006
+ action_type?: 'create_journal_entry_schedule';
2007
+ } & ActivityCreateJournalEntryScheduleActionTemplateOutput) | ({
2008
+ action_type?: 'create_journal_entries';
2009
+ } & ActivityCreateJournalEntriesActionTemplateOutput) | ({
2010
+ action_type?: 'failure_task';
2011
+ } & ActivityFailureActionTemplate) | ({
2012
+ action_type?: 'lock_consolidation_period';
2013
+ } & ActivityLockConsolidationRateActionTemplate) | ({
2014
+ action_type?: 'create_journal_entries_bulk';
2015
+ } & ActivityCreateJournalEntriesBulkActionTemplateOutput) | ({
2016
+ action_type?: 'match_resolution';
2017
+ } & ActivityMatchResolutionActionTemplate) | ({
2018
+ action_type?: 'reconciliation_submit';
2019
+ } & ActivityReconciliationSubmitActionTemplate)) | null;
2020
+ reconciliation_definition_params?: ({
2021
+ reconciliation_type?: 'account_reconciliation';
2022
+ } & ActivityAccountReconciliationParams) | null;
2023
+ trigger_id?: string | null;
2024
+ workflow_execution_id?: string | null;
2025
+ creator_task_id?: string | null;
2026
+ activity_definition: ActivityActivityDefinitionCreateWithType;
2027
+ action_type?: string | null;
2028
+ task_instances?: Array<ActivityTaskInstanceWithAction>;
2029
+ creator: ActivityTaskCreator | null;
2030
+ };
2031
+ /**
2032
+ * Task-specific DueDate that carries an optional preparer/reviewer offset.
2033
+ *
2034
+ * Stored in task_definition.due_date JSONB. Not added to the shared libcommon
2035
+ * DueDate. No min/max on offset: range is enforced in the FE so the BE can stay
2036
+ * reusable if product changes the bounds (0 means preparer == reviewer).
2037
+ */
2038
+ type ActivityTaskDueDate = {
2039
+ from_start: boolean;
2040
+ days_delta: number;
2041
+ is_forward: boolean;
2042
+ delta_unit?: ActivityDeltaUnit;
2043
+ is_specific_day?: boolean;
2044
+ should_skip_holidays?: boolean;
2045
+ offset?: number | null;
2046
+ };
2047
+ /**
2048
+ * Model representing an entity mapping for a task definition.
2049
+ */
2050
+ type ActivityTaskEntityMapping = {
2051
+ entity_id: string;
2052
+ entity_type: ActivityTaskEntityType;
2053
+ task_definition_id: string;
2054
+ };
2055
+ /**
2056
+ * Model representing an entity mapping for a task definition.
2057
+ */
2058
+ type ActivityTaskEntityMappingCreate = {
2059
+ entity_id: string;
2060
+ entity_type: ActivityTaskEntityType;
2061
+ };
2062
+ type ActivityTaskEntityType = 'lease' | 'transaction' | 'clearing_group' | 'journal_entry' | 'invoice' | 'workflow_output' | 'attachment' | 'match' | 'reconciliation';
2063
+ type ActivityTaskInstancePaginationOutput = {
2064
+ results?: Array<ActivityTaskInstanceWithActivity | ActivitySlimTaskInstanceWithActionAndEntities | ActivitySlimTaskInstanceWithAction>;
2065
+ pagination?: ActivityPaginationOutput | null;
2066
+ };
2067
+ type ActivityTaskInstanceSearch = {
2068
+ q?: string | null;
2069
+ };
2070
+ type ActivityTaskInstanceUpdate = {
2071
+ name?: string | null;
2072
+ description?: string | null;
2073
+ due_date?: string | null;
2074
+ assignee_id?: string | null;
2075
+ preparer_id?: string | null;
2076
+ /**
2077
+ * Not supported for task instances — task instances use preparer_id/assignee_id only. reviewer_id is set at the activity definition level, not on tasks.
2078
+ */
2079
+ reviewer_id?: string | null;
2080
+ status?: ActivityTaskStatus | null;
2081
+ preparer_due_date?: string | null;
2082
+ trigger_execution_id?: string | null;
2083
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2084
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2085
+ };
2086
+ /**
2087
+ * Clears the task action from a task instance.
2088
+ *
2089
+ * Send {"task_action": null} in the PUT body to hard-delete the existing
2090
+ * StoredTaskAction row. Sending {} (no key) maps to plain TaskInstanceUpdate
2091
+ * and leaves any existing task action untouched.
2092
+ */
2093
+ type ActivityTaskInstanceUpdateClearAction = {
2094
+ name?: string | null;
2095
+ description?: string | null;
2096
+ due_date?: string | null;
2097
+ assignee_id?: string | null;
2098
+ preparer_id?: string | null;
2099
+ /**
2100
+ * Not supported for task instances — task instances use preparer_id/assignee_id only. reviewer_id is set at the activity definition level, not on tasks.
2101
+ */
2102
+ reviewer_id?: string | null;
2103
+ status?: ActivityTaskStatus | null;
2104
+ preparer_due_date?: string | null;
2105
+ trigger_execution_id?: string | null;
2106
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2107
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2108
+ task_action: null;
2109
+ };
2110
+ type ActivityTaskInstanceUpdateWithAction = {
2111
+ name?: string | null;
2112
+ description?: string | null;
2113
+ due_date?: string | null;
2114
+ assignee_id?: string | null;
2115
+ preparer_id?: string | null;
2116
+ /**
2117
+ * Not supported for task instances — task instances use preparer_id/assignee_id only. reviewer_id is set at the activity definition level, not on tasks.
2118
+ */
2119
+ reviewer_id?: string | null;
2120
+ status?: ActivityTaskStatus | null;
2121
+ preparer_due_date?: string | null;
2122
+ trigger_execution_id?: string | null;
2123
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2124
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2125
+ task_action: ActivityTaskActionInput;
2126
+ };
2127
+ type ActivityTaskInstanceWithAction = {
2128
+ last_manually_updated?: string | null;
2129
+ created_at?: string | null;
2130
+ last_modified_at?: string | null;
2131
+ id: string;
2132
+ name: string;
2133
+ due_date: string;
2134
+ preparer_due_date: string;
2135
+ status: ActivityTaskStatus;
2136
+ description?: string | null;
2137
+ task_definition_id: string;
2138
+ activity_instance_id: string;
2139
+ subsidiary_id: number;
2140
+ is_deleted?: boolean;
2141
+ preparer_id?: string | null;
2142
+ assignee_id?: string | null;
2143
+ reconciled?: boolean | null;
2144
+ creator?: ActivityTaskCreator | null;
2145
+ decline_reason?: string | null;
2146
+ trigger_execution_id?: string | null;
2147
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2148
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2149
+ is_currently_blocked?: boolean | null;
2150
+ is_blocking_manually_set?: boolean;
2151
+ task_type?: ActivityTaskType | null;
2152
+ attachments_count?: number;
2153
+ task_action?: ActivityTaskActionOutput | null;
2154
+ task_action_type?: string | null;
2155
+ is_manual_task?: boolean | null;
2156
+ activity_name?: string | null;
2157
+ period_display_id?: string | null;
2158
+ activity_definition_id?: string | null;
2159
+ task_action_execution_errors?: Array<ActivityTaskActionExecutionError> | null;
2160
+ };
2161
+ type ActivityTaskInstanceWithActivity = {
2162
+ last_manually_updated?: string | null;
2163
+ created_at?: string | null;
2164
+ last_modified_at?: string | null;
2165
+ id: string;
2166
+ name: string;
2167
+ due_date: string;
2168
+ preparer_due_date: string;
2169
+ status: ActivityTaskStatus;
2170
+ description?: string | null;
2171
+ task_definition_id: string;
2172
+ activity_instance_id: string;
2173
+ subsidiary_id: number;
2174
+ is_deleted?: boolean;
2175
+ preparer_id?: string | null;
2176
+ assignee_id?: string | null;
2177
+ reconciled?: boolean | null;
2178
+ creator?: ActivityTaskCreator | null;
2179
+ decline_reason?: string | null;
2180
+ trigger_execution_id?: string | null;
2181
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2182
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2183
+ is_currently_blocked?: boolean | null;
2184
+ is_blocking_manually_set?: boolean;
2185
+ task_type?: ActivityTaskType | null;
2186
+ attachments_count?: number;
2187
+ task_action?: ActivityTaskActionOutput | null;
2188
+ task_action_type?: string | null;
2189
+ is_manual_task?: boolean | null;
2190
+ activity_name?: string | null;
2191
+ period_display_id?: string | null;
2192
+ activity_definition_id?: string | null;
2193
+ task_action_execution_errors?: Array<ActivityTaskActionExecutionError> | null;
2194
+ activity_instance: ActivityActivityInstance;
2195
+ };
2196
+ type ActivityTaskStatus = 'DONE' | 'PENDING' | 'IN_REVIEW' | 'IN_PROGRESS' | 'CANCELLED' | 'FAILED' | 'DRAFT';
2197
+ /**
2198
+ * The type of the task definition
2199
+ */
2200
+ type ActivityTaskType = 'RECONCILIATION';
2201
+ type ActivityTasksProgress = {
2202
+ done?: number;
2203
+ review?: number;
2204
+ pending?: number;
2205
+ declined?: number;
2206
+ total?: number;
2207
+ };
2208
+ type ActivityTestActionData = {
2209
+ action_type?: 'test_action';
2210
+ name: string;
2211
+ };
2212
+ type ActivityTestActionTemplate = {
2213
+ action_type?: 'test_action';
2214
+ name: string;
2215
+ };
2216
+ type ActivityTestScheduleActionTemplate = {
2217
+ action_type?: 'test_schedule_action';
2218
+ name: string;
2219
+ };
2220
+ type ActivityTimeframe = {
2221
+ tf_type?: ActivityTimeframeType;
2222
+ offset?: number;
2223
+ periods?: number;
2224
+ unit?: ActivityTimeframeUnit;
2225
+ from_date?: string | null;
2226
+ to_date?: string | null;
2227
+ };
2228
+ type ActivityTimeframeType = 'all' | 'custom' | 'full_periods' | 'last_periods' | 'ytd';
2229
+ type ActivityTimeframeUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
2230
+ type ActivityWriteBackStatusInput = {
2231
+ id: string;
2232
+ transaction_id: string;
2233
+ journal_entry_id: string;
2234
+ status: ActivityJeWriteBackStatus;
2235
+ provider_uid?: string | null;
2236
+ error_message?: string | null;
2237
+ error_type?: ActivityProviderOperationErrorType | null;
2238
+ last_modified_time?: string | null;
2239
+ };
2240
+ type ActivityWriteBackStatusOutput = {
2241
+ id: string;
2242
+ transaction_id: string;
2243
+ journal_entry_id: string;
2244
+ status: ActivityJeWriteBackStatus;
2245
+ provider_uid?: string | null;
2246
+ error_message?: string | null;
2247
+ error_type?: ActivityProviderOperationErrorType | null;
2248
+ last_modified_time?: string | null;
2249
+ readonly display_error_message: string;
2250
+ };
2251
+ type AuditTrailAuditTrailEvent = {
2252
+ id: string;
2253
+ time: string;
2254
+ action: string;
2255
+ actor: AuditTrailAuditTrailEventActor;
2256
+ subsidiary_id: number;
2257
+ target: AuditTrailEntityRef;
2258
+ additional_data?: {
2259
+ [key: string]: unknown;
2260
+ } | null;
2261
+ old_value?: {
2262
+ [key: string]: unknown;
2263
+ } | null;
2264
+ new_value?: {
2265
+ [key: string]: unknown;
2266
+ } | null;
2267
+ message: string;
2268
+ };
2269
+ type AuditTrailAuditTrailEventActor = {
2270
+ entity_id: string | null;
2271
+ entity_type: AuditTrailEventActorType;
2272
+ entity_name?: string | null;
2273
+ [key: string]: unknown | (string | null) | AuditTrailEventActorType | (string | null) | undefined;
2274
+ };
2275
+ type AuditTrailEntityRef = {
2276
+ entity_id: string;
2277
+ entity_type: AuditTrailEntityType;
2278
+ entity_name?: string | null;
2279
+ [key: string]: unknown | string | AuditTrailEntityType | (string | null) | undefined;
2280
+ };
2281
+ type AuditTrailEntityType = 'TENANT' | 'SUBSIDIARY' | 'LEASE' | 'ACTIVITY_DEFINITION' | 'ACTIVITY_INSTANCE' | 'PERIOD_INSTANCE' | 'TASK_DEFINITION' | 'TASK_INSTANCE' | 'TRIGGER' | 'USER' | 'JOURNAL_ENTRY' | 'ACCOUNT' | 'BILL' | 'ICT';
2282
+ type AuditTrailEventActorType = 'USER' | 'TRIGGER' | 'WORKFLOW' | 'SYSTEM';
2283
+ type AuditTrailGetEntityAuditTrailArgs = {
2284
+ target_id: string;
2285
+ target_type: AuditTrailEntityType;
2286
+ include_before?: boolean;
2287
+ include_after?: boolean;
2288
+ };
2289
+ /**
2290
+ * Fiscal calendar domain model with audit timestamps
2291
+ *
2292
+ * Inherits core fields from `FiscalCalendarCreate` and is used as the
2293
+ * persisted/read model across services.
2294
+ */
2295
+ type PeriodManagerFiscalCalendar = {
2296
+ created_at?: string | null;
2297
+ last_modified_at?: string | null;
2298
+ id: string;
2299
+ name: string;
2300
+ start_month: number;
2301
+ subsidiary_id: number;
2302
+ config?: PeriodManagerFiscalCalendarConfig | null;
2303
+ };
2304
+ /**
2305
+ * Configuration options for a fiscal calendar.
2306
+ *
2307
+ * :param shift_backwards: If False (default), the fiscal year name uses the
2308
+ * year from the start date (e.g., 2025-07-01 to 2026-06-30 -> FY 2025).
2309
+ * If True, uses the year from the end date (e.g., FY 2026).
2310
+ * :param force_p_naming: If True, use P01, P02, etc. naming for periods
2311
+ * even for standard January-December calendars.
2312
+ */
2313
+ type PeriodManagerFiscalCalendarConfig = {
2314
+ shift_backwards?: boolean;
2315
+ force_p_naming?: boolean;
2316
+ };
2317
+ type TenancyCurrency = 'United States Dollar' | 'Euro' | 'British Pound Sterling' | 'Indian Rupee' | 'Australian Dollar' | 'Canadian Dollar' | 'New Israeli Shekel' | 'Japanese Yen' | 'Sri Lankan Rupee' | 'New Zealand Dollar' | 'Swedish Krona' | 'South African Rand' | 'Singapore Dollar' | 'Indonesian Rupiah' | 'Danish Krone' | 'Hong Kong Dollar' | 'United Arab Emirates Dirham' | 'Argentine Peso' | 'Brazilian Real' | 'Bulgarian Lev' | 'Chinese Yuan' | 'Colombian Peso' | 'Czech Koruna' | 'Malaysian Ringgit' | 'Mexican Peso' | 'Myanmar Kyat' | 'New Taiwan Dollar' | 'Norwegian Krone' | 'Omani Rial' | 'Philippine Peso' | 'Polish Zloty' | 'Romanian Leu' | 'Swiss Franc' | 'Turkish Lira' | 'Serbian Dinar' | 'Hungarian Forint' | 'South Korean Won' | 'Armenian Dram' | 'Azerbaijani Manat' | 'Bahraini Dinar' | 'Chilean Peso' | 'Fijian Dollar' | 'Georgian Lari' | 'Guatemalan Quetzal' | 'Croatian Kuna' | 'Icelandic Krona' | 'Jordanian Dinar' | 'Kyrgyzstani Som' | 'Kuwaiti Dinar' | 'Kazakhstani Tenge' | 'Moroccan Dirham' | 'Papua New Guinean Kina' | 'Qatari Rial' | 'Russian Ruble' | 'Saudi Riyal' | 'Thai Baht' | 'Somali Shilling' | 'Tunisian Dinar' | 'Ukrainian Hryvnia' | 'Uzbekistani Som' | 'Vietnamese Dong' | 'Central African CFA Franc' | 'Afghani' | 'Lek' | 'Kwanza' | 'Aruban Florin' | 'Convertible Mark' | 'Barbados Dollar' | 'Taka' | 'Burundi Franc' | 'Bermudian Dollar' | 'Brunei Dollar' | 'Boliviano' | 'Mvdol' | 'Bahamian Dollar' | 'Ngultrum' | 'Pula' | 'Belarusian Ruble' | 'Belize Dollar' | 'Congolese Franc' | 'WIR Euro' | 'WIR Franc' | 'Unidad de Fomento' | 'Unidad de Valor Real' | 'Costa Rican Colon' | 'Cuban Peso' | 'Cabo Verde Escudo' | 'Djibouti Franc' | 'Dominican Peso' | 'Algerian Dinar' | 'Egyptian Pound' | 'Nakfa' | 'Ethiopian Birr' | 'Falkland Islands Pound' | 'Ghana Cedi' | 'Gibraltar Pound' | 'Dalasi' | 'Guinean Franc' | 'Guyana Dollar' | 'Lempira' | 'Gourde' | 'Iraqi Dinar' | 'Iranian Rial' | 'Jamaican Dollar' | 'Kenyan Shilling' | 'Riel' | 'Comorian Franc' | 'North Korean Won' | 'Cayman Islands Dollar' | 'Lao Kip' | 'Lebanese Pound' | 'Liberian Dollar' | 'Loti' | 'Libyan Dinar' | 'Moldovan Leu' | 'Malagasy Ariary' | 'Denar' | 'Tugrik' | 'Pataca' | 'Ouguiya' | 'Mauritius Rupee' | 'Rufiyaa' | 'Malawi Kwacha' | 'Mexican Unidad de Inversion (UDI)' | 'Mozambique Metical' | 'Namibia Dollar' | 'Naira' | 'Cordoba Oro' | 'Nepalese Rupee' | 'Balboa' | 'Sol' | 'Pakistan Rupee' | 'Guarani' | 'Rwanda Franc' | 'Solomon Islands Dollar' | 'Seychelles Rupee' | 'Sudanese Pound' | 'Saint Helena Pound' | 'Leone' | 'Surinam Dollar' | 'South Sudanese Pound' | 'Dobra' | 'El Salvador Colon' | 'Syrian Pound' | 'Lilangeni' | 'Somoni' | 'Turkmenistan New Manat' | "Pa'anga" | 'Trinidad and Tobago Dollar' | 'Tanzanian Shilling' | 'Uganda Shilling' | 'US Dollar (Next day)' | 'Uruguay Peso en Unidades Indexadas (UI)' | 'Peso Uruguayo' | 'Unidad Previsional' | 'Bolivar Digital' | 'Bolivar Soberano' | 'Vatu' | 'Tala' | 'Arab Accounting Dinar' | 'Silver' | 'Gold' | 'Bond Markets Unit European Composite Unit (EURCO)' | 'Bond Markets Unit European Monetary Unit (E.M.U.-6)' | 'Bond Markets Unit European Unit of Account 9 (E.U.A.-9)' | 'Bond Markets Unit European Unit of Account 17 (E.U.A.-17)' | 'East Caribbean Dollar' | 'Caribbean Guilder' | 'SDR (Special Drawing Right)' | 'CFA Franc BCEAO' | 'Palladium' | 'CFP Franc' | 'Platinum' | 'Sucre' | 'Codes specifically reserved for testing purposes' | 'ADB Unit of Account' | 'The codes assigned for transactions where no currency is involved' | 'Yemeni Rial' | 'Zambian Kwacha' | 'Zimbabwe Gold';
2318
+ type TenancySubsidiary = {
2319
+ company_name: string;
2320
+ legal_name: string;
2321
+ description?: string | null;
2322
+ created_time?: string | null;
2323
+ modified_time?: string | null;
2324
+ fully_synced?: boolean;
2325
+ is_active?: boolean;
2326
+ business_summary?: string | null;
2327
+ id?: number | null;
2328
+ default_currency: TenancyCurrency;
2329
+ tenant_id: string;
2330
+ parent_company_id?: number | null;
2331
+ provider_id?: number | null;
2332
+ children?: Array<TenancySubsidiaryCreate>;
2333
+ is_elimination_subsidiary?: boolean | null;
2334
+ is_organization_top?: boolean | null;
2335
+ organization_id?: number | null;
2336
+ provider_uid?: string | null;
2337
+ parent_company?: TenancySubsidiary | null;
2338
+ attachments?: Array<TenancySubsidiaryAttachment>;
2339
+ };
2340
+ type TenancySubsidiaryApiResponse = {
2341
+ company_name: string;
2342
+ legal_name: string;
2343
+ description?: string | null;
2344
+ created_time?: string | null;
2345
+ modified_time?: string | null;
2346
+ fully_synced?: boolean;
2347
+ is_active?: boolean;
2348
+ business_summary?: string | null;
2349
+ id?: number | null;
2350
+ default_currency: TenancyCurrency;
2351
+ tenant_id: string;
2352
+ parent_company_id?: number | null;
2353
+ provider_id?: number | null;
2354
+ children?: Array<TenancySubsidiaryCreate>;
2355
+ is_elimination_subsidiary?: boolean | null;
2356
+ is_organization_top?: boolean | null;
2357
+ organization_id?: number | null;
2358
+ provider_uid?: string | null;
2359
+ parent_company?: TenancySubsidiary | null;
2360
+ attachments?: Array<TenancySubsidiaryAttachment>;
2361
+ is_organization?: boolean;
2362
+ is_parent_subsidiary?: boolean;
2363
+ is_nominal_subsidiary?: boolean;
2364
+ };
2365
+ type TenancySubsidiaryAttachment = {
2366
+ attachment_id: string;
2367
+ attachment_type: TenancySubsidiaryAttachmentType;
2368
+ attachment_date?: string;
2369
+ processing_status?: TenancySubsidiaryAttachmentProcessingStatus;
2370
+ error_message?: string | null;
2371
+ should_use_top_coa?: boolean;
2372
+ created_time?: string | null;
2373
+ };
2374
+ type TenancySubsidiaryAttachmentProcessingStatus = 'PENDING' | 'ACTIVE' | 'FAILED';
2375
+ type TenancySubsidiaryAttachmentType = 'BVA';
2376
+ type TenancySubsidiaryCreate = {
2377
+ company_name: string;
2378
+ legal_name: string;
2379
+ description?: string | null;
2380
+ created_time?: string | null;
2381
+ modified_time?: string | null;
2382
+ fully_synced?: boolean;
2383
+ is_active?: boolean;
2384
+ business_summary?: string | null;
2385
+ id?: number | null;
2386
+ default_currency: TenancyCurrency;
2387
+ tenant_id: string;
2388
+ parent_company_id?: number | null;
2389
+ provider_id?: number | null;
2390
+ children?: Array<TenancySubsidiaryCreate>;
2391
+ is_elimination_subsidiary?: boolean | null;
2392
+ is_organization_top?: boolean | null;
2393
+ organization_id?: number | null;
2394
+ provider_uid?: string | null;
2395
+ };
2396
+ type TenancyUser = {
2397
+ id?: string;
2398
+ email?: string;
2399
+ name?: string;
2400
+ status?: TenancyUserStatus;
2401
+ picture?: string;
2402
+ custom_attributes?: {
2403
+ [key: string]: unknown;
2404
+ };
2405
+ };
2406
+ type TenancyUserStatus = 'invited' | 'enabled' | 'disabled';
2407
+ type GetAccountsApiAccountingAccountGetData = {
2408
+ body?: never;
2409
+ path?: never;
2410
+ query?: {
2411
+ account_ids?: Array<string> | null;
2412
+ };
2413
+ url: '/api/accounting/account';
2414
+ };
2415
+ type GetAccountsApiAccountingAccountGetResponses = {
2416
+ /**
2417
+ * Successful Response
2418
+ */
2419
+ 200: Array<AccountingTAccountOutput>;
2420
+ };
2421
+ type GetAccountsApiAccountingAccountGetResponse = GetAccountsApiAccountingAccountGetResponses[keyof GetAccountsApiAccountingAccountGetResponses];
2422
+ type GetAccountApiAccountingAccountAccountIdGetData = {
2423
+ body?: never;
2424
+ path: {
2425
+ account_id: string;
2426
+ };
2427
+ query?: never;
2428
+ url: '/api/accounting/account/{account_id}';
2429
+ };
2430
+ type GetAccountApiAccountingAccountAccountIdGetResponses = {
2431
+ /**
2432
+ * Successful Response
2433
+ */
2434
+ 200: AccountingTAccountWithSubAccounts;
2435
+ };
2436
+ type GetAccountApiAccountingAccountAccountIdGetResponse = GetAccountApiAccountingAccountAccountIdGetResponses[keyof GetAccountApiAccountingAccountAccountIdGetResponses];
2437
+ type GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetData = {
2438
+ body?: never;
2439
+ path: {
2440
+ subsidiary_id: number;
2441
+ };
2442
+ query?: {
2443
+ account_subsidiary_ids?: Array<number>;
2444
+ from_date?: string;
2445
+ to_date?: string;
2446
+ ignore_elimination_balance?: boolean;
2447
+ is_normalized?: boolean;
2448
+ };
2449
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa';
2450
+ };
2451
+ type GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponses = {
2452
+ /**
2453
+ * Successful Response
2454
+ */
2455
+ 200: Array<AccountingTAccountWithSubAccounts>;
2456
+ };
2457
+ type GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponse = GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponses[keyof GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponses];
2458
+ type GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetData = {
2459
+ body?: AccountingPaginationPositionInput | null;
2460
+ path: {
2461
+ subsidiary_id: number;
2462
+ };
2463
+ query?: {
2464
+ account_subsidiary_ids?: Array<number>;
2465
+ account_type?: Array<AccountingAccountType>;
2466
+ accounting_class?: Array<AccountingAccountingClass>;
2467
+ exclude_account_ids?: Array<string>;
2468
+ from_date?: string;
2469
+ to_date?: string;
2470
+ with_direct_balance?: boolean;
2471
+ with_no_balance?: boolean;
2472
+ ignore_elimination_balance?: boolean;
2473
+ is_normalized?: boolean;
2474
+ page?: number | null;
2475
+ per_page?: number | null;
2476
+ include_total?: boolean;
2477
+ sort?: AccountingSortableFieldsCoa;
2478
+ order?: AccountingSortingOrder | null;
2479
+ q?: string | null;
2480
+ };
2481
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/account';
2482
+ };
2483
+ type GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponses = {
2484
+ /**
2485
+ * Successful Response
2486
+ */
2487
+ 200: AccountingCoaPaginationOutput | Array<AccountingTAccountOutput>;
2488
+ };
2489
+ type GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponse = GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponses[keyof GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponses];
2490
+ type GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetData = {
2491
+ body?: never;
2492
+ path: {
2493
+ subsidiary_id: number;
2494
+ };
2495
+ query?: {
2496
+ ignore_inactive_accounts?: boolean;
2497
+ };
2498
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/available-currencies';
2499
+ };
2500
+ type GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponses = {
2501
+ /**
2502
+ * Successful Response
2503
+ */
2504
+ 200: Array<AccountingCurrency>;
2505
+ };
2506
+ type GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponse = GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponses[keyof GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponses];
2507
+ type GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetData = {
2508
+ body?: AccountingPaginationPositionInput | null;
2509
+ path: {
2510
+ subsidiary_id: number;
2511
+ };
2512
+ query?: {
2513
+ account_subsidiary_ids?: Array<number>;
2514
+ account_ids?: Array<string>;
2515
+ exclude_account_ids?: Array<string>;
2516
+ account_type?: Array<AccountingAccountType>;
2517
+ accounting_class?: Array<AccountingAccountingClass>;
2518
+ ignore_elimination_balance?: boolean;
2519
+ ignore_inactive_accounts?: boolean;
2520
+ is_normalized?: boolean;
2521
+ page?: number | null;
2522
+ per_page?: number | null;
2523
+ include_total?: boolean;
2524
+ sort?: AccountingSortableFieldsCoa;
2525
+ order?: AccountingSortingOrder | null;
2526
+ q?: string | null;
2527
+ };
2528
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/account/simple';
2529
+ };
2530
+ type GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponses = {
2531
+ /**
2532
+ * Successful Response
2533
+ */
2534
+ 200: AccountingSimpleCoAPaginationOutput | Array<AccountingSimpleTAccount>;
2535
+ };
2536
+ type GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponse = GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponses[keyof GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponses];
2537
+ type GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetData = {
2538
+ body?: never;
2539
+ path: {
2540
+ subsidiary_id: number;
2541
+ };
2542
+ query: {
2543
+ group_by: AccountingCoAGroupBy;
2544
+ account_subsidiary_ids?: Array<number>;
2545
+ from_date?: string;
2546
+ to_date?: string;
2547
+ with_direct_balance?: boolean;
2548
+ ignore_elimination_balance?: boolean;
2549
+ is_normalized?: boolean;
2550
+ };
2551
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/account/group';
2552
+ };
2553
+ type GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponses = {
2554
+ /**
2555
+ * Successful Response
2556
+ */
2557
+ 200: Array<AccountingGroupedAccounts>;
2558
+ };
2559
+ type GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponse = GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponses[keyof GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponses];
2560
+ type GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetData = {
2561
+ body?: never;
2562
+ path: {
2563
+ subsidiary_id: number;
2564
+ account_id: string;
2565
+ };
2566
+ query?: {
2567
+ is_normalized?: boolean;
2568
+ from_date?: string;
2569
+ to_date?: string;
2570
+ };
2571
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/account/{account_id}';
2572
+ };
2573
+ type GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponses = {
2574
+ /**
2575
+ * Successful Response
2576
+ */
2577
+ 200: AccountingTAccountWithSubAccounts;
2578
+ };
2579
+ type GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponse = GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponses[keyof GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponses];
2580
+ type GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetData = {
2581
+ body?: never;
2582
+ path: {
2583
+ currency: AccountingCurrency;
2584
+ };
2585
+ query?: {
2586
+ exchange_date?: string;
2587
+ };
2588
+ url: '/api/accounting/currency/{currency}/conversion-rates';
2589
+ };
2590
+ type GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponses = {
2591
+ /**
2592
+ * Successful Response
2593
+ */
2594
+ 200: AccountingExchangeRates;
2595
+ };
2596
+ type GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponse = GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponses[keyof GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponses];
2597
+ type GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetData = {
2598
+ body?: AccountingPaginationPositionInput | null;
2599
+ path: {
2600
+ subsidiary_id: number;
2601
+ };
2602
+ query?: {
2603
+ entry_types?: Array<AccountingJournalEntryType> | null;
2604
+ ref_numbers?: Array<string> | null;
2605
+ child_subsidiaries?: Array<number> | null;
2606
+ from_date?: string | null;
2607
+ to_date?: string | null;
2608
+ is_nominal_ledger?: boolean | null;
2609
+ memo?: string | null;
2610
+ journal_entry_line_ids?: Array<string> | null;
2611
+ /**
2612
+ * Filter to lines posted to any of these GL accounts.
2613
+ */
2614
+ account_ids?: Array<string> | null;
2615
+ /**
2616
+ * Filter to lines assigned any of these dimension values.
2617
+ */
2618
+ dimension_value_ids?: Array<string> | null;
2619
+ /**
2620
+ * Return only lines with no dimension assignment. Takes precedence over dimension_value_ids.
2621
+ */
2622
+ unassigned_only?: boolean | null;
2623
+ page?: number | null;
2624
+ per_page?: number | null;
2625
+ include_total?: boolean;
2626
+ sort?: 'date' | 'transaction_type' | 'memo' | 'ref_number';
2627
+ order?: AccountingSortingOrder | null;
2628
+ };
2629
+ url: '/api/accounting/subsidiary/{subsidiary_id}/journal-entry/lines';
2630
+ };
2631
+ type GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponses = {
2632
+ /**
2633
+ * Successful Response
2634
+ */
2635
+ 200: Array<AccountingJournalEntryLineWithJournalEntryWithDimensionsWithOperationCtx> | AccountingJournalEntryLinePaginationOutput;
2636
+ };
2637
+ type GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponse = GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponses[keyof GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponses];
2638
+ type GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetData = {
2639
+ body?: AccountingPaginationPositionInput | null;
2640
+ path: {
2641
+ subsidiary_id: number;
2642
+ };
2643
+ query?: {
2644
+ /**
2645
+ * Filter by journal entry type. Values: adjustment (manual Nominal entry), elimination (consolidation entry), book_entry, ic_transaction (inter-company).
2646
+ */
2647
+ entry_types?: Array<AccountingJournalEntryType> | null;
2648
+ /**
2649
+ * Filter by one or more human-readable reference numbers (e.g. ref #42).
2650
+ */
2651
+ ref_numbers?: Array<string> | null;
2652
+ child_subsidiaries?: Array<number> | null;
2653
+ from_date?: string | null;
2654
+ to_date?: string | null;
2655
+ /**
2656
+ * If true, return only manually created Nominal ledger entries, excluding provider-synced transactions.
2657
+ */
2658
+ is_nominal_ledger?: boolean | null;
2659
+ memo?: string | null;
2660
+ /**
2661
+ * Filter by status. Values: Draft (not yet posted), Submitted (pending review), Posted (finalised and reflected in reports).
2662
+ */
2663
+ entry_statuses?: Array<AccountingJournalEntryStatus> | null;
2664
+ /**
2665
+ * Filter entries where any line has this amount
2666
+ */
2667
+ line_amount?: number | null;
2668
+ page?: number | null;
2669
+ per_page?: number | null;
2670
+ include_total?: boolean;
2671
+ sort?: 'date' | 'transaction_type' | 'memo' | 'ref_number';
2672
+ order?: AccountingSortingOrder | null;
2673
+ };
2674
+ url: '/api/accounting/subsidiary/{subsidiary_id}/journal-entry';
2675
+ };
2676
+ type GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponses = {
2677
+ /**
2678
+ * Successful Response
2679
+ */
2680
+ 200: Array<AccountingJournalEntryDimensionsWithOperationCtx> | AccountingJournalEntryPaginationOutput;
2681
+ };
2682
+ type GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponse = GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponses[keyof GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponses];
2683
+ type GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetData = {
2684
+ body?: never;
2685
+ path: {
2686
+ journal_entry_id: string;
2687
+ subsidiary_id: number;
2688
+ };
2689
+ query?: never;
2690
+ url: '/api/accounting/subsidiary/{subsidiary_id}/journal-entry/{journal_entry_id}';
2691
+ };
2692
+ type GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponses = {
2693
+ /**
2694
+ * Successful Response
2695
+ */
2696
+ 200: AccountingJournalEntryDimensionsWithOperationCtx;
2697
+ };
2698
+ type GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponse = GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponses[keyof GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponses];
2699
+ type GetDimensionsApiAccountingDimensionGetData = {
2700
+ body?: never;
2701
+ path?: never;
2702
+ query?: {
2703
+ /**
2704
+ * Filter dimensions scoped to a specific subsidiary (integer ID).
2705
+ */
2706
+ subsidiary_id?: number | null;
2707
+ /**
2708
+ * Maximum number of dimension values to return per dimension (default 1000).
2709
+ */
2710
+ values_limit?: number | null;
2711
+ /**
2712
+ * If true, include the full set of dimension values and their auto-assignment rules in the response.
2713
+ */
2714
+ with_rules_and_values?: boolean;
2715
+ };
2716
+ url: '/api/accounting/dimension';
2717
+ };
2718
+ type GetDimensionsApiAccountingDimensionGetResponses = {
2719
+ /**
2720
+ * Successful Response
2721
+ */
2722
+ 200: Array<AccountingDimensionWithRules>;
2723
+ };
2724
+ type GetDimensionsApiAccountingDimensionGetResponse = GetDimensionsApiAccountingDimensionGetResponses[keyof GetDimensionsApiAccountingDimensionGetResponses];
2725
+ type GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetData = {
2726
+ body?: never;
2727
+ path: {
2728
+ dimension_id: string;
2729
+ account_id: string;
2730
+ };
2731
+ query?: never;
2732
+ url: '/api/accounting/dimension/{dimension_id}/account/{account_id}';
2733
+ };
2734
+ type GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponses = {
2735
+ /**
2736
+ * Successful Response
2737
+ */
2738
+ 200: AccountingAccountDimensionValues;
2739
+ };
2740
+ type GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponse = GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponses[keyof GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponses];
2741
+ type GetDimensionValuesApiAccountingDimensionValueGetData = {
2742
+ body?: never;
2743
+ path?: never;
2744
+ query?: {
2745
+ /**
2746
+ * Filter to values belonging to specific dimension IDs.
2747
+ */
2748
+ dimension_ids?: Array<string> | null;
2749
+ /**
2750
+ * Filter to specific dimension value IDs.
2751
+ */
2752
+ dimension_value_ids?: Array<string> | null;
2753
+ /**
2754
+ * Text search filter on the parent dimension name.
2755
+ */
2756
+ dimension_name?: string | null;
2757
+ /**
2758
+ * Text search filter on the dimension value name.
2759
+ */
2760
+ dimension_value?: string | null;
2761
+ /**
2762
+ * Return a lightweight response without rules and extended metadata.
2763
+ */
2764
+ slim?: boolean;
2765
+ /**
2766
+ * Sort dimension values alphabetically by value
2767
+ */
2768
+ sort_alphabetically?: boolean;
2769
+ };
2770
+ url: '/api/accounting/dimension-value';
2771
+ };
2772
+ type GetDimensionValuesApiAccountingDimensionValueGetResponses = {
2773
+ /**
2774
+ * Successful Response
2775
+ */
2776
+ 200: Array<AccountingDimensionValueWithRulesAndChildren | AccountingDimensionValueSlim | AccountingDimensionValue> | [
2777
+ Array<AccountingDimensionValueWithRulesAndChildren | AccountingDimensionValueSlim | AccountingDimensionValue>,
2778
+ AccountingPaginationOutput
2779
+ ];
2780
+ };
2781
+ type GetDimensionValuesApiAccountingDimensionValueGetResponse = GetDimensionValuesApiAccountingDimensionValueGetResponses[keyof GetDimensionValuesApiAccountingDimensionValueGetResponses];
2782
+ type GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetData = {
2783
+ body?: never;
2784
+ path?: never;
2785
+ query?: {
2786
+ dimension_id?: string | null;
2787
+ dimension_name?: string | null;
2788
+ parent_id?: string | null;
2789
+ search_query?: string | null;
2790
+ include_ids?: Array<string> | null;
2791
+ slim?: boolean;
2792
+ };
2793
+ url: '/api/accounting/dimension-value/hierarchical';
2794
+ };
2795
+ type GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponses = {
2796
+ /**
2797
+ * Successful Response
2798
+ */
2799
+ 200: [
2800
+ Array<AccountingDimensionValueWithChildren> | Array<AccountingDimensionValueSlim>,
2801
+ AccountingPaginationOutput | null
2802
+ ];
2803
+ };
2804
+ type GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponse = GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponses[keyof GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponses];
2805
+ type GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetData = {
2806
+ body?: AccountingPaginationPositionInput | null;
2807
+ path?: never;
2808
+ query?: {
2809
+ from_subsidiary?: Array<number> | null;
2810
+ to_subsidiary?: Array<number> | null;
2811
+ page?: number | null;
2812
+ per_page?: number | null;
2813
+ include_total?: boolean;
2814
+ sort?: AccountingSortableFieldsCer;
2815
+ order?: AccountingSortingOrder | null;
2816
+ };
2817
+ url: '/api/accounting/consolidation-exchange-rate';
2818
+ };
2819
+ type GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponses = {
2820
+ /**
2821
+ * Successful Response
2822
+ */
2823
+ 200: AccountingCerPaginationOutput;
2824
+ };
2825
+ type GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponse = GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponses[keyof GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponses];
2826
+ type GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetData = {
2827
+ body?: never;
2828
+ path: {
2829
+ input_date: string;
2830
+ };
2831
+ query?: never;
2832
+ url: '/api/accounting/consolidation-exchange-rate/period/{input_date}';
2833
+ };
2834
+ type GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponses = {
2835
+ /**
2836
+ * Successful Response
2837
+ */
2838
+ 200: AccountingConsolidationExchangeRatePeriod;
2839
+ };
2840
+ type GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponse = GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponses[keyof GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponses];
2841
+ type GetActivityDefinitionsApiActivityActivityDefinitionGetData = {
2842
+ body?: never;
2843
+ path?: never;
2844
+ query?: {
2845
+ /**
2846
+ * Include disabled activity definitions in the response.
2847
+ */
2848
+ with_disabled_activity?: boolean;
2849
+ /**
2850
+ * Include the nested task definition templates in the response.
2851
+ */
2852
+ with_task_definitions?: boolean;
2853
+ };
2854
+ url: '/api/activity/activity-definition';
2855
+ };
2856
+ type GetActivityDefinitionByIdApiActivityActivityDefinitionActivityDefinitionIdGetData = {
2857
+ body?: never;
2858
+ path: {
2859
+ activity_definition_id: string;
2860
+ };
2861
+ query?: {
2862
+ with_task_definitions?: boolean;
2863
+ };
2864
+ url: '/api/activity/activity-definition/{activity_definition_id}';
2865
+ };
2866
+ type GetPeriodInstancesApiActivityPeriodInstanceGetData = {
2867
+ body?: never;
2868
+ path?: never;
2869
+ query?: {
2870
+ period?: ActivityPeriod | null;
2871
+ /**
2872
+ * Return lightweight response without task instance details.
2873
+ */
2874
+ slim?: boolean;
2875
+ from_date?: string | null;
2876
+ to_date?: string | null;
2877
+ ref_date?: string | null;
2878
+ };
2879
+ url: '/api/activity/period-instance';
2880
+ };
2881
+ type GetPeriodInstanceApiActivityPeriodInstancePeriodInstanceIdGetData = {
2882
+ body?: never;
2883
+ path: {
2884
+ period_instance_id: string;
2885
+ };
2886
+ query?: {
2887
+ /**
2888
+ * Include activities that are currently disabled in the response.
2889
+ */
2890
+ with_disabled_activity?: boolean;
2891
+ /**
2892
+ * Include child subsidiary period instances in the response.
2893
+ */
2894
+ include_children?: boolean;
2895
+ /**
2896
+ * Filter to specific subsidiary integer IDs.
2897
+ */
2898
+ subsidiary_ids?: Array<number> | null;
2899
+ };
2900
+ url: '/api/activity/period-instance/{period_instance_id}';
2901
+ };
2902
+ type GetPeriodInstanceBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdGetData = {
2903
+ body?: never;
2904
+ path: {
2905
+ /**
2906
+ * Human-readable period identifier, e.g. '2024-01' for January 2024 or '2024-Q1' for Q1 2024.
2907
+ */
2908
+ period_display_id: string;
2909
+ };
2910
+ query?: {
2911
+ with_disabled_activity?: boolean;
2912
+ include_children?: boolean;
2913
+ subsidiary_ids?: Array<number> | null;
2914
+ /**
2915
+ * Filter by activity definition IDs
2916
+ */
2917
+ activity_definition_ids?: Array<string> | null;
2918
+ exclude_task_types?: Array<ActivityTaskType> | null;
2919
+ include_task_types?: Array<ActivityTaskType> | null;
2920
+ };
2921
+ url: '/api/activity/period-instance/by-slug/{period_display_id}';
2922
+ };
2923
+ type GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetData = {
2924
+ body?: never;
2925
+ path: {
2926
+ period_display_id: string;
2927
+ };
2928
+ query?: {
2929
+ /**
2930
+ * Maximum number of subsidiaries to return globally (max 50)
2931
+ */
2932
+ max_subsidiaries?: number;
2933
+ /**
2934
+ * Filter by specific subsidiary IDs
2935
+ */
2936
+ subsidiary_ids?: Array<number> | null;
2937
+ /**
2938
+ * Filter by activity definition IDs
2939
+ */
2940
+ activity_definition_ids?: Array<string> | null;
2941
+ };
2942
+ url: '/api/activity/period-instance/by-slug/{period_display_id}/progress-breakdown';
2943
+ };
2944
+ type GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponses = {
2945
+ /**
2946
+ * Successful Response
2947
+ */
2948
+ 200: ActivityPeriodInstanceProgressBreakdownApi;
2949
+ };
2950
+ type GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponse = GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponses[keyof GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponses];
2951
+ type GetAllTasksDefinitionsApiActivityTaskDefinitionGetData = {
2952
+ body?: never;
2953
+ path?: never;
2954
+ query?: {
2955
+ entity_id?: string | null;
2956
+ with_instances?: boolean;
2957
+ };
2958
+ url: '/api/activity/task-definition';
2959
+ };
2960
+ type GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponses = {
2961
+ /**
2962
+ * Successful Response
2963
+ */
2964
+ 200: Array<ActivitySlimTaskDefinitionWithInstances>;
2965
+ };
2966
+ type GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponse = GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponses[keyof GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponses];
2967
+ type CreateTaskDefinitionApiActivityTaskDefinitionPostData = {
2968
+ body: ActivityTaskDefinitionWithActionCreateApi;
2969
+ path?: never;
2970
+ query?: never;
2971
+ url: '/api/activity/task-definition';
2972
+ };
2973
+ type CreateTaskDefinitionApiActivityTaskDefinitionPostResponses = {
2974
+ /**
2975
+ * Successful Response
2976
+ */
2977
+ 200: ActivityTaskDefinitionWithInstances;
2978
+ };
2979
+ type CreateTaskDefinitionApiActivityTaskDefinitionPostResponse = CreateTaskDefinitionApiActivityTaskDefinitionPostResponses[keyof CreateTaskDefinitionApiActivityTaskDefinitionPostResponses];
2980
+ type GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostData = {
2981
+ body?: never;
2982
+ path?: never;
2983
+ query?: {
2984
+ entity_ids?: Array<string>;
2985
+ /**
2986
+ * Filter by the type of entity the task applies to. Values: SUBSIDIARY (subsidiary-level tasks), PROVIDER (accounting provider tasks), ACTIVITY (activity-level tasks).
2987
+ */
2988
+ entity_type?: ActivityTaskEntityType | null;
2989
+ with_instances?: boolean;
2990
+ q?: string | null;
2991
+ };
2992
+ url: '/api/activity/task-definition/query';
2993
+ };
2994
+ type GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponses = {
2995
+ /**
2996
+ * Successful Response
2997
+ */
2998
+ 200: Array<ActivitySlimTaskDefinitionWithInstances>;
2999
+ };
3000
+ type GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponse = GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponses[keyof GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponses];
3001
+ type GetTaskDefinitionByIdApiActivityTaskDefinitionTaskDefinitionIdGetData = {
3002
+ body?: never;
3003
+ path: {
3004
+ task_definition_id: string;
3005
+ };
3006
+ query?: {
3007
+ include_draft?: boolean;
3008
+ with_instances?: boolean;
3009
+ with_action_template?: boolean;
3010
+ };
3011
+ url: '/api/activity/task-definition/{task_definition_id}';
3012
+ };
3013
+ type UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutData = {
3014
+ body: ActivityTaskDefinitionUpdate;
3015
+ path: {
3016
+ task_definition_id: string;
3017
+ };
3018
+ query?: {
3019
+ should_override_instances?: boolean;
3020
+ };
3021
+ url: '/api/activity/task-definition/{task_definition_id}';
3022
+ };
3023
+ type UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponses = {
3024
+ /**
3025
+ * Successful Response
3026
+ */
3027
+ 200: ActivityTaskDefinition;
3028
+ };
3029
+ type UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponse = UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponses[keyof UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponses];
3030
+ type GetActivityInstanceApiActivityActivityInstanceActivityInstanceIdGetData = {
3031
+ body?: never;
3032
+ path: {
3033
+ activity_instance_id: string;
3034
+ };
3035
+ query?: {
3036
+ /**
3037
+ * Return lightweight task instance summaries instead of full task details.
3038
+ */
3039
+ with_slim_task_instances?: boolean;
3040
+ /**
3041
+ * Include the nested task instance list in the response.
3042
+ */
3043
+ with_instances?: boolean;
3044
+ /**
3045
+ * Include reconciliation-specific fields in the response.
3046
+ */
3047
+ for_reconciliation?: boolean;
3048
+ subsidiary_ids?: Array<number> | null;
3049
+ };
3050
+ url: '/api/activity/activity-instance/{activity_instance_id}';
3051
+ };
3052
+ type GetTaskInstancesByActivityApiActivityActivityInstanceActivityInstanceIdTaskGetData = {
3053
+ body?: ActivityPaginationPositionInput | null;
3054
+ path: {
3055
+ activity_instance_id: string;
3056
+ };
3057
+ query?: {
3058
+ is_deleted?: boolean | null;
3059
+ include_draft?: boolean;
3060
+ subsidiary_ids?: Array<number> | null;
3061
+ status?: Array<ActivityTaskStatus> | null;
3062
+ preparer_ids?: Array<string> | null;
3063
+ reviewer_ids?: Array<string> | null;
3064
+ due_date_period?: ActivityPeriodFilter | null;
3065
+ due_date_from?: string | null;
3066
+ due_date_to?: string | null;
3067
+ slim?: boolean;
3068
+ without_activity_instance?: boolean;
3069
+ page?: number | null;
3070
+ per_page?: number | null;
3071
+ include_total?: boolean;
3072
+ sort?: ActivitySortableFieldsTask;
3073
+ order?: ActivitySortingOrder | null;
3074
+ q?: string | null;
3075
+ };
3076
+ url: '/api/activity/activity-instance/{activity_instance_id}/task';
3077
+ };
3078
+ type GetActivityInstancesApiActivityActivityInstanceGetData = {
3079
+ body?: never;
3080
+ path?: never;
3081
+ query?: {
3082
+ period_instance_id?: string | null;
3083
+ activity_definition_id?: string | null;
3084
+ from_date?: string | null;
3085
+ to_date?: string | null;
3086
+ /**
3087
+ * Return enriched response including subsidiary details and provider information alongside each activity instance.
3088
+ */
3089
+ as_enriched?: boolean;
3090
+ };
3091
+ url: '/api/activity/activity-instance';
3092
+ };
3093
+ type GetActivityInstancesApiActivityActivityInstanceGetResponses = {
3094
+ /**
3095
+ * Successful Response
3096
+ */
3097
+ 200: Array<ActivityApiEnrichedActivityInstance | ActivityActivityInstanceWithTaskInstances>;
3098
+ };
3099
+ type GetActivityInstancesApiActivityActivityInstanceGetResponse = GetActivityInstancesApiActivityActivityInstanceGetResponses[keyof GetActivityInstancesApiActivityActivityInstanceGetResponses];
3100
+ type GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetData = {
3101
+ body?: never;
3102
+ path: {
3103
+ period_display_id: string;
3104
+ activity_definition_id: string;
3105
+ };
3106
+ query?: {
3107
+ with_slim_task_instances?: boolean;
3108
+ with_instances?: boolean;
3109
+ for_reconciliation?: boolean;
3110
+ subsidiary_ids?: Array<number> | null;
3111
+ };
3112
+ url: '/api/activity/activity-instance/by-period/{period_display_id}/{activity_definition_id}';
3113
+ };
3114
+ type GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponses = {
3115
+ /**
3116
+ * Successful Response
3117
+ */
3118
+ 200: ActivityApiEnrichedActivityInstance;
3119
+ };
3120
+ type GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponse = GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponses[keyof GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponses];
3121
+ type GetTaskInstancesByActivityPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdTaskGetData = {
3122
+ body?: ActivityPaginationPositionInput | null;
3123
+ path: {
3124
+ period_display_id: string;
3125
+ activity_definition_id: string;
3126
+ };
3127
+ query?: {
3128
+ is_deleted?: boolean | null;
3129
+ include_draft?: boolean;
3130
+ subsidiary_ids?: Array<number> | null;
3131
+ status?: Array<ActivityTaskStatus> | null;
3132
+ preparer_ids?: Array<string> | null;
3133
+ reviewer_ids?: Array<string> | null;
3134
+ slim?: boolean;
3135
+ without_activity_instance?: boolean;
3136
+ exclude_task_types?: Array<ActivityTaskType> | null;
3137
+ page?: number | null;
3138
+ per_page?: number | null;
3139
+ include_total?: boolean;
3140
+ sort?: ActivitySortableFieldsTask;
3141
+ order?: ActivitySortingOrder | null;
3142
+ q?: string | null;
3143
+ };
3144
+ url: '/api/activity/activity-instance/by-period/{period_display_id}/{activity_definition_id}/task';
3145
+ };
3146
+ type GetAllTaskInstancesApiActivityTaskInstanceGetData = {
3147
+ body?: never;
3148
+ path?: never;
3149
+ query?: {
3150
+ /**
3151
+ * Filter by task status. Values: PENDING (not started), IN_REVIEW (submitted for review), DONE (completed and approved), CANCELLED.
3152
+ */
3153
+ status?: Array<ActivityTaskStatus>;
3154
+ subsidiary_ids?: Array<number>;
3155
+ activity_definition_ids?: Array<string>;
3156
+ preparer_ids?: Array<string> | null;
3157
+ reviewer_ids?: Array<string> | null;
3158
+ period_instance_id?: string | null;
3159
+ /**
3160
+ * Filter to tasks for a specific period (e.g. '2024-01').
3161
+ */
3162
+ period_display_id?: string | null;
3163
+ period_instance_ids?: Array<string> | null;
3164
+ period_display_ids?: Array<string> | null;
3165
+ /**
3166
+ * Exclude task instances of specific types. Values: RECONCILIATION, APPROVAL, MANUAL.
3167
+ */
3168
+ exclude_task_types?: Array<ActivityTaskType> | null;
3169
+ /**
3170
+ * Return lightweight response without full task details.
3171
+ */
3172
+ slim?: boolean;
3173
+ sort?: ActivitySortableFieldsTask;
3174
+ order?: ActivitySortingOrder | null;
3175
+ q?: string | null;
3176
+ };
3177
+ url: '/api/activity/task-instance';
3178
+ };
3179
+ type GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostData = {
3180
+ body?: ActivityBodyGetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPost;
3181
+ path?: never;
3182
+ query?: {
3183
+ sort?: ActivitySortableFieldsTask;
3184
+ order?: ActivitySortingOrder | null;
3185
+ };
3186
+ url: '/api/activity/task-instance/query';
3187
+ };
3188
+ type GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponses = {
3189
+ /**
3190
+ * Successful Response
3191
+ */
3192
+ 200: ActivityTaskInstancePaginationOutput;
3193
+ };
3194
+ type GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponse = GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponses[keyof GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponses];
3195
+ type GetTaskInstanceByIdApiActivityTaskInstanceTaskInstanceIdGetData = {
3196
+ body?: never;
3197
+ path: {
3198
+ task_instance_id: string;
3199
+ };
3200
+ query?: {
3201
+ with_task_action?: boolean;
3202
+ };
3203
+ url: '/api/activity/task-instance/{task_instance_id}';
3204
+ };
3205
+ type UpdateTaskInstanceApiActivityTaskInstanceTaskInstanceIdPutData = {
3206
+ body: ActivityTaskInstanceUpdateWithAction | ActivityTaskInstanceUpdateClearAction | ActivityTaskInstanceUpdate;
3207
+ path: {
3208
+ task_instance_id: string;
3209
+ };
3210
+ query?: never;
3211
+ url: '/api/activity/task-instance/{task_instance_id}';
3212
+ };
3213
+ type GetEventsApiAuditTrailEventGetData = {
3214
+ body?: never;
3215
+ path?: never;
3216
+ query?: never;
3217
+ url: '/api/audit-trail/event';
3218
+ };
3219
+ type GetEventsApiAuditTrailEventGetResponses = {
3220
+ /**
3221
+ * Successful Response
3222
+ */
3223
+ 200: Array<AuditTrailAuditTrailEvent>;
3224
+ };
3225
+ type GetEventsApiAuditTrailEventGetResponse = GetEventsApiAuditTrailEventGetResponses[keyof GetEventsApiAuditTrailEventGetResponses];
3226
+ type GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostData = {
3227
+ body?: Array<AuditTrailGetEntityAuditTrailArgs> | null;
3228
+ path: {
3229
+ target_type: AuditTrailEntityType;
3230
+ target_id: string;
3231
+ };
3232
+ query?: never;
3233
+ url: '/api/audit-trail/event/entity/{target_type}/{target_id}';
3234
+ };
3235
+ type GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponses = {
3236
+ /**
3237
+ * Successful Response
3238
+ */
3239
+ 200: Array<AuditTrailAuditTrailEvent>;
3240
+ };
3241
+ type GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponse = GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponses[keyof GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponses];
3242
+ type GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetData = {
3243
+ body?: never;
3244
+ path: {
3245
+ subsidiary_id: number;
3246
+ };
3247
+ query?: never;
3248
+ url: '/api/period-manager/fiscal-calendar/by-subsidiary/{subsidiary_id}';
3249
+ };
3250
+ type GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponses = {
3251
+ /**
3252
+ * Successful Response
3253
+ */
3254
+ 200: Array<PeriodManagerFiscalCalendar>;
3255
+ };
3256
+ type GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponse = GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponses[keyof GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponses];
3257
+ type GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetData = {
3258
+ body?: never;
3259
+ path: {
3260
+ calendar_id: string;
3261
+ };
3262
+ query?: never;
3263
+ url: '/api/period-manager/fiscal-calendar/{calendar_id}';
3264
+ };
3265
+ type GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponses = {
3266
+ /**
3267
+ * Successful Response
3268
+ */
3269
+ 200: PeriodManagerFiscalCalendar;
3270
+ };
3271
+ type GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponse = GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponses[keyof GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponses];
3272
+ type GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetData = {
3273
+ body?: never;
3274
+ path: {
3275
+ /**
3276
+ * The tenant UUID or its string name identifier (slug).
3277
+ */
3278
+ tenant_id_or_name: string;
3279
+ };
3280
+ query?: never;
3281
+ url: '/api/tenancy/tenant/{tenant_id_or_name}/users';
3282
+ };
3283
+ type GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponses = {
3284
+ /**
3285
+ * Successful Response
3286
+ */
3287
+ 200: Array<TenancyUser>;
3288
+ };
3289
+ type GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponse = GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponses[keyof GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponses];
3290
+ type GetAllSubsidiariesApiTenancySubsidiaryGetData = {
3291
+ body?: never;
3292
+ path?: never;
3293
+ query?: {
3294
+ is_flat?: boolean;
3295
+ only_active?: boolean;
3296
+ with_elimination_subsidiaries?: boolean;
3297
+ q?: string | null;
3298
+ };
3299
+ url: '/api/tenancy/subsidiary';
3300
+ };
3301
+ type GetAllSubsidiariesApiTenancySubsidiaryGetResponses = {
3302
+ /**
3303
+ * Successful Response
3304
+ */
3305
+ 200: Array<TenancySubsidiaryApiResponse>;
3306
+ };
3307
+ type GetAllSubsidiariesApiTenancySubsidiaryGetResponse = GetAllSubsidiariesApiTenancySubsidiaryGetResponses[keyof GetAllSubsidiariesApiTenancySubsidiaryGetResponses];
3308
+ type GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetData = {
3309
+ body?: never;
3310
+ path: {
3311
+ /**
3312
+ * Integer subsidiary ID from the tenancy hierarchy.
3313
+ */
3314
+ subsidiary_id: number;
3315
+ };
3316
+ query?: {
3317
+ /**
3318
+ * If true, include consolidation-only elimination subsidiaries in the response.
3319
+ */
3320
+ with_elimination_subsidiaries?: boolean;
3321
+ };
3322
+ url: '/api/tenancy/subsidiary/{subsidiary_id}';
3323
+ };
3324
+ type GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponses = {
3325
+ /**
3326
+ * Successful Response
3327
+ */
3328
+ 200: TenancySubsidiaryApiResponse | null;
3329
+ };
3330
+ type GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponse = GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponses[keyof GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponses];
3331
+ type GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetData = {
3332
+ body?: never;
3333
+ path: {
3334
+ subsidiary_id: number;
3335
+ };
3336
+ query?: never;
3337
+ url: '/api/tenancy/subsidiary/{subsidiary_id}/parent-currencies';
3338
+ };
3339
+ type GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponses = {
3340
+ /**
3341
+ * Successful Response
3342
+ */
3343
+ 200: {
3344
+ [key: string]: unknown;
3345
+ };
3346
+ };
3347
+ type GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponse = GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponses[keyof GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponses];
3348
+
3349
+ interface BridgeSubsidiary {
3350
+ id: number;
3351
+ displayName: string;
3352
+ }
3353
+ /**
3354
+ * PostHog configuration the host supplies so the iframe can record a session
3355
+ * replay (stitched into the host's recording via `recordCrossOriginIframes`)
3356
+ * and emit custom events, all attributed to the **same PostHog person** as
3357
+ * nom-ui.
3358
+ *
3359
+ * The host (nom-ui) is the single source of truth for these values — it knows
3360
+ * the project key, the env-aware ingestion host, and the resolved person — and
3361
+ * delivers it over the bridge (as a one-time `POSTHOG_PUSH`, separate from
3362
+ * {@link ContextPayload}) so the iframe never hardcodes any of it. When the host
3363
+ * has no PostHog config (recording disabled for this env/app), it sends no
3364
+ * `POSTHOG_PUSH` and the bridge initializes nothing.
3365
+ */
3366
+ interface PostHogContext {
3367
+ /** Project API key — the same PostHog project the host (nom-ui) uses. */
3368
+ token: string;
3369
+ /**
3370
+ * **Absolute** ingestion host, e.g. `"https://us.i.posthog.com"`.
3371
+ *
3372
+ * Must NOT be the host's relative `/ingest` reverse-proxy path: a relative
3373
+ * path resolves against the iframe's *own* (cross-origin) host and 404s.
3374
+ */
3375
+ apiHost: string;
3376
+ /**
3377
+ * Host-resolved PostHog distinct id. The bridge calls `identify()` with it so
3378
+ * the iframe's recording and events attribute to the same person as the host.
3379
+ */
3380
+ distinctId: string;
3381
+ /**
3382
+ * **Optional.** The host's current PostHog session id (from
3383
+ * `posthog.get_session_id()`). When provided, the bridge seeds it as the
3384
+ * iframe instance's session via `bootstrap.sessionID`, so custom events from
3385
+ * `bridge.track()` share the **same `$session_id`** as the host — letting them
3386
+ * line up with the stitched session replay on one timeline.
3387
+ *
3388
+ * Not needed for *replay* stitching itself (that works via
3389
+ * `recordCrossOriginIframes` on both sides regardless). Must be a valid UUID
3390
+ * v7 — PostHog session ids already are. It is a one-time seed at connect, so
3391
+ * if the host's session later rotates the two can diverge; alignment is
3392
+ * best-effort for the session in progress.
3393
+ */
3394
+ sessionId?: string;
3395
+ /**
3396
+ * Master switch, env- and/or app-gated by the host. The bridge only calls
3397
+ * `posthog.init()` when this is `true`; it stays the kill-switch even though
3398
+ * `posthog-js` is bundled into the bridge.
3399
+ */
3400
+ enabled: boolean;
3401
+ }
3402
+ /**
3403
+ * Authentication-state change the host pushes to the iframe via `AUTH_CHANGED`.
3404
+ * It carries the security principal the embedded app authenticates and scopes
3405
+ * its own data by. Sent when the Nominal session changes: a logout
3406
+ * (`authenticated: false`) or an identity/tenant switch (`authenticated: true`
3407
+ * with a new `userId`/`tenant`). The initial state is implicit at connect — the
3408
+ * iframe only loads when authenticated, and the current identity/tenant are
3409
+ * {@link ContextPayload.user} / {@link ContextPayload.tenant}, so apps baseline
3410
+ * off those and react to this push.
3411
+ *
3412
+ * Subsidiary/period and other view-level state are NOT here — they ride the
3413
+ * follow-up `CONTEXT_PUSH` (`onContextChange`), per "auth change, then context".
3414
+ */
3415
+ interface AuthPayload {
3416
+ /** Whether the Nominal user is still authenticated. */
3417
+ authenticated: boolean;
3418
+ /** The effective Nominal user id when authenticated; omitted on logout. */
3419
+ userId?: string;
3420
+ /** The tenant the user is acting in — the app's data-scoping key (RLS). */
3421
+ tenant?: string;
3422
+ }
3423
+ interface ContextPayload {
3424
+ tenant: string;
3425
+ subsidiaryId: number;
3426
+ subsidiaries: BridgeSubsidiary[];
3427
+ user: {
3428
+ id: string;
3429
+ displayName: string;
3430
+ };
3431
+ /** Initial subroute the iframe should navigate to on first load. */
3432
+ subroute?: string;
3433
+ /** Slug of the last closed accounting period, e.g. "mar-2026". */
3434
+ lastClosedPeriodSlug?: string;
3435
+ /** Version of the host SDK (@nominalso/vibe-host) running in nom-ui. */
3436
+ hostVersion: string;
3437
+ }
3438
+
3439
+ /**
3440
+ * Response type for operations whose Nominal OpenAPI `200` response declares
3441
+ * **no content schema**. hey-api generates `200: unknown` for these, so there is
3442
+ * genuinely no concrete type to narrow to at codegen time — the shape is
3443
+ * undocumented upstream, not merely unmapped by this SDK.
3444
+ *
3445
+ * We surface this named alias instead of a bare `unknown` so the gap is
3446
+ * self-documenting: editors show `UntypedApiResponse` (with this doc) rather than
3447
+ * an anonymous `unknown`, signalling that the value must be explicitly asserted
3448
+ * to a known shape (`const p = res as MyPeriod`) rather than trusted. It stays
3449
+ * assignment-compatible with `unknown`, so no runtime or narrowing behaviour
3450
+ * changes.
3451
+ *
3452
+ * The fix is upstream: document these endpoints' response bodies in the owning
3453
+ * Nominal service's OpenAPI (then the registry entry can reference the generated
3454
+ * `*Response` type). Affected ops today: `GET_PERIODS`, `GET_PERIOD_INSTANCE`,
3455
+ * `GET_PERIOD_INSTANCE_BY_SLUG`, `POST_TASK_OUTPUT`, `GET_TASK_INSTANCE`,
3456
+ * `GET_TASK_INSTANCES`, `GET_TASK_DEFINITION`, `GET_ACTIVITY_DEFINITION(S)`,
3457
+ * `GET_ACTIVITY_INSTANCE`, `GET_ACTIVITY_INSTANCE_TASKS`,
3458
+ * `GET_ACTIVITY_PERIOD_TASKS`.
3459
+ */
3460
+ type UntypedApiResponse = unknown;
3461
+ interface UploadPayload {
3462
+ buffer: ArrayBuffer;
3463
+ fileName: string;
3464
+ fileType: string;
3465
+ entityType: string;
3466
+ entityId?: string | number;
3467
+ }
3468
+ interface UploadResponse {
3469
+ attachmentId: string;
3470
+ name: string;
3471
+ /** Public/presigned URL of the stored file, when the host returns one. */
3472
+ url?: string;
3473
+ }
3474
+ interface UploadProgress {
3475
+ attachmentId: string;
3476
+ progress: number;
3477
+ }
3478
+ /** How the host should apply a navigation. Defaults to `'push'`. */
3479
+ type NavigateAction = 'push' | 'replace' | 'refresh';
3480
+ /** Collapse/expand the host's side navigation. */
3481
+ interface SetSideNavPayload {
3482
+ collapsed: boolean;
3483
+ }
3484
+ /** Targets for a host cache invalidation. */
3485
+ interface InvalidateCachePayload {
3486
+ /** API path prefixes to invalidate, e.g. `['/accounting/accounts']`. */
3487
+ paths?: string[];
3488
+ /** Cache tag keys to invalidate, e.g. `['REPORTS', 'SUBSIDIARIES']`. */
3489
+ tags?: string[];
3490
+ }
3491
+ /** Result of a host cache invalidation. */
3492
+ interface InvalidateResult {
3493
+ invalidated: boolean;
3494
+ }
3495
+
3496
+ /**
3497
+ * All operations the iframe can invoke on the host, each with a typed request
3498
+ * payload and a typed response. Adding a new operation here is all that's
3499
+ * required — message union types and handler types are derived automatically.
3500
+ *
3501
+ * Operations that also emit intermediate progress events should include a
3502
+ * `progress` field with the progress payload type.
3503
+ */
3504
+ interface RequestRegistry {
3505
+ GET_CHART_OF_ACCOUNTS: {
3506
+ payload: Omit<GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetData, 'url'>;
3507
+ data: GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponse;
3508
+ };
3509
+ GET_SUBSIDIARIES: {
3510
+ payload: Omit<GetAllSubsidiariesApiTenancySubsidiaryGetData, 'url'>;
3511
+ data: GetAllSubsidiariesApiTenancySubsidiaryGetResponse;
3512
+ };
3513
+ GET_PERIODS: {
3514
+ payload: Omit<GetPeriodInstancesApiActivityPeriodInstanceGetData, 'url'>;
3515
+ data: UntypedApiResponse;
3516
+ };
3517
+ POST_TASK_OUTPUT: {
3518
+ payload: Omit<UpdateTaskInstanceApiActivityTaskInstanceTaskInstanceIdPutData, 'url'>;
3519
+ data: UntypedApiResponse;
3520
+ };
3521
+ GET_DIMENSIONS: {
3522
+ payload: Omit<GetDimensionsApiAccountingDimensionGetData, 'url'>;
3523
+ data: GetDimensionsApiAccountingDimensionGetResponse;
3524
+ };
3525
+ GET_DIMENSION_VALUES: {
3526
+ payload: Omit<GetDimensionValuesApiAccountingDimensionValueGetData, 'url'>;
3527
+ data: GetDimensionValuesApiAccountingDimensionValueGetResponse;
3528
+ };
3529
+ GET_JOURNAL_ENTRIES: {
3530
+ payload: Omit<GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetData, 'url'>;
3531
+ data: GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponse;
3532
+ };
3533
+ GET_ACTIVITY_DEFINITIONS: {
3534
+ payload: Omit<GetActivityDefinitionsApiActivityActivityDefinitionGetData, 'url'>;
3535
+ data: UntypedApiResponse;
3536
+ };
3537
+ GET_TASK_DEFINITIONS: {
3538
+ payload: Omit<GetAllTasksDefinitionsApiActivityTaskDefinitionGetData, 'url'>;
3539
+ data: GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponse;
3540
+ };
3541
+ GET_TASK_INSTANCES: {
3542
+ payload: Omit<GetAllTaskInstancesApiActivityTaskInstanceGetData, 'url'>;
3543
+ data: UntypedApiResponse;
3544
+ };
3545
+ GET_FISCAL_CALENDARS: {
3546
+ payload: Omit<GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetData, 'url'>;
3547
+ data: GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponse;
3548
+ };
3549
+ GET_FISCAL_CALENDAR: {
3550
+ payload: Omit<GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetData, 'url'>;
3551
+ data: GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponse;
3552
+ };
3553
+ GET_ACCOUNTS: {
3554
+ payload: Omit<GetAccountsApiAccountingAccountGetData, 'url'>;
3555
+ data: GetAccountsApiAccountingAccountGetResponse;
3556
+ };
3557
+ GET_ACCOUNT: {
3558
+ payload: Omit<GetAccountApiAccountingAccountAccountIdGetData, 'url'>;
3559
+ data: GetAccountApiAccountingAccountAccountIdGetResponse;
3560
+ };
3561
+ GET_COA_TREE: {
3562
+ payload: Omit<GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetData, 'url'>;
3563
+ data: GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponse;
3564
+ };
3565
+ GET_COA_FLAT_SIMPLE: {
3566
+ payload: Omit<GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetData, 'url'>;
3567
+ data: GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponse;
3568
+ };
3569
+ GET_COA_GROUPED: {
3570
+ payload: Omit<GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetData, 'url'>;
3571
+ data: GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponse;
3572
+ };
3573
+ GET_COA_ACCOUNT: {
3574
+ payload: Omit<GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetData, 'url'>;
3575
+ data: GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponse;
3576
+ };
3577
+ GET_SUBSIDIARY_AVAILABLE_CURRENCIES: {
3578
+ payload: Omit<GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetData, 'url'>;
3579
+ data: GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponse;
3580
+ };
3581
+ GET_CONVERSION_RATES: {
3582
+ payload: Omit<GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetData, 'url'>;
3583
+ data: GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponse;
3584
+ };
3585
+ GET_EFFECTIVE_EXCHANGE_RATE: {
3586
+ payload: Omit<GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetData, 'url'>;
3587
+ data: GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponse;
3588
+ };
3589
+ GET_EXCHANGE_RATE_BY_DATE: {
3590
+ payload: Omit<GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetData, 'url'>;
3591
+ data: GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponse;
3592
+ };
3593
+ GET_DIMENSION_ACCOUNT_ASSIGNMENTS: {
3594
+ payload: Omit<GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetData, 'url'>;
3595
+ data: GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponse;
3596
+ };
3597
+ GET_DIMENSION_VALUES_HIERARCHICAL: {
3598
+ payload: Omit<GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetData, 'url'>;
3599
+ data: GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponse;
3600
+ };
3601
+ GET_JOURNAL_LINES: {
3602
+ payload: Omit<GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetData, 'url'>;
3603
+ data: GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponse;
3604
+ };
3605
+ GET_JOURNAL_ENTRY: {
3606
+ payload: Omit<GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetData, 'url'>;
3607
+ data: GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponse;
3608
+ };
3609
+ GET_PERIOD_INSTANCE: {
3610
+ payload: Omit<GetPeriodInstanceApiActivityPeriodInstancePeriodInstanceIdGetData, 'url'>;
3611
+ data: UntypedApiResponse;
3612
+ };
3613
+ GET_PERIOD_INSTANCE_BY_SLUG: {
3614
+ payload: Omit<GetPeriodInstanceBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdGetData, 'url'>;
3615
+ data: UntypedApiResponse;
3616
+ };
3617
+ GET_PERIOD_PROGRESS_BREAKDOWN: {
3618
+ payload: Omit<GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetData, 'url'>;
3619
+ data: GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponse;
3620
+ };
3621
+ GET_ACTIVITY_DEFINITION: {
3622
+ payload: Omit<GetActivityDefinitionByIdApiActivityActivityDefinitionActivityDefinitionIdGetData, 'url'>;
3623
+ data: UntypedApiResponse;
3624
+ };
3625
+ GET_ACTIVITY_INSTANCES: {
3626
+ payload: Omit<GetActivityInstancesApiActivityActivityInstanceGetData, 'url'>;
3627
+ data: GetActivityInstancesApiActivityActivityInstanceGetResponse;
3628
+ };
3629
+ GET_ACTIVITY_INSTANCE: {
3630
+ payload: Omit<GetActivityInstanceApiActivityActivityInstanceActivityInstanceIdGetData, 'url'>;
3631
+ data: UntypedApiResponse;
3632
+ };
3633
+ GET_ACTIVITY_INSTANCE_BY_PERIOD: {
3634
+ payload: Omit<GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetData, 'url'>;
3635
+ data: GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponse;
3636
+ };
3637
+ GET_ACTIVITY_INSTANCE_TASKS: {
3638
+ payload: Omit<GetTaskInstancesByActivityApiActivityActivityInstanceActivityInstanceIdTaskGetData, 'url'>;
3639
+ data: UntypedApiResponse;
3640
+ };
3641
+ GET_ACTIVITY_PERIOD_TASKS: {
3642
+ payload: Omit<GetTaskInstancesByActivityPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdTaskGetData, 'url'>;
3643
+ data: UntypedApiResponse;
3644
+ };
3645
+ GET_TASK_DEFINITION: {
3646
+ payload: Omit<GetTaskDefinitionByIdApiActivityTaskDefinitionTaskDefinitionIdGetData, 'url'>;
3647
+ data: UntypedApiResponse;
3648
+ };
3649
+ CREATE_TASK_DEFINITION: {
3650
+ payload: Omit<CreateTaskDefinitionApiActivityTaskDefinitionPostData, 'url'>;
3651
+ data: CreateTaskDefinitionApiActivityTaskDefinitionPostResponse;
3652
+ };
3653
+ UPDATE_TASK_DEFINITION: {
3654
+ payload: Omit<UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutData, 'url'>;
3655
+ data: UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponse;
3656
+ };
3657
+ GET_TASK_DEFINITIONS_BY_FILTER: {
3658
+ payload: Omit<GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostData, 'url'>;
3659
+ data: GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponse;
3660
+ };
3661
+ GET_TASK_INSTANCE: {
3662
+ payload: Omit<GetTaskInstanceByIdApiActivityTaskInstanceTaskInstanceIdGetData, 'url'>;
3663
+ data: UntypedApiResponse;
3664
+ };
3665
+ GET_TASK_INSTANCES_BY_FILTER: {
3666
+ payload: Omit<GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostData, 'url'>;
3667
+ data: GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponse;
3668
+ };
3669
+ GET_AUDIT_EVENTS: {
3670
+ payload: Omit<GetEventsApiAuditTrailEventGetData, 'url'>;
3671
+ data: GetEventsApiAuditTrailEventGetResponse;
3672
+ };
3673
+ GET_ENTITY_AUDIT_EVENTS: {
3674
+ payload: Omit<GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostData, 'url'>;
3675
+ data: GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponse;
3676
+ };
3677
+ GET_SUBSIDIARY: {
3678
+ payload: Omit<GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetData, 'url'>;
3679
+ data: GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponse;
3680
+ };
3681
+ GET_SUBSIDIARY_PARENT_CURRENCIES: {
3682
+ payload: Omit<GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetData, 'url'>;
3683
+ data: GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponse;
3684
+ };
3685
+ GET_TENANT_USERS: {
3686
+ payload: Omit<GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetData, 'url'>;
3687
+ data: GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponse;
3688
+ };
3689
+ INVALIDATE_CACHE: {
3690
+ payload: InvalidateCachePayload;
3691
+ data: InvalidateResult;
3692
+ };
3693
+ UPLOAD_FILE: {
3694
+ payload: UploadPayload;
3695
+ data: UploadResponse;
3696
+ progress: UploadProgress;
3697
+ };
3698
+ }
3699
+
3700
+ /**
3701
+ * An error that crossed the bridge, carrying a machine-readable {@link code}
3702
+ * alongside the human-readable message.
3703
+ *
3704
+ * The host attaches a `code` to failed responses (e.g. `'RATE_LIMITED'`,
3705
+ * `'FILE_TOO_LARGE'`, `'REQUEST_FAILED'`); the bridge rehydrates it into a
3706
+ * `BridgeError` so app `catch` blocks can branch on `error.code` instead of
3707
+ * string-matching `error.message`. A failed Nominal API call rehydrates as the
3708
+ * {@link HttpBridgeError} subtype, which adds the HTTP `status`.
3709
+ *
3710
+ * SDK-originated codes you may also see: `'TIMEOUT'` (a request or the connect
3711
+ * handshake timed out), `'DESTROYED'` (the bridge was torn down mid-flight),
3712
+ * `'PARENT_ORIGIN_UNRESOLVED'` (no embedding origin could be resolved) and
3713
+ * `'SERVER_ENVIRONMENT'` (a browser-only method was called where there is no
3714
+ * `window` — e.g. during SSR / in a React Server Component / in a Worker).
3715
+ *
3716
+ * This class is safe to import from any environment (see the module header).
3717
+ *
3718
+ * @example
3719
+ * ```ts
3720
+ * import { BridgeError } from '@nominalso/vibe-bridge'
3721
+ *
3722
+ * try {
3723
+ * await bridge.getAccounts({})
3724
+ * } catch (err) {
3725
+ * // `instanceof` works within a single bundle; `isBridgeError` also works
3726
+ * // across independently-built server/client bundles.
3727
+ * if (BridgeError.isBridgeError(err) && err.code === 'RATE_LIMITED') {
3728
+ * // back off and retry
3729
+ * }
3730
+ * }
3731
+ * ```
3732
+ */
3733
+ declare class BridgeError extends Error {
3734
+ readonly code: string;
3735
+ constructor(code: string, message: string);
3736
+ /**
3737
+ * Cross-realm-safe type guard. Prefer this over `instanceof BridgeError` when
3738
+ * an error may have been thrown by a differently-built copy of the SDK (e.g.
3739
+ * server bundle vs client bundle) — it matches on a process-global brand
3740
+ * rather than class identity.
3741
+ */
3742
+ static isBridgeError(err: unknown): err is BridgeError;
3743
+ }
3744
+ /**
3745
+ * A {@link BridgeError} for a failed Nominal API call. Its `code` is always
3746
+ * `'REQUEST_FAILED'`; the HTTP {@link status} is carried as a structured field
3747
+ * so callers can branch on it (e.g. `err.status === 404`) instead of parsing
3748
+ * the code string.
3749
+ *
3750
+ * @example
3751
+ * ```ts
3752
+ * import { HttpBridgeError } from '@nominalso/vibe-bridge'
3753
+ *
3754
+ * try {
3755
+ * await bridge.getAccount({ path: { account_id: 'missing' } })
3756
+ * } catch (err) {
3757
+ * if (HttpBridgeError.isHttpBridgeError(err) && err.status === 404) {
3758
+ * // handle not-found
3759
+ * }
3760
+ * }
3761
+ * ```
3762
+ */
3763
+ declare class HttpBridgeError extends BridgeError {
3764
+ readonly status: number;
3765
+ constructor(status: number, message: string);
3766
+ /**
3767
+ * Cross-realm-safe type guard (see {@link BridgeError.isBridgeError}). Returns
3768
+ * `true` only for `HttpBridgeError` instances, not plain `BridgeError`s.
3769
+ */
3770
+ static isHttpBridgeError(err: unknown): err is HttpBridgeError;
3771
+ }
3772
+
3773
+ interface VibeAppBridgeOptions {
3774
+ /**
3775
+ * Origin(s) of the Nominal app embedding this iframe. **Optional.**
3776
+ *
3777
+ * **Omit it** (the recommended default) and the bridge auto-detects the
3778
+ * Nominal page that actually embeds it and talks only to that origin. This is
3779
+ * safe because Nominal serves Vibe Apps behind a `frame-ancestors` CSP, so
3780
+ * only nom-ui can frame the app — a hostile site can't embed it to intercept
3781
+ * what the iframe sends out (`postTaskOutput` bodies, file uploads). Most apps
3782
+ * need nothing here.
3783
+ *
3784
+ * Provide a value to **pin explicitly** — defense in depth, or when deploying
3785
+ * outside Nominal's edge:
3786
+ *
3787
+ * ```ts
3788
+ * parentOrigin: 'https://app.nominal.so' // one exact origin
3789
+ * parentOrigin: ['https://app.nominal.so', 'https://*.vercel.app'] // exact + preview pattern
3790
+ * ```
3791
+ *
3792
+ * A pattern's `*` matches exactly one DNS label or port — anchored, scheme
3793
+ * literal — so `https://*.vercel.app` matches `https://pr-7.vercel.app` but
3794
+ * not `https://a.b.vercel.app` or `https://pr-7.vercel.app.evil.com`. Patterns
3795
+ * are honoured only when this app's own page is served from a recognised
3796
+ * preview host (`*.vercel.app`, `*.lovable.app`, `localhost`, …); on a
3797
+ * production custom domain only exact origins match.
3798
+ *
3799
+ * If neither an explicit value nor an auto-detected parent is available,
3800
+ * `connect()` rejects with `BridgeError` code `PARENT_ORIGIN_UNRESOLVED`.
3801
+ *
3802
+ * Note: this option is only *read* when {@link VibeAppBridge.connect} /
3803
+ * {@link VibeAppBridge.attach} runs — the constructor stores it untouched, so
3804
+ * origin auto-detection never accesses `window` at construction time.
3805
+ */
3806
+ parentOrigin?: string | string[];
3807
+ /**
3808
+ * Global per-request timeout in milliseconds before a call rejects with a
3809
+ * `BridgeError` whose `code` is `'TIMEOUT'`.
3810
+ *
3811
+ * When omitted, each operation uses an operation-specific default tuned to
3812
+ * how long it realistically takes (API reads `30000`, `UPLOAD_FILE`
3813
+ * `120000`, `INVALIDATE_CACHE` `10000`). Setting this overrides all of them
3814
+ * with a single value — only do that if you have a specific reason; the
3815
+ * defaults already match the host's expectations.
3816
+ */
3817
+ requestTimeout?: number;
3818
+ }
3819
+
3820
+ interface UploadOptions {
3821
+ /** Domain entity the file attaches to, e.g. `'JOURNAL_ENTRY'`. */
3822
+ entityType: string;
3823
+ /** Id of the entity the file attaches to, when applicable. */
3824
+ entityId?: string | number;
3825
+ /** Called with incremental progress (`0`–`100`) while the upload streams. */
3826
+ onProgress?: (p: RequestRegistry['UPLOAD_FILE']['progress']) => void;
3827
+ }
3828
+ /**
3829
+ * The typed Nominal data methods (~46) plus {@link BridgeDataMethods.upload},
3830
+ * factored onto a base class so {@link VibeAppBridge} stays focused on
3831
+ * connection/transport. Each method is a thin typed wrapper over `request()`;
3832
+ * `VibeAppBridge` provides the concrete `request` implementation.
3833
+ */
3834
+ declare abstract class BridgeDataMethods {
3835
+ /**
3836
+ * Low-level typed request for **any** operation in {@link RequestRegistry} —
3837
+ * implemented by {@link VibeAppBridge}. The named methods below wrap this.
3838
+ */
3839
+ abstract request<K extends keyof RequestRegistry>(type: K, payload: RequestRegistry[K]['payload'], onProgress?: (payload: unknown) => void): Promise<RequestRegistry[K]['data']>;
3840
+ /**
3841
+ * Fetch the flat chart of accounts for a subsidiary.
3842
+ *
3843
+ * @example
3844
+ * ```ts
3845
+ * const ctx = await bridge.connect()
3846
+ * const accounts = await bridge.getChartOfAccounts({
3847
+ * path: { subsidiary_id: ctx.subsidiaryId },
3848
+ * })
3849
+ * ```
3850
+ */
3851
+ getChartOfAccounts(payload: RequestRegistry['GET_CHART_OF_ACCOUNTS']['payload']): Promise<RequestRegistry['GET_CHART_OF_ACCOUNTS']['data']>;
3852
+ /** Fetch the chart of accounts as a hierarchical tree for a subsidiary. */
3853
+ getCoaTree(payload: RequestRegistry['GET_COA_TREE']['payload']): Promise<RequestRegistry['GET_COA_TREE']['data']>;
3854
+ /** Fetch a simplified flat chart of accounts for a subsidiary. */
3855
+ getCoaFlatSimple(payload: RequestRegistry['GET_COA_FLAT_SIMPLE']['payload']): Promise<RequestRegistry['GET_COA_FLAT_SIMPLE']['data']>;
3856
+ /** Fetch the flat chart of accounts grouped by account group. */
3857
+ getCoaGrouped(payload: RequestRegistry['GET_COA_GROUPED']['payload']): Promise<RequestRegistry['GET_COA_GROUPED']['data']>;
3858
+ /** Fetch a single chart-of-accounts account by id within a subsidiary. */
3859
+ getCoaAccount(payload: RequestRegistry['GET_COA_ACCOUNT']['payload']): Promise<RequestRegistry['GET_COA_ACCOUNT']['data']>;
3860
+ /** List the currencies available to a subsidiary's chart of accounts. */
3861
+ getSubsidiaryAvailableCurrencies(payload: RequestRegistry['GET_SUBSIDIARY_AVAILABLE_CURRENCIES']['payload']): Promise<RequestRegistry['GET_SUBSIDIARY_AVAILABLE_CURRENCIES']['data']>;
3862
+ /** Fetch accounts at the tenant level. */
3863
+ getAccounts(payload: RequestRegistry['GET_ACCOUNTS']['payload']): Promise<RequestRegistry['GET_ACCOUNTS']['data']>;
3864
+ /** Fetch a single account by id. */
3865
+ getAccount(payload: RequestRegistry['GET_ACCOUNT']['payload']): Promise<RequestRegistry['GET_ACCOUNT']['data']>;
3866
+ /** Fetch currency conversion rates for a currency. */
3867
+ getConversionRates(payload: RequestRegistry['GET_CONVERSION_RATES']['payload']): Promise<RequestRegistry['GET_CONVERSION_RATES']['data']>;
3868
+ /** Fetch the effective consolidation exchange rate. */
3869
+ getEffectiveExchangeRate(payload: RequestRegistry['GET_EFFECTIVE_EXCHANGE_RATE']['payload']): Promise<RequestRegistry['GET_EFFECTIVE_EXCHANGE_RATE']['data']>;
3870
+ /** Fetch the exchange-rate period covering a given input date. */
3871
+ getExchangeRateByDate(payload: RequestRegistry['GET_EXCHANGE_RATE_BY_DATE']['payload']): Promise<RequestRegistry['GET_EXCHANGE_RATE_BY_DATE']['data']>;
3872
+ /** List accounting dimensions. */
3873
+ getDimensions(payload: RequestRegistry['GET_DIMENSIONS']['payload']): Promise<RequestRegistry['GET_DIMENSIONS']['data']>;
3874
+ /** List values for accounting dimensions. */
3875
+ getDimensionValues(payload: RequestRegistry['GET_DIMENSION_VALUES']['payload']): Promise<RequestRegistry['GET_DIMENSION_VALUES']['data']>;
3876
+ /** List dimension values in hierarchical form. */
3877
+ getDimensionValuesHierarchical(payload: RequestRegistry['GET_DIMENSION_VALUES_HIERARCHICAL']['payload']): Promise<RequestRegistry['GET_DIMENSION_VALUES_HIERARCHICAL']['data']>;
3878
+ /** List account assignments for a dimension/account pair. */
3879
+ getDimensionAccountAssignments(payload: RequestRegistry['GET_DIMENSION_ACCOUNT_ASSIGNMENTS']['payload']): Promise<RequestRegistry['GET_DIMENSION_ACCOUNT_ASSIGNMENTS']['data']>;
3880
+ /**
3881
+ * Fetch journal entries for a subsidiary, optionally filtered by date range.
3882
+ *
3883
+ * @example
3884
+ * ```ts
3885
+ * const entries = await bridge.getJournalEntries({
3886
+ * path: { subsidiary_id: ctx.subsidiaryId },
3887
+ * query: { from_date: '2026-01-01', to_date: '2026-03-31' },
3888
+ * })
3889
+ * ```
3890
+ */
3891
+ getJournalEntries(payload: RequestRegistry['GET_JOURNAL_ENTRIES']['payload']): Promise<RequestRegistry['GET_JOURNAL_ENTRIES']['data']>;
3892
+ /** Fetch journal entry lines for a subsidiary. */
3893
+ getJournalLines(payload: RequestRegistry['GET_JOURNAL_LINES']['payload']): Promise<RequestRegistry['GET_JOURNAL_LINES']['data']>;
3894
+ /** Fetch a single journal entry by id within a subsidiary. */
3895
+ getJournalEntry(payload: RequestRegistry['GET_JOURNAL_ENTRY']['payload']): Promise<RequestRegistry['GET_JOURNAL_ENTRY']['data']>;
3896
+ /** List accounting period instances. */
3897
+ getPeriods(payload: RequestRegistry['GET_PERIODS']['payload']): Promise<RequestRegistry['GET_PERIODS']['data']>;
3898
+ /** Fetch a single period instance by id. */
3899
+ getPeriodInstance(payload: RequestRegistry['GET_PERIOD_INSTANCE']['payload']): Promise<RequestRegistry['GET_PERIOD_INSTANCE']['data']>;
3900
+ /** Fetch a period instance by its display slug (e.g. `"mar-2026"`). */
3901
+ getPeriodInstanceBySlug(payload: RequestRegistry['GET_PERIOD_INSTANCE_BY_SLUG']['payload']): Promise<RequestRegistry['GET_PERIOD_INSTANCE_BY_SLUG']['data']>;
3902
+ /** Fetch the close-progress breakdown for a period (by slug). */
3903
+ getPeriodProgressBreakdown(payload: RequestRegistry['GET_PERIOD_PROGRESS_BREAKDOWN']['payload']): Promise<RequestRegistry['GET_PERIOD_PROGRESS_BREAKDOWN']['data']>;
3904
+ /** List activity definitions. */
3905
+ getActivityDefinitions(payload: RequestRegistry['GET_ACTIVITY_DEFINITIONS']['payload']): Promise<RequestRegistry['GET_ACTIVITY_DEFINITIONS']['data']>;
3906
+ /** Fetch a single activity definition by id. */
3907
+ getActivityDefinition(payload: RequestRegistry['GET_ACTIVITY_DEFINITION']['payload']): Promise<RequestRegistry['GET_ACTIVITY_DEFINITION']['data']>;
3908
+ /** List activity instances. */
3909
+ getActivityInstances(payload: RequestRegistry['GET_ACTIVITY_INSTANCES']['payload']): Promise<RequestRegistry['GET_ACTIVITY_INSTANCES']['data']>;
3910
+ /** Fetch a single activity instance by id. */
3911
+ getActivityInstance(payload: RequestRegistry['GET_ACTIVITY_INSTANCE']['payload']): Promise<RequestRegistry['GET_ACTIVITY_INSTANCE']['data']>;
3912
+ /** Fetch an activity instance for a given period + activity definition. */
3913
+ getActivityInstanceByPeriod(payload: RequestRegistry['GET_ACTIVITY_INSTANCE_BY_PERIOD']['payload']): Promise<RequestRegistry['GET_ACTIVITY_INSTANCE_BY_PERIOD']['data']>;
3914
+ /** List task instances for an activity instance. */
3915
+ getActivityInstanceTasks(payload: RequestRegistry['GET_ACTIVITY_INSTANCE_TASKS']['payload']): Promise<RequestRegistry['GET_ACTIVITY_INSTANCE_TASKS']['data']>;
3916
+ /** List task instances for an activity in a given period. */
3917
+ getActivityPeriodTasks(payload: RequestRegistry['GET_ACTIVITY_PERIOD_TASKS']['payload']): Promise<RequestRegistry['GET_ACTIVITY_PERIOD_TASKS']['data']>;
3918
+ /** List task definitions. */
3919
+ getTaskDefinitions(payload: RequestRegistry['GET_TASK_DEFINITIONS']['payload']): Promise<RequestRegistry['GET_TASK_DEFINITIONS']['data']>;
3920
+ /** Fetch a single task definition by id. */
3921
+ getTaskDefinition(payload: RequestRegistry['GET_TASK_DEFINITION']['payload']): Promise<RequestRegistry['GET_TASK_DEFINITION']['data']>;
3922
+ /** Create a task definition. */
3923
+ createTaskDefinition(payload: RequestRegistry['CREATE_TASK_DEFINITION']['payload']): Promise<RequestRegistry['CREATE_TASK_DEFINITION']['data']>;
3924
+ /** Update a task definition by id. */
3925
+ updateTaskDefinition(payload: RequestRegistry['UPDATE_TASK_DEFINITION']['payload']): Promise<RequestRegistry['UPDATE_TASK_DEFINITION']['data']>;
3926
+ /** Query task definitions by filter. */
3927
+ getTaskDefinitionsByFilter(payload: RequestRegistry['GET_TASK_DEFINITIONS_BY_FILTER']['payload']): Promise<RequestRegistry['GET_TASK_DEFINITIONS_BY_FILTER']['data']>;
3928
+ /** List task instances. */
3929
+ getTaskInstances(payload: RequestRegistry['GET_TASK_INSTANCES']['payload']): Promise<RequestRegistry['GET_TASK_INSTANCES']['data']>;
3930
+ /** Fetch a single task instance by id. */
3931
+ getTaskInstance(payload: RequestRegistry['GET_TASK_INSTANCE']['payload']): Promise<RequestRegistry['GET_TASK_INSTANCE']['data']>;
3932
+ /**
3933
+ * Submit a Close-Management task output. This is the **only write path** back
3934
+ * into Nominal — Vibe Apps never write Nominal data directly.
3935
+ *
3936
+ * @example
3937
+ * ```ts
3938
+ * // `body` carries the task-specific output shape.
3939
+ * await bridge.postTaskOutput({
3940
+ * path: { task_instance_id: 'task-1' },
3941
+ * body: {},
3942
+ * })
3943
+ * ```
3944
+ */
3945
+ postTaskOutput(payload: RequestRegistry['POST_TASK_OUTPUT']['payload']): Promise<RequestRegistry['POST_TASK_OUTPUT']['data']>;
3946
+ /** Query task instances by filter. */
3947
+ getTaskInstancesByFilter(payload: RequestRegistry['GET_TASK_INSTANCES_BY_FILTER']['payload']): Promise<RequestRegistry['GET_TASK_INSTANCES_BY_FILTER']['data']>;
3948
+ /** List audit-trail events. */
3949
+ getAuditEvents(payload: RequestRegistry['GET_AUDIT_EVENTS']['payload']): Promise<RequestRegistry['GET_AUDIT_EVENTS']['data']>;
3950
+ /** List audit-trail events for a specific entity. */
3951
+ getEntityAuditEvents(payload: RequestRegistry['GET_ENTITY_AUDIT_EVENTS']['payload']): Promise<RequestRegistry['GET_ENTITY_AUDIT_EVENTS']['data']>;
3952
+ /** List fiscal calendars for a subsidiary. */
3953
+ getFiscalCalendars(payload: RequestRegistry['GET_FISCAL_CALENDARS']['payload']): Promise<RequestRegistry['GET_FISCAL_CALENDARS']['data']>;
3954
+ /** Fetch a single fiscal calendar by id. */
3955
+ getFiscalCalendar(payload: RequestRegistry['GET_FISCAL_CALENDAR']['payload']): Promise<RequestRegistry['GET_FISCAL_CALENDAR']['data']>;
3956
+ /** List subsidiaries for the tenant. */
3957
+ getSubsidiaries(payload: RequestRegistry['GET_SUBSIDIARIES']['payload']): Promise<RequestRegistry['GET_SUBSIDIARIES']['data']>;
3958
+ /** Fetch a single subsidiary by id. */
3959
+ getSubsidiary(payload: RequestRegistry['GET_SUBSIDIARY']['payload']): Promise<RequestRegistry['GET_SUBSIDIARY']['data']>;
3960
+ /** List parent currencies for a subsidiary. */
3961
+ getSubsidiaryParentCurrencies(payload: RequestRegistry['GET_SUBSIDIARY_PARENT_CURRENCIES']['payload']): Promise<RequestRegistry['GET_SUBSIDIARY_PARENT_CURRENCIES']['data']>;
3962
+ /** List users for the tenant. */
3963
+ getTenantUsers(payload: RequestRegistry['GET_TENANT_USERS']['payload']): Promise<RequestRegistry['GET_TENANT_USERS']['data']>;
3964
+ /**
3965
+ * Uploads a file through the host. Converts the `File` to an `ArrayBuffer`
3966
+ * before sending — sandboxed iframes cannot pass `File` handles across
3967
+ * windows. Resolves once Nominal has stored the file.
3968
+ *
3969
+ * @example
3970
+ * ```ts
3971
+ * const input = document.querySelector<HTMLInputElement>('#file')!
3972
+ * const file = input.files![0]
3973
+ * const result = await bridge.upload(file, {
3974
+ * entityType: 'JOURNAL_ENTRY',
3975
+ * entityId: '123',
3976
+ * onProgress: (p) => console.log(`${p.progress}%`),
3977
+ * })
3978
+ * // result.attachmentId, result.name
3979
+ * ```
3980
+ */
3981
+ upload(file: File, options: UploadOptions): Promise<RequestRegistry['UPLOAD_FILE']['data']>;
3982
+ }
3983
+
3984
+ /**
3985
+ * Published version of this package (`@nominalso/vibe-bridge`), sent to the host
3986
+ * in the `CONNECT` handshake. Import-safe from any environment.
3987
+ */
3988
+ declare const BRIDGE_VERSION: string;
3989
+
3990
+ export { type AuthPayload as A, BridgeDataMethods as B, type ContextPayload as C, HttpBridgeError as H, type InvalidateCachePayload as I, type NavigateAction as N, type PostHogContext as P, type RequestRegistry as R, type SetSideNavPayload as S, type UploadOptions as U, type VibeAppBridgeOptions as V, type InvalidateResult as a, BRIDGE_VERSION as b, BridgeError as c, type BridgeSubsidiary as d, type UploadProgress as e, type UploadResponse as f };