@nominalso/vibe-bridge 0.4.0 → 0.6.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,3819 @@
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 ActivityBillDataInput = {
722
+ bill: ActivityBillCreate;
723
+ bill_items: Array<ActivityBillItemCreate>;
724
+ dimension_value_ids?: Array<string>;
725
+ };
726
+ type ActivityBillDataOutput = {
727
+ bill: ActivityBillCreate;
728
+ bill_items: Array<ActivityBillItemCreate>;
729
+ dimension_value_ids?: Array<string>;
730
+ };
731
+ type ActivityBillItemCreate = {
732
+ subsidiary_id: number;
733
+ amount: number;
734
+ account_id: string;
735
+ ap_account_id: string;
736
+ memo?: string | null;
737
+ id: string;
738
+ provider_uid: string;
739
+ bill_id: string;
740
+ item_number: number;
741
+ is_nominal?: boolean;
742
+ };
743
+ type ActivityBillSourceEntity = 'lease';
744
+ type ActivityBillStatus = 'draft' | 'posted' | 'submitted';
745
+ type ActivityBillUpdateBase = {
746
+ posting_date?: string | null;
747
+ due_date?: string | null;
748
+ amount?: number | null;
749
+ currency?: ActivityCurrency | null;
750
+ vendor_id?: string | null;
751
+ reference_number?: string | null;
752
+ bill_number?: string | null;
753
+ memo?: string | null;
754
+ original_id?: string | null;
755
+ };
756
+ type ActivityBlockingScope = 'GLOBAL' | 'SUBSIDIARY';
757
+ type ActivityBodyGetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPost = {
758
+ due_date_timeframe?: ActivityTimeframe | null;
759
+ status?: Array<ActivityTaskStatus>;
760
+ subsidiary_ids?: Array<number>;
761
+ activity_definition_ids?: Array<string>;
762
+ preparer_ids?: Array<string> | null;
763
+ reviewer_ids?: Array<string> | null;
764
+ pagination_in?: ActivityPaginationInput | null;
765
+ search?: ActivityTaskInstanceSearch | null;
766
+ period_instance_id?: string | null;
767
+ period_display_id?: string | null;
768
+ period_instance_ids?: Array<string> | null;
769
+ period_display_ids?: Array<string> | null;
770
+ exclude_task_types?: Array<ActivityTaskType> | null;
771
+ slim?: boolean;
772
+ entity_ids?: Array<string>;
773
+ entity_type?: ActivityTaskEntityType | null;
774
+ with_entities?: boolean;
775
+ };
776
+ type ActivityConsolidationExchangeRateType = 'current' | 'average' | 'historical';
777
+ type ActivityCreateBillTaskActionDataInput = {
778
+ action_type?: 'create_bill';
779
+ bill_data: ActivityBillDataInput;
780
+ };
781
+ type ActivityCreateBillTaskActionDataOutput = {
782
+ action_type?: 'create_bill';
783
+ bill_data: ActivityBillDataOutput;
784
+ };
785
+ type ActivityCreateIctEliminationActionTemplateInput = {
786
+ action_type?: 'create_ict_elimination_entries';
787
+ ict_elimination_data: ActivityIctEliminationDataInput;
788
+ };
789
+ type ActivityCreateIctEliminationActionTemplateOutput = {
790
+ action_type?: 'create_ict_elimination_entries';
791
+ ict_elimination_data: ActivityIctEliminationDataOutput;
792
+ };
793
+ type ActivityCreateIctEliminationTaskActionDataInput = {
794
+ action_type?: 'create_ict_elimination_entries';
795
+ ict_elimination_data: ActivityIctEliminationDataInput;
796
+ };
797
+ type ActivityCreateIctEliminationTaskActionDataOutput = {
798
+ action_type?: 'create_ict_elimination_entries';
799
+ ict_elimination_data: ActivityIctEliminationDataOutput;
800
+ };
801
+ type ActivityCreateJournalEntriesActionTemplateInput = {
802
+ action_type?: 'create_journal_entries';
803
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput>;
804
+ };
805
+ type ActivityCreateJournalEntriesActionTemplateOutput = {
806
+ action_type?: 'create_journal_entries';
807
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput>;
808
+ };
809
+ type ActivityCreateJournalEntriesBulkActionTemplateInput = {
810
+ action_type?: 'create_journal_entries_bulk';
811
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput | ActivityApiJournalEntryInput>;
812
+ };
813
+ type ActivityCreateJournalEntriesBulkActionTemplateOutput = {
814
+ action_type?: 'create_journal_entries_bulk';
815
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput | ActivityApiJournalEntryOutput>;
816
+ };
817
+ type ActivityCreateJournalEntriesBulkTaskActionDataInput = {
818
+ action_type?: 'create_journal_entries_bulk';
819
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput>;
820
+ };
821
+ type ActivityCreateJournalEntriesBulkTaskActionDataOutput = {
822
+ action_type?: 'create_journal_entries_bulk';
823
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput>;
824
+ };
825
+ type ActivityCreateJournalEntryActionTemplateInput = {
826
+ action_type?: 'create_journal_entry';
827
+ journal_entry_data: ActivityJournalEntryWithLinesWithDimensionValuesInput | ActivityApiJournalEntryInput;
828
+ reverse_date?: string | null;
829
+ };
830
+ type ActivityCreateJournalEntryActionTemplateOutput = {
831
+ action_type?: 'create_journal_entry';
832
+ journal_entry_data: ActivityJournalEntryWithLinesWithDimensionValuesOutput | ActivityApiJournalEntryOutput;
833
+ reverse_date?: string | null;
834
+ };
835
+ type ActivityCreateJournalEntryScheduleActionTemplateInput = {
836
+ action_type?: 'create_journal_entry_schedule';
837
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput>;
838
+ due_date: ActivityDueDate;
839
+ schedule_name: string;
840
+ };
841
+ type ActivityCreateJournalEntryScheduleActionTemplateOutput = {
842
+ action_type?: 'create_journal_entry_schedule';
843
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput>;
844
+ due_date: ActivityDueDate;
845
+ schedule_name: string;
846
+ };
847
+ type ActivityCreateJournalEntryTaskActionDataInput = {
848
+ action_type?: 'create_journal_entry';
849
+ journal_entry_data: ActivityJournalEntryWithLinesWithDimensionValuesInput | ActivityApiJournalEntryInput;
850
+ reverse_date?: string | null;
851
+ };
852
+ type ActivityCreateJournalEntryTaskActionDataOutput = {
853
+ action_type?: 'create_journal_entry';
854
+ journal_entry_data: ActivityJournalEntryWithLinesWithDimensionValuesOutput | ActivityApiJournalEntryOutput;
855
+ reverse_date?: string | null;
856
+ };
857
+ type ActivityCreateJournalEntryTaskScheduleActionDataInput = {
858
+ action_type?: 'create_journal_entry_schedule';
859
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesInput>;
860
+ due_date: ActivityDueDate;
861
+ schedule_name: string;
862
+ };
863
+ type ActivityCreateJournalEntryTaskScheduleActionDataOutput = {
864
+ action_type?: 'create_journal_entry_schedule';
865
+ journal_entries: Array<ActivityJournalEntryWithLinesWithDimensionValuesOutput>;
866
+ due_date: ActivityDueDate;
867
+ schedule_name: string;
868
+ };
869
+ type ActivityCreateLockPeriodTaskActionDataInput = {
870
+ action_type?: 'lock_consolidation_period';
871
+ period_data: ActivityPeriodData;
872
+ };
873
+ type ActivityCreateLockPeriodTaskActionDataOutput = {
874
+ action_type?: 'lock_consolidation_period';
875
+ period_data: ActivityPeriodData;
876
+ };
877
+ 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';
878
+ type ActivityDeltaUnit = 'Days' | 'Weeks' | 'Weekdays';
879
+ type ActivityDimension = {
880
+ name: string;
881
+ description?: string | null;
882
+ id: string;
883
+ is_default?: boolean;
884
+ values?: Array<ActivityDimensionValue>;
885
+ };
886
+ type ActivityDimensionRuleInput = {
887
+ dimension_id: string;
888
+ order: number;
889
+ dimension_value_id: string;
890
+ name: string;
891
+ subsidiary_id?: number | null;
892
+ by_account_code?: Array<string> | null;
893
+ by_account_name?: string | null;
894
+ by_account_ids?: Array<string> | null;
895
+ by_account_types?: Array<ActivityAccountType> | null;
896
+ by_journal_entry_memo?: string | null;
897
+ by_journal_entry_created_from?: string | null;
898
+ by_journal_entry_line_memo?: string | null;
899
+ by_journal_entry_line_property?: string | null;
900
+ by_dimension_value_ids?: Array<string> | null;
901
+ by_empty_dimension_id_values?: Array<string> | null;
902
+ id: number;
903
+ dimension: ActivityDimension;
904
+ dimension_value: ActivityDimensionValue;
905
+ accounts?: Array<ActivityTAccountWithoutSubsidiaryMappingInput>;
906
+ };
907
+ type ActivityDimensionRuleOutput = {
908
+ dimension_id: string;
909
+ order: number;
910
+ dimension_value_id: string;
911
+ name: string;
912
+ subsidiary_id?: number | null;
913
+ by_account_code?: Array<string> | null;
914
+ by_account_name?: string | null;
915
+ by_account_ids?: Array<string> | null;
916
+ by_account_types?: Array<ActivityAccountType> | null;
917
+ by_journal_entry_memo?: string | null;
918
+ by_journal_entry_created_from?: string | null;
919
+ by_journal_entry_line_memo?: string | null;
920
+ by_journal_entry_line_property?: string | null;
921
+ by_dimension_value_ids?: Array<string> | null;
922
+ by_empty_dimension_id_values?: Array<string> | null;
923
+ id: number;
924
+ dimension: ActivityDimension;
925
+ dimension_value: ActivityDimensionValue;
926
+ accounts?: Array<ActivityTAccountWithoutSubsidiaryMappingOutput>;
927
+ };
928
+ type ActivityDimensionValue = {
929
+ id?: string | null;
930
+ value: string;
931
+ subsidiary_id?: number | null;
932
+ provider_uid?: string | null;
933
+ parent_id?: string | null;
934
+ dimension_id: string;
935
+ is_default: boolean;
936
+ effective_rule_id?: number | null;
937
+ has_children?: boolean;
938
+ };
939
+ type ActivityDimensionValueOverrideSource = 'user' | 'provider';
940
+ /**
941
+ * DueDate represents the due date of a task/activity definition.
942
+ * We will use it to decide the actual due date of a task/activity instance.
943
+ *
944
+ * from_start: if True, the due date is calculated from the start date of the period.
945
+ * days_delta: the number of days/weeks/workdays to shift for start/end date.
946
+ * is_forward: if True, the due date is calculated forward from the start/end date of the period.
947
+ * delta_unit: unit of the delta (Days | Weeks | Workdays), default is Days.
948
+ * is_specific_day: if True, indicates that the due date is a specific calendar day (reserved for future use).
949
+ * should_skip_holidays: when using Workdays, whether to skip country holidays in addition to weekends.
950
+ */
951
+ type ActivityDueDate = {
952
+ from_start: boolean;
953
+ days_delta: number;
954
+ is_forward: boolean;
955
+ delta_unit?: ActivityDeltaUnit;
956
+ is_specific_day?: boolean;
957
+ should_skip_holidays?: boolean;
958
+ };
959
+ type ActivityExchangeRate = {
960
+ from_currency: ActivityCurrency;
961
+ to_currency: ActivityCurrency;
962
+ rate: number;
963
+ };
964
+ type ActivityFailureActionTemplate = {
965
+ action_type?: 'failure_task';
966
+ };
967
+ type ActivityFailureTaskActionData = {
968
+ action_type?: 'failure_task';
969
+ };
970
+ type ActivityGroupTransaction = {
971
+ transaction_id: number;
972
+ journal_entry_id: string;
973
+ elimination_entry_id?: string | null;
974
+ id: number;
975
+ };
976
+ type ActivityIctEliminationDataInput = {
977
+ ict_transaction_id: number;
978
+ eliminations: Array<ActivityIctEliminationEntryInput>;
979
+ };
980
+ type ActivityIctEliminationDataOutput = {
981
+ ict_transaction_id: number;
982
+ eliminations: Array<ActivityIctEliminationEntryOutput>;
983
+ };
984
+ type ActivityIctEliminationEntryInput = {
985
+ journal_entry: ActivityJournalEntryWithLinesWithDimensionValuesInput;
986
+ from_subsidiary_id: number;
987
+ to_subsidiary_id: number;
988
+ };
989
+ type ActivityIctEliminationEntryOutput = {
990
+ journal_entry: ActivityJournalEntryWithLinesWithDimensionValuesOutput;
991
+ from_subsidiary_id: number;
992
+ to_subsidiary_id: number;
993
+ };
994
+ type ActivityJeWriteBackStatus = 'syncing' | 'synced' | 'partial_success' | 'success' | 'failure';
995
+ type ActivityJournalEntryLineWithDimensionValuesInput = {
996
+ id: string;
997
+ account_id: string;
998
+ journal_entry_id: string;
999
+ line_num: number;
1000
+ is_debit: boolean;
1001
+ account_provider_id?: string | null;
1002
+ account?: ActivityTAccountWithoutSubsidiaryMappingInput | null;
1003
+ total_amount?: number;
1004
+ primary_currency_amount?: number;
1005
+ secondary_currency_amount?: number;
1006
+ tertiary_currency_amount?: number;
1007
+ subsidiary_id?: number | null;
1008
+ create_time?: string | null;
1009
+ transaction_date?: string | null;
1010
+ memo?: string | null;
1011
+ provider_property?: string | null;
1012
+ is_for_elimination?: boolean;
1013
+ recurring_transaction_id?: string | null;
1014
+ transaction_number?: string | null;
1015
+ po_number?: string | null;
1016
+ sales_order_ref?: string | null;
1017
+ invoice_ref?: string | null;
1018
+ extra_reference?: string | null;
1019
+ assignment_ref?: string | null;
1020
+ dimension_values?: Array<ActivityLineDimensionEffectiveAssignmentInput | ActivityDimensionValue>;
1021
+ };
1022
+ type ActivityJournalEntryLineWithDimensionValuesOutput = {
1023
+ id: string;
1024
+ account_id: string;
1025
+ journal_entry_id: string;
1026
+ line_num: number;
1027
+ is_debit: boolean;
1028
+ account_provider_id?: string | null;
1029
+ account?: ActivityTAccountWithoutSubsidiaryMappingOutput | null;
1030
+ total_amount?: number;
1031
+ primary_currency_amount?: number;
1032
+ secondary_currency_amount?: number;
1033
+ tertiary_currency_amount?: number;
1034
+ subsidiary_id?: number | null;
1035
+ create_time?: string | null;
1036
+ transaction_date?: string | null;
1037
+ memo?: string | null;
1038
+ provider_property?: string | null;
1039
+ is_for_elimination?: boolean;
1040
+ recurring_transaction_id?: string | null;
1041
+ transaction_number?: string | null;
1042
+ po_number?: string | null;
1043
+ sales_order_ref?: string | null;
1044
+ invoice_ref?: string | null;
1045
+ extra_reference?: string | null;
1046
+ assignment_ref?: string | null;
1047
+ dimension_values?: Array<ActivityLineDimensionEffectiveAssignmentOutput | ActivityDimensionValue>;
1048
+ };
1049
+ type ActivityJournalEntrySource = 'Elimination' | 'Journal Entry' | 'Bill' | 'Lease' | 'Invoice' | 'Bill Payment';
1050
+ type ActivityJournalEntryStatus = 'Posted' | 'Draft' | 'Submitted';
1051
+ type ActivityJournalEntryType = 'adjustment' | 'elimination' | 'book_entry' | 'ic_transaction';
1052
+ type ActivityJournalEntryWithLinesWithDimensionValuesInput = {
1053
+ lines?: Array<ActivityJournalEntryLineWithDimensionValuesInput>;
1054
+ created_from: string;
1055
+ currency: ActivityCurrency;
1056
+ memo?: string | null;
1057
+ create_time?: string;
1058
+ transaction_date?: string | null;
1059
+ posting_date?: string | null;
1060
+ is_adjustment?: boolean;
1061
+ transaction_id?: number | null;
1062
+ status?: ActivityJournalEntryStatus;
1063
+ exchange_rates?: Array<ActivityExchangeRate>;
1064
+ id: string;
1065
+ subsidiary_id: number;
1066
+ provider_uid: string;
1067
+ ref_number?: string | null;
1068
+ insert_time?: string;
1069
+ clearing_group_id?: number | null;
1070
+ is_nominal_ledger?: boolean;
1071
+ sub_ledger?: ActivitySubLedger | null;
1072
+ gl_entry_id?: string | null;
1073
+ reconciled?: boolean | null;
1074
+ source_entity?: ActivityJournalEntrySource | null;
1075
+ provider_url?: string | null;
1076
+ posting_period_id?: string | null;
1077
+ syncing_status?: ActivityWriteBackStatusInput | null;
1078
+ group_transaction?: ActivityGroupTransaction | null;
1079
+ reverse_entry_id?: string | null;
1080
+ };
1081
+ type ActivityJournalEntryWithLinesWithDimensionValuesOutput = {
1082
+ lines?: Array<ActivityJournalEntryLineWithDimensionValuesOutput>;
1083
+ created_from: string;
1084
+ currency: ActivityCurrency;
1085
+ memo?: string | null;
1086
+ create_time?: string;
1087
+ transaction_date?: string | null;
1088
+ posting_date?: string | null;
1089
+ is_adjustment?: boolean;
1090
+ transaction_id?: number | null;
1091
+ status?: ActivityJournalEntryStatus;
1092
+ exchange_rates?: Array<ActivityExchangeRate>;
1093
+ id: string;
1094
+ subsidiary_id: number;
1095
+ provider_uid: string;
1096
+ ref_number?: string | null;
1097
+ insert_time?: string;
1098
+ clearing_group_id?: number | null;
1099
+ is_nominal_ledger?: boolean;
1100
+ sub_ledger?: ActivitySubLedger | null;
1101
+ gl_entry_id?: string | null;
1102
+ reconciled?: boolean | null;
1103
+ source_entity?: ActivityJournalEntrySource | null;
1104
+ provider_url?: string | null;
1105
+ posting_period_id?: string | null;
1106
+ syncing_status?: ActivityWriteBackStatusOutput | null;
1107
+ group_transaction?: ActivityGroupTransaction | null;
1108
+ reverse_entry_id?: string | null;
1109
+ };
1110
+ type ActivityLeaseAmortizationOpeningBalanceActionTemplateInput = {
1111
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1112
+ currency: ActivityCurrency;
1113
+ subsidiary_id: number;
1114
+ rou_asset_opening_balance: number;
1115
+ liability_opening_balance: number;
1116
+ primary_start_date: string;
1117
+ lease_id: string;
1118
+ lease_name: string;
1119
+ lease_dimension_value_id: string;
1120
+ vendor_id: string;
1121
+ liability_account_id: string;
1122
+ rou_asset_account_id: string;
1123
+ lease_expense_account_id: string;
1124
+ lease_amortization: Array<ActivityLeaseAmortizationPointInput>;
1125
+ migration_date?: string | null;
1126
+ is_draft?: boolean;
1127
+ };
1128
+ type ActivityLeaseAmortizationOpeningBalanceActionTemplateOutput = {
1129
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1130
+ currency: ActivityCurrency;
1131
+ subsidiary_id: number;
1132
+ rou_asset_opening_balance: number;
1133
+ liability_opening_balance: number;
1134
+ primary_start_date: string;
1135
+ lease_id: string;
1136
+ lease_name: string;
1137
+ lease_dimension_value_id: string;
1138
+ vendor_id: string;
1139
+ liability_account_id: string;
1140
+ rou_asset_account_id: string;
1141
+ lease_expense_account_id: string;
1142
+ lease_amortization: Array<ActivityLeaseAmortizationPointOutput>;
1143
+ migration_date?: string | null;
1144
+ is_draft?: boolean;
1145
+ };
1146
+ type ActivityLeaseAmortizationPointInput = {
1147
+ date: string;
1148
+ payment: ActivityBalanceInput;
1149
+ interest_rate: ActivityBalanceInput;
1150
+ straight_line_payment: ActivityBalanceInput;
1151
+ liability: ActivityBalanceInput;
1152
+ right_of_use_asset: ActivityBalanceInput;
1153
+ term?: ActivityMinimalTerm | null;
1154
+ };
1155
+ type ActivityLeaseAmortizationPointOutput = {
1156
+ date: string;
1157
+ payment: ActivityBalanceOutput;
1158
+ interest_rate: ActivityBalanceOutput;
1159
+ straight_line_payment: ActivityBalanceOutput;
1160
+ liability: ActivityBalanceOutput;
1161
+ right_of_use_asset: ActivityBalanceOutput;
1162
+ term?: ActivityMinimalTerm | null;
1163
+ asset_reduction: ActivityBalanceOutput;
1164
+ };
1165
+ type ActivityLeaseAmortizationScheduleActionTemplateInput = {
1166
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1167
+ currency: ActivityCurrency;
1168
+ subsidiary_id: number;
1169
+ rou_asset_opening_balance: number;
1170
+ liability_opening_balance: number;
1171
+ primary_start_date: string;
1172
+ lease_id: string;
1173
+ lease_name: string;
1174
+ lease_dimension_value_id: string;
1175
+ vendor_id: string;
1176
+ liability_account_id: string;
1177
+ rou_asset_account_id: string;
1178
+ lease_expense_account_id: string;
1179
+ lease_amortization: Array<ActivityLeaseAmortizationPointInput>;
1180
+ migration_date?: string | null;
1181
+ is_draft?: boolean;
1182
+ };
1183
+ type ActivityLeaseAmortizationScheduleActionTemplateOutput = {
1184
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1185
+ currency: ActivityCurrency;
1186
+ subsidiary_id: number;
1187
+ rou_asset_opening_balance: number;
1188
+ liability_opening_balance: number;
1189
+ primary_start_date: string;
1190
+ lease_id: string;
1191
+ lease_name: string;
1192
+ lease_dimension_value_id: string;
1193
+ vendor_id: string;
1194
+ liability_account_id: string;
1195
+ rou_asset_account_id: string;
1196
+ lease_expense_account_id: string;
1197
+ lease_amortization: Array<ActivityLeaseAmortizationPointOutput>;
1198
+ migration_date?: string | null;
1199
+ is_draft?: boolean;
1200
+ };
1201
+ type ActivityLeaseEscalatorFrequency = 'monthly' | 'quarterly' | 'annually';
1202
+ type ActivityLeasePaymentFrequency = 'monthly' | 'quarterly' | 'annually' | 'once';
1203
+ type ActivityLeasePaymentScheduleActionTemplateInput = {
1204
+ action_type?: 'lease_payment';
1205
+ lease_id: string;
1206
+ lease_name: string;
1207
+ currency: ActivityCurrency;
1208
+ lease_dimension_value_id: string;
1209
+ vendor_id: string;
1210
+ billing_account_id: string;
1211
+ payment_terms: Array<ActivityLeasePaymentTerm>;
1212
+ migration_date?: string | null;
1213
+ is_draft?: boolean;
1214
+ };
1215
+ type ActivityLeasePaymentScheduleActionTemplateOutput = {
1216
+ action_type?: 'lease_payment';
1217
+ lease_id: string;
1218
+ lease_name: string;
1219
+ currency: ActivityCurrency;
1220
+ lease_dimension_value_id: string;
1221
+ vendor_id: string;
1222
+ billing_account_id: string;
1223
+ payment_terms: Array<ActivityLeasePaymentTerm>;
1224
+ migration_date?: string | null;
1225
+ is_draft?: boolean;
1226
+ };
1227
+ type ActivityLeasePaymentTerm = {
1228
+ id?: string;
1229
+ name: string;
1230
+ start_date: string;
1231
+ end_date: string;
1232
+ rent_payment: number;
1233
+ payment_frequency?: ActivityLeasePaymentFrequency;
1234
+ escalator_rate?: number;
1235
+ escalator_frequency?: ActivityLeaseEscalatorFrequency | null;
1236
+ primary_term?: boolean;
1237
+ subsidiary_id?: number | null;
1238
+ lease_id: string;
1239
+ };
1240
+ type ActivityLeaseTermReminderActionTemplateInput = {
1241
+ action_type?: 'lease_term_reminder';
1242
+ lease_id: string;
1243
+ lease_name: string;
1244
+ payment_terms: Array<ActivityLeasePaymentTerm>;
1245
+ migration_date?: string | null;
1246
+ is_draft?: boolean;
1247
+ };
1248
+ type ActivityLeaseTermReminderActionTemplateOutput = {
1249
+ action_type?: 'lease_term_reminder';
1250
+ lease_id: string;
1251
+ lease_name: string;
1252
+ payment_terms: Array<ActivityLeasePaymentTerm>;
1253
+ migration_date?: string | null;
1254
+ is_draft?: boolean;
1255
+ };
1256
+ type ActivityLineDimensionEffectiveAssignmentInput = {
1257
+ journal_line_id: string;
1258
+ dimension_id?: string | null;
1259
+ dimension_value_id?: string | null;
1260
+ effective_rule_id?: number | null;
1261
+ dimension_value_override_id?: number | null;
1262
+ dimension_value?: ActivityDimensionValue | null;
1263
+ effective_rule?: ActivityDimensionRuleInput | null;
1264
+ dimension_value_override?: ActivityLineDimensionValueOverride | null;
1265
+ };
1266
+ type ActivityLineDimensionEffectiveAssignmentOutput = {
1267
+ journal_line_id: string;
1268
+ dimension_id?: string | null;
1269
+ dimension_value_id?: string | null;
1270
+ effective_rule_id?: number | null;
1271
+ dimension_value_override_id?: number | null;
1272
+ dimension_value?: ActivityDimensionValue | null;
1273
+ effective_rule?: ActivityDimensionRuleOutput | null;
1274
+ dimension_value_override?: ActivityLineDimensionValueOverride | null;
1275
+ };
1276
+ type ActivityLineDimensionValueOverride = {
1277
+ dimension_id: string;
1278
+ dimension_value_id: string;
1279
+ journal_line_id: string;
1280
+ override_source?: ActivityDimensionValueOverrideSource;
1281
+ id: number;
1282
+ dimension_value?: ActivityDimensionValue | null;
1283
+ };
1284
+ type ActivityLockConsolidationRateActionTemplate = {
1285
+ action_type?: 'lock_consolidation_period';
1286
+ };
1287
+ type ActivityMappedNominalAccount = {
1288
+ id: string;
1289
+ name: string;
1290
+ hierarchy_account_name: string;
1291
+ account_type: ActivityAccountType;
1292
+ account_number?: string | null;
1293
+ };
1294
+ type ActivityMatchResolutionActionTemplate = {
1295
+ action_type?: 'match_resolution';
1296
+ match_id: string;
1297
+ };
1298
+ type ActivityMatchResolutionTaskActionData = {
1299
+ action_type?: 'match_resolution';
1300
+ match_id: string;
1301
+ entity_id?: string | null;
1302
+ entity_type?: ActivityMatchedEntityType | null;
1303
+ trigger_execution_id?: string | null;
1304
+ trigger_id?: string | null;
1305
+ };
1306
+ type ActivityMatchedEntityType = 'bill' | 'bill_payment' | 'invoice' | 'journal_entry' | 'journal_entry_line' | 'bank_line';
1307
+ type ActivityMinimalTerm = {
1308
+ name: string;
1309
+ id: string;
1310
+ };
1311
+ type ActivityPaginationInput = {
1312
+ page?: number | null;
1313
+ per_page?: number | null;
1314
+ include_total?: boolean;
1315
+ position?: ActivityPaginationPositionInput | null;
1316
+ };
1317
+ type ActivityPaginationOutput = {
1318
+ page?: number | null;
1319
+ per_page?: number | null;
1320
+ include_total?: boolean;
1321
+ position?: ActivityPaginationPositionInput | null;
1322
+ pages?: number | null;
1323
+ total?: number | null;
1324
+ };
1325
+ type ActivityPaginationPositionInput = {
1326
+ start: number;
1327
+ end: number;
1328
+ };
1329
+ type ActivityPeriod = 'Annual' | 'Quarterly' | 'Monthly';
1330
+ type ActivityPeriodData = {
1331
+ id: string;
1332
+ name: string;
1333
+ start_date: string;
1334
+ frequency: ActivityPeriod;
1335
+ };
1336
+ 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';
1337
+ /**
1338
+ * API representation of PeriodInstanceProgressBreakdown.
1339
+ *
1340
+ * Uses a plain 'display_id' field instead of a computed property to avoid
1341
+ * dependency on TenantContext during serialization.
1342
+ */
1343
+ type ActivityPeriodInstanceProgressBreakdownApi = {
1344
+ id: string;
1345
+ period: ActivityPeriod;
1346
+ start_date: string;
1347
+ end_date: string;
1348
+ name: string;
1349
+ display_id: string;
1350
+ progress: ActivityTasksProgress;
1351
+ activities?: Array<ActivityActivitySubsidiaryProgress>;
1352
+ };
1353
+ type ActivityPostBillDataInput = {
1354
+ bill_id: string;
1355
+ bill: ActivityBillUpdateBase;
1356
+ bill_items?: Array<ActivityBillItemCreate> | null;
1357
+ dimension_value_ids?: Array<string>;
1358
+ };
1359
+ type ActivityPostBillDataOutput = {
1360
+ bill_id: string;
1361
+ bill: ActivityBillUpdateBase;
1362
+ bill_items?: Array<ActivityBillItemCreate> | null;
1363
+ dimension_value_ids?: Array<string>;
1364
+ };
1365
+ type ActivityPostBillTaskActionDataInput = {
1366
+ action_type?: 'post_bill';
1367
+ bill_data: ActivityPostBillDataInput;
1368
+ };
1369
+ type ActivityPostBillTaskActionDataOutput = {
1370
+ action_type?: 'post_bill';
1371
+ bill_data: ActivityPostBillDataOutput;
1372
+ };
1373
+ type ActivityPostIctActionTemplate = {
1374
+ action_type?: 'post_ict';
1375
+ ict_id: number;
1376
+ };
1377
+ type ActivityPostIctTaskActionData = {
1378
+ action_type?: 'post_ict';
1379
+ ict_id: number;
1380
+ };
1381
+ type ActivityPostJournalEntryTaskActionDataInput = {
1382
+ action_type?: 'post_journal_entry';
1383
+ journal_entry: ActivityJournalEntryWithLinesWithDimensionValuesInput;
1384
+ };
1385
+ type ActivityPostJournalEntryTaskActionDataOutput = {
1386
+ action_type?: 'post_journal_entry';
1387
+ journal_entry: ActivityJournalEntryWithLinesWithDimensionValuesOutput;
1388
+ };
1389
+ type ActivityProviderOperationErrorType = 'Connection Error' | 'Authentication Error' | 'Data Operation Error' | 'Server Error' | 'Not Ready For Sync';
1390
+ type ActivityReconciliationDefinitionData = {
1391
+ type: ActivityReconciliationType;
1392
+ task_definition_id: string;
1393
+ currency?: ActivityCurrency | null;
1394
+ side_a_entity_type: ActivityReconciliationEntityType;
1395
+ side_a_entity_id: string;
1396
+ side_b_entity_type: ActivityReconciliationEntityType;
1397
+ side_b_entity_id?: string | null;
1398
+ side_a_source: ActivityReconciliationSource;
1399
+ side_b_source: ActivityReconciliationSource;
1400
+ };
1401
+ type ActivityReconciliationEntityType = 'account' | 'bank_account' | 'external_balance_capture';
1402
+ type ActivityReconciliationInstanceDataInput = {
1403
+ reconciliation_definition_id: string;
1404
+ task_instance_id: string;
1405
+ start_date: string;
1406
+ end_date: string;
1407
+ side_a_value?: number | string | null;
1408
+ side_b_value?: number | string | null;
1409
+ reconciling_items_balance?: number | string | null;
1410
+ variance?: number | string | null;
1411
+ variance_percentage?: number | string | null;
1412
+ has_post_signoff_changes?: boolean;
1413
+ event_timestamp?: string | null;
1414
+ };
1415
+ type ActivityReconciliationInstanceDataOutput = {
1416
+ reconciliation_definition_id: string;
1417
+ task_instance_id: string;
1418
+ start_date: string;
1419
+ end_date: string;
1420
+ side_a_value?: string | null;
1421
+ side_b_value?: string | null;
1422
+ reconciling_items_balance?: string | null;
1423
+ variance?: string | null;
1424
+ variance_percentage?: string | null;
1425
+ has_post_signoff_changes?: boolean;
1426
+ event_timestamp?: string | null;
1427
+ };
1428
+ type ActivityReconciliationSource = 'gl' | 'bank' | 'external';
1429
+ type ActivityReconciliationStatus = 'PENDING' | 'IN_PROGRESS' | 'DONE' | 'FAILED';
1430
+ type ActivityReconciliationSubmitActionTemplate = {
1431
+ action_type?: 'reconciliation_submit';
1432
+ reconciliation_definition_id: string;
1433
+ };
1434
+ type ActivityReconciliationSubmitTaskActionDataInput = {
1435
+ action_type?: 'reconciliation_submit';
1436
+ reconciliation_definition_id: string;
1437
+ reconciliation_definition: ActivityReconciliationDefinitionData;
1438
+ reconciliation_instance_id?: string | null;
1439
+ reconciliation_instance?: ActivityReconciliationInstanceDataInput | null;
1440
+ };
1441
+ type ActivityReconciliationSubmitTaskActionDataOutput = {
1442
+ action_type?: 'reconciliation_submit';
1443
+ reconciliation_definition_id: string;
1444
+ reconciliation_definition: ActivityReconciliationDefinitionData;
1445
+ reconciliation_instance_id?: string | null;
1446
+ reconciliation_instance?: ActivityReconciliationInstanceDataOutput | null;
1447
+ };
1448
+ type ActivityReconciliationType = 'bank_reconciliation' | 'account_reconciliation';
1449
+ type ActivitySlimTaskAction = {
1450
+ created_at?: string | null;
1451
+ last_modified_at?: string | null;
1452
+ id?: string;
1453
+ task_instance_id: string;
1454
+ status: ActivityTaskActionStatus;
1455
+ execution_start_time?: string | null;
1456
+ };
1457
+ type ActivitySlimTaskDefinitionWithInstances = {
1458
+ name: string;
1459
+ due_date: ActivityTaskDueDate;
1460
+ preparer_due_date?: ActivityDueDate | null;
1461
+ description?: string | null;
1462
+ preparer_id?: string | null;
1463
+ assignee_id?: string | null;
1464
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1465
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1466
+ end_date?: string | null;
1467
+ task_type?: ActivityTaskType | null;
1468
+ created_at?: string | null;
1469
+ last_modified_at?: string | null;
1470
+ is_deleted?: boolean;
1471
+ activity_definition_id: string;
1472
+ start_date: string;
1473
+ subsidiary_ids: Array<number>;
1474
+ activity_instance_id?: string | null;
1475
+ recurring: boolean;
1476
+ id?: string;
1477
+ creator_user_id?: string | null;
1478
+ is_manual_task?: boolean;
1479
+ entities?: Array<ActivityTaskEntityMapping>;
1480
+ action_template?: (({
1481
+ action_type?: 'create_journal_entry';
1482
+ } & ActivityCreateJournalEntryActionTemplateOutput) | ({
1483
+ action_type?: 'create_ict_elimination_entries';
1484
+ } & ActivityCreateIctEliminationActionTemplateOutput) | ({
1485
+ action_type?: 'post_ict';
1486
+ } & ActivityPostIctActionTemplate) | ({
1487
+ action_type?: 'test_action';
1488
+ } & ActivityTestActionTemplate) | ({
1489
+ action_type?: 'test_schedule_action';
1490
+ } & ActivityTestScheduleActionTemplate) | ({
1491
+ action_type?: 'lease_payment';
1492
+ } & ActivityLeasePaymentScheduleActionTemplateOutput) | ({
1493
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1494
+ } & ActivityLeaseAmortizationScheduleActionTemplateOutput) | ({
1495
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1496
+ } & ActivityLeaseAmortizationOpeningBalanceActionTemplateOutput) | ({
1497
+ action_type?: 'lease_term_reminder';
1498
+ } & ActivityLeaseTermReminderActionTemplateOutput) | ({
1499
+ action_type?: 'create_journal_entry_schedule';
1500
+ } & ActivityCreateJournalEntryScheduleActionTemplateOutput) | ({
1501
+ action_type?: 'create_journal_entries';
1502
+ } & ActivityCreateJournalEntriesActionTemplateOutput) | ({
1503
+ action_type?: 'failure_task';
1504
+ } & ActivityFailureActionTemplate) | ({
1505
+ action_type?: 'lock_consolidation_period';
1506
+ } & ActivityLockConsolidationRateActionTemplate) | ({
1507
+ action_type?: 'create_journal_entries_bulk';
1508
+ } & ActivityCreateJournalEntriesBulkActionTemplateOutput) | ({
1509
+ action_type?: 'match_resolution';
1510
+ } & ActivityMatchResolutionActionTemplate) | ({
1511
+ action_type?: 'reconciliation_submit';
1512
+ } & ActivityReconciliationSubmitActionTemplate)) | null;
1513
+ reconciliation_definition_params?: ({
1514
+ reconciliation_type?: 'account_reconciliation';
1515
+ } & ActivityAccountReconciliationParams) | null;
1516
+ trigger_id?: string | null;
1517
+ workflow_execution_id?: string | null;
1518
+ creator_task_id?: string | null;
1519
+ activity_definition: ActivityActivityDefinitionCreateWithType;
1520
+ action_type?: string | null;
1521
+ task_instances?: Array<ActivityBaseTaskInstanceWithAction>;
1522
+ creator: ActivityTaskCreator | null;
1523
+ };
1524
+ type ActivitySlimTaskInstanceWithAction = {
1525
+ last_manually_updated?: string | null;
1526
+ created_at?: string | null;
1527
+ last_modified_at?: string | null;
1528
+ id: string;
1529
+ name: string;
1530
+ due_date: string;
1531
+ preparer_due_date: string;
1532
+ status: ActivityTaskStatus;
1533
+ description?: string | null;
1534
+ task_definition_id: string;
1535
+ activity_instance_id: string;
1536
+ subsidiary_id: number;
1537
+ is_deleted?: boolean;
1538
+ preparer_id?: string | null;
1539
+ assignee_id?: string | null;
1540
+ reconciled?: boolean | null;
1541
+ creator?: ActivityTaskCreator | null;
1542
+ decline_reason?: string | null;
1543
+ trigger_execution_id?: string | null;
1544
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1545
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1546
+ is_currently_blocked?: boolean | null;
1547
+ is_blocking_manually_set?: boolean;
1548
+ task_type?: ActivityTaskType | null;
1549
+ attachments_count?: number;
1550
+ task_action?: ActivitySlimTaskAction | null;
1551
+ task_action_type?: string | null;
1552
+ is_manual_task?: boolean | null;
1553
+ activity_name?: string | null;
1554
+ period_display_id?: string | null;
1555
+ activity_definition_id?: string | null;
1556
+ };
1557
+ type ActivitySlimTaskInstanceWithActionAndEntities = {
1558
+ last_manually_updated?: string | null;
1559
+ created_at?: string | null;
1560
+ last_modified_at?: string | null;
1561
+ id: string;
1562
+ name: string;
1563
+ due_date: string;
1564
+ preparer_due_date: string;
1565
+ status: ActivityTaskStatus;
1566
+ description?: string | null;
1567
+ task_definition_id: string;
1568
+ activity_instance_id: string;
1569
+ subsidiary_id: number;
1570
+ is_deleted?: boolean;
1571
+ preparer_id?: string | null;
1572
+ assignee_id?: string | null;
1573
+ reconciled?: boolean | null;
1574
+ creator?: ActivityTaskCreator | null;
1575
+ decline_reason?: string | null;
1576
+ trigger_execution_id?: string | null;
1577
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1578
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1579
+ is_currently_blocked?: boolean | null;
1580
+ is_blocking_manually_set?: boolean;
1581
+ task_type?: ActivityTaskType | null;
1582
+ attachments_count?: number;
1583
+ task_action?: ActivitySlimTaskAction | null;
1584
+ task_action_type?: string | null;
1585
+ is_manual_task?: boolean | null;
1586
+ activity_name?: string | null;
1587
+ period_display_id?: string | null;
1588
+ activity_definition_id?: string | null;
1589
+ task_definition_entities?: Array<ActivityTaskEntityMapping> | null;
1590
+ };
1591
+ type ActivitySortableFieldsTask = 'due_date' | 'name' | 'subsidiary_id' | 'status' | 'preparer_id' | 'assignee_id' | 'activity_name' | 'closing_period';
1592
+ type ActivitySortingOrder = 'asc' | 'desc';
1593
+ type ActivitySubLedger = 'lease' | 'prepaid_expense';
1594
+ /**
1595
+ * Progress for a subsidiary within an activity.
1596
+ */
1597
+ type ActivitySubsidiaryProgress = {
1598
+ subsidiary_id: number;
1599
+ progress: ActivityTasksProgress;
1600
+ };
1601
+ type ActivityTAccountWithoutSubsidiaryMappingInput = {
1602
+ id: string;
1603
+ name: string;
1604
+ report_category?: ActivityAccountReportCategory | null;
1605
+ accounting_class: ActivityAccountingClass;
1606
+ account_type: ActivityAccountType;
1607
+ account_rate_type?: ActivityConsolidationExchangeRateType | null;
1608
+ account_number?: string | null;
1609
+ parent_account_id?: string | null;
1610
+ active?: boolean;
1611
+ summary?: boolean;
1612
+ read_only?: boolean;
1613
+ is_manually_created?: boolean;
1614
+ provider_id: string;
1615
+ subsidiary_id: number;
1616
+ currency?: ActivityCurrency;
1617
+ sourced_account_id?: string | null;
1618
+ account_balance?: ActivityBalanceInput;
1619
+ primary_balance?: ActivityBalanceInput;
1620
+ secondary_balance?: ActivityBalanceInput;
1621
+ cta_balance?: ActivityBalanceInput;
1622
+ credit_account_balance?: ActivityBalanceInput;
1623
+ debit_account_balance?: ActivityBalanceInput;
1624
+ credit_primary_balance?: ActivityBalanceInput;
1625
+ debit_primary_balance?: ActivityBalanceInput;
1626
+ credit_secondary_balance?: ActivityBalanceInput;
1627
+ debit_secondary_balance?: ActivityBalanceInput;
1628
+ credit_cta_balance?: ActivityBalanceInput;
1629
+ debit_cta_balance?: ActivityBalanceInput;
1630
+ tertiary_debit?: ActivityBalanceInput | null;
1631
+ tertiary_credit?: ActivityBalanceInput | null;
1632
+ create_time?: string;
1633
+ last_update_time?: string;
1634
+ description?: string | null;
1635
+ meta?: {
1636
+ [key: string]: unknown;
1637
+ } | null;
1638
+ nominal_account?: ActivityMappedNominalAccount | null;
1639
+ };
1640
+ type ActivityTAccountWithoutSubsidiaryMappingOutput = {
1641
+ id: string;
1642
+ name: string;
1643
+ report_category?: ActivityAccountReportCategory | null;
1644
+ accounting_class: ActivityAccountingClass;
1645
+ account_type: ActivityAccountType;
1646
+ account_rate_type?: ActivityConsolidationExchangeRateType | null;
1647
+ account_number?: string | null;
1648
+ parent_account_id?: string | null;
1649
+ active?: boolean;
1650
+ summary?: boolean;
1651
+ read_only?: boolean;
1652
+ is_manually_created?: boolean;
1653
+ provider_id: string;
1654
+ subsidiary_id: number;
1655
+ currency?: ActivityCurrency;
1656
+ sourced_account_id?: string | null;
1657
+ account_balance?: ActivityBalanceOutput;
1658
+ primary_balance?: ActivityBalanceOutput;
1659
+ secondary_balance?: ActivityBalanceOutput;
1660
+ cta_balance?: ActivityBalanceOutput;
1661
+ credit_account_balance?: ActivityBalanceOutput;
1662
+ debit_account_balance?: ActivityBalanceOutput;
1663
+ credit_primary_balance?: ActivityBalanceOutput;
1664
+ debit_primary_balance?: ActivityBalanceOutput;
1665
+ credit_secondary_balance?: ActivityBalanceOutput;
1666
+ debit_secondary_balance?: ActivityBalanceOutput;
1667
+ credit_cta_balance?: ActivityBalanceOutput;
1668
+ debit_cta_balance?: ActivityBalanceOutput;
1669
+ tertiary_debit?: ActivityBalanceOutput | null;
1670
+ tertiary_credit?: ActivityBalanceOutput | null;
1671
+ create_time?: string;
1672
+ last_update_time?: string;
1673
+ description?: string | null;
1674
+ meta?: {
1675
+ [key: string]: unknown;
1676
+ } | null;
1677
+ nominal_account?: ActivityMappedNominalAccount | null;
1678
+ };
1679
+ type ActivityTaskActionInput = {
1680
+ created_at?: string | null;
1681
+ last_modified_at?: string | null;
1682
+ id?: string;
1683
+ task_instance_id: string;
1684
+ status: ActivityTaskActionStatus;
1685
+ execution_start_time?: string | null;
1686
+ action_data: ({
1687
+ action_type?: 'create_journal_entry';
1688
+ } & ActivityCreateJournalEntryTaskActionDataInput) | ({
1689
+ action_type?: 'create_ict_elimination_entries';
1690
+ } & ActivityCreateIctEliminationTaskActionDataInput) | ({
1691
+ action_type?: 'test_action';
1692
+ } & ActivityTestActionData) | ({
1693
+ action_type?: 'create_bill';
1694
+ } & ActivityCreateBillTaskActionDataInput) | ({
1695
+ action_type?: 'post_bill';
1696
+ } & ActivityPostBillTaskActionDataInput) | ({
1697
+ action_type?: 'post_journal_entry';
1698
+ } & ActivityPostJournalEntryTaskActionDataInput) | ({
1699
+ action_type?: 'post_ict';
1700
+ } & ActivityPostIctTaskActionData) | ({
1701
+ action_type?: 'create_journal_entry_schedule';
1702
+ } & ActivityCreateJournalEntryTaskScheduleActionDataInput) | ({
1703
+ action_type?: 'failure_task';
1704
+ } & ActivityFailureTaskActionData) | ({
1705
+ action_type?: 'lock_consolidation_period';
1706
+ } & ActivityCreateLockPeriodTaskActionDataInput) | ({
1707
+ action_type?: 'create_journal_entries_bulk';
1708
+ } & ActivityCreateJournalEntriesBulkTaskActionDataInput) | ({
1709
+ action_type?: 'match_resolution';
1710
+ } & ActivityMatchResolutionTaskActionData) | ({
1711
+ action_type?: 'reconciliation_submit';
1712
+ } & ActivityReconciliationSubmitTaskActionDataInput);
1713
+ original_action_data?: (({
1714
+ action_type?: 'create_journal_entry';
1715
+ } & ActivityCreateJournalEntryTaskActionDataInput) | ({
1716
+ action_type?: 'create_ict_elimination_entries';
1717
+ } & ActivityCreateIctEliminationTaskActionDataInput) | ({
1718
+ action_type?: 'test_action';
1719
+ } & ActivityTestActionData) | ({
1720
+ action_type?: 'create_bill';
1721
+ } & ActivityCreateBillTaskActionDataInput) | ({
1722
+ action_type?: 'post_bill';
1723
+ } & ActivityPostBillTaskActionDataInput) | ({
1724
+ action_type?: 'post_journal_entry';
1725
+ } & ActivityPostJournalEntryTaskActionDataInput) | ({
1726
+ action_type?: 'post_ict';
1727
+ } & ActivityPostIctTaskActionData) | ({
1728
+ action_type?: 'create_journal_entry_schedule';
1729
+ } & ActivityCreateJournalEntryTaskScheduleActionDataInput) | ({
1730
+ action_type?: 'failure_task';
1731
+ } & ActivityFailureTaskActionData) | ({
1732
+ action_type?: 'lock_consolidation_period';
1733
+ } & ActivityCreateLockPeriodTaskActionDataInput) | ({
1734
+ action_type?: 'create_journal_entries_bulk';
1735
+ } & ActivityCreateJournalEntriesBulkTaskActionDataInput) | ({
1736
+ action_type?: 'match_resolution';
1737
+ } & ActivityMatchResolutionTaskActionData) | ({
1738
+ action_type?: 'reconciliation_submit';
1739
+ } & ActivityReconciliationSubmitTaskActionDataInput)) | null;
1740
+ execution_errors?: Array<ActivityTaskActionExecutionError> | null;
1741
+ };
1742
+ type ActivityTaskActionOutput = {
1743
+ created_at?: string | null;
1744
+ last_modified_at?: string | null;
1745
+ id?: string;
1746
+ task_instance_id: string;
1747
+ status: ActivityTaskActionStatus;
1748
+ execution_start_time?: string | null;
1749
+ action_data: ({
1750
+ action_type?: 'create_journal_entry';
1751
+ } & ActivityCreateJournalEntryTaskActionDataOutput) | ({
1752
+ action_type?: 'create_ict_elimination_entries';
1753
+ } & ActivityCreateIctEliminationTaskActionDataOutput) | ({
1754
+ action_type?: 'test_action';
1755
+ } & ActivityTestActionData) | ({
1756
+ action_type?: 'create_bill';
1757
+ } & ActivityCreateBillTaskActionDataOutput) | ({
1758
+ action_type?: 'post_bill';
1759
+ } & ActivityPostBillTaskActionDataOutput) | ({
1760
+ action_type?: 'post_journal_entry';
1761
+ } & ActivityPostJournalEntryTaskActionDataOutput) | ({
1762
+ action_type?: 'post_ict';
1763
+ } & ActivityPostIctTaskActionData) | ({
1764
+ action_type?: 'create_journal_entry_schedule';
1765
+ } & ActivityCreateJournalEntryTaskScheduleActionDataOutput) | ({
1766
+ action_type?: 'failure_task';
1767
+ } & ActivityFailureTaskActionData) | ({
1768
+ action_type?: 'lock_consolidation_period';
1769
+ } & ActivityCreateLockPeriodTaskActionDataOutput) | ({
1770
+ action_type?: 'create_journal_entries_bulk';
1771
+ } & ActivityCreateJournalEntriesBulkTaskActionDataOutput) | ({
1772
+ action_type?: 'match_resolution';
1773
+ } & ActivityMatchResolutionTaskActionData) | ({
1774
+ action_type?: 'reconciliation_submit';
1775
+ } & ActivityReconciliationSubmitTaskActionDataOutput);
1776
+ original_action_data?: (({
1777
+ action_type?: 'create_journal_entry';
1778
+ } & ActivityCreateJournalEntryTaskActionDataOutput) | ({
1779
+ action_type?: 'create_ict_elimination_entries';
1780
+ } & ActivityCreateIctEliminationTaskActionDataOutput) | ({
1781
+ action_type?: 'test_action';
1782
+ } & ActivityTestActionData) | ({
1783
+ action_type?: 'create_bill';
1784
+ } & ActivityCreateBillTaskActionDataOutput) | ({
1785
+ action_type?: 'post_bill';
1786
+ } & ActivityPostBillTaskActionDataOutput) | ({
1787
+ action_type?: 'post_journal_entry';
1788
+ } & ActivityPostJournalEntryTaskActionDataOutput) | ({
1789
+ action_type?: 'post_ict';
1790
+ } & ActivityPostIctTaskActionData) | ({
1791
+ action_type?: 'create_journal_entry_schedule';
1792
+ } & ActivityCreateJournalEntryTaskScheduleActionDataOutput) | ({
1793
+ action_type?: 'failure_task';
1794
+ } & ActivityFailureTaskActionData) | ({
1795
+ action_type?: 'lock_consolidation_period';
1796
+ } & ActivityCreateLockPeriodTaskActionDataOutput) | ({
1797
+ action_type?: 'create_journal_entries_bulk';
1798
+ } & ActivityCreateJournalEntriesBulkTaskActionDataOutput) | ({
1799
+ action_type?: 'match_resolution';
1800
+ } & ActivityMatchResolutionTaskActionData) | ({
1801
+ action_type?: 'reconciliation_submit';
1802
+ } & ActivityReconciliationSubmitTaskActionDataOutput)) | null;
1803
+ execution_errors?: Array<ActivityTaskActionExecutionError> | null;
1804
+ };
1805
+ type ActivityTaskActionExecutionError = {
1806
+ error_type: ActivityTaskActionExecutionErrorType;
1807
+ error_message: string;
1808
+ error_summary?: string | null;
1809
+ error_time?: string;
1810
+ required_action?: string | null;
1811
+ subsidiary_id?: number | null;
1812
+ };
1813
+ type ActivityTaskActionExecutionErrorType = 'Server Error' | 'Provider Validation Error' | 'Provider Connection Error' | 'Provider Authentication Error';
1814
+ type ActivityTaskActionStatus = 'DONE' | 'PENDING' | 'CANCELLED' | 'FAILED' | 'IN_PROGRESS' | 'RESETTING';
1815
+ /**
1816
+ * Represents a blocking relationship for a definition or instance.
1817
+ */
1818
+ type ActivityTaskBlocking = {
1819
+ id: string;
1820
+ scope: ActivityBlockingScope;
1821
+ };
1822
+ type ActivityTaskCreator = {
1823
+ type?: ActivityTaskCreatorType | null;
1824
+ entity_type?: ActivityTaskEntityType | null;
1825
+ id?: string | null;
1826
+ };
1827
+ type ActivityTaskCreatorType = 'user' | 'trigger' | 'workflow_execution' | 'task' | 'entity';
1828
+ type ActivityTaskDefinition = {
1829
+ name: string;
1830
+ due_date: ActivityTaskDueDate;
1831
+ preparer_due_date?: ActivityDueDate | null;
1832
+ description?: string | null;
1833
+ preparer_id?: string | null;
1834
+ assignee_id?: string | null;
1835
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1836
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1837
+ end_date?: string | null;
1838
+ task_type?: ActivityTaskType | null;
1839
+ created_at?: string | null;
1840
+ last_modified_at?: string | null;
1841
+ is_deleted?: boolean;
1842
+ activity_definition_id: string;
1843
+ start_date: string;
1844
+ subsidiary_ids: Array<number>;
1845
+ activity_instance_id?: string | null;
1846
+ recurring: boolean;
1847
+ id?: string;
1848
+ creator_user_id?: string | null;
1849
+ is_manual_task?: boolean;
1850
+ entities?: Array<ActivityTaskEntityMapping>;
1851
+ action_template?: (({
1852
+ action_type?: 'create_journal_entry';
1853
+ } & ActivityCreateJournalEntryActionTemplateOutput) | ({
1854
+ action_type?: 'create_ict_elimination_entries';
1855
+ } & ActivityCreateIctEliminationActionTemplateOutput) | ({
1856
+ action_type?: 'post_ict';
1857
+ } & ActivityPostIctActionTemplate) | ({
1858
+ action_type?: 'test_action';
1859
+ } & ActivityTestActionTemplate) | ({
1860
+ action_type?: 'test_schedule_action';
1861
+ } & ActivityTestScheduleActionTemplate) | ({
1862
+ action_type?: 'lease_payment';
1863
+ } & ActivityLeasePaymentScheduleActionTemplateOutput) | ({
1864
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1865
+ } & ActivityLeaseAmortizationScheduleActionTemplateOutput) | ({
1866
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1867
+ } & ActivityLeaseAmortizationOpeningBalanceActionTemplateOutput) | ({
1868
+ action_type?: 'lease_term_reminder';
1869
+ } & ActivityLeaseTermReminderActionTemplateOutput) | ({
1870
+ action_type?: 'create_journal_entry_schedule';
1871
+ } & ActivityCreateJournalEntryScheduleActionTemplateOutput) | ({
1872
+ action_type?: 'create_journal_entries';
1873
+ } & ActivityCreateJournalEntriesActionTemplateOutput) | ({
1874
+ action_type?: 'failure_task';
1875
+ } & ActivityFailureActionTemplate) | ({
1876
+ action_type?: 'lock_consolidation_period';
1877
+ } & ActivityLockConsolidationRateActionTemplate) | ({
1878
+ action_type?: 'create_journal_entries_bulk';
1879
+ } & ActivityCreateJournalEntriesBulkActionTemplateOutput) | ({
1880
+ action_type?: 'match_resolution';
1881
+ } & ActivityMatchResolutionActionTemplate) | ({
1882
+ action_type?: 'reconciliation_submit';
1883
+ } & ActivityReconciliationSubmitActionTemplate)) | null;
1884
+ reconciliation_definition_params?: ({
1885
+ reconciliation_type?: 'account_reconciliation';
1886
+ } & ActivityAccountReconciliationParams) | null;
1887
+ trigger_id?: string | null;
1888
+ workflow_execution_id?: string | null;
1889
+ creator_task_id?: string | null;
1890
+ activity_definition: ActivityActivityDefinitionCreateWithType;
1891
+ action_type?: string | null;
1892
+ creator: ActivityTaskCreator | null;
1893
+ };
1894
+ type ActivityTaskDefinitionUpdate = {
1895
+ name: string;
1896
+ due_date: ActivityTaskDueDate;
1897
+ preparer_due_date?: ActivityDueDate | null;
1898
+ description?: string | null;
1899
+ preparer_id?: string | null;
1900
+ assignee_id?: string | null;
1901
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1902
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1903
+ end_date?: string | null;
1904
+ task_type?: ActivityTaskType | null;
1905
+ created_at?: string | null;
1906
+ last_modified_at?: string | null;
1907
+ is_deleted?: boolean;
1908
+ activity_definition_id: string;
1909
+ start_date: string;
1910
+ subsidiary_ids: Array<number>;
1911
+ activity_instance_id?: string | null;
1912
+ recurring: boolean;
1913
+ };
1914
+ type ActivityTaskDefinitionWithActionCreateApi = {
1915
+ name: string;
1916
+ due_date: ActivityTaskDueDate;
1917
+ preparer_due_date?: ActivityDueDate | null;
1918
+ description?: string | null;
1919
+ preparer_id?: string | null;
1920
+ assignee_id?: string | null;
1921
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
1922
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
1923
+ end_date?: string | null;
1924
+ task_type?: ActivityTaskType | null;
1925
+ created_at?: string | null;
1926
+ last_modified_at?: string | null;
1927
+ is_deleted?: boolean;
1928
+ activity_definition_id: string;
1929
+ start_date: string;
1930
+ subsidiary_ids: Array<number>;
1931
+ activity_instance_id?: string | null;
1932
+ recurring: boolean;
1933
+ id?: string;
1934
+ creator_user_id?: string | null;
1935
+ is_manual_task?: boolean;
1936
+ entities?: Array<ActivityTaskEntityMappingCreate>;
1937
+ action_template?: (({
1938
+ action_type?: 'create_journal_entry';
1939
+ } & ActivityCreateJournalEntryActionTemplateInput) | ({
1940
+ action_type?: 'create_ict_elimination_entries';
1941
+ } & ActivityCreateIctEliminationActionTemplateInput) | ({
1942
+ action_type?: 'post_ict';
1943
+ } & ActivityPostIctActionTemplate) | ({
1944
+ action_type?: 'test_action';
1945
+ } & ActivityTestActionTemplate) | ({
1946
+ action_type?: 'test_schedule_action';
1947
+ } & ActivityTestScheduleActionTemplate) | ({
1948
+ action_type?: 'lease_payment';
1949
+ } & ActivityLeasePaymentScheduleActionTemplateInput) | ({
1950
+ action_type?: 'LEASE_AMORTIZATION_SCHEDULE';
1951
+ } & ActivityLeaseAmortizationScheduleActionTemplateInput) | ({
1952
+ action_type?: 'LEASE_AMORTIZATION_OPENING_BALANCE';
1953
+ } & ActivityLeaseAmortizationOpeningBalanceActionTemplateInput) | ({
1954
+ action_type?: 'lease_term_reminder';
1955
+ } & ActivityLeaseTermReminderActionTemplateInput) | ({
1956
+ action_type?: 'create_journal_entry_schedule';
1957
+ } & ActivityCreateJournalEntryScheduleActionTemplateInput) | ({
1958
+ action_type?: 'create_journal_entries';
1959
+ } & ActivityCreateJournalEntriesActionTemplateInput) | ({
1960
+ action_type?: 'failure_task';
1961
+ } & ActivityFailureActionTemplate) | ({
1962
+ action_type?: 'lock_consolidation_period';
1963
+ } & ActivityLockConsolidationRateActionTemplate) | ({
1964
+ action_type?: 'create_journal_entries_bulk';
1965
+ } & ActivityCreateJournalEntriesBulkActionTemplateInput) | ({
1966
+ action_type?: 'match_resolution';
1967
+ } & ActivityMatchResolutionActionTemplate) | ({
1968
+ action_type?: 'reconciliation_submit';
1969
+ } & ActivityReconciliationSubmitActionTemplate)) | null;
1970
+ reconciliation_definition_params?: ({
1971
+ reconciliation_type?: 'account_reconciliation';
1972
+ } & ActivityAccountReconciliationParams) | null;
1973
+ };
1974
+ /**
1975
+ * Task-specific DueDate that carries an optional preparer/reviewer offset.
1976
+ *
1977
+ * Stored in task_definition.due_date JSONB. Not added to the shared libcommon
1978
+ * DueDate. No min/max on offset: range is enforced in the FE so the BE can stay
1979
+ * reusable if product changes the bounds (0 means preparer == reviewer).
1980
+ */
1981
+ type ActivityTaskDueDate = {
1982
+ from_start: boolean;
1983
+ days_delta: number;
1984
+ is_forward: boolean;
1985
+ delta_unit?: ActivityDeltaUnit;
1986
+ is_specific_day?: boolean;
1987
+ should_skip_holidays?: boolean;
1988
+ offset?: number | null;
1989
+ };
1990
+ /**
1991
+ * Model representing an entity mapping for a task definition.
1992
+ */
1993
+ type ActivityTaskEntityMapping = {
1994
+ entity_id: string;
1995
+ entity_type: ActivityTaskEntityType;
1996
+ task_definition_id: string;
1997
+ };
1998
+ /**
1999
+ * Model representing an entity mapping for a task definition.
2000
+ */
2001
+ type ActivityTaskEntityMappingCreate = {
2002
+ entity_id: string;
2003
+ entity_type: ActivityTaskEntityType;
2004
+ };
2005
+ type ActivityTaskEntityType = 'lease' | 'transaction' | 'clearing_group' | 'journal_entry' | 'invoice' | 'workflow_output' | 'attachment' | 'match' | 'reconciliation';
2006
+ type ActivityTaskInstancePaginationOutput = {
2007
+ results?: Array<ActivityTaskInstanceWithActivity | ActivitySlimTaskInstanceWithActionAndEntities | ActivitySlimTaskInstanceWithAction>;
2008
+ pagination?: ActivityPaginationOutput | null;
2009
+ };
2010
+ type ActivityTaskInstanceSearch = {
2011
+ q?: string | null;
2012
+ };
2013
+ type ActivityTaskInstanceUpdate = {
2014
+ name?: string | null;
2015
+ description?: string | null;
2016
+ due_date?: string | null;
2017
+ assignee_id?: string | null;
2018
+ preparer_id?: string | null;
2019
+ reviewer_id?: string | null;
2020
+ status?: ActivityTaskStatus | null;
2021
+ preparer_due_date?: string | null;
2022
+ trigger_execution_id?: string | null;
2023
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2024
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2025
+ };
2026
+ /**
2027
+ * Clears the task action from a task instance.
2028
+ *
2029
+ * Send {"task_action": null} in the PUT body to hard-delete the existing
2030
+ * StoredTaskAction row. Sending {} (no key) maps to plain TaskInstanceUpdate
2031
+ * and leaves any existing task action untouched.
2032
+ */
2033
+ type ActivityTaskInstanceUpdateClearAction = {
2034
+ name?: string | null;
2035
+ description?: string | null;
2036
+ due_date?: string | null;
2037
+ assignee_id?: string | null;
2038
+ preparer_id?: string | null;
2039
+ reviewer_id?: string | null;
2040
+ status?: ActivityTaskStatus | null;
2041
+ preparer_due_date?: string | null;
2042
+ trigger_execution_id?: string | null;
2043
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2044
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2045
+ task_action: null;
2046
+ };
2047
+ type ActivityTaskInstanceUpdateWithAction = {
2048
+ name?: string | null;
2049
+ description?: string | null;
2050
+ due_date?: string | null;
2051
+ assignee_id?: string | null;
2052
+ preparer_id?: string | null;
2053
+ reviewer_id?: string | null;
2054
+ status?: ActivityTaskStatus | null;
2055
+ preparer_due_date?: string | null;
2056
+ trigger_execution_id?: string | null;
2057
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2058
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2059
+ task_action: ActivityTaskActionInput;
2060
+ };
2061
+ type ActivityTaskInstanceWithAction = {
2062
+ last_manually_updated?: string | null;
2063
+ created_at?: string | null;
2064
+ last_modified_at?: string | null;
2065
+ id: string;
2066
+ name: string;
2067
+ due_date: string;
2068
+ preparer_due_date: string;
2069
+ status: ActivityTaskStatus;
2070
+ description?: string | null;
2071
+ task_definition_id: string;
2072
+ activity_instance_id: string;
2073
+ subsidiary_id: number;
2074
+ is_deleted?: boolean;
2075
+ preparer_id?: string | null;
2076
+ assignee_id?: string | null;
2077
+ reconciled?: boolean | null;
2078
+ creator?: ActivityTaskCreator | null;
2079
+ decline_reason?: string | null;
2080
+ trigger_execution_id?: string | null;
2081
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2082
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2083
+ is_currently_blocked?: boolean | null;
2084
+ is_blocking_manually_set?: boolean;
2085
+ task_type?: ActivityTaskType | null;
2086
+ attachments_count?: number;
2087
+ task_action?: ActivityTaskActionOutput | null;
2088
+ task_action_type?: string | null;
2089
+ is_manual_task?: boolean | null;
2090
+ activity_name?: string | null;
2091
+ period_display_id?: string | null;
2092
+ activity_definition_id?: string | null;
2093
+ task_action_execution_errors?: Array<ActivityTaskActionExecutionError> | null;
2094
+ };
2095
+ type ActivityTaskInstanceWithActivity = {
2096
+ last_manually_updated?: string | null;
2097
+ created_at?: string | null;
2098
+ last_modified_at?: string | null;
2099
+ id: string;
2100
+ name: string;
2101
+ due_date: string;
2102
+ preparer_due_date: string;
2103
+ status: ActivityTaskStatus;
2104
+ description?: string | null;
2105
+ task_definition_id: string;
2106
+ activity_instance_id: string;
2107
+ subsidiary_id: number;
2108
+ is_deleted?: boolean;
2109
+ preparer_id?: string | null;
2110
+ assignee_id?: string | null;
2111
+ reconciled?: boolean | null;
2112
+ creator?: ActivityTaskCreator | null;
2113
+ decline_reason?: string | null;
2114
+ trigger_execution_id?: string | null;
2115
+ blocks_tasks?: Array<ActivityTaskBlocking> | null;
2116
+ blocked_by_tasks?: Array<ActivityTaskBlocking> | null;
2117
+ is_currently_blocked?: boolean | null;
2118
+ is_blocking_manually_set?: boolean;
2119
+ task_type?: ActivityTaskType | null;
2120
+ attachments_count?: number;
2121
+ task_action?: ActivityTaskActionOutput | null;
2122
+ task_action_type?: string | null;
2123
+ is_manual_task?: boolean | null;
2124
+ activity_name?: string | null;
2125
+ period_display_id?: string | null;
2126
+ activity_definition_id?: string | null;
2127
+ task_action_execution_errors?: Array<ActivityTaskActionExecutionError> | null;
2128
+ activity_instance: ActivityActivityInstance;
2129
+ };
2130
+ type ActivityTaskStatus = 'DONE' | 'PENDING' | 'IN_REVIEW' | 'IN_PROGRESS' | 'CANCELLED' | 'FAILED' | 'DRAFT';
2131
+ /**
2132
+ * The type of the task definition
2133
+ */
2134
+ type ActivityTaskType = 'RECONCILIATION';
2135
+ type ActivityTasksProgress = {
2136
+ done?: number;
2137
+ review?: number;
2138
+ pending?: number;
2139
+ declined?: number;
2140
+ total?: number;
2141
+ };
2142
+ type ActivityTestActionData = {
2143
+ action_type?: 'test_action';
2144
+ name: string;
2145
+ };
2146
+ type ActivityTestActionTemplate = {
2147
+ action_type?: 'test_action';
2148
+ name: string;
2149
+ };
2150
+ type ActivityTestScheduleActionTemplate = {
2151
+ action_type?: 'test_schedule_action';
2152
+ name: string;
2153
+ };
2154
+ type ActivityTimeframe = {
2155
+ tf_type?: ActivityTimeframeType;
2156
+ offset?: number;
2157
+ periods?: number;
2158
+ unit?: ActivityTimeframeUnit;
2159
+ from_date?: string | null;
2160
+ to_date?: string | null;
2161
+ };
2162
+ type ActivityTimeframeType = 'all' | 'custom' | 'full_periods' | 'last_periods' | 'ytd';
2163
+ type ActivityTimeframeUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
2164
+ type ActivityWriteBackStatusInput = {
2165
+ id: string;
2166
+ transaction_id: string;
2167
+ journal_entry_id: string;
2168
+ status: ActivityJeWriteBackStatus;
2169
+ provider_uid?: string | null;
2170
+ error_message?: string | null;
2171
+ error_type?: ActivityProviderOperationErrorType | null;
2172
+ last_modified_time?: string | null;
2173
+ };
2174
+ type ActivityWriteBackStatusOutput = {
2175
+ id: string;
2176
+ transaction_id: string;
2177
+ journal_entry_id: string;
2178
+ status: ActivityJeWriteBackStatus;
2179
+ provider_uid?: string | null;
2180
+ error_message?: string | null;
2181
+ error_type?: ActivityProviderOperationErrorType | null;
2182
+ last_modified_time?: string | null;
2183
+ readonly display_error_message: string;
2184
+ };
2185
+ type AuditTrailAuditTrailEvent = {
2186
+ id: string;
2187
+ time: string;
2188
+ action: string;
2189
+ actor: AuditTrailAuditTrailEventActor;
2190
+ subsidiary_id: number;
2191
+ target: AuditTrailEntityRef;
2192
+ additional_data?: {
2193
+ [key: string]: unknown;
2194
+ } | null;
2195
+ old_value?: {
2196
+ [key: string]: unknown;
2197
+ } | null;
2198
+ new_value?: {
2199
+ [key: string]: unknown;
2200
+ } | null;
2201
+ message: string;
2202
+ };
2203
+ type AuditTrailAuditTrailEventActor = {
2204
+ entity_id: string | null;
2205
+ entity_type: AuditTrailEventActorType;
2206
+ entity_name?: string | null;
2207
+ [key: string]: unknown | (string | null) | AuditTrailEventActorType | (string | null) | undefined;
2208
+ };
2209
+ type AuditTrailEntityRef = {
2210
+ entity_id: string;
2211
+ entity_type: AuditTrailEntityType;
2212
+ entity_name?: string | null;
2213
+ [key: string]: unknown | string | AuditTrailEntityType | (string | null) | undefined;
2214
+ };
2215
+ type AuditTrailEntityType = 'TENANT' | 'SUBSIDIARY' | 'LEASE' | 'ACTIVITY_DEFINITION' | 'ACTIVITY_INSTANCE' | 'PERIOD_INSTANCE' | 'TASK_DEFINITION' | 'TASK_INSTANCE' | 'TRIGGER' | 'USER' | 'JOURNAL_ENTRY' | 'ACCOUNT' | 'BILL' | 'ICT';
2216
+ type AuditTrailEventActorType = 'USER' | 'TRIGGER' | 'WORKFLOW' | 'SYSTEM';
2217
+ type AuditTrailGetEntityAuditTrailArgs = {
2218
+ target_id: string;
2219
+ target_type: AuditTrailEntityType;
2220
+ include_before?: boolean;
2221
+ include_after?: boolean;
2222
+ };
2223
+ /**
2224
+ * Fiscal calendar domain model with audit timestamps
2225
+ *
2226
+ * Inherits core fields from `FiscalCalendarCreate` and is used as the
2227
+ * persisted/read model across services.
2228
+ */
2229
+ type PeriodManagerFiscalCalendar = {
2230
+ created_at?: string | null;
2231
+ last_modified_at?: string | null;
2232
+ id: string;
2233
+ name: string;
2234
+ start_month: number;
2235
+ subsidiary_id: number;
2236
+ config?: PeriodManagerFiscalCalendarConfig | null;
2237
+ };
2238
+ /**
2239
+ * Configuration options for a fiscal calendar.
2240
+ *
2241
+ * :param shift_backwards: If False (default), the fiscal year name uses the
2242
+ * year from the start date (e.g., 2025-07-01 to 2026-06-30 -> FY 2025).
2243
+ * If True, uses the year from the end date (e.g., FY 2026).
2244
+ * :param force_p_naming: If True, use P01, P02, etc. naming for periods
2245
+ * even for standard January-December calendars.
2246
+ */
2247
+ type PeriodManagerFiscalCalendarConfig = {
2248
+ shift_backwards?: boolean;
2249
+ force_p_naming?: boolean;
2250
+ };
2251
+ 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';
2252
+ type TenancySubsidiary = {
2253
+ company_name: string;
2254
+ legal_name: string;
2255
+ description?: string | null;
2256
+ created_time?: string | null;
2257
+ modified_time?: string | null;
2258
+ fully_synced?: boolean;
2259
+ is_active?: boolean;
2260
+ business_summary?: string | null;
2261
+ id?: number | null;
2262
+ default_currency: TenancyCurrency;
2263
+ tenant_id: string;
2264
+ parent_company_id?: number | null;
2265
+ provider_id?: number | null;
2266
+ children?: Array<TenancySubsidiaryCreate>;
2267
+ is_elimination_subsidiary?: boolean | null;
2268
+ is_organization_top?: boolean | null;
2269
+ organization_id?: number | null;
2270
+ provider_uid?: string | null;
2271
+ parent_company?: TenancySubsidiary | null;
2272
+ attachments?: Array<TenancySubsidiaryAttachment>;
2273
+ };
2274
+ type TenancySubsidiaryApiResponse = {
2275
+ company_name: string;
2276
+ legal_name: string;
2277
+ description?: string | null;
2278
+ created_time?: string | null;
2279
+ modified_time?: string | null;
2280
+ fully_synced?: boolean;
2281
+ is_active?: boolean;
2282
+ business_summary?: string | null;
2283
+ id?: number | null;
2284
+ default_currency: TenancyCurrency;
2285
+ tenant_id: string;
2286
+ parent_company_id?: number | null;
2287
+ provider_id?: number | null;
2288
+ children?: Array<TenancySubsidiaryCreate>;
2289
+ is_elimination_subsidiary?: boolean | null;
2290
+ is_organization_top?: boolean | null;
2291
+ organization_id?: number | null;
2292
+ provider_uid?: string | null;
2293
+ parent_company?: TenancySubsidiary | null;
2294
+ attachments?: Array<TenancySubsidiaryAttachment>;
2295
+ is_organization?: boolean;
2296
+ is_parent_subsidiary?: boolean;
2297
+ is_nominal_subsidiary?: boolean;
2298
+ };
2299
+ type TenancySubsidiaryAttachment = {
2300
+ attachment_id: string;
2301
+ attachment_type: TenancySubsidiaryAttachmentType;
2302
+ attachment_date?: string;
2303
+ processing_status?: TenancySubsidiaryAttachmentProcessingStatus;
2304
+ error_message?: string | null;
2305
+ should_use_top_coa?: boolean;
2306
+ created_time?: string | null;
2307
+ };
2308
+ type TenancySubsidiaryAttachmentProcessingStatus = 'PENDING' | 'ACTIVE' | 'FAILED';
2309
+ type TenancySubsidiaryAttachmentType = 'BVA';
2310
+ type TenancySubsidiaryCreate = {
2311
+ company_name: string;
2312
+ legal_name: string;
2313
+ description?: string | null;
2314
+ created_time?: string | null;
2315
+ modified_time?: string | null;
2316
+ fully_synced?: boolean;
2317
+ is_active?: boolean;
2318
+ business_summary?: string | null;
2319
+ id?: number | null;
2320
+ default_currency: TenancyCurrency;
2321
+ tenant_id: string;
2322
+ parent_company_id?: number | null;
2323
+ provider_id?: number | null;
2324
+ children?: Array<TenancySubsidiaryCreate>;
2325
+ is_elimination_subsidiary?: boolean | null;
2326
+ is_organization_top?: boolean | null;
2327
+ organization_id?: number | null;
2328
+ provider_uid?: string | null;
2329
+ };
2330
+ type TenancyUser = {
2331
+ id?: string;
2332
+ email?: string;
2333
+ name?: string;
2334
+ status?: TenancyUserStatus;
2335
+ picture?: string;
2336
+ custom_attributes?: {
2337
+ [key: string]: unknown;
2338
+ };
2339
+ };
2340
+ type TenancyUserStatus = 'invited' | 'enabled' | 'disabled';
2341
+ type GetAccountsApiAccountingAccountGetData = {
2342
+ body?: never;
2343
+ path?: never;
2344
+ query?: {
2345
+ account_ids?: Array<string> | null;
2346
+ };
2347
+ url: '/api/accounting/account';
2348
+ };
2349
+ type GetAccountsApiAccountingAccountGetResponses = {
2350
+ /**
2351
+ * Successful Response
2352
+ */
2353
+ 200: Array<AccountingTAccountOutput>;
2354
+ };
2355
+ type GetAccountsApiAccountingAccountGetResponse = GetAccountsApiAccountingAccountGetResponses[keyof GetAccountsApiAccountingAccountGetResponses];
2356
+ type GetAccountApiAccountingAccountAccountIdGetData = {
2357
+ body?: never;
2358
+ path: {
2359
+ account_id: string;
2360
+ };
2361
+ query?: never;
2362
+ url: '/api/accounting/account/{account_id}';
2363
+ };
2364
+ type GetAccountApiAccountingAccountAccountIdGetResponses = {
2365
+ /**
2366
+ * Successful Response
2367
+ */
2368
+ 200: AccountingTAccountWithSubAccounts;
2369
+ };
2370
+ type GetAccountApiAccountingAccountAccountIdGetResponse = GetAccountApiAccountingAccountAccountIdGetResponses[keyof GetAccountApiAccountingAccountAccountIdGetResponses];
2371
+ type GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetData = {
2372
+ body?: never;
2373
+ path: {
2374
+ subsidiary_id: number;
2375
+ };
2376
+ query?: {
2377
+ account_subsidiary_ids?: Array<number>;
2378
+ from_date?: string;
2379
+ to_date?: string;
2380
+ ignore_elimination_balance?: boolean;
2381
+ is_normalized?: boolean;
2382
+ };
2383
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa';
2384
+ };
2385
+ type GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponses = {
2386
+ /**
2387
+ * Successful Response
2388
+ */
2389
+ 200: Array<AccountingTAccountWithSubAccounts>;
2390
+ };
2391
+ type GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponse = GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponses[keyof GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponses];
2392
+ type GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetData = {
2393
+ body?: AccountingPaginationPositionInput | null;
2394
+ path: {
2395
+ subsidiary_id: number;
2396
+ };
2397
+ query?: {
2398
+ account_subsidiary_ids?: Array<number>;
2399
+ account_type?: Array<AccountingAccountType>;
2400
+ accounting_class?: Array<AccountingAccountingClass>;
2401
+ exclude_account_ids?: Array<string>;
2402
+ from_date?: string;
2403
+ to_date?: string;
2404
+ with_direct_balance?: boolean;
2405
+ with_no_balance?: boolean;
2406
+ ignore_elimination_balance?: boolean;
2407
+ is_normalized?: boolean;
2408
+ page?: number | null;
2409
+ per_page?: number | null;
2410
+ include_total?: boolean;
2411
+ sort?: AccountingSortableFieldsCoa;
2412
+ order?: AccountingSortingOrder | null;
2413
+ q?: string | null;
2414
+ };
2415
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/account';
2416
+ };
2417
+ type GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponses = {
2418
+ /**
2419
+ * Successful Response
2420
+ */
2421
+ 200: AccountingCoaPaginationOutput | Array<AccountingTAccountOutput>;
2422
+ };
2423
+ type GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponse = GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponses[keyof GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponses];
2424
+ type GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetData = {
2425
+ body?: never;
2426
+ path: {
2427
+ subsidiary_id: number;
2428
+ };
2429
+ query?: {
2430
+ ignore_inactive_accounts?: boolean;
2431
+ };
2432
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/available-currencies';
2433
+ };
2434
+ type GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponses = {
2435
+ /**
2436
+ * Successful Response
2437
+ */
2438
+ 200: Array<AccountingCurrency>;
2439
+ };
2440
+ type GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponse = GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponses[keyof GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponses];
2441
+ type GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetData = {
2442
+ body?: AccountingPaginationPositionInput | null;
2443
+ path: {
2444
+ subsidiary_id: number;
2445
+ };
2446
+ query?: {
2447
+ account_subsidiary_ids?: Array<number>;
2448
+ account_ids?: Array<string>;
2449
+ exclude_account_ids?: Array<string>;
2450
+ account_type?: Array<AccountingAccountType>;
2451
+ accounting_class?: Array<AccountingAccountingClass>;
2452
+ ignore_elimination_balance?: boolean;
2453
+ ignore_inactive_accounts?: boolean;
2454
+ is_normalized?: boolean;
2455
+ page?: number | null;
2456
+ per_page?: number | null;
2457
+ include_total?: boolean;
2458
+ sort?: AccountingSortableFieldsCoa;
2459
+ order?: AccountingSortingOrder | null;
2460
+ q?: string | null;
2461
+ };
2462
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/account/simple';
2463
+ };
2464
+ type GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponses = {
2465
+ /**
2466
+ * Successful Response
2467
+ */
2468
+ 200: AccountingSimpleCoAPaginationOutput | Array<AccountingSimpleTAccount>;
2469
+ };
2470
+ type GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponse = GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponses[keyof GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponses];
2471
+ type GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetData = {
2472
+ body?: never;
2473
+ path: {
2474
+ subsidiary_id: number;
2475
+ };
2476
+ query: {
2477
+ group_by: AccountingCoAGroupBy;
2478
+ account_subsidiary_ids?: Array<number>;
2479
+ from_date?: string;
2480
+ to_date?: string;
2481
+ with_direct_balance?: boolean;
2482
+ ignore_elimination_balance?: boolean;
2483
+ is_normalized?: boolean;
2484
+ };
2485
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/account/group';
2486
+ };
2487
+ type GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponses = {
2488
+ /**
2489
+ * Successful Response
2490
+ */
2491
+ 200: Array<AccountingGroupedAccounts>;
2492
+ };
2493
+ type GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponse = GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponses[keyof GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponses];
2494
+ type GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetData = {
2495
+ body?: never;
2496
+ path: {
2497
+ subsidiary_id: number;
2498
+ account_id: string;
2499
+ };
2500
+ query?: {
2501
+ is_normalized?: boolean;
2502
+ from_date?: string;
2503
+ to_date?: string;
2504
+ };
2505
+ url: '/api/accounting/subsidiary/{subsidiary_id}/coa/account/{account_id}';
2506
+ };
2507
+ type GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponses = {
2508
+ /**
2509
+ * Successful Response
2510
+ */
2511
+ 200: AccountingTAccountWithSubAccounts;
2512
+ };
2513
+ type GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponse = GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponses[keyof GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponses];
2514
+ type GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetData = {
2515
+ body?: never;
2516
+ path: {
2517
+ currency: AccountingCurrency;
2518
+ };
2519
+ query?: {
2520
+ exchange_date?: string;
2521
+ };
2522
+ url: '/api/accounting/currency/{currency}/conversion-rates';
2523
+ };
2524
+ type GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponses = {
2525
+ /**
2526
+ * Successful Response
2527
+ */
2528
+ 200: AccountingExchangeRates;
2529
+ };
2530
+ type GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponse = GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponses[keyof GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponses];
2531
+ type GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetData = {
2532
+ body?: AccountingPaginationPositionInput | null;
2533
+ path: {
2534
+ subsidiary_id: number;
2535
+ };
2536
+ query?: {
2537
+ entry_types?: Array<AccountingJournalEntryType> | null;
2538
+ ref_numbers?: Array<string> | null;
2539
+ child_subsidiaries?: Array<number> | null;
2540
+ from_date?: string | null;
2541
+ to_date?: string | null;
2542
+ is_nominal_ledger?: boolean | null;
2543
+ memo?: string | null;
2544
+ journal_entry_line_ids?: Array<string> | null;
2545
+ page?: number | null;
2546
+ per_page?: number | null;
2547
+ include_total?: boolean;
2548
+ sort?: 'date' | 'transaction_type' | 'memo' | 'ref_number';
2549
+ order?: AccountingSortingOrder | null;
2550
+ };
2551
+ url: '/api/accounting/subsidiary/{subsidiary_id}/journal-entry/lines';
2552
+ };
2553
+ type GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponses = {
2554
+ /**
2555
+ * Successful Response
2556
+ */
2557
+ 200: Array<AccountingJournalEntryLineWithJournalEntryWithDimensionsWithOperationCtx> | AccountingJournalEntryLinePaginationOutput;
2558
+ };
2559
+ type GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponse = GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponses[keyof GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponses];
2560
+ type GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetData = {
2561
+ body?: AccountingPaginationPositionInput | null;
2562
+ path: {
2563
+ subsidiary_id: number;
2564
+ };
2565
+ query?: {
2566
+ entry_types?: Array<AccountingJournalEntryType> | null;
2567
+ ref_numbers?: Array<string> | null;
2568
+ child_subsidiaries?: Array<number> | null;
2569
+ from_date?: string | null;
2570
+ to_date?: string | null;
2571
+ is_nominal_ledger?: boolean | null;
2572
+ memo?: string | null;
2573
+ entry_statuses?: Array<AccountingJournalEntryStatus> | null;
2574
+ /**
2575
+ * Filter entries where any line has this amount
2576
+ */
2577
+ line_amount?: number | null;
2578
+ page?: number | null;
2579
+ per_page?: number | null;
2580
+ include_total?: boolean;
2581
+ sort?: 'date' | 'transaction_type' | 'memo' | 'ref_number';
2582
+ order?: AccountingSortingOrder | null;
2583
+ };
2584
+ url: '/api/accounting/subsidiary/{subsidiary_id}/journal-entry';
2585
+ };
2586
+ type GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponses = {
2587
+ /**
2588
+ * Successful Response
2589
+ */
2590
+ 200: Array<AccountingJournalEntryDimensionsWithOperationCtx> | AccountingJournalEntryPaginationOutput;
2591
+ };
2592
+ type GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponse = GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponses[keyof GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponses];
2593
+ type GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetData = {
2594
+ body?: never;
2595
+ path: {
2596
+ journal_entry_id: string;
2597
+ subsidiary_id: number;
2598
+ };
2599
+ query?: never;
2600
+ url: '/api/accounting/subsidiary/{subsidiary_id}/journal-entry/{journal_entry_id}';
2601
+ };
2602
+ type GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponses = {
2603
+ /**
2604
+ * Successful Response
2605
+ */
2606
+ 200: AccountingJournalEntryDimensionsWithOperationCtx;
2607
+ };
2608
+ type GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponse = GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponses[keyof GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponses];
2609
+ type GetDimensionsApiAccountingDimensionGetData = {
2610
+ body?: never;
2611
+ path?: never;
2612
+ query?: {
2613
+ subsidiary_id?: number | null;
2614
+ values_limit?: number | null;
2615
+ with_rules_and_values?: boolean;
2616
+ };
2617
+ url: '/api/accounting/dimension';
2618
+ };
2619
+ type GetDimensionsApiAccountingDimensionGetResponses = {
2620
+ /**
2621
+ * Successful Response
2622
+ */
2623
+ 200: Array<AccountingDimensionWithRules>;
2624
+ };
2625
+ type GetDimensionsApiAccountingDimensionGetResponse = GetDimensionsApiAccountingDimensionGetResponses[keyof GetDimensionsApiAccountingDimensionGetResponses];
2626
+ type GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetData = {
2627
+ body?: never;
2628
+ path: {
2629
+ dimension_id: string;
2630
+ account_id: string;
2631
+ };
2632
+ query?: never;
2633
+ url: '/api/accounting/dimension/{dimension_id}/account/{account_id}';
2634
+ };
2635
+ type GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponses = {
2636
+ /**
2637
+ * Successful Response
2638
+ */
2639
+ 200: AccountingAccountDimensionValues;
2640
+ };
2641
+ type GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponse = GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponses[keyof GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponses];
2642
+ type GetDimensionValuesApiAccountingDimensionValueGetData = {
2643
+ body?: never;
2644
+ path?: never;
2645
+ query?: {
2646
+ dimension_ids?: Array<string> | null;
2647
+ dimension_value_ids?: Array<string> | null;
2648
+ dimension_name?: string | null;
2649
+ dimension_value?: string | null;
2650
+ slim?: boolean;
2651
+ /**
2652
+ * Sort dimension values alphabetically by value
2653
+ */
2654
+ sort_alphabetically?: boolean;
2655
+ };
2656
+ url: '/api/accounting/dimension-value';
2657
+ };
2658
+ type GetDimensionValuesApiAccountingDimensionValueGetResponses = {
2659
+ /**
2660
+ * Successful Response
2661
+ */
2662
+ 200: Array<AccountingDimensionValueWithRulesAndChildren | AccountingDimensionValueSlim | AccountingDimensionValue> | [
2663
+ Array<AccountingDimensionValueWithRulesAndChildren | AccountingDimensionValueSlim | AccountingDimensionValue>,
2664
+ AccountingPaginationOutput
2665
+ ];
2666
+ };
2667
+ type GetDimensionValuesApiAccountingDimensionValueGetResponse = GetDimensionValuesApiAccountingDimensionValueGetResponses[keyof GetDimensionValuesApiAccountingDimensionValueGetResponses];
2668
+ type GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetData = {
2669
+ body?: never;
2670
+ path?: never;
2671
+ query?: {
2672
+ dimension_id?: string | null;
2673
+ dimension_name?: string | null;
2674
+ parent_id?: string | null;
2675
+ search_query?: string | null;
2676
+ include_ids?: Array<string> | null;
2677
+ slim?: boolean;
2678
+ };
2679
+ url: '/api/accounting/dimension-value/hierarchical';
2680
+ };
2681
+ type GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponses = {
2682
+ /**
2683
+ * Successful Response
2684
+ */
2685
+ 200: [
2686
+ Array<AccountingDimensionValueWithChildren> | Array<AccountingDimensionValueSlim>,
2687
+ AccountingPaginationOutput | null
2688
+ ];
2689
+ };
2690
+ type GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponse = GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponses[keyof GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponses];
2691
+ type GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetData = {
2692
+ body?: AccountingPaginationPositionInput | null;
2693
+ path?: never;
2694
+ query?: {
2695
+ from_subsidiary?: Array<number> | null;
2696
+ to_subsidiary?: Array<number> | null;
2697
+ page?: number | null;
2698
+ per_page?: number | null;
2699
+ include_total?: boolean;
2700
+ sort?: AccountingSortableFieldsCer;
2701
+ order?: AccountingSortingOrder | null;
2702
+ };
2703
+ url: '/api/accounting/consolidation-exchange-rate';
2704
+ };
2705
+ type GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponses = {
2706
+ /**
2707
+ * Successful Response
2708
+ */
2709
+ 200: AccountingCerPaginationOutput;
2710
+ };
2711
+ type GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponse = GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponses[keyof GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponses];
2712
+ type GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetData = {
2713
+ body?: never;
2714
+ path: {
2715
+ input_date: string;
2716
+ };
2717
+ query?: never;
2718
+ url: '/api/accounting/consolidation-exchange-rate/period/{input_date}';
2719
+ };
2720
+ type GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponses = {
2721
+ /**
2722
+ * Successful Response
2723
+ */
2724
+ 200: AccountingConsolidationExchangeRatePeriod;
2725
+ };
2726
+ type GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponse = GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponses[keyof GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponses];
2727
+ type GetActivityDefinitionsApiActivityActivityDefinitionGetData = {
2728
+ body?: never;
2729
+ path?: never;
2730
+ query?: {
2731
+ with_disabled_activity?: boolean;
2732
+ with_task_definitions?: boolean;
2733
+ };
2734
+ url: '/api/activity/activity-definition';
2735
+ };
2736
+ type GetActivityDefinitionByIdApiActivityActivityDefinitionActivityDefinitionIdGetData = {
2737
+ body?: never;
2738
+ path: {
2739
+ activity_definition_id: string;
2740
+ };
2741
+ query?: {
2742
+ with_task_definitions?: boolean;
2743
+ };
2744
+ url: '/api/activity/activity-definition/{activity_definition_id}';
2745
+ };
2746
+ type GetPeriodInstancesApiActivityPeriodInstanceGetData = {
2747
+ body?: never;
2748
+ path?: never;
2749
+ query?: {
2750
+ period?: ActivityPeriod | null;
2751
+ slim?: boolean;
2752
+ from_date?: string | null;
2753
+ to_date?: string | null;
2754
+ ref_date?: string | null;
2755
+ };
2756
+ url: '/api/activity/period-instance';
2757
+ };
2758
+ type GetPeriodInstanceApiActivityPeriodInstancePeriodInstanceIdGetData = {
2759
+ body?: never;
2760
+ path: {
2761
+ period_instance_id: string;
2762
+ };
2763
+ query?: {
2764
+ with_disabled_activity?: boolean;
2765
+ include_children?: boolean;
2766
+ subsidiary_ids?: Array<number> | null;
2767
+ };
2768
+ url: '/api/activity/period-instance/{period_instance_id}';
2769
+ };
2770
+ type GetPeriodInstanceBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdGetData = {
2771
+ body?: never;
2772
+ path: {
2773
+ period_display_id: string;
2774
+ };
2775
+ query?: {
2776
+ with_disabled_activity?: boolean;
2777
+ include_children?: boolean;
2778
+ subsidiary_ids?: Array<number> | null;
2779
+ /**
2780
+ * Filter by activity definition IDs
2781
+ */
2782
+ activity_definition_ids?: Array<string> | null;
2783
+ exclude_task_types?: Array<ActivityTaskType> | null;
2784
+ include_task_types?: Array<ActivityTaskType> | null;
2785
+ };
2786
+ url: '/api/activity/period-instance/by-slug/{period_display_id}';
2787
+ };
2788
+ type GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetData = {
2789
+ body?: never;
2790
+ path: {
2791
+ period_display_id: string;
2792
+ };
2793
+ query?: {
2794
+ /**
2795
+ * Maximum number of subsidiaries to return globally (max 50)
2796
+ */
2797
+ max_subsidiaries?: number;
2798
+ /**
2799
+ * Filter by specific subsidiary IDs
2800
+ */
2801
+ subsidiary_ids?: Array<number> | null;
2802
+ /**
2803
+ * Filter by activity definition IDs
2804
+ */
2805
+ activity_definition_ids?: Array<string> | null;
2806
+ };
2807
+ url: '/api/activity/period-instance/by-slug/{period_display_id}/progress-breakdown';
2808
+ };
2809
+ type GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponses = {
2810
+ /**
2811
+ * Successful Response
2812
+ */
2813
+ 200: ActivityPeriodInstanceProgressBreakdownApi;
2814
+ };
2815
+ type GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponse = GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponses[keyof GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponses];
2816
+ type GetAllTasksDefinitionsApiActivityTaskDefinitionGetData = {
2817
+ body?: never;
2818
+ path?: never;
2819
+ query?: {
2820
+ entity_id?: string | null;
2821
+ with_instances?: boolean;
2822
+ };
2823
+ url: '/api/activity/task-definition';
2824
+ };
2825
+ type GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponses = {
2826
+ /**
2827
+ * Successful Response
2828
+ */
2829
+ 200: Array<ActivitySlimTaskDefinitionWithInstances>;
2830
+ };
2831
+ type GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponse = GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponses[keyof GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponses];
2832
+ type CreateTaskDefinitionApiActivityTaskDefinitionPostData = {
2833
+ body: ActivityTaskDefinitionWithActionCreateApi;
2834
+ path?: never;
2835
+ query?: never;
2836
+ url: '/api/activity/task-definition';
2837
+ };
2838
+ type CreateTaskDefinitionApiActivityTaskDefinitionPostResponses = {
2839
+ /**
2840
+ * Successful Response
2841
+ */
2842
+ 200: ActivityTaskDefinition;
2843
+ };
2844
+ type CreateTaskDefinitionApiActivityTaskDefinitionPostResponse = CreateTaskDefinitionApiActivityTaskDefinitionPostResponses[keyof CreateTaskDefinitionApiActivityTaskDefinitionPostResponses];
2845
+ type GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostData = {
2846
+ body?: never;
2847
+ path?: never;
2848
+ query?: {
2849
+ entity_ids?: Array<string>;
2850
+ entity_type?: ActivityTaskEntityType | null;
2851
+ with_instances?: boolean;
2852
+ q?: string | null;
2853
+ };
2854
+ url: '/api/activity/task-definition/query';
2855
+ };
2856
+ type GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponses = {
2857
+ /**
2858
+ * Successful Response
2859
+ */
2860
+ 200: Array<ActivitySlimTaskDefinitionWithInstances>;
2861
+ };
2862
+ type GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponse = GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponses[keyof GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponses];
2863
+ type GetTaskDefinitionByIdApiActivityTaskDefinitionTaskDefinitionIdGetData = {
2864
+ body?: never;
2865
+ path: {
2866
+ task_definition_id: string;
2867
+ };
2868
+ query?: {
2869
+ include_draft?: boolean;
2870
+ with_instances?: boolean;
2871
+ with_action_template?: boolean;
2872
+ };
2873
+ url: '/api/activity/task-definition/{task_definition_id}';
2874
+ };
2875
+ type UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutData = {
2876
+ body: ActivityTaskDefinitionUpdate;
2877
+ path: {
2878
+ task_definition_id: string;
2879
+ };
2880
+ query?: {
2881
+ should_override_instances?: boolean;
2882
+ };
2883
+ url: '/api/activity/task-definition/{task_definition_id}';
2884
+ };
2885
+ type UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponses = {
2886
+ /**
2887
+ * Successful Response
2888
+ */
2889
+ 200: ActivityTaskDefinition;
2890
+ };
2891
+ type UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponse = UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponses[keyof UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponses];
2892
+ type GetActivityInstanceApiActivityActivityInstanceActivityInstanceIdGetData = {
2893
+ body?: never;
2894
+ path: {
2895
+ activity_instance_id: string;
2896
+ };
2897
+ query?: {
2898
+ with_slim_task_instances?: boolean;
2899
+ with_instances?: boolean;
2900
+ for_reconciliation?: boolean;
2901
+ subsidiary_ids?: Array<number> | null;
2902
+ };
2903
+ url: '/api/activity/activity-instance/{activity_instance_id}';
2904
+ };
2905
+ type GetTaskInstancesByActivityApiActivityActivityInstanceActivityInstanceIdTaskGetData = {
2906
+ body?: ActivityPaginationPositionInput | null;
2907
+ path: {
2908
+ activity_instance_id: string;
2909
+ };
2910
+ query?: {
2911
+ is_deleted?: boolean | null;
2912
+ include_draft?: boolean;
2913
+ subsidiary_ids?: Array<number> | null;
2914
+ status?: Array<ActivityTaskStatus> | null;
2915
+ preparer_ids?: Array<string> | null;
2916
+ reviewer_ids?: Array<string> | null;
2917
+ due_date_period?: ActivityPeriodFilter;
2918
+ due_date_from?: string;
2919
+ due_date_to?: string;
2920
+ slim?: boolean;
2921
+ without_activity_instance?: boolean;
2922
+ page?: number | null;
2923
+ per_page?: number | null;
2924
+ include_total?: boolean;
2925
+ sort?: ActivitySortableFieldsTask;
2926
+ order?: ActivitySortingOrder | null;
2927
+ q?: string | null;
2928
+ };
2929
+ url: '/api/activity/activity-instance/{activity_instance_id}/task';
2930
+ };
2931
+ type GetActivityInstancesApiActivityActivityInstanceGetData = {
2932
+ body?: never;
2933
+ path?: never;
2934
+ query?: {
2935
+ period_instance_id?: string | null;
2936
+ activity_definition_id?: string | null;
2937
+ from_date?: string | null;
2938
+ to_date?: string | null;
2939
+ as_enriched?: boolean;
2940
+ };
2941
+ url: '/api/activity/activity-instance';
2942
+ };
2943
+ type GetActivityInstancesApiActivityActivityInstanceGetResponses = {
2944
+ /**
2945
+ * Successful Response
2946
+ */
2947
+ 200: Array<ActivityApiEnrichedActivityInstance | ActivityActivityInstanceWithTaskInstances>;
2948
+ };
2949
+ type GetActivityInstancesApiActivityActivityInstanceGetResponse = GetActivityInstancesApiActivityActivityInstanceGetResponses[keyof GetActivityInstancesApiActivityActivityInstanceGetResponses];
2950
+ type GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetData = {
2951
+ body?: never;
2952
+ path: {
2953
+ period_display_id: string;
2954
+ activity_definition_id: string;
2955
+ };
2956
+ query?: {
2957
+ with_slim_task_instances?: boolean;
2958
+ with_instances?: boolean;
2959
+ for_reconciliation?: boolean;
2960
+ subsidiary_ids?: Array<number> | null;
2961
+ };
2962
+ url: '/api/activity/activity-instance/by-period/{period_display_id}/{activity_definition_id}';
2963
+ };
2964
+ type GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponses = {
2965
+ /**
2966
+ * Successful Response
2967
+ */
2968
+ 200: ActivityApiEnrichedActivityInstance;
2969
+ };
2970
+ type GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponse = GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponses[keyof GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponses];
2971
+ type GetTaskInstancesByActivityPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdTaskGetData = {
2972
+ body?: ActivityPaginationPositionInput | null;
2973
+ path: {
2974
+ period_display_id: string;
2975
+ activity_definition_id: string;
2976
+ };
2977
+ query?: {
2978
+ is_deleted?: boolean | null;
2979
+ include_draft?: boolean;
2980
+ subsidiary_ids?: Array<number> | null;
2981
+ status?: Array<ActivityTaskStatus> | null;
2982
+ preparer_ids?: Array<string> | null;
2983
+ reviewer_ids?: Array<string> | null;
2984
+ slim?: boolean;
2985
+ without_activity_instance?: boolean;
2986
+ exclude_task_types?: Array<ActivityTaskType> | null;
2987
+ page?: number | null;
2988
+ per_page?: number | null;
2989
+ include_total?: boolean;
2990
+ sort?: ActivitySortableFieldsTask;
2991
+ order?: ActivitySortingOrder | null;
2992
+ q?: string | null;
2993
+ };
2994
+ url: '/api/activity/activity-instance/by-period/{period_display_id}/{activity_definition_id}/task';
2995
+ };
2996
+ type GetAllTaskInstancesApiActivityTaskInstanceGetData = {
2997
+ body?: never;
2998
+ path?: never;
2999
+ query?: {
3000
+ status?: Array<ActivityTaskStatus>;
3001
+ subsidiary_ids?: Array<number>;
3002
+ activity_definition_ids?: Array<string>;
3003
+ preparer_ids?: Array<string> | null;
3004
+ reviewer_ids?: Array<string> | null;
3005
+ period_instance_id?: string | null;
3006
+ period_display_id?: string | null;
3007
+ period_instance_ids?: Array<string> | null;
3008
+ period_display_ids?: Array<string> | null;
3009
+ exclude_task_types?: Array<ActivityTaskType> | null;
3010
+ slim?: boolean;
3011
+ sort?: ActivitySortableFieldsTask;
3012
+ order?: ActivitySortingOrder | null;
3013
+ q?: string | null;
3014
+ };
3015
+ url: '/api/activity/task-instance';
3016
+ };
3017
+ type GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostData = {
3018
+ body?: ActivityBodyGetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPost;
3019
+ path?: never;
3020
+ query?: {
3021
+ sort?: ActivitySortableFieldsTask;
3022
+ order?: ActivitySortingOrder | null;
3023
+ };
3024
+ url: '/api/activity/task-instance/query';
3025
+ };
3026
+ type GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponses = {
3027
+ /**
3028
+ * Successful Response
3029
+ */
3030
+ 200: ActivityTaskInstancePaginationOutput;
3031
+ };
3032
+ type GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponse = GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponses[keyof GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponses];
3033
+ type GetTaskInstanceByIdApiActivityTaskInstanceTaskInstanceIdGetData = {
3034
+ body?: never;
3035
+ path: {
3036
+ task_instance_id: string;
3037
+ };
3038
+ query?: {
3039
+ with_task_action?: boolean;
3040
+ };
3041
+ url: '/api/activity/task-instance/{task_instance_id}';
3042
+ };
3043
+ type UpdateTaskInstanceApiActivityTaskInstanceTaskInstanceIdPutData = {
3044
+ body: ActivityTaskInstanceUpdateWithAction | ActivityTaskInstanceUpdateClearAction | ActivityTaskInstanceUpdate;
3045
+ path: {
3046
+ task_instance_id: string;
3047
+ };
3048
+ query?: never;
3049
+ url: '/api/activity/task-instance/{task_instance_id}';
3050
+ };
3051
+ type GetEventsApiAuditTrailEventGetData = {
3052
+ body?: never;
3053
+ path?: never;
3054
+ query?: never;
3055
+ url: '/api/audit-trail/event';
3056
+ };
3057
+ type GetEventsApiAuditTrailEventGetResponses = {
3058
+ /**
3059
+ * Successful Response
3060
+ */
3061
+ 200: Array<AuditTrailAuditTrailEvent>;
3062
+ };
3063
+ type GetEventsApiAuditTrailEventGetResponse = GetEventsApiAuditTrailEventGetResponses[keyof GetEventsApiAuditTrailEventGetResponses];
3064
+ type GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostData = {
3065
+ body?: Array<AuditTrailGetEntityAuditTrailArgs> | null;
3066
+ path: {
3067
+ target_type: AuditTrailEntityType;
3068
+ target_id: string;
3069
+ };
3070
+ query?: never;
3071
+ url: '/api/audit-trail/event/entity/{target_type}/{target_id}';
3072
+ };
3073
+ type GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponses = {
3074
+ /**
3075
+ * Successful Response
3076
+ */
3077
+ 200: Array<AuditTrailAuditTrailEvent>;
3078
+ };
3079
+ type GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponse = GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponses[keyof GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponses];
3080
+ type GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetData = {
3081
+ body?: never;
3082
+ path: {
3083
+ subsidiary_id: number;
3084
+ };
3085
+ query?: never;
3086
+ url: '/api/period-manager/fiscal-calendar/by-subsidiary/{subsidiary_id}';
3087
+ };
3088
+ type GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponses = {
3089
+ /**
3090
+ * Successful Response
3091
+ */
3092
+ 200: Array<PeriodManagerFiscalCalendar>;
3093
+ };
3094
+ type GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponse = GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponses[keyof GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponses];
3095
+ type GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetData = {
3096
+ body?: never;
3097
+ path: {
3098
+ calendar_id: string;
3099
+ };
3100
+ query?: never;
3101
+ url: '/api/period-manager/fiscal-calendar/{calendar_id}';
3102
+ };
3103
+ type GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponses = {
3104
+ /**
3105
+ * Successful Response
3106
+ */
3107
+ 200: PeriodManagerFiscalCalendar;
3108
+ };
3109
+ type GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponse = GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponses[keyof GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponses];
3110
+ type GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetData = {
3111
+ body?: never;
3112
+ path: {
3113
+ tenant_id_or_name: string;
3114
+ };
3115
+ query?: never;
3116
+ url: '/api/tenancy/tenant/{tenant_id_or_name}/users';
3117
+ };
3118
+ type GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponses = {
3119
+ /**
3120
+ * Successful Response
3121
+ */
3122
+ 200: Array<TenancyUser>;
3123
+ };
3124
+ type GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponse = GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponses[keyof GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponses];
3125
+ type GetAllSubsidiariesApiTenancySubsidiaryGetData = {
3126
+ body?: never;
3127
+ path?: never;
3128
+ query?: {
3129
+ is_flat?: boolean;
3130
+ only_active?: boolean;
3131
+ with_elimination_subsidiaries?: boolean;
3132
+ q?: string | null;
3133
+ };
3134
+ url: '/api/tenancy/subsidiary';
3135
+ };
3136
+ type GetAllSubsidiariesApiTenancySubsidiaryGetResponses = {
3137
+ /**
3138
+ * Successful Response
3139
+ */
3140
+ 200: Array<TenancySubsidiaryApiResponse>;
3141
+ };
3142
+ type GetAllSubsidiariesApiTenancySubsidiaryGetResponse = GetAllSubsidiariesApiTenancySubsidiaryGetResponses[keyof GetAllSubsidiariesApiTenancySubsidiaryGetResponses];
3143
+ type GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetData = {
3144
+ body?: never;
3145
+ path: {
3146
+ subsidiary_id: number;
3147
+ };
3148
+ query?: {
3149
+ with_elimination_subsidiaries?: boolean;
3150
+ };
3151
+ url: '/api/tenancy/subsidiary/{subsidiary_id}';
3152
+ };
3153
+ type GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponses = {
3154
+ /**
3155
+ * Successful Response
3156
+ */
3157
+ 200: TenancySubsidiaryApiResponse | null;
3158
+ };
3159
+ type GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponse = GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponses[keyof GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponses];
3160
+ type GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetData = {
3161
+ body?: never;
3162
+ path: {
3163
+ subsidiary_id: number;
3164
+ };
3165
+ query?: never;
3166
+ url: '/api/tenancy/subsidiary/{subsidiary_id}/parent-currencies';
3167
+ };
3168
+ type GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponses = {
3169
+ /**
3170
+ * Successful Response
3171
+ */
3172
+ 200: {
3173
+ [key: string]: unknown;
3174
+ };
3175
+ };
3176
+ type GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponse = GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponses[keyof GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponses];
3177
+
3178
+ interface BridgeSubsidiary {
3179
+ id: number;
3180
+ displayName: string;
3181
+ }
3182
+ /**
3183
+ * PostHog configuration the host supplies so the iframe can record a session
3184
+ * replay (stitched into the host's recording via `recordCrossOriginIframes`)
3185
+ * and emit custom events, all attributed to the **same PostHog person** as
3186
+ * nom-ui.
3187
+ *
3188
+ * The host (nom-ui) is the single source of truth for these values — it knows
3189
+ * the project key, the env-aware ingestion host, and the resolved person — and
3190
+ * delivers it over the bridge (as a one-time `POSTHOG_PUSH`, separate from
3191
+ * {@link ContextPayload}) so the iframe never hardcodes any of it. When the host
3192
+ * has no PostHog config (recording disabled for this env/app), it sends no
3193
+ * `POSTHOG_PUSH` and the bridge initializes nothing.
3194
+ */
3195
+ interface PostHogContext {
3196
+ /** Project API key — the same PostHog project the host (nom-ui) uses. */
3197
+ token: string;
3198
+ /**
3199
+ * **Absolute** ingestion host, e.g. `"https://us.i.posthog.com"`.
3200
+ *
3201
+ * Must NOT be the host's relative `/ingest` reverse-proxy path: a relative
3202
+ * path resolves against the iframe's *own* (cross-origin) host and 404s.
3203
+ */
3204
+ apiHost: string;
3205
+ /**
3206
+ * Host-resolved PostHog distinct id. The bridge calls `identify()` with it so
3207
+ * the iframe's recording and events attribute to the same person as the host.
3208
+ */
3209
+ distinctId: string;
3210
+ /**
3211
+ * **Optional.** The host's current PostHog session id (from
3212
+ * `posthog.get_session_id()`). When provided, the bridge seeds it as the
3213
+ * iframe instance's session via `bootstrap.sessionID`, so custom events from
3214
+ * `bridge.track()` share the **same `$session_id`** as the host — letting them
3215
+ * line up with the stitched session replay on one timeline.
3216
+ *
3217
+ * Not needed for *replay* stitching itself (that works via
3218
+ * `recordCrossOriginIframes` on both sides regardless). Must be a valid UUID
3219
+ * v7 — PostHog session ids already are. It is a one-time seed at connect, so
3220
+ * if the host's session later rotates the two can diverge; alignment is
3221
+ * best-effort for the session in progress.
3222
+ */
3223
+ sessionId?: string;
3224
+ /**
3225
+ * Master switch, env- and/or app-gated by the host. The bridge only calls
3226
+ * `posthog.init()` when this is `true`; it stays the kill-switch even though
3227
+ * `posthog-js` is bundled into the bridge.
3228
+ */
3229
+ enabled: boolean;
3230
+ }
3231
+ /**
3232
+ * Authentication-state change the host pushes to the iframe via `AUTH_CHANGED`.
3233
+ * It carries the security principal the embedded app authenticates and scopes
3234
+ * its own data by. Sent when the Nominal session changes: a logout
3235
+ * (`authenticated: false`) or an identity/tenant switch (`authenticated: true`
3236
+ * with a new `userId`/`tenant`). The initial state is implicit at connect — the
3237
+ * iframe only loads when authenticated, and the current identity/tenant are
3238
+ * {@link ContextPayload.user} / {@link ContextPayload.tenant}, so apps baseline
3239
+ * off those and react to this push.
3240
+ *
3241
+ * Subsidiary/period and other view-level state are NOT here — they ride the
3242
+ * follow-up `CONTEXT_PUSH` (`onContextChange`), per "auth change, then context".
3243
+ */
3244
+ interface AuthPayload {
3245
+ /** Whether the Nominal user is still authenticated. */
3246
+ authenticated: boolean;
3247
+ /** The effective Nominal user id when authenticated; omitted on logout. */
3248
+ userId?: string;
3249
+ /** The tenant the user is acting in — the app's data-scoping key (RLS). */
3250
+ tenant?: string;
3251
+ }
3252
+ interface ContextPayload {
3253
+ tenant: string;
3254
+ subsidiaryId: number;
3255
+ subsidiaries: BridgeSubsidiary[];
3256
+ user: {
3257
+ id: string;
3258
+ displayName: string;
3259
+ };
3260
+ /** Initial subroute the iframe should navigate to on first load. */
3261
+ subroute?: string;
3262
+ /** Slug of the last closed accounting period, e.g. "mar-2026". */
3263
+ lastClosedPeriodSlug?: string;
3264
+ /** Version of the host SDK (@nominalso/vibe-host) running in nom-ui. */
3265
+ hostVersion: string;
3266
+ }
3267
+
3268
+ /**
3269
+ * Response type for operations whose Nominal OpenAPI `200` response declares
3270
+ * **no content schema**. hey-api generates `200: unknown` for these, so there is
3271
+ * genuinely no concrete type to narrow to at codegen time — the shape is
3272
+ * undocumented upstream, not merely unmapped by this SDK.
3273
+ *
3274
+ * We surface this named alias instead of a bare `unknown` so the gap is
3275
+ * self-documenting: editors show `UntypedApiResponse` (with this doc) rather than
3276
+ * an anonymous `unknown`, signalling that the value must be explicitly asserted
3277
+ * to a known shape (`const p = res as MyPeriod`) rather than trusted. It stays
3278
+ * assignment-compatible with `unknown`, so no runtime or narrowing behaviour
3279
+ * changes.
3280
+ *
3281
+ * The fix is upstream: document these endpoints' response bodies in the owning
3282
+ * Nominal service's OpenAPI (then the registry entry can reference the generated
3283
+ * `*Response` type). Affected ops today: `GET_PERIODS`, `GET_PERIOD_INSTANCE`,
3284
+ * `GET_PERIOD_INSTANCE_BY_SLUG`, `POST_TASK_OUTPUT`, `GET_TASK_INSTANCE`,
3285
+ * `GET_TASK_INSTANCES`, `GET_TASK_DEFINITION`, `GET_ACTIVITY_DEFINITION(S)`,
3286
+ * `GET_ACTIVITY_INSTANCE`, `GET_ACTIVITY_INSTANCE_TASKS`,
3287
+ * `GET_ACTIVITY_PERIOD_TASKS`.
3288
+ */
3289
+ type UntypedApiResponse = unknown;
3290
+ interface UploadPayload {
3291
+ buffer: ArrayBuffer;
3292
+ fileName: string;
3293
+ fileType: string;
3294
+ entityType: string;
3295
+ entityId?: string | number;
3296
+ }
3297
+ interface UploadResponse {
3298
+ attachmentId: string;
3299
+ name: string;
3300
+ /** Public/presigned URL of the stored file, when the host returns one. */
3301
+ url?: string;
3302
+ }
3303
+ interface UploadProgress {
3304
+ attachmentId: string;
3305
+ progress: number;
3306
+ }
3307
+ /** How the host should apply a navigation. Defaults to `'push'`. */
3308
+ type NavigateAction = 'push' | 'replace' | 'refresh';
3309
+ /** Collapse/expand the host's side navigation. */
3310
+ interface SetSideNavPayload {
3311
+ collapsed: boolean;
3312
+ }
3313
+ /** Targets for a host cache invalidation. */
3314
+ interface InvalidateCachePayload {
3315
+ /** API path prefixes to invalidate, e.g. `['/accounting/accounts']`. */
3316
+ paths?: string[];
3317
+ /** Cache tag keys to invalidate, e.g. `['REPORTS', 'SUBSIDIARIES']`. */
3318
+ tags?: string[];
3319
+ }
3320
+ /** Result of a host cache invalidation. */
3321
+ interface InvalidateResult {
3322
+ invalidated: boolean;
3323
+ }
3324
+
3325
+ /**
3326
+ * All operations the iframe can invoke on the host, each with a typed request
3327
+ * payload and a typed response. Adding a new operation here is all that's
3328
+ * required — message union types and handler types are derived automatically.
3329
+ *
3330
+ * Operations that also emit intermediate progress events should include a
3331
+ * `progress` field with the progress payload type.
3332
+ */
3333
+ interface RequestRegistry {
3334
+ GET_CHART_OF_ACCOUNTS: {
3335
+ payload: Omit<GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetData, 'url'>;
3336
+ data: GetCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGetResponse;
3337
+ };
3338
+ GET_SUBSIDIARIES: {
3339
+ payload: Omit<GetAllSubsidiariesApiTenancySubsidiaryGetData, 'url'>;
3340
+ data: GetAllSubsidiariesApiTenancySubsidiaryGetResponse;
3341
+ };
3342
+ GET_PERIODS: {
3343
+ payload: Omit<GetPeriodInstancesApiActivityPeriodInstanceGetData, 'url'>;
3344
+ data: UntypedApiResponse;
3345
+ };
3346
+ POST_TASK_OUTPUT: {
3347
+ payload: Omit<UpdateTaskInstanceApiActivityTaskInstanceTaskInstanceIdPutData, 'url'>;
3348
+ data: UntypedApiResponse;
3349
+ };
3350
+ GET_DIMENSIONS: {
3351
+ payload: Omit<GetDimensionsApiAccountingDimensionGetData, 'url'>;
3352
+ data: GetDimensionsApiAccountingDimensionGetResponse;
3353
+ };
3354
+ GET_DIMENSION_VALUES: {
3355
+ payload: Omit<GetDimensionValuesApiAccountingDimensionValueGetData, 'url'>;
3356
+ data: GetDimensionValuesApiAccountingDimensionValueGetResponse;
3357
+ };
3358
+ GET_JOURNAL_ENTRIES: {
3359
+ payload: Omit<GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetData, 'url'>;
3360
+ data: GetSubsidiaryJournalApiAccountingSubsidiarySubsidiaryIdJournalEntryGetResponse;
3361
+ };
3362
+ GET_ACTIVITY_DEFINITIONS: {
3363
+ payload: Omit<GetActivityDefinitionsApiActivityActivityDefinitionGetData, 'url'>;
3364
+ data: UntypedApiResponse;
3365
+ };
3366
+ GET_TASK_DEFINITIONS: {
3367
+ payload: Omit<GetAllTasksDefinitionsApiActivityTaskDefinitionGetData, 'url'>;
3368
+ data: GetAllTasksDefinitionsApiActivityTaskDefinitionGetResponse;
3369
+ };
3370
+ GET_TASK_INSTANCES: {
3371
+ payload: Omit<GetAllTaskInstancesApiActivityTaskInstanceGetData, 'url'>;
3372
+ data: UntypedApiResponse;
3373
+ };
3374
+ GET_FISCAL_CALENDARS: {
3375
+ payload: Omit<GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetData, 'url'>;
3376
+ data: GetFiscalCalendarsBySubsidiaryApiPeriodManagerFiscalCalendarBySubsidiarySubsidiaryIdGetResponse;
3377
+ };
3378
+ GET_FISCAL_CALENDAR: {
3379
+ payload: Omit<GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetData, 'url'>;
3380
+ data: GetFiscalCalendarByIdApiPeriodManagerFiscalCalendarCalendarIdGetResponse;
3381
+ };
3382
+ GET_ACCOUNTS: {
3383
+ payload: Omit<GetAccountsApiAccountingAccountGetData, 'url'>;
3384
+ data: GetAccountsApiAccountingAccountGetResponse;
3385
+ };
3386
+ GET_ACCOUNT: {
3387
+ payload: Omit<GetAccountApiAccountingAccountAccountIdGetData, 'url'>;
3388
+ data: GetAccountApiAccountingAccountAccountIdGetResponse;
3389
+ };
3390
+ GET_COA_TREE: {
3391
+ payload: Omit<GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetData, 'url'>;
3392
+ data: GetCoaTreeApiAccountingSubsidiarySubsidiaryIdCoaGetResponse;
3393
+ };
3394
+ GET_COA_FLAT_SIMPLE: {
3395
+ payload: Omit<GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetData, 'url'>;
3396
+ data: GetCoaFlatSimpleApiAccountingSubsidiarySubsidiaryIdCoaAccountSimpleGetResponse;
3397
+ };
3398
+ GET_COA_GROUPED: {
3399
+ payload: Omit<GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetData, 'url'>;
3400
+ data: GetGroupedCoaFlatApiAccountingSubsidiarySubsidiaryIdCoaAccountGroupGetResponse;
3401
+ };
3402
+ GET_COA_ACCOUNT: {
3403
+ payload: Omit<GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetData, 'url'>;
3404
+ data: GetAccountByIdApiAccountingSubsidiarySubsidiaryIdCoaAccountAccountIdGetResponse;
3405
+ };
3406
+ GET_SUBSIDIARY_AVAILABLE_CURRENCIES: {
3407
+ payload: Omit<GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetData, 'url'>;
3408
+ data: GetSubsidiaryAvailableCurrenciesApiAccountingSubsidiarySubsidiaryIdCoaAvailableCurrenciesGetResponse;
3409
+ };
3410
+ GET_CONVERSION_RATES: {
3411
+ payload: Omit<GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetData, 'url'>;
3412
+ data: GetConversionRateApiAccountingCurrencyCurrencyConversionRatesGetResponse;
3413
+ };
3414
+ GET_EFFECTIVE_EXCHANGE_RATE: {
3415
+ payload: Omit<GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetData, 'url'>;
3416
+ data: GetEffectiveExchangeRateApiAccountingConsolidationExchangeRateGetResponse;
3417
+ };
3418
+ GET_EXCHANGE_RATE_BY_DATE: {
3419
+ payload: Omit<GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetData, 'url'>;
3420
+ data: GetPeriodByDateApiAccountingConsolidationExchangeRatePeriodInputDateGetResponse;
3421
+ };
3422
+ GET_DIMENSION_ACCOUNT_ASSIGNMENTS: {
3423
+ payload: Omit<GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetData, 'url'>;
3424
+ data: GetAccountDimensionAssignmentsForDimensionApiAccountingDimensionDimensionIdAccountAccountIdGetResponse;
3425
+ };
3426
+ GET_DIMENSION_VALUES_HIERARCHICAL: {
3427
+ payload: Omit<GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetData, 'url'>;
3428
+ data: GetDimensionValuesHierarchicalApiAccountingDimensionValueHierarchicalGetResponse;
3429
+ };
3430
+ GET_JOURNAL_LINES: {
3431
+ payload: Omit<GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetData, 'url'>;
3432
+ data: GetSubsidiaryJournalLinesApiAccountingSubsidiarySubsidiaryIdJournalEntryLinesGetResponse;
3433
+ };
3434
+ GET_JOURNAL_ENTRY: {
3435
+ payload: Omit<GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetData, 'url'>;
3436
+ data: GetJournalEntryApiAccountingSubsidiarySubsidiaryIdJournalEntryJournalEntryIdGetResponse;
3437
+ };
3438
+ GET_PERIOD_INSTANCE: {
3439
+ payload: Omit<GetPeriodInstanceApiActivityPeriodInstancePeriodInstanceIdGetData, 'url'>;
3440
+ data: UntypedApiResponse;
3441
+ };
3442
+ GET_PERIOD_INSTANCE_BY_SLUG: {
3443
+ payload: Omit<GetPeriodInstanceBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdGetData, 'url'>;
3444
+ data: UntypedApiResponse;
3445
+ };
3446
+ GET_PERIOD_PROGRESS_BREAKDOWN: {
3447
+ payload: Omit<GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetData, 'url'>;
3448
+ data: GetPeriodInstanceProgressBreakdownBySlugApiActivityPeriodInstanceBySlugPeriodDisplayIdProgressBreakdownGetResponse;
3449
+ };
3450
+ GET_ACTIVITY_DEFINITION: {
3451
+ payload: Omit<GetActivityDefinitionByIdApiActivityActivityDefinitionActivityDefinitionIdGetData, 'url'>;
3452
+ data: UntypedApiResponse;
3453
+ };
3454
+ GET_ACTIVITY_INSTANCES: {
3455
+ payload: Omit<GetActivityInstancesApiActivityActivityInstanceGetData, 'url'>;
3456
+ data: GetActivityInstancesApiActivityActivityInstanceGetResponse;
3457
+ };
3458
+ GET_ACTIVITY_INSTANCE: {
3459
+ payload: Omit<GetActivityInstanceApiActivityActivityInstanceActivityInstanceIdGetData, 'url'>;
3460
+ data: UntypedApiResponse;
3461
+ };
3462
+ GET_ACTIVITY_INSTANCE_BY_PERIOD: {
3463
+ payload: Omit<GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetData, 'url'>;
3464
+ data: GetActivityInstanceByPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdGetResponse;
3465
+ };
3466
+ GET_ACTIVITY_INSTANCE_TASKS: {
3467
+ payload: Omit<GetTaskInstancesByActivityApiActivityActivityInstanceActivityInstanceIdTaskGetData, 'url'>;
3468
+ data: UntypedApiResponse;
3469
+ };
3470
+ GET_ACTIVITY_PERIOD_TASKS: {
3471
+ payload: Omit<GetTaskInstancesByActivityPeriodApiActivityActivityInstanceByPeriodPeriodDisplayIdActivityDefinitionIdTaskGetData, 'url'>;
3472
+ data: UntypedApiResponse;
3473
+ };
3474
+ GET_TASK_DEFINITION: {
3475
+ payload: Omit<GetTaskDefinitionByIdApiActivityTaskDefinitionTaskDefinitionIdGetData, 'url'>;
3476
+ data: UntypedApiResponse;
3477
+ };
3478
+ CREATE_TASK_DEFINITION: {
3479
+ payload: Omit<CreateTaskDefinitionApiActivityTaskDefinitionPostData, 'url'>;
3480
+ data: CreateTaskDefinitionApiActivityTaskDefinitionPostResponse;
3481
+ };
3482
+ UPDATE_TASK_DEFINITION: {
3483
+ payload: Omit<UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutData, 'url'>;
3484
+ data: UpdateTaskDefinitionApiActivityTaskDefinitionTaskDefinitionIdPutResponse;
3485
+ };
3486
+ GET_TASK_DEFINITIONS_BY_FILTER: {
3487
+ payload: Omit<GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostData, 'url'>;
3488
+ data: GetAllTasksDefinitionsByFilterApiActivityTaskDefinitionQueryPostResponse;
3489
+ };
3490
+ GET_TASK_INSTANCE: {
3491
+ payload: Omit<GetTaskInstanceByIdApiActivityTaskInstanceTaskInstanceIdGetData, 'url'>;
3492
+ data: UntypedApiResponse;
3493
+ };
3494
+ GET_TASK_INSTANCES_BY_FILTER: {
3495
+ payload: Omit<GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostData, 'url'>;
3496
+ data: GetAllTaskInstancesByFilterApiActivityTaskInstanceQueryPostResponse;
3497
+ };
3498
+ GET_AUDIT_EVENTS: {
3499
+ payload: Omit<GetEventsApiAuditTrailEventGetData, 'url'>;
3500
+ data: GetEventsApiAuditTrailEventGetResponse;
3501
+ };
3502
+ GET_ENTITY_AUDIT_EVENTS: {
3503
+ payload: Omit<GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostData, 'url'>;
3504
+ data: GetEntityEventsApiAuditTrailEventEntityTargetTypeTargetIdPostResponse;
3505
+ };
3506
+ GET_SUBSIDIARY: {
3507
+ payload: Omit<GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetData, 'url'>;
3508
+ data: GetSubsidiaryApiTenancySubsidiarySubsidiaryIdGetResponse;
3509
+ };
3510
+ GET_SUBSIDIARY_PARENT_CURRENCIES: {
3511
+ payload: Omit<GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetData, 'url'>;
3512
+ data: GetSubsidiaryParentCurrenciesApiTenancySubsidiarySubsidiaryIdParentCurrenciesGetResponse;
3513
+ };
3514
+ GET_TENANT_USERS: {
3515
+ payload: Omit<GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetData, 'url'>;
3516
+ data: GetTenantUsersApiTenancyTenantTenantIdOrNameUsersGetResponse;
3517
+ };
3518
+ INVALIDATE_CACHE: {
3519
+ payload: InvalidateCachePayload;
3520
+ data: InvalidateResult;
3521
+ };
3522
+ UPLOAD_FILE: {
3523
+ payload: UploadPayload;
3524
+ data: UploadResponse;
3525
+ progress: UploadProgress;
3526
+ };
3527
+ }
3528
+
3529
+ /**
3530
+ * An error that crossed the bridge, carrying a machine-readable {@link code}
3531
+ * alongside the human-readable message.
3532
+ *
3533
+ * The host attaches a `code` to failed responses (e.g. `'RATE_LIMITED'`,
3534
+ * `'FILE_TOO_LARGE'`, `'REQUEST_FAILED'`); the bridge rehydrates it into a
3535
+ * `BridgeError` so app `catch` blocks can branch on `error.code` instead of
3536
+ * string-matching `error.message`. A failed Nominal API call rehydrates as the
3537
+ * {@link HttpBridgeError} subtype, which adds the HTTP `status`.
3538
+ *
3539
+ * SDK-originated codes you may also see: `'TIMEOUT'` (a request or the connect
3540
+ * handshake timed out), `'DESTROYED'` (the bridge was torn down mid-flight),
3541
+ * `'PARENT_ORIGIN_UNRESOLVED'` (no embedding origin could be resolved) and
3542
+ * `'SERVER_ENVIRONMENT'` (a browser-only method was called where there is no
3543
+ * `window` — e.g. during SSR / in a React Server Component / in a Worker).
3544
+ *
3545
+ * This class is safe to import from any environment (see the module header).
3546
+ *
3547
+ * @example
3548
+ * ```ts
3549
+ * import { BridgeError } from '@nominalso/vibe-bridge'
3550
+ *
3551
+ * try {
3552
+ * await bridge.getAccounts({})
3553
+ * } catch (err) {
3554
+ * // `instanceof` works within a single bundle; `isBridgeError` also works
3555
+ * // across independently-built server/client bundles.
3556
+ * if (BridgeError.isBridgeError(err) && err.code === 'RATE_LIMITED') {
3557
+ * // back off and retry
3558
+ * }
3559
+ * }
3560
+ * ```
3561
+ */
3562
+ declare class BridgeError extends Error {
3563
+ readonly code: string;
3564
+ constructor(code: string, message: string);
3565
+ /**
3566
+ * Cross-realm-safe type guard. Prefer this over `instanceof BridgeError` when
3567
+ * an error may have been thrown by a differently-built copy of the SDK (e.g.
3568
+ * server bundle vs client bundle) — it matches on a process-global brand
3569
+ * rather than class identity.
3570
+ */
3571
+ static isBridgeError(err: unknown): err is BridgeError;
3572
+ }
3573
+ /**
3574
+ * A {@link BridgeError} for a failed Nominal API call. Its `code` is always
3575
+ * `'REQUEST_FAILED'`; the HTTP {@link status} is carried as a structured field
3576
+ * so callers can branch on it (e.g. `err.status === 404`) instead of parsing
3577
+ * the code string.
3578
+ *
3579
+ * @example
3580
+ * ```ts
3581
+ * import { HttpBridgeError } from '@nominalso/vibe-bridge'
3582
+ *
3583
+ * try {
3584
+ * await bridge.getAccount({ path: { account_id: 'missing' } })
3585
+ * } catch (err) {
3586
+ * if (HttpBridgeError.isHttpBridgeError(err) && err.status === 404) {
3587
+ * // handle not-found
3588
+ * }
3589
+ * }
3590
+ * ```
3591
+ */
3592
+ declare class HttpBridgeError extends BridgeError {
3593
+ readonly status: number;
3594
+ constructor(status: number, message: string);
3595
+ /**
3596
+ * Cross-realm-safe type guard (see {@link BridgeError.isBridgeError}). Returns
3597
+ * `true` only for `HttpBridgeError` instances, not plain `BridgeError`s.
3598
+ */
3599
+ static isHttpBridgeError(err: unknown): err is HttpBridgeError;
3600
+ }
3601
+
3602
+ interface VibeAppBridgeOptions {
3603
+ /**
3604
+ * Origin(s) of the Nominal app embedding this iframe. **Optional.**
3605
+ *
3606
+ * **Omit it** (the recommended default) and the bridge auto-detects the
3607
+ * Nominal page that actually embeds it and talks only to that origin. This is
3608
+ * safe because Nominal serves Vibe Apps behind a `frame-ancestors` CSP, so
3609
+ * only nom-ui can frame the app — a hostile site can't embed it to intercept
3610
+ * what the iframe sends out (`postTaskOutput` bodies, file uploads). Most apps
3611
+ * need nothing here.
3612
+ *
3613
+ * Provide a value to **pin explicitly** — defense in depth, or when deploying
3614
+ * outside Nominal's edge:
3615
+ *
3616
+ * ```ts
3617
+ * parentOrigin: 'https://app.nominal.so' // one exact origin
3618
+ * parentOrigin: ['https://app.nominal.so', 'https://*.vercel.app'] // exact + preview pattern
3619
+ * ```
3620
+ *
3621
+ * A pattern's `*` matches exactly one DNS label or port — anchored, scheme
3622
+ * literal — so `https://*.vercel.app` matches `https://pr-7.vercel.app` but
3623
+ * not `https://a.b.vercel.app` or `https://pr-7.vercel.app.evil.com`. Patterns
3624
+ * are honoured only when this app's own page is served from a recognised
3625
+ * preview host (`*.vercel.app`, `*.lovable.app`, `localhost`, …); on a
3626
+ * production custom domain only exact origins match.
3627
+ *
3628
+ * If neither an explicit value nor an auto-detected parent is available,
3629
+ * `connect()` rejects with `BridgeError` code `PARENT_ORIGIN_UNRESOLVED`.
3630
+ *
3631
+ * Note: this option is only *read* when {@link VibeAppBridge.connect} /
3632
+ * {@link VibeAppBridge.attach} runs — the constructor stores it untouched, so
3633
+ * origin auto-detection never accesses `window` at construction time.
3634
+ */
3635
+ parentOrigin?: string | string[];
3636
+ /**
3637
+ * Global per-request timeout in milliseconds before a call rejects with a
3638
+ * `BridgeError` whose `code` is `'TIMEOUT'`.
3639
+ *
3640
+ * When omitted, each operation uses an operation-specific default tuned to
3641
+ * how long it realistically takes (API reads `30000`, `UPLOAD_FILE`
3642
+ * `120000`, `INVALIDATE_CACHE` `10000`). Setting this overrides all of them
3643
+ * with a single value — only do that if you have a specific reason; the
3644
+ * defaults already match the host's expectations.
3645
+ */
3646
+ requestTimeout?: number;
3647
+ }
3648
+
3649
+ interface UploadOptions {
3650
+ /** Domain entity the file attaches to, e.g. `'JOURNAL_ENTRY'`. */
3651
+ entityType: string;
3652
+ /** Id of the entity the file attaches to, when applicable. */
3653
+ entityId?: string | number;
3654
+ /** Called with incremental progress (`0`–`100`) while the upload streams. */
3655
+ onProgress?: (p: RequestRegistry['UPLOAD_FILE']['progress']) => void;
3656
+ }
3657
+ /**
3658
+ * The typed Nominal data methods (~46) plus {@link BridgeDataMethods.upload},
3659
+ * factored onto a base class so {@link VibeAppBridge} stays focused on
3660
+ * connection/transport. Each method is a thin typed wrapper over `request()`;
3661
+ * `VibeAppBridge` provides the concrete `request` implementation.
3662
+ */
3663
+ declare abstract class BridgeDataMethods {
3664
+ /**
3665
+ * Low-level typed request for **any** operation in {@link RequestRegistry} —
3666
+ * implemented by {@link VibeAppBridge}. The named methods below wrap this.
3667
+ */
3668
+ abstract request<K extends keyof RequestRegistry>(type: K, payload: RequestRegistry[K]['payload'], onProgress?: (payload: unknown) => void): Promise<RequestRegistry[K]['data']>;
3669
+ /**
3670
+ * Fetch the flat chart of accounts for a subsidiary.
3671
+ *
3672
+ * @example
3673
+ * ```ts
3674
+ * const ctx = await bridge.connect()
3675
+ * const accounts = await bridge.getChartOfAccounts({
3676
+ * path: { subsidiary_id: ctx.subsidiaryId },
3677
+ * })
3678
+ * ```
3679
+ */
3680
+ getChartOfAccounts(payload: RequestRegistry['GET_CHART_OF_ACCOUNTS']['payload']): Promise<RequestRegistry['GET_CHART_OF_ACCOUNTS']['data']>;
3681
+ /** Fetch the chart of accounts as a hierarchical tree for a subsidiary. */
3682
+ getCoaTree(payload: RequestRegistry['GET_COA_TREE']['payload']): Promise<RequestRegistry['GET_COA_TREE']['data']>;
3683
+ /** Fetch a simplified flat chart of accounts for a subsidiary. */
3684
+ getCoaFlatSimple(payload: RequestRegistry['GET_COA_FLAT_SIMPLE']['payload']): Promise<RequestRegistry['GET_COA_FLAT_SIMPLE']['data']>;
3685
+ /** Fetch the flat chart of accounts grouped by account group. */
3686
+ getCoaGrouped(payload: RequestRegistry['GET_COA_GROUPED']['payload']): Promise<RequestRegistry['GET_COA_GROUPED']['data']>;
3687
+ /** Fetch a single chart-of-accounts account by id within a subsidiary. */
3688
+ getCoaAccount(payload: RequestRegistry['GET_COA_ACCOUNT']['payload']): Promise<RequestRegistry['GET_COA_ACCOUNT']['data']>;
3689
+ /** List the currencies available to a subsidiary's chart of accounts. */
3690
+ getSubsidiaryAvailableCurrencies(payload: RequestRegistry['GET_SUBSIDIARY_AVAILABLE_CURRENCIES']['payload']): Promise<RequestRegistry['GET_SUBSIDIARY_AVAILABLE_CURRENCIES']['data']>;
3691
+ /** Fetch accounts at the tenant level. */
3692
+ getAccounts(payload: RequestRegistry['GET_ACCOUNTS']['payload']): Promise<RequestRegistry['GET_ACCOUNTS']['data']>;
3693
+ /** Fetch a single account by id. */
3694
+ getAccount(payload: RequestRegistry['GET_ACCOUNT']['payload']): Promise<RequestRegistry['GET_ACCOUNT']['data']>;
3695
+ /** Fetch currency conversion rates for a currency. */
3696
+ getConversionRates(payload: RequestRegistry['GET_CONVERSION_RATES']['payload']): Promise<RequestRegistry['GET_CONVERSION_RATES']['data']>;
3697
+ /** Fetch the effective consolidation exchange rate. */
3698
+ getEffectiveExchangeRate(payload: RequestRegistry['GET_EFFECTIVE_EXCHANGE_RATE']['payload']): Promise<RequestRegistry['GET_EFFECTIVE_EXCHANGE_RATE']['data']>;
3699
+ /** Fetch the exchange-rate period covering a given input date. */
3700
+ getExchangeRateByDate(payload: RequestRegistry['GET_EXCHANGE_RATE_BY_DATE']['payload']): Promise<RequestRegistry['GET_EXCHANGE_RATE_BY_DATE']['data']>;
3701
+ /** List accounting dimensions. */
3702
+ getDimensions(payload: RequestRegistry['GET_DIMENSIONS']['payload']): Promise<RequestRegistry['GET_DIMENSIONS']['data']>;
3703
+ /** List values for accounting dimensions. */
3704
+ getDimensionValues(payload: RequestRegistry['GET_DIMENSION_VALUES']['payload']): Promise<RequestRegistry['GET_DIMENSION_VALUES']['data']>;
3705
+ /** List dimension values in hierarchical form. */
3706
+ getDimensionValuesHierarchical(payload: RequestRegistry['GET_DIMENSION_VALUES_HIERARCHICAL']['payload']): Promise<RequestRegistry['GET_DIMENSION_VALUES_HIERARCHICAL']['data']>;
3707
+ /** List account assignments for a dimension/account pair. */
3708
+ getDimensionAccountAssignments(payload: RequestRegistry['GET_DIMENSION_ACCOUNT_ASSIGNMENTS']['payload']): Promise<RequestRegistry['GET_DIMENSION_ACCOUNT_ASSIGNMENTS']['data']>;
3709
+ /**
3710
+ * Fetch journal entries for a subsidiary, optionally filtered by date range.
3711
+ *
3712
+ * @example
3713
+ * ```ts
3714
+ * const entries = await bridge.getJournalEntries({
3715
+ * path: { subsidiary_id: ctx.subsidiaryId },
3716
+ * query: { from_date: '2026-01-01', to_date: '2026-03-31' },
3717
+ * })
3718
+ * ```
3719
+ */
3720
+ getJournalEntries(payload: RequestRegistry['GET_JOURNAL_ENTRIES']['payload']): Promise<RequestRegistry['GET_JOURNAL_ENTRIES']['data']>;
3721
+ /** Fetch journal entry lines for a subsidiary. */
3722
+ getJournalLines(payload: RequestRegistry['GET_JOURNAL_LINES']['payload']): Promise<RequestRegistry['GET_JOURNAL_LINES']['data']>;
3723
+ /** Fetch a single journal entry by id within a subsidiary. */
3724
+ getJournalEntry(payload: RequestRegistry['GET_JOURNAL_ENTRY']['payload']): Promise<RequestRegistry['GET_JOURNAL_ENTRY']['data']>;
3725
+ /** List accounting period instances. */
3726
+ getPeriods(payload: RequestRegistry['GET_PERIODS']['payload']): Promise<RequestRegistry['GET_PERIODS']['data']>;
3727
+ /** Fetch a single period instance by id. */
3728
+ getPeriodInstance(payload: RequestRegistry['GET_PERIOD_INSTANCE']['payload']): Promise<RequestRegistry['GET_PERIOD_INSTANCE']['data']>;
3729
+ /** Fetch a period instance by its display slug (e.g. `"mar-2026"`). */
3730
+ getPeriodInstanceBySlug(payload: RequestRegistry['GET_PERIOD_INSTANCE_BY_SLUG']['payload']): Promise<RequestRegistry['GET_PERIOD_INSTANCE_BY_SLUG']['data']>;
3731
+ /** Fetch the close-progress breakdown for a period (by slug). */
3732
+ getPeriodProgressBreakdown(payload: RequestRegistry['GET_PERIOD_PROGRESS_BREAKDOWN']['payload']): Promise<RequestRegistry['GET_PERIOD_PROGRESS_BREAKDOWN']['data']>;
3733
+ /** List activity definitions. */
3734
+ getActivityDefinitions(payload: RequestRegistry['GET_ACTIVITY_DEFINITIONS']['payload']): Promise<RequestRegistry['GET_ACTIVITY_DEFINITIONS']['data']>;
3735
+ /** Fetch a single activity definition by id. */
3736
+ getActivityDefinition(payload: RequestRegistry['GET_ACTIVITY_DEFINITION']['payload']): Promise<RequestRegistry['GET_ACTIVITY_DEFINITION']['data']>;
3737
+ /** List activity instances. */
3738
+ getActivityInstances(payload: RequestRegistry['GET_ACTIVITY_INSTANCES']['payload']): Promise<RequestRegistry['GET_ACTIVITY_INSTANCES']['data']>;
3739
+ /** Fetch a single activity instance by id. */
3740
+ getActivityInstance(payload: RequestRegistry['GET_ACTIVITY_INSTANCE']['payload']): Promise<RequestRegistry['GET_ACTIVITY_INSTANCE']['data']>;
3741
+ /** Fetch an activity instance for a given period + activity definition. */
3742
+ getActivityInstanceByPeriod(payload: RequestRegistry['GET_ACTIVITY_INSTANCE_BY_PERIOD']['payload']): Promise<RequestRegistry['GET_ACTIVITY_INSTANCE_BY_PERIOD']['data']>;
3743
+ /** List task instances for an activity instance. */
3744
+ getActivityInstanceTasks(payload: RequestRegistry['GET_ACTIVITY_INSTANCE_TASKS']['payload']): Promise<RequestRegistry['GET_ACTIVITY_INSTANCE_TASKS']['data']>;
3745
+ /** List task instances for an activity in a given period. */
3746
+ getActivityPeriodTasks(payload: RequestRegistry['GET_ACTIVITY_PERIOD_TASKS']['payload']): Promise<RequestRegistry['GET_ACTIVITY_PERIOD_TASKS']['data']>;
3747
+ /** List task definitions. */
3748
+ getTaskDefinitions(payload: RequestRegistry['GET_TASK_DEFINITIONS']['payload']): Promise<RequestRegistry['GET_TASK_DEFINITIONS']['data']>;
3749
+ /** Fetch a single task definition by id. */
3750
+ getTaskDefinition(payload: RequestRegistry['GET_TASK_DEFINITION']['payload']): Promise<RequestRegistry['GET_TASK_DEFINITION']['data']>;
3751
+ /** Create a task definition. */
3752
+ createTaskDefinition(payload: RequestRegistry['CREATE_TASK_DEFINITION']['payload']): Promise<RequestRegistry['CREATE_TASK_DEFINITION']['data']>;
3753
+ /** Update a task definition by id. */
3754
+ updateTaskDefinition(payload: RequestRegistry['UPDATE_TASK_DEFINITION']['payload']): Promise<RequestRegistry['UPDATE_TASK_DEFINITION']['data']>;
3755
+ /** Query task definitions by filter. */
3756
+ getTaskDefinitionsByFilter(payload: RequestRegistry['GET_TASK_DEFINITIONS_BY_FILTER']['payload']): Promise<RequestRegistry['GET_TASK_DEFINITIONS_BY_FILTER']['data']>;
3757
+ /** List task instances. */
3758
+ getTaskInstances(payload: RequestRegistry['GET_TASK_INSTANCES']['payload']): Promise<RequestRegistry['GET_TASK_INSTANCES']['data']>;
3759
+ /** Fetch a single task instance by id. */
3760
+ getTaskInstance(payload: RequestRegistry['GET_TASK_INSTANCE']['payload']): Promise<RequestRegistry['GET_TASK_INSTANCE']['data']>;
3761
+ /**
3762
+ * Submit a Close-Management task output. This is the **only write path** back
3763
+ * into Nominal — Vibe Apps never write Nominal data directly.
3764
+ *
3765
+ * @example
3766
+ * ```ts
3767
+ * // `body` carries the task-specific output shape.
3768
+ * await bridge.postTaskOutput({
3769
+ * path: { task_instance_id: 'task-1' },
3770
+ * body: {},
3771
+ * })
3772
+ * ```
3773
+ */
3774
+ postTaskOutput(payload: RequestRegistry['POST_TASK_OUTPUT']['payload']): Promise<RequestRegistry['POST_TASK_OUTPUT']['data']>;
3775
+ /** Query task instances by filter. */
3776
+ getTaskInstancesByFilter(payload: RequestRegistry['GET_TASK_INSTANCES_BY_FILTER']['payload']): Promise<RequestRegistry['GET_TASK_INSTANCES_BY_FILTER']['data']>;
3777
+ /** List audit-trail events. */
3778
+ getAuditEvents(payload: RequestRegistry['GET_AUDIT_EVENTS']['payload']): Promise<RequestRegistry['GET_AUDIT_EVENTS']['data']>;
3779
+ /** List audit-trail events for a specific entity. */
3780
+ getEntityAuditEvents(payload: RequestRegistry['GET_ENTITY_AUDIT_EVENTS']['payload']): Promise<RequestRegistry['GET_ENTITY_AUDIT_EVENTS']['data']>;
3781
+ /** List fiscal calendars for a subsidiary. */
3782
+ getFiscalCalendars(payload: RequestRegistry['GET_FISCAL_CALENDARS']['payload']): Promise<RequestRegistry['GET_FISCAL_CALENDARS']['data']>;
3783
+ /** Fetch a single fiscal calendar by id. */
3784
+ getFiscalCalendar(payload: RequestRegistry['GET_FISCAL_CALENDAR']['payload']): Promise<RequestRegistry['GET_FISCAL_CALENDAR']['data']>;
3785
+ /** List subsidiaries for the tenant. */
3786
+ getSubsidiaries(payload: RequestRegistry['GET_SUBSIDIARIES']['payload']): Promise<RequestRegistry['GET_SUBSIDIARIES']['data']>;
3787
+ /** Fetch a single subsidiary by id. */
3788
+ getSubsidiary(payload: RequestRegistry['GET_SUBSIDIARY']['payload']): Promise<RequestRegistry['GET_SUBSIDIARY']['data']>;
3789
+ /** List parent currencies for a subsidiary. */
3790
+ getSubsidiaryParentCurrencies(payload: RequestRegistry['GET_SUBSIDIARY_PARENT_CURRENCIES']['payload']): Promise<RequestRegistry['GET_SUBSIDIARY_PARENT_CURRENCIES']['data']>;
3791
+ /** List users for the tenant. */
3792
+ getTenantUsers(payload: RequestRegistry['GET_TENANT_USERS']['payload']): Promise<RequestRegistry['GET_TENANT_USERS']['data']>;
3793
+ /**
3794
+ * Uploads a file through the host. Converts the `File` to an `ArrayBuffer`
3795
+ * before sending — sandboxed iframes cannot pass `File` handles across
3796
+ * windows. Resolves once Nominal has stored the file.
3797
+ *
3798
+ * @example
3799
+ * ```ts
3800
+ * const input = document.querySelector<HTMLInputElement>('#file')!
3801
+ * const file = input.files![0]
3802
+ * const result = await bridge.upload(file, {
3803
+ * entityType: 'JOURNAL_ENTRY',
3804
+ * entityId: '123',
3805
+ * onProgress: (p) => console.log(`${p.progress}%`),
3806
+ * })
3807
+ * // result.attachmentId, result.name
3808
+ * ```
3809
+ */
3810
+ upload(file: File, options: UploadOptions): Promise<RequestRegistry['UPLOAD_FILE']['data']>;
3811
+ }
3812
+
3813
+ /**
3814
+ * Published version of this package (`@nominalso/vibe-bridge`), sent to the host
3815
+ * in the `CONNECT` handshake. Import-safe from any environment.
3816
+ */
3817
+ declare const BRIDGE_VERSION: string;
3818
+
3819
+ 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 };