@layerfi/components 0.1.77 → 0.1.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,36 +1,24 @@
1
- declare module '@layerfi/components/api/layer/authenticate' {
2
- import { OAuthResponse } from '@layerfi/components/types';
3
- type AuthenticationArguments = {
4
- appId: string;
5
- appSecret: string;
6
- authenticationUrl?: string;
7
- scope: string;
8
- };
9
- export const authenticate: ({ appId, appSecret, authenticationUrl, scope, }: AuthenticationArguments) => () => Promise<OAuthResponse>;
10
- export {};
11
-
12
- }
13
1
  declare module '@layerfi/components/api/layer/authenticated_http' {
14
2
  export type HTTPVerb = 'get' | 'put' | 'post' | 'patch' | 'options' | 'delete';
15
3
  export const get: <Return extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
16
- params?: Params | undefined;
17
- } | undefined) => () => Promise<Return>;
18
- export const request: (verb: HTTPVerb) => <Return extends Record<string, unknown> = Record<string, unknown>, Body_1 extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
19
- params?: Params | undefined;
20
- body?: Body_1 | undefined;
21
- } | undefined) => Promise<Return>;
22
- export const post: <Return extends Record<string, unknown> = Record<string, unknown>, Body_1 extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
23
- params?: Params | undefined;
24
- body?: Body_1 | undefined;
25
- } | undefined) => Promise<Return>;
26
- export const put: <Return extends Record<string, unknown> = Record<string, unknown>, Body_1 extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
27
- params?: Params | undefined;
28
- body?: Body_1 | undefined;
29
- } | undefined) => Promise<Return>;
30
- export const deleteRequest: <Return extends Record<string, unknown> = Record<string, unknown>, Body_1 extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
31
- params?: Params | undefined;
32
- body?: Body_1 | undefined;
33
- } | undefined) => Promise<Return>;
4
+ params?: Params;
5
+ }) => () => Promise<Return>;
6
+ export const request: (verb: HTTPVerb) => <Return extends Record<string, unknown> = Record<string, unknown>, Body extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
7
+ params?: Params;
8
+ body?: Body;
9
+ }) => Promise<Return>;
10
+ export const post: <Return extends Record<string, unknown> = Record<string, unknown>, Body extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
11
+ params?: Params;
12
+ body?: Body;
13
+ }) => Promise<Return>;
14
+ export const put: <Return extends Record<string, unknown> = Record<string, unknown>, Body extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
15
+ params?: Params;
16
+ body?: Body;
17
+ }) => Promise<Return>;
18
+ export const deleteRequest: <Return extends Record<string, unknown> = Record<string, unknown>, Body extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
19
+ params?: Params;
20
+ body?: Body;
21
+ }) => Promise<Return>;
34
22
  export const postWithFormData: <Return extends Record<string, unknown> = Record<string, unknown>>(url: string, formData: FormData, baseUrl: string, accessToken: string | undefined) => Promise<Return>;
35
23
 
36
24
  }
@@ -102,7 +90,7 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
102
90
  export const getBankTransactionsCsv: (baseUrl: string, accessToken: string | undefined, options?: {
103
91
  params?: Record<string, string | undefined> | undefined;
104
92
  } | undefined) => () => Promise<{
105
- data?: S3PresignedUrl | undefined;
93
+ data?: S3PresignedUrl;
106
94
  error?: unknown;
107
95
  }>;
108
96
  export const getBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
@@ -136,10 +124,10 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
136
124
  params?: Record<string, string | undefined> | undefined;
137
125
  body?: Record<string, unknown> | undefined;
138
126
  } | undefined) => Promise<{
139
- data: {};
127
+ data: Record<never, never>;
140
128
  errors: unknown;
141
129
  }>;
142
- export const uploadBankTransactionDocument: (baseUrl: string, accessToken: string) => ({ businessId, bankTransactionId, file, documentType, }: {
130
+ export const uploadBankTransactionDocument: (baseUrl: string, accessToken?: string) => ({ businessId, bankTransactionId, file, documentType, }: {
143
131
  businessId: string;
144
132
  bankTransactionId: string;
145
133
  file: File;
@@ -165,7 +153,7 @@ declare module '@layerfi/components/api/layer/categories' {
165
153
  params?: Record<string, string | undefined> | undefined;
166
154
  } | undefined) => () => Promise<{
167
155
  data: {
168
- type: 'Category_List';
156
+ type: "Category_List";
169
157
  categories: Category[];
170
158
  };
171
159
  }>;
@@ -225,7 +213,7 @@ declare module '@layerfi/components/api/layer/journal' {
225
213
  export const reverseJournalEntry: (baseUrl: string, accessToken: string | undefined, options?: {
226
214
  params?: Record<string, string | undefined> | undefined;
227
215
  body?: Record<string, unknown> | undefined;
228
- } | undefined) => Promise<{}>;
216
+ } | undefined) => Promise<Record<never, never>>;
229
217
 
230
218
  }
231
219
  declare module '@layerfi/components/api/layer/linked_accounts' {
@@ -249,20 +237,40 @@ declare module '@layerfi/components/api/layer/linked_accounts' {
249
237
  } | undefined) => () => Promise<{
250
238
  data: LinkedAccounts;
251
239
  }>;
252
- export const confirmConnection: (baseUrl: string, accessToken: string | undefined, options?: {
240
+ export const confirmAccount: (baseUrl: string, accessToken: string | undefined, options?: {
253
241
  params?: {
254
242
  businessId: string;
255
243
  accountId: string;
256
244
  } | undefined;
257
- body?: Record<string, unknown> | undefined;
258
- } | undefined) => Promise<Record<string, unknown>>;
259
- export const denyConnection: (baseUrl: string, accessToken: string | undefined, options?: {
245
+ body?: ({
246
+ is_unique: true;
247
+ } & Partial<{
248
+ is_unique: boolean;
249
+ is_relevant: boolean;
250
+ }> & {}) | ({
251
+ is_relevant: true;
252
+ } & Partial<{
253
+ is_unique: boolean;
254
+ is_relevant: boolean;
255
+ }> & {}) | undefined;
256
+ } | undefined) => Promise<never>;
257
+ export const excludeAccount: (baseUrl: string, accessToken: string | undefined, options?: {
260
258
  params?: {
261
259
  businessId: string;
262
260
  accountId: string;
263
261
  } | undefined;
264
- body?: Record<string, unknown> | undefined;
265
- } | undefined) => Promise<Record<string, unknown>>;
262
+ body?: ({
263
+ is_irrelevant: true;
264
+ } & Partial<{
265
+ is_irrelevant: boolean;
266
+ is_duplicate: boolean;
267
+ }> & {}) | ({
268
+ is_duplicate: true;
269
+ } & Partial<{
270
+ is_irrelevant: boolean;
271
+ is_duplicate: boolean;
272
+ }> & {}) | undefined;
273
+ } | undefined) => Promise<never>;
266
274
  export const unlinkConnection: (baseUrl: string, accessToken: string | undefined, options?: {
267
275
  params?: {
268
276
  businessId: string;
@@ -287,7 +295,7 @@ declare module '@layerfi/components/api/layer/linked_accounts' {
287
295
  body?: Record<string, unknown> | undefined;
288
296
  } | undefined) => Promise<{
289
297
  data: {
290
- type: 'Link_Token';
298
+ type: "Link_Token";
291
299
  link_token: string;
292
300
  };
293
301
  }>;
@@ -298,7 +306,7 @@ declare module '@layerfi/components/api/layer/linked_accounts' {
298
306
  body?: Record<string, unknown> | undefined;
299
307
  } | undefined) => Promise<{
300
308
  data: {
301
- type: 'Link_Token';
309
+ type: "Link_Token";
302
310
  link_token: string;
303
311
  };
304
312
  }>;
@@ -331,33 +339,33 @@ declare module '@layerfi/components/api/layer/profit_and_loss' {
331
339
  export const getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
332
340
  params?: Record<string, string | undefined> | undefined;
333
341
  } | undefined) => () => Promise<{
334
- data?: ProfitAndLoss | undefined;
342
+ data?: ProfitAndLoss;
335
343
  error?: unknown;
336
344
  }>;
337
345
  export const compareProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
338
346
  params?: Record<string, string | undefined> | undefined;
339
347
  body?: Record<string, unknown> | undefined;
340
348
  } | undefined) => Promise<{
341
- data?: ProfitAndLossComparison | undefined;
349
+ data?: ProfitAndLossComparison;
342
350
  error?: unknown;
343
351
  }>;
344
352
  export const getProfitAndLossSummaries: (baseUrl: string, accessToken: string | undefined, options?: {
345
353
  params?: Record<string, string | undefined> | undefined;
346
354
  } | undefined) => () => Promise<{
347
- data?: ProfitAndLossSummaries | undefined;
355
+ data?: ProfitAndLossSummaries;
348
356
  error?: unknown;
349
357
  }>;
350
358
  export const getProfitAndLossCsv: (baseUrl: string, accessToken: string | undefined, options?: {
351
359
  params?: Record<string, string | undefined> | undefined;
352
360
  } | undefined) => () => Promise<{
353
- data?: S3PresignedUrl | undefined;
361
+ data?: S3PresignedUrl;
354
362
  error?: unknown;
355
363
  }>;
356
364
  export const profitAndLossComparisonCsv: (baseUrl: string, accessToken: string | undefined, options?: {
357
365
  params?: Record<string, string | undefined> | undefined;
358
366
  body?: Record<string, unknown> | undefined;
359
367
  } | undefined) => Promise<{
360
- data?: S3PresignedUrl | undefined;
368
+ data?: S3PresignedUrl;
361
369
  error?: unknown;
362
370
  }>;
363
371
 
@@ -384,7 +392,7 @@ declare module '@layerfi/components/api/layer/quickbooks' {
384
392
  body?: Record<string, unknown> | undefined;
385
393
  } | undefined) => Promise<{
386
394
  data: {
387
- type: 'Quickbooks_Authorization_Params';
395
+ type: "Quickbooks_Authorization_Params";
388
396
  redirect_url: string;
389
397
  };
390
398
  }>;
@@ -444,7 +452,7 @@ declare module '@layerfi/components/api/layer/tasks' {
444
452
  } | undefined) => Promise<{
445
453
  data: TaskTypes;
446
454
  }>;
447
- export const completeTaskWithUpload: (baseUrl: string, accessToken: string) => ({ businessId, taskId, file, }: {
455
+ export const completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, file, }: {
448
456
  businessId: string;
449
457
  taskId: string;
450
458
  file: File;
@@ -456,12 +464,6 @@ declare module '@layerfi/components/api/layer/tasks' {
456
464
  }
457
465
  declare module '@layerfi/components/api/layer' {
458
466
  export const Layer: {
459
- authenticate: ({ appId, appSecret, authenticationUrl, scope, }: {
460
- appId: string;
461
- appSecret: string;
462
- authenticationUrl?: string | undefined;
463
- scope: string;
464
- }) => () => Promise<import("@layerfi/components/types").OAuthResponse>;
465
467
  getBusiness: (baseUrl: string, accessToken: string | undefined, options?: {
466
468
  params?: Record<string, string | undefined> | undefined;
467
469
  } | undefined) => () => Promise<{
@@ -505,7 +507,7 @@ declare module '@layerfi/components/api/layer' {
505
507
  getBankTransactionsCsv: (baseUrl: string, accessToken: string | undefined, options?: {
506
508
  params?: Record<string, string | undefined> | undefined;
507
509
  } | undefined) => () => Promise<{
508
- data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
510
+ data?: import("@layerfi/components/types/general").S3PresignedUrl;
509
511
  error?: unknown;
510
512
  }>;
511
513
  getBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
@@ -530,7 +532,7 @@ declare module '@layerfi/components/api/layer' {
530
532
  params?: Record<string, string | undefined> | undefined;
531
533
  body?: Record<string, unknown> | undefined;
532
534
  } | undefined) => Promise<{
533
- data: {};
535
+ data: Record<never, never>;
534
536
  errors: unknown;
535
537
  }>;
536
538
  updateBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
@@ -542,7 +544,7 @@ declare module '@layerfi/components/api/layer' {
542
544
  data: import("@layerfi/components/types/bank_transactions").BankTransactionMetadata;
543
545
  errors: unknown;
544
546
  }>;
545
- uploadBankTransactionDocument: (baseUrl: string, accessToken: string) => ({ businessId, bankTransactionId, file, documentType, }: {
547
+ uploadBankTransactionDocument: (baseUrl: string, accessToken?: string) => ({ businessId, bankTransactionId, file, documentType, }: {
546
548
  businessId: string;
547
549
  bankTransactionId: string;
548
550
  file: File;
@@ -582,19 +584,19 @@ declare module '@layerfi/components/api/layer' {
582
584
  getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
583
585
  params?: Record<string, string | undefined> | undefined;
584
586
  } | undefined) => () => Promise<{
585
- data?: import("@layerfi/components/types").ProfitAndLoss | undefined;
587
+ data?: import("@layerfi/components/types").ProfitAndLoss;
586
588
  error?: unknown;
587
589
  }>;
588
590
  getProfitAndLossSummaries: (baseUrl: string, accessToken: string | undefined, options?: {
589
591
  params?: Record<string, string | undefined> | undefined;
590
592
  } | undefined) => () => Promise<{
591
- data?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossSummaries | undefined;
593
+ data?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossSummaries;
592
594
  error?: unknown;
593
595
  }>;
594
596
  getProfitAndLossCsv: (baseUrl: string, accessToken: string | undefined, options?: {
595
597
  params?: Record<string, string | undefined> | undefined;
596
598
  } | undefined) => () => Promise<{
597
- data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
599
+ data?: import("@layerfi/components/types/general").S3PresignedUrl;
598
600
  error?: unknown;
599
601
  }>;
600
602
  getLinkedAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
@@ -612,19 +614,19 @@ declare module '@layerfi/components/api/layer' {
612
614
  reverseJournalEntry: (baseUrl: string, accessToken: string | undefined, options?: {
613
615
  params?: Record<string, string | undefined> | undefined;
614
616
  body?: Record<string, unknown> | undefined;
615
- } | undefined) => Promise<{}>;
617
+ } | undefined) => Promise<Record<never, never>>;
616
618
  compareProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
617
619
  params?: Record<string, string | undefined> | undefined;
618
620
  body?: Record<string, unknown> | undefined;
619
621
  } | undefined) => Promise<{
620
- data?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparison | undefined;
622
+ data?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparison;
621
623
  error?: unknown;
622
624
  }>;
623
625
  profitAndLossComparisonCsv: (baseUrl: string, accessToken: string | undefined, options?: {
624
626
  params?: Record<string, string | undefined> | undefined;
625
627
  body?: Record<string, unknown> | undefined;
626
628
  } | undefined) => Promise<{
627
- data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
629
+ data?: import("@layerfi/components/types/general").S3PresignedUrl;
628
630
  error?: unknown;
629
631
  }>;
630
632
  createJournalEntries: (baseUrl: string, accessToken: string | undefined, options?: {
@@ -675,26 +677,46 @@ declare module '@layerfi/components/api/layer' {
675
677
  } | undefined;
676
678
  body?: Record<string, unknown> | undefined;
677
679
  } | undefined) => Promise<Record<string, unknown>>;
678
- confirmConnection: (baseUrl: string, accessToken: string | undefined, options?: {
680
+ confirmAccount: (baseUrl: string, accessToken: string | undefined, options?: {
679
681
  params?: {
680
682
  businessId: string;
681
683
  accountId: string;
682
684
  } | undefined;
683
- body?: Record<string, unknown> | undefined;
684
- } | undefined) => Promise<Record<string, unknown>>;
685
- denyConnection: (baseUrl: string, accessToken: string | undefined, options?: {
685
+ body?: ({
686
+ is_unique: true;
687
+ } & Partial<{
688
+ is_unique: boolean;
689
+ is_relevant: boolean;
690
+ }> & {}) | ({
691
+ is_relevant: true;
692
+ } & Partial<{
693
+ is_unique: boolean;
694
+ is_relevant: boolean;
695
+ }> & {}) | undefined;
696
+ } | undefined) => Promise<never>;
697
+ excludeAccount: (baseUrl: string, accessToken: string | undefined, options?: {
686
698
  params?: {
687
699
  businessId: string;
688
700
  accountId: string;
689
701
  } | undefined;
690
- body?: Record<string, unknown> | undefined;
691
- } | undefined) => Promise<Record<string, unknown>>;
702
+ body?: ({
703
+ is_irrelevant: true;
704
+ } & Partial<{
705
+ is_irrelevant: boolean;
706
+ is_duplicate: boolean;
707
+ }> & {}) | ({
708
+ is_duplicate: true;
709
+ } & Partial<{
710
+ is_irrelevant: boolean;
711
+ is_duplicate: boolean;
712
+ }> & {}) | undefined;
713
+ } | undefined) => Promise<never>;
692
714
  getTasks: (baseUrl: string, accessToken: string | undefined, options?: {
693
715
  params?: Record<string, string | undefined> | undefined;
694
716
  } | undefined) => () => Promise<{
695
717
  data: import("@layerfi/components/types/tasks").TaskTypes[];
696
718
  }>;
697
- completeTaskWithUpload: (baseUrl: string, accessToken: string) => ({ businessId, taskId, file, }: {
719
+ completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, file, }: {
698
720
  businessId: string;
699
721
  taskId: string;
700
722
  file: File;
@@ -771,10 +793,6 @@ declare module '@layerfi/components/api/layer' {
771
793
  } | undefined) => Promise<Record<string, unknown>>;
772
794
  };
773
795
 
774
- }
775
- declare module '@layerfi/components/api/util' {
776
- export const formStringFromObject: (object: Record<string, string | number | boolean>) => string;
777
-
778
796
  }
779
797
  declare module '@layerfi/components/components/ActionableList/ActionableList' {
780
798
  import React from 'react';
@@ -934,7 +952,7 @@ declare module '@layerfi/components/components/BalanceSheetTable/BalanceSheetTab
934
952
  export const BalanceSheetTable: ({ data, config, stringOverrides, }: {
935
953
  data: BalanceSheet;
936
954
  config: BalanceSheetRowProps[];
937
- stringOverrides?: BalanceSheetTableStringOverrides | undefined;
955
+ stringOverrides?: BalanceSheetTableStringOverrides;
938
956
  }) => React.JSX.Element;
939
957
  export {};
940
958
 
@@ -1082,8 +1100,8 @@ declare module '@layerfi/components/components/BankTransactionMobileList/MatchFo
1082
1100
  import { BankTransaction } from '@layerfi/components/types';
1083
1101
  export const MatchForm: ({ bankTransaction, showReceiptUploads, showDescriptions, }: {
1084
1102
  bankTransaction: BankTransaction;
1085
- showReceiptUploads?: boolean | undefined;
1086
- showDescriptions?: boolean | undefined;
1103
+ showReceiptUploads?: boolean;
1104
+ showDescriptions?: boolean;
1087
1105
  }) => React.JSX.Element;
1088
1106
 
1089
1107
  }
@@ -1118,13 +1136,12 @@ declare module '@layerfi/components/components/BankTransactionMobileList/SplitFo
1118
1136
  export const SplitForm: ({ bankTransaction, showTooltips, showReceiptUploads, showDescriptions, }: {
1119
1137
  bankTransaction: BankTransaction;
1120
1138
  showTooltips: boolean;
1121
- showReceiptUploads?: boolean | undefined;
1122
- showDescriptions?: boolean | undefined;
1139
+ showReceiptUploads?: boolean;
1140
+ showDescriptions?: boolean;
1123
1141
  }) => React.JSX.Element;
1124
1142
 
1125
1143
  }
1126
1144
  declare module '@layerfi/components/components/BankTransactionMobileList/TransactionToOpenContext' {
1127
- /// <reference types="react" />
1128
1145
  type UseTransactionToOpen = () => {
1129
1146
  transactionIdToOpen?: string;
1130
1147
  setTransactionIdToOpen: (id: string) => void;
@@ -1133,7 +1150,7 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Transac
1133
1150
  export const useTransactionToOpen: UseTransactionToOpen;
1134
1151
  export type TransactionToOpenContextType = ReturnType<typeof useTransactionToOpen>;
1135
1152
  export const TransactionToOpenContext: import("react").Context<{
1136
- transactionIdToOpen?: string | undefined;
1153
+ transactionIdToOpen?: string;
1137
1154
  setTransactionIdToOpen: (id: string) => void;
1138
1155
  clearTransactionIdToOpen: () => void;
1139
1156
  }>;
@@ -1293,6 +1310,7 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1293
1310
  import { BankTransactionsTableStringOverrides } from '@layerfi/components/components/BankTransactionsTable/BankTransactionsTable';
1294
1311
  import { BankTransactionsHeaderStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactionsHeader';
1295
1312
  import { MobileComponentType } from '@layerfi/components/components/BankTransactions/constants';
1313
+ import type { LayerError } from '@layerfi/components/models/ErrorHandler';
1296
1314
  export type BankTransactionsMode = 'bookkeeping-client' | 'self-serve';
1297
1315
  export const categorizationEnabled: (mode: BankTransactionsMode) => boolean;
1298
1316
  export interface BankTransactionsStringOverrides {
@@ -1319,7 +1337,7 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1319
1337
  stringOverrides?: BankTransactionsStringOverrides;
1320
1338
  }
1321
1339
  export interface BankTransactionsWithErrorProps extends BankTransactionsProps {
1322
- onError?: (error: Error) => void;
1340
+ onError?: (error: LayerError) => void;
1323
1341
  }
1324
1342
  export const BankTransactions: ({ onError, ...props }: BankTransactionsWithErrorProps) => React.JSX.Element;
1325
1343
 
@@ -1731,7 +1749,7 @@ declare module '@layerfi/components/components/ChartOfAccountsForm/ChartOfAccoun
1731
1749
  normalityLabel?: string;
1732
1750
  }
1733
1751
  export const ChartOfAccountsForm: ({ stringOverrides, }: {
1734
- stringOverrides?: ChartOfAccountsFormStringOverrides | undefined;
1752
+ stringOverrides?: ChartOfAccountsFormStringOverrides;
1735
1753
  }) => React.JSX.Element | null;
1736
1754
 
1737
1755
  }
@@ -1764,8 +1782,8 @@ declare module '@layerfi/components/components/ChartOfAccountsSidebar/ChartOfAcc
1764
1782
  import React, { RefObject } from 'react';
1765
1783
  import { ChartOfAccountsFormStringOverrides } from '@layerfi/components/components/ChartOfAccountsForm/ChartOfAccountsForm';
1766
1784
  export const ChartOfAccountsSidebar: ({ parentRef: _parentRef, stringOverrides, }: {
1767
- parentRef?: React.RefObject<HTMLDivElement> | undefined;
1768
- stringOverrides?: ChartOfAccountsFormStringOverrides | undefined;
1785
+ parentRef?: RefObject<HTMLDivElement>;
1786
+ stringOverrides?: ChartOfAccountsFormStringOverrides;
1769
1787
  }) => React.JSX.Element;
1770
1788
 
1771
1789
  }
@@ -1781,18 +1799,18 @@ declare module '@layerfi/components/components/ChartOfAccountsTable/ChartOfAccou
1781
1799
  export const ChartOfAccountsTable: ({ view, stringOverrides, data, error, expandAll, cumulativeIndex, accountsLength, templateAccountsEditable, }: {
1782
1800
  view: View;
1783
1801
  data: ChartWithBalances;
1784
- stringOverrides?: ChartOfAccountsTableStringOverrides | undefined;
1785
- error?: any;
1802
+ stringOverrides?: ChartOfAccountsTableStringOverrides;
1803
+ error?: unknown;
1786
1804
  expandAll?: ExpandActionState;
1787
1805
  cumulativeIndex: number;
1788
1806
  accountsLength: number;
1789
- templateAccountsEditable?: boolean | undefined;
1807
+ templateAccountsEditable?: boolean;
1790
1808
  }) => React.JSX.Element;
1791
1809
  export const ChartOfAccountsTableContent: ({ stringOverrides, data, error, expandAll, templateAccountsEditable, }: {
1792
1810
  view: View;
1793
1811
  data: ChartWithBalances;
1794
- stringOverrides?: ChartOfAccountsTableStringOverrides | undefined;
1795
- error?: any;
1812
+ stringOverrides?: ChartOfAccountsTableStringOverrides;
1813
+ error?: unknown;
1796
1814
  expandAll?: ExpandActionState;
1797
1815
  cumulativeIndex: number;
1798
1816
  accountsLength: number;
@@ -1817,11 +1835,11 @@ declare module '@layerfi/components/components/ChartOfAccountsTable/ChartOfAccou
1817
1835
  export const ChartOfAccountsTableWithPanel: ({ view, containerRef, asWidget, withDateControl, withExpandAllButton, stringOverrides, templateAccountsEditable, }: {
1818
1836
  view: View;
1819
1837
  containerRef: RefObject<HTMLDivElement>;
1820
- asWidget?: boolean | undefined;
1821
- withDateControl?: boolean | undefined;
1822
- withExpandAllButton?: boolean | undefined;
1823
- stringOverrides?: ChartOfAccountsTableStringOverrides | undefined;
1824
- templateAccountsEditable?: boolean | undefined;
1838
+ asWidget?: boolean;
1839
+ withDateControl?: boolean;
1840
+ withExpandAllButton?: boolean;
1841
+ stringOverrides?: ChartOfAccountsTableStringOverrides;
1842
+ templateAccountsEditable?: boolean;
1825
1843
  }) => React.JSX.Element;
1826
1844
 
1827
1845
  }
@@ -1930,7 +1948,7 @@ declare module '@layerfi/components/components/DatePicker/DatePickerOptions' {
1930
1948
  endDate: Date;
1931
1949
  };
1932
1950
  export const DatePickerOptions: ({ customDateRanges, setSelectedDate, }: {
1933
- customDateRanges?: CustomDateRange[] | undefined;
1951
+ customDateRanges?: CustomDateRange[];
1934
1952
  setSelectedDate: (dates: [Date | null, Date | null]) => void;
1935
1953
  }) => React.JSX.Element;
1936
1954
 
@@ -2012,22 +2030,22 @@ declare module '@layerfi/components/components/Drawer/index' {
2012
2030
 
2013
2031
  }
2014
2032
  declare module '@layerfi/components/components/ErrorBoundary/ErrorBoundary' {
2015
- import React, { ErrorInfo, Component } from 'react';
2033
+ import React, { ErrorInfo, Component, type PropsWithChildren } from 'react';
2016
2034
  import { LayerError } from '@layerfi/components/models/ErrorHandler';
2017
2035
  interface ErrorBoundaryProps {
2018
- onError?: (error: Error) => void;
2036
+ onError?: (error: LayerError) => void;
2019
2037
  }
2020
2038
  interface ErrorBoundaryState {
2021
2039
  hasError?: boolean;
2022
2040
  }
2023
- export class ErrorBoundary extends Component<React.PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
2024
- onError: (err: LayerError) => void;
2025
- constructor(props: any);
2041
+ export class ErrorBoundary extends Component<PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
2042
+ onError?: (err: LayerError) => void;
2043
+ constructor(props: PropsWithChildren<ErrorBoundaryProps>);
2026
2044
  static getDerivedStateFromError(_error: Error): {
2027
2045
  hasError: boolean;
2028
2046
  };
2029
2047
  componentDidCatch(error: Error, _info: ErrorInfo): void;
2030
- render(): any;
2048
+ render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
2031
2049
  }
2032
2050
  export {};
2033
2051
 
@@ -2332,7 +2350,7 @@ declare module '@layerfi/components/components/JournalForm/JournalForm' {
2332
2350
  }
2333
2351
  export const JournalForm: ({ config, stringOverrides, }: {
2334
2352
  config: JournalConfig;
2335
- stringOverrides?: JournalFormStringOverrides | undefined;
2353
+ stringOverrides?: JournalFormStringOverrides;
2336
2354
  }) => React.JSX.Element;
2337
2355
 
2338
2356
  }
@@ -2361,9 +2379,9 @@ declare module '@layerfi/components/components/JournalSidebar/JournalSidebar' {
2361
2379
  import { JournalConfig } from '@layerfi/components/components/Journal/Journal';
2362
2380
  import { JournalFormStringOverrides } from '@layerfi/components/components/JournalForm/JournalForm';
2363
2381
  export const JournalSidebar: ({ parentRef: _parentRef, config, stringOverrides, }: {
2364
- parentRef?: React.RefObject<HTMLDivElement> | undefined;
2382
+ parentRef?: RefObject<HTMLDivElement>;
2365
2383
  config: JournalConfig;
2366
- stringOverrides?: JournalFormStringOverrides | undefined;
2384
+ stringOverrides?: JournalFormStringOverrides;
2367
2385
  }) => React.JSX.Element;
2368
2386
 
2369
2387
  }
@@ -2379,7 +2397,7 @@ declare module '@layerfi/components/components/JournalTable/JournalTable' {
2379
2397
  export const JournalTable: ({ view, data, stringOverrides, }: {
2380
2398
  view: View;
2381
2399
  data: JournalEntry[];
2382
- stringOverrides?: JournalTableStringOverrides | undefined;
2400
+ stringOverrides?: JournalTableStringOverrides;
2383
2401
  }) => React.JSX.Element;
2384
2402
 
2385
2403
  }
@@ -2403,9 +2421,9 @@ declare module '@layerfi/components/components/JournalTable/JournalTableWithPane
2403
2421
  export const JournalTableWithPanel: ({ containerRef, pageSize, config, stringOverrides, view, }: {
2404
2422
  view: View;
2405
2423
  containerRef: RefObject<HTMLDivElement>;
2406
- pageSize?: number | undefined;
2424
+ pageSize?: number;
2407
2425
  config: JournalConfig;
2408
- stringOverrides?: JournalTableStringOverrides | undefined;
2426
+ stringOverrides?: JournalTableStringOverrides;
2409
2427
  }) => React.JSX.Element;
2410
2428
 
2411
2429
  }
@@ -2474,7 +2492,7 @@ declare module '@layerfi/components/components/LedgerAccountEntryDetails/LedgerA
2474
2492
  }
2475
2493
  export const SourceDetailView: ({ source, stringOverrides, }: {
2476
2494
  source: LedgerEntrySource;
2477
- stringOverrides?: SourceDetailStringOverrides | undefined;
2495
+ stringOverrides?: SourceDetailStringOverrides;
2478
2496
  }) => React.JSX.Element | null;
2479
2497
  interface JournalEntryDetailsStringOverrides {
2480
2498
  entryTypeLabel?: string;
@@ -2501,7 +2519,7 @@ declare module '@layerfi/components/components/LedgerAccountEntryDetails/LedgerA
2501
2519
  lineItemsTable?: LineItemsTableStringOverrides;
2502
2520
  }
2503
2521
  export const LedgerAccountEntryDetails: ({ stringOverrides, }: {
2504
- stringOverrides?: LedgerAccountEntryDetailsStringOverrides | undefined;
2522
+ stringOverrides?: LedgerAccountEntryDetailsStringOverrides;
2505
2523
  }) => React.JSX.Element;
2506
2524
  export {};
2507
2525
 
@@ -2562,6 +2580,23 @@ declare module '@layerfi/components/components/LinkedAccountThumb/LinkedAccountT
2562
2580
  declare module '@layerfi/components/components/LinkedAccountThumb/index' {
2563
2581
  export { LinkedAccountThumb } from '@layerfi/components/components/LinkedAccountThumb/LinkedAccountThumb';
2564
2582
 
2583
+ }
2584
+ declare module '@layerfi/components/components/LinkedAccounts/ConfirmationModal/LinkedAccountToConfirm' {
2585
+ import React from 'react';
2586
+ import type { LinkedAccount } from '@layerfi/components/types/linked_accounts';
2587
+ type LinkedAccountConfirmationProps = {
2588
+ account: LinkedAccount;
2589
+ isConfirmed: boolean;
2590
+ onChangeConfirmed: (isConfirmed: boolean) => void;
2591
+ };
2592
+ export function LinkedAccountToConfirm({ account, isConfirmed, onChangeConfirmed, }: LinkedAccountConfirmationProps): React.JSX.Element;
2593
+ export {};
2594
+
2595
+ }
2596
+ declare module '@layerfi/components/components/LinkedAccounts/ConfirmationModal/LinkedAccountsConfirmationModal' {
2597
+ import React from 'react';
2598
+ export function LinkedAccountsConfirmationModal(): React.JSX.Element;
2599
+
2565
2600
  }
2566
2601
  declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountItemThumb' {
2567
2602
  import React from 'react';
@@ -2772,9 +2807,9 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2772
2807
  Context: React.Context<{
2773
2808
  data: import("@layerfi/components/types").ProfitAndLoss | undefined;
2774
2809
  filteredDataRevenue: import("@layerfi/components/types/line_item").LineBaseItem[];
2775
- filteredTotalRevenue?: number | undefined;
2810
+ filteredTotalRevenue?: number;
2776
2811
  filteredDataExpenses: import("@layerfi/components/types/line_item").LineBaseItem[];
2777
- filteredTotalExpenses?: number | undefined;
2812
+ filteredTotalExpenses?: number;
2778
2813
  isLoading: boolean;
2779
2814
  isValidating: boolean;
2780
2815
  error: unknown;
@@ -2784,9 +2819,9 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2784
2819
  sidebarScope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope;
2785
2820
  setSidebarScope: (view: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope) => void;
2786
2821
  filters: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").ProfitAndLossFilters;
2787
- sortBy: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, field: string, direction?: import("../../types").SortDirection | undefined) => void;
2822
+ sortBy: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, field: string, direction?: import("../../types").SortDirection) => void;
2788
2823
  setFilterTypes: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, types: string[]) => void;
2789
- tagFilter?: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").PnlTagFilter | undefined;
2824
+ tagFilter?: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").PnlTagFilter;
2790
2825
  }>;
2791
2826
  ComparisonContext: React.Context<{
2792
2827
  data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
@@ -2799,31 +2834,29 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2799
2834
  setCompareMonths: (months: number) => void;
2800
2835
  compareOptions: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[];
2801
2836
  setCompareOptions: (options: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[]) => void;
2802
- refetch: (dateRange: import("@layerfi/components/types").DateRange, actAsInitial?: boolean | undefined) => void;
2803
- getProfitAndLossComparisonCsv: (dateRange: import("@layerfi/components/types").DateRange, moneyFormat?: import("../../types").MoneyFormat | undefined) => Promise<{
2804
- data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
2837
+ refetch: (dateRange: import("@layerfi/components/types").DateRange, actAsInitial?: boolean) => void;
2838
+ getProfitAndLossComparisonCsv: (dateRange: import("@layerfi/components/types").DateRange, moneyFormat?: import("../../types").MoneyFormat) => Promise<{
2839
+ data?: import("@layerfi/components/types/general").S3PresignedUrl;
2805
2840
  error?: unknown;
2806
2841
  }>;
2807
2842
  }>;
2808
- DatePicker: ({ allowedDatePickerModes, datePickerMode: deprecated_datePickerMode, defaultDatePickerMode, customDateRanges, }: import("@layerfi/components/views/Reports/reportTypes").TimeRangePickerConfig) => React.JSX.Element;
2843
+ DatePicker: ({ allowedDatePickerModes, datePickerMode: deprecated_datePickerMode, defaultDatePickerMode, customDateRanges, }: import("@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker").ProfitAndLossDatePickerProps) => React.JSX.Element;
2809
2844
  CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/index").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2810
2845
  Summaries: (props: {
2811
- actionable?: boolean | undefined;
2812
- stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides | undefined;
2813
- chartColorsList?: string[] | undefined;
2814
- variants?: Partial<{
2815
- size: "lg" | "sm";
2816
- }> | undefined;
2817
- revenueLabel?: string | undefined;
2818
- vertical?: boolean | undefined;
2846
+ actionable?: boolean;
2847
+ stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides;
2848
+ chartColorsList?: string[];
2849
+ variants?: import("@layerfi/components/utils/styleUtils/sizeVariants").Variants;
2850
+ revenueLabel?: string;
2851
+ vertical?: boolean;
2819
2852
  }) => React.JSX.Element;
2820
2853
  Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").ProfitAndLossTableProps) => React.JSX.Element;
2821
2854
  DetailedCharts: ({ scope, hideClose, showDatePicker, chartColorsList, stringOverrides, }: {
2822
2855
  scope?: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope;
2823
- hideClose?: boolean | undefined;
2824
- showDatePicker?: boolean | undefined;
2825
- chartColorsList?: string[] | undefined;
2826
- stringOverrides?: import("@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts").ProfitAndLossDetailedChartsStringOverrides | undefined;
2856
+ hideClose?: boolean;
2857
+ showDatePicker?: boolean;
2858
+ chartColorsList?: string[];
2859
+ stringOverrides?: import("@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts").ProfitAndLossDetailedChartsStringOverrides;
2827
2860
  }) => React.JSX.Element;
2828
2861
  Header: ({ text, className, headingClassName, withDatePicker, }: import("@layerfi/components/components/ProfitAndLossHeader/ProfitAndLossHeader").ProfitAndLossHeaderProps) => React.JSX.Element;
2829
2862
  Report: ({ stringOverrides, comparisonConfig, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => React.JSX.Element;
@@ -2978,10 +3011,10 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Profi
2978
3011
  }
2979
3012
  export const ProfitAndLossDetailedCharts: ({ scope, hideClose, showDatePicker, chartColorsList, stringOverrides, }: {
2980
3013
  scope?: SidebarScope;
2981
- hideClose?: boolean | undefined;
2982
- showDatePicker?: boolean | undefined;
2983
- chartColorsList?: string[] | undefined;
2984
- stringOverrides?: ProfitAndLossDetailedChartsStringOverrides | undefined;
3014
+ hideClose?: boolean;
3015
+ showDatePicker?: boolean;
3016
+ chartColorsList?: string[];
3017
+ stringOverrides?: ProfitAndLossDetailedChartsStringOverrides;
2985
3018
  }) => React.JSX.Element;
2986
3019
 
2987
3020
  }
@@ -3302,7 +3335,7 @@ declare module '@layerfi/components/components/StatementOfCashFlowTable/Statemen
3302
3335
  export const StatementOfCashFlowTable: ({ data, config, stringOverrides, }: {
3303
3336
  data: StatementOfCashFlow;
3304
3337
  config: StatementOfCashFlowRowProps[];
3305
- stringOverrides?: StatementOfCashFlowTableStringOverrides | undefined;
3338
+ stringOverrides?: StatementOfCashFlowTableStringOverrides;
3306
3339
  }) => React.JSX.Element;
3307
3340
  export {};
3308
3341
 
@@ -3417,20 +3450,20 @@ declare module '@layerfi/components/components/Tasks/Tasks' {
3417
3450
  import { useTasks } from '@layerfi/components/hooks/useTasks/index';
3418
3451
  export type UseTasksContextType = ReturnType<typeof useTasks>;
3419
3452
  export const UseTasksContext: React.Context<{
3420
- data?: import("@layerfi/components/types/tasks").TaskTypes[] | undefined;
3421
- isLoading?: boolean | undefined;
3422
- loadedStatus?: import("@layerfi/components/types/general").LoadedStatus | undefined;
3423
- isValidating?: boolean | undefined;
3453
+ data?: import("@layerfi/components/types/tasks").TaskTypes[];
3454
+ isLoading?: boolean;
3455
+ loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
3456
+ isValidating?: boolean;
3424
3457
  error?: unknown;
3425
3458
  refetch: () => void;
3426
3459
  submitResponseToTask: (taskId: string, userResponse: string) => void;
3427
3460
  uploadDocumentForTask: (taskId: string, file: File) => void;
3428
3461
  }>;
3429
3462
  export const useTasksContext: () => {
3430
- data?: import("@layerfi/components/types/tasks").TaskTypes[] | undefined;
3431
- isLoading?: boolean | undefined;
3432
- loadedStatus?: import("@layerfi/components/types/general").LoadedStatus | undefined;
3433
- isValidating?: boolean | undefined;
3463
+ data?: import("@layerfi/components/types/tasks").TaskTypes[];
3464
+ isLoading?: boolean;
3465
+ loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
3466
+ isValidating?: boolean;
3434
3467
  error?: unknown;
3435
3468
  refetch: () => void;
3436
3469
  submitResponseToTask: (taskId: string, userResponse: string) => void;
@@ -3440,21 +3473,21 @@ declare module '@layerfi/components/components/Tasks/Tasks' {
3440
3473
  header?: string;
3441
3474
  }
3442
3475
  export const Tasks: ({ collapsable, defaultCollapsed, collapsedWhenComplete, tasksHeader, stringOverrides, }: {
3443
- tasksHeader?: string | undefined;
3444
- collapsable?: boolean | undefined;
3445
- defaultCollapsed?: boolean | undefined;
3446
- collapsedWhenComplete?: boolean | undefined;
3447
- stringOverrides?: TasksStringOverrides | undefined;
3476
+ tasksHeader?: string;
3477
+ collapsable?: boolean;
3478
+ defaultCollapsed?: boolean;
3479
+ collapsedWhenComplete?: boolean;
3480
+ stringOverrides?: TasksStringOverrides;
3448
3481
  }) => React.JSX.Element;
3449
3482
  export const TasksProvider: ({ children }: {
3450
3483
  children: ReactNode;
3451
3484
  }) => React.JSX.Element;
3452
3485
  export const TasksComponent: ({ collapsable, defaultCollapsed, collapsedWhenComplete, tasksHeader, stringOverrides, }: {
3453
- tasksHeader?: string | undefined;
3454
- collapsable?: boolean | undefined;
3455
- defaultCollapsed?: boolean | undefined;
3456
- collapsedWhenComplete?: boolean | undefined;
3457
- stringOverrides?: TasksStringOverrides | undefined;
3486
+ tasksHeader?: string;
3487
+ collapsable?: boolean;
3488
+ defaultCollapsed?: boolean;
3489
+ collapsedWhenComplete?: boolean;
3490
+ stringOverrides?: TasksStringOverrides;
3458
3491
  }) => React.JSX.Element;
3459
3492
 
3460
3493
  }
@@ -3465,9 +3498,9 @@ declare module '@layerfi/components/components/Tasks/index' {
3465
3498
  declare module '@layerfi/components/components/TasksHeader/TasksHeader' {
3466
3499
  import React from 'react';
3467
3500
  export const TasksHeader: ({ tasksHeader, collapsable, open, toggleContent, }: {
3468
- tasksHeader?: string | undefined;
3469
- collapsable?: boolean | undefined;
3470
- open?: boolean | undefined;
3501
+ tasksHeader?: string;
3502
+ collapsable?: boolean;
3503
+ open?: boolean;
3471
3504
  toggleContent: () => void;
3472
3505
  }) => React.JSX.Element;
3473
3506
 
@@ -3479,7 +3512,7 @@ declare module '@layerfi/components/components/TasksHeader/index' {
3479
3512
  declare module '@layerfi/components/components/TasksList/TasksList' {
3480
3513
  import React from 'react';
3481
3514
  export const TasksList: ({ pageSize }: {
3482
- pageSize?: number | undefined;
3515
+ pageSize?: number;
3483
3516
  }) => React.JSX.Element;
3484
3517
 
3485
3518
  }
@@ -3581,7 +3614,7 @@ declare module '@layerfi/components/components/Tooltip/Tooltip' {
3581
3614
  children: ReactNode;
3582
3615
  } & TooltipOptions) => React.JSX.Element;
3583
3616
  export const TooltipTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & {
3584
- asChild?: boolean | undefined;
3617
+ asChild?: boolean;
3585
3618
  }, "ref"> & React.RefAttributes<HTMLElement>>;
3586
3619
  type TooltipContentProps = Omit<HTMLProps<HTMLDivElement>, 'style'>;
3587
3620
  export const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -3627,7 +3660,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3627
3660
  update: () => void;
3628
3661
  floatingStyles: React.CSSProperties;
3629
3662
  open: boolean;
3630
- onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
3663
+ onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
3631
3664
  events: import("@floating-ui/react").FloatingEvents;
3632
3665
  dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
3633
3666
  nodeId: string | undefined;
@@ -3635,12 +3668,12 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3635
3668
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
3636
3669
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
3637
3670
  };
3638
- getReferenceProps: (userProps?: React.HTMLProps<Element> | undefined) => Record<string, unknown>;
3639
- getFloatingProps: (userProps?: React.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
3640
- getItemProps: (userProps?: (Omit<React.HTMLProps<HTMLElement>, "active" | "selected"> & {
3641
- active?: boolean | undefined;
3642
- selected?: boolean | undefined;
3643
- }) | undefined) => Record<string, unknown>;
3671
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
3672
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
3673
+ getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
3674
+ active?: boolean;
3675
+ selected?: boolean;
3676
+ }) => Record<string, unknown>;
3644
3677
  open: boolean;
3645
3678
  setOpen: (open: boolean) => void;
3646
3679
  isMounted: boolean;
@@ -3676,7 +3709,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3676
3709
  update: () => void;
3677
3710
  floatingStyles: React.CSSProperties;
3678
3711
  open: boolean;
3679
- onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
3712
+ onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
3680
3713
  events: import("@floating-ui/react").FloatingEvents;
3681
3714
  dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
3682
3715
  nodeId: string | undefined;
@@ -3684,12 +3717,12 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3684
3717
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
3685
3718
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
3686
3719
  };
3687
- getReferenceProps: (userProps?: React.HTMLProps<Element> | undefined) => Record<string, unknown>;
3688
- getFloatingProps: (userProps?: React.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
3689
- getItemProps: (userProps?: (Omit<React.HTMLProps<HTMLElement>, "active" | "selected"> & {
3690
- active?: boolean | undefined;
3691
- selected?: boolean | undefined;
3692
- }) | undefined) => Record<string, unknown>;
3720
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
3721
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
3722
+ getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
3723
+ active?: boolean;
3724
+ selected?: boolean;
3725
+ }) => Record<string, unknown>;
3693
3726
  open: boolean;
3694
3727
  setOpen: (open: boolean) => void;
3695
3728
  isMounted: boolean;
@@ -3813,13 +3846,119 @@ declare module '@layerfi/components/components/ViewHeader/index' {
3813
3846
  export { ViewHeader } from '@layerfi/components/components/ViewHeader/ViewHeader';
3814
3847
 
3815
3848
  }
3816
- declare module '@layerfi/components/components/ui/Stack' {
3849
+ declare module '@layerfi/components/components/ui/Button/Button' {
3850
+ import React from 'react';
3851
+ import { type ButtonProps } from 'react-aria-components';
3852
+ type ButtonVariant = 'solid' | 'ghost';
3853
+ type ButtonSize = 'md' | 'lg';
3854
+ const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "className"> & {
3855
+ icon?: true;
3856
+ size?: ButtonSize;
3857
+ variant?: ButtonVariant;
3858
+ } & React.RefAttributes<HTMLButtonElement>>;
3859
+ export { Button };
3860
+
3861
+ }
3862
+ declare module '@layerfi/components/components/ui/Checkbox/Checkbox' {
3863
+ import React from 'react';
3864
+ import { type CheckboxProps } from 'react-aria-components';
3865
+ export function Checkbox({ children, ...props }: Omit<CheckboxProps, 'className'>): React.JSX.Element;
3866
+
3867
+ }
3868
+ declare module '@layerfi/components/components/ui/Loading/LoadingSpinner' {
3869
+ import React from 'react';
3870
+ import { type LucideProps } from 'lucide-react';
3871
+ export function LoadingSpinner({ size }: Pick<LucideProps, 'size'>): React.JSX.Element;
3872
+
3873
+ }
3874
+ declare module '@layerfi/components/components/ui/Modal/Modal' {
3875
+ import React, { type ComponentProps } from 'react';
3876
+ import { type DialogProps, type ModalOverlayProps } from 'react-aria-components';
3877
+ const ModalOverlay: React.ForwardRefExoticComponent<Omit<ModalOverlayProps, "className"> & React.RefAttributes<HTMLDivElement>>;
3878
+ const Dialog: React.ForwardRefExoticComponent<Omit<DialogProps, "className"> & React.RefAttributes<HTMLElement>>;
3879
+ type AllowedModalProps = Pick<ComponentProps<typeof ModalOverlay>, 'isOpen' | 'onOpenChange'>;
3880
+ type AllowedDialogProps = Pick<ComponentProps<typeof Dialog>, 'children'>;
3881
+ type ModalProps = AllowedModalProps & AllowedDialogProps;
3882
+ export function Modal({ isOpen, onOpenChange, children }: ModalProps): React.JSX.Element;
3883
+ export {};
3884
+
3885
+ }
3886
+ declare module '@layerfi/components/components/ui/Modal/ModalSlots' {
3887
+ import React, { type PropsWithChildren } from 'react';
3888
+ type ModalContextBarProps = {
3889
+ onClose?: () => void;
3890
+ };
3891
+ function ModalContextBar({ onClose }: ModalContextBarProps): React.JSX.Element;
3892
+ const ModalHeading: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react-aria-components").HeadingProps & React.RefAttributes<HTMLHeadingElement>, "className"> & {
3893
+ size?: "sm";
3894
+ pbe?: "2xs" | "xs" | "sm" | "md" | "lg";
3895
+ }, "ref"> & React.RefAttributes<HTMLHeadingElement>, "slot" | "level">, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
3896
+ const ModalDescription: React.ForwardRefExoticComponent<Omit<Omit<{
3897
+ slot?: string;
3898
+ size?: "xs" | "sm" | "md" | "lg";
3899
+ pbe?: "xs" | "sm" | "md" | "lg";
3900
+ align?: "center";
3901
+ } & {
3902
+ children?: React.ReactNode | undefined;
3903
+ } & React.RefAttributes<HTMLParagraphElement>, "slot">, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
3904
+ function ModalContent({ children }: PropsWithChildren): React.JSX.Element;
3905
+ function ModalActions({ children }: PropsWithChildren): React.JSX.Element;
3906
+ export { ModalContextBar, ModalHeading, ModalDescription, ModalContent, ModalActions, };
3907
+
3908
+ }
3909
+ declare module '@layerfi/components/components/ui/Stack/Stack' {
3817
3910
  import React, { type PropsWithChildren } from 'react';
3818
3911
  export type StackProps = PropsWithChildren<{
3819
3912
  gap?: '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '5xl';
3820
- align?: 'start';
3913
+ align?: 'start' | 'center';
3914
+ justify?: 'center';
3915
+ slot?: string;
3821
3916
  }>;
3822
- export function VStack({ align, children, gap }: StackProps): React.JSX.Element;
3917
+ export function VStack({ align, children, gap, justify, ...restProps }: StackProps): React.JSX.Element;
3918
+
3919
+ }
3920
+ declare module '@layerfi/components/components/ui/Typography/Heading' {
3921
+ import React from 'react';
3922
+ type HeadingDataProps = {
3923
+ size?: 'sm';
3924
+ pbe?: '2xs' | 'xs' | 'sm' | 'md' | 'lg';
3925
+ };
3926
+ const Heading: React.ForwardRefExoticComponent<Omit<Omit<import("react-aria-components").HeadingProps & React.RefAttributes<HTMLHeadingElement>, "className"> & HeadingDataProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
3927
+ export { Heading };
3928
+
3929
+ }
3930
+ declare module '@layerfi/components/components/ui/Typography/Text' {
3931
+ import React from 'react';
3932
+ type TextProps = {
3933
+ slot?: string;
3934
+ size?: 'xs' | 'sm' | 'md' | 'lg';
3935
+ pbe?: 'xs' | 'sm' | 'md' | 'lg';
3936
+ align?: 'center';
3937
+ };
3938
+ const P: React.ForwardRefExoticComponent<TextProps & {
3939
+ children?: React.ReactNode | undefined;
3940
+ } & React.RefAttributes<HTMLParagraphElement>>;
3941
+ export { P };
3942
+
3943
+ }
3944
+ declare module '@layerfi/components/components/utility/ConditionalList' {
3945
+ import React, { type PropsWithChildren } from 'react';
3946
+ type ConditionalListProps<T> = {
3947
+ list: ReadonlyArray<T>;
3948
+ Empty: React.ReactNode;
3949
+ children: React.FC<{
3950
+ item: T;
3951
+ }>;
3952
+ Container?: React.FC<PropsWithChildren>;
3953
+ } & ({
3954
+ isLoading: boolean;
3955
+ Loading: React.ReactNode;
3956
+ } | {
3957
+ isLoading?: never;
3958
+ Loading?: never;
3959
+ });
3960
+ export function ConditionalList<T>({ list, isLoading, Empty, Container, Loading, children }: ConditionalListProps<T>): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
3961
+ export {};
3823
3962
 
3824
3963
  }
3825
3964
  declare module '@layerfi/components/config/charts' {
@@ -3896,7 +4035,6 @@ declare module '@layerfi/components/config/theme' {
3896
4035
 
3897
4036
  }
3898
4037
  declare module '@layerfi/components/contexts/BalanceSheetContext/BalanceSheetContext' {
3899
- /// <reference types="react" />
3900
4038
  import { useBalanceSheet } from '@layerfi/components/hooks/useBalanceSheet/index';
3901
4039
  export type BalanceSheetContextType = ReturnType<typeof useBalanceSheet>;
3902
4040
  export const BalanceSheetContext: import("react").Context<{
@@ -3912,49 +4050,48 @@ declare module '@layerfi/components/contexts/BalanceSheetContext/index' {
3912
4050
 
3913
4051
  }
3914
4052
  declare module '@layerfi/components/contexts/BankTransactionsContext/BankTransactionsContext' {
3915
- /// <reference types="react" />
3916
4053
  import { useBankTransactions } from '@layerfi/components/hooks/useBankTransactions/index';
3917
4054
  import { DisplayState } from '@layerfi/components/types';
3918
4055
  export type BankTransactionsContextType = ReturnType<typeof useBankTransactions>;
3919
4056
  export const BankTransactionsContext: import("react").Context<{
3920
- data?: import("@layerfi/components/types").BankTransaction[] | undefined;
3921
- metadata?: import("@layerfi/components/types").Metadata | undefined;
4057
+ data?: import("@layerfi/components/types").BankTransaction[];
4058
+ metadata?: import("@layerfi/components/types").Metadata;
3922
4059
  loadingStatus: import("@layerfi/components/types/general").LoadedStatus;
3923
4060
  isLoading: boolean;
3924
4061
  isValidating: boolean;
3925
4062
  error: unknown;
3926
- hasMore?: boolean | undefined;
3927
- filters?: import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters | undefined;
3928
- accountsList?: import("@layerfi/components/hooks/useBankTransactions/types").AccountItem[] | undefined;
4063
+ hasMore?: boolean;
4064
+ filters?: import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters;
4065
+ accountsList?: import("@layerfi/components/hooks/useBankTransactions/types").AccountItem[];
3929
4066
  display: DisplayState;
3930
- categorize: (id: string, newCategory: import("@layerfi/components/types").CategoryUpdate, notify?: boolean | undefined) => Promise<void>;
3931
- match: (id: string, matchId: string, notify?: boolean | undefined) => Promise<void>;
4067
+ categorize: (id: import("@layerfi/components/types").BankTransaction["id"], newCategory: import("../../types").CategoryUpdate, notify?: boolean) => Promise<void>;
4068
+ match: (id: import("@layerfi/components/types").BankTransaction["id"], matchId: import("../../types").BankTransaction["id"], notify?: boolean) => Promise<void>;
3932
4069
  updateOneLocal: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
3933
4070
  shouldHideAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => boolean;
3934
4071
  removeAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
3935
4072
  refetch: () => void;
3936
- setFilters: (filters?: Partial<import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters> | undefined) => void;
4073
+ setFilters: (filters?: Partial<import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters>) => void;
3937
4074
  activate: () => void;
3938
4075
  fetchMore: () => void;
3939
4076
  }>;
3940
4077
  export const useBankTransactionsContext: () => {
3941
- data?: import("@layerfi/components/types").BankTransaction[] | undefined;
3942
- metadata?: import("@layerfi/components/types").Metadata | undefined;
4078
+ data?: import("@layerfi/components/types").BankTransaction[];
4079
+ metadata?: import("@layerfi/components/types").Metadata;
3943
4080
  loadingStatus: import("@layerfi/components/types/general").LoadedStatus;
3944
4081
  isLoading: boolean;
3945
4082
  isValidating: boolean;
3946
4083
  error: unknown;
3947
- hasMore?: boolean | undefined;
3948
- filters?: import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters | undefined;
3949
- accountsList?: import("@layerfi/components/hooks/useBankTransactions/types").AccountItem[] | undefined;
4084
+ hasMore?: boolean;
4085
+ filters?: import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters;
4086
+ accountsList?: import("@layerfi/components/hooks/useBankTransactions/types").AccountItem[];
3950
4087
  display: DisplayState;
3951
- categorize: (id: string, newCategory: import("@layerfi/components/types").CategoryUpdate, notify?: boolean | undefined) => Promise<void>;
3952
- match: (id: string, matchId: string, notify?: boolean | undefined) => Promise<void>;
4088
+ categorize: (id: import("@layerfi/components/types").BankTransaction["id"], newCategory: import("../../types").CategoryUpdate, notify?: boolean) => Promise<void>;
4089
+ match: (id: import("@layerfi/components/types").BankTransaction["id"], matchId: import("../../types").BankTransaction["id"], notify?: boolean) => Promise<void>;
3953
4090
  updateOneLocal: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
3954
4091
  shouldHideAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => boolean;
3955
4092
  removeAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
3956
4093
  refetch: () => void;
3957
- setFilters: (filters?: Partial<import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters> | undefined) => void;
4094
+ setFilters: (filters?: Partial<import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters>) => void;
3958
4095
  activate: () => void;
3959
4096
  fetchMore: () => void;
3960
4097
  };
@@ -3965,7 +4102,6 @@ declare module '@layerfi/components/contexts/BankTransactionsContext/index' {
3965
4102
 
3966
4103
  }
3967
4104
  declare module '@layerfi/components/contexts/ChartOfAccountsContext/ChartOfAccountsContext' {
3968
- /// <reference types="react" />
3969
4105
  import { useChartOfAccounts } from '@layerfi/components/hooks/useChartOfAccounts/index';
3970
4106
  export type ChartOfAccountsContextType = ReturnType<typeof useChartOfAccounts>;
3971
4107
  export const ChartOfAccountsContext: import("react").Context<{
@@ -3998,7 +4134,6 @@ declare module '@layerfi/components/contexts/ChartOfAccountsContext/index' {
3998
4134
 
3999
4135
  }
4000
4136
  declare module '@layerfi/components/contexts/DrawerContext/DrawerContext' {
4001
- /// <reference types="react" />
4002
4137
  import { useDrawer } from '@layerfi/components/hooks/useDrawer/index';
4003
4138
  export type DrawerContextType = ReturnType<typeof useDrawer>;
4004
4139
  export const DrawerContext: import("react").Context<{
@@ -4015,33 +4150,35 @@ declare module '@layerfi/components/contexts/DrawerContext/index' {
4015
4150
 
4016
4151
  }
4017
4152
  declare module '@layerfi/components/contexts/JournalContext/JournalContext' {
4018
- /// <reference types="react" />
4019
4153
  import { useJournal } from '@layerfi/components/hooks/useJournal/index';
4020
4154
  export type JournalContextType = ReturnType<typeof useJournal>;
4021
4155
  export const JournalContext: import("react").Context<{
4022
- data?: import("@layerfi/components/types").JournalEntry[] | undefined;
4023
- isLoading?: boolean | undefined;
4024
- isLoadingEntry?: boolean | undefined;
4025
- isValidating?: boolean | undefined;
4026
- isValidatingEntry?: boolean | undefined;
4156
+ data?: import("@layerfi/components/types").JournalEntry[];
4157
+ isLoading?: boolean;
4158
+ isLoadingEntry?: boolean;
4159
+ isValidating?: boolean;
4160
+ isValidatingEntry?: boolean;
4027
4161
  error?: unknown;
4028
4162
  errorEntry?: unknown;
4029
4163
  refetch: () => void;
4030
- selectedEntryId?: string | undefined;
4031
- setSelectedEntryId: (id?: string | undefined) => void;
4164
+ selectedEntryId?: string;
4165
+ setSelectedEntryId: (id?: string) => void;
4032
4166
  closeSelectedEntry: () => void;
4033
4167
  create: (newJournalEntry: import("@layerfi/components/types/journal").NewApiJournalEntry) => void;
4034
- changeFormData: (name: string, value: string | number | import("@layerfi/components/types/general").BaseSelectOption | undefined, lineItemIndex?: number | undefined, accounts?: import("../../types/chart_of_accounts").LedgerAccountBalance[] | undefined) => void;
4168
+ changeFormData: (name: string, value: string | import("@layerfi/components/types/general").BaseSelectOption | undefined | number, lineItemIndex?: number, accounts?: import("../../types/chart_of_accounts").LedgerAccountBalance[] | undefined) => void;
4035
4169
  submitForm: () => void;
4036
4170
  cancelForm: () => void;
4037
4171
  addEntry: () => void;
4038
4172
  sendingForm: boolean;
4039
- form?: import("@layerfi/components/hooks/useJournal/useJournal").JournalFormTypes | undefined;
4040
- apiError?: string | undefined;
4041
- setForm: (form?: import("@layerfi/components/hooks/useJournal/useJournal").JournalFormTypes | undefined) => void;
4173
+ form?: import("@layerfi/components/hooks/useJournal/useJournal").JournalFormTypes;
4174
+ apiError?: string;
4175
+ setForm: (form?: import("@layerfi/components/hooks/useJournal/useJournal").JournalFormTypes) => void;
4042
4176
  addEntryLine: (direction: import("@layerfi/components/index").Direction) => void;
4043
4177
  removeEntryLine: (index: number) => void;
4044
- reverseEntry: (entryId: string) => Promise<{}>;
4178
+ reverseEntry: (entryId: string) => ReturnType<(baseUrl: string, accessToken: string | undefined, options?: {
4179
+ params?: Record<string, string | undefined> | undefined;
4180
+ body?: Record<string, unknown> | undefined;
4181
+ } | undefined) => Promise<Record<never, never>>>;
4045
4182
  }>;
4046
4183
 
4047
4184
  }
@@ -4050,7 +4187,6 @@ declare module '@layerfi/components/contexts/JournalContext/index' {
4050
4187
 
4051
4188
  }
4052
4189
  declare module '@layerfi/components/contexts/LayerContext/LayerContext' {
4053
- /// <reference types="react" />
4054
4190
  import { LayerContextValues } from '@layerfi/components/types';
4055
4191
  import { LayerContextHelpers, LayerThemeConfig } from '@layerfi/components/types/layer_context';
4056
4192
  export const LayerContext: import("react").Context<LayerContextValues & LayerContextHelpers & {
@@ -4066,23 +4202,22 @@ declare module '@layerfi/components/contexts/LayerContext/index' {
4066
4202
 
4067
4203
  }
4068
4204
  declare module '@layerfi/components/contexts/LedgerAccountsContext/LedgerAccountsContext' {
4069
- /// <reference types="react" />
4070
4205
  import { useLedgerAccounts } from '@layerfi/components/hooks/useLedgerAccounts/index';
4071
4206
  export type LedgerAccountsContextType = ReturnType<typeof useLedgerAccounts>;
4072
4207
  export const LedgerAccountsContext: import("react").Context<{
4073
- data?: import("@layerfi/components/types").LedgerAccounts | undefined;
4074
- entryData?: import("@layerfi/components/types").LedgerAccountsEntry | undefined;
4075
- isLoading?: boolean | undefined;
4076
- isLoadingEntry?: boolean | undefined;
4077
- isValidating?: boolean | undefined;
4078
- isValidatingEntry?: boolean | undefined;
4208
+ data?: import("@layerfi/components/types").LedgerAccounts;
4209
+ entryData?: import("@layerfi/components/types").LedgerAccountsEntry;
4210
+ isLoading?: boolean;
4211
+ isLoadingEntry?: boolean;
4212
+ isValidating?: boolean;
4213
+ isValidatingEntry?: boolean;
4079
4214
  error?: unknown;
4080
4215
  errorEntry?: unknown;
4081
4216
  refetch: () => void;
4082
- accountId?: string | undefined;
4083
- setAccountId: (id?: string | undefined) => void;
4084
- selectedEntryId?: string | undefined;
4085
- setSelectedEntryId: (id?: string | undefined) => void;
4217
+ accountId?: string;
4218
+ setAccountId: (id?: string) => void;
4219
+ selectedEntryId?: string;
4220
+ setSelectedEntryId: (id?: string) => void;
4086
4221
  closeSelectedEntry: () => void;
4087
4222
  }>;
4088
4223
 
@@ -4092,25 +4227,24 @@ declare module '@layerfi/components/contexts/LedgerAccountsContext/index' {
4092
4227
 
4093
4228
  }
4094
4229
  declare module '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccountsContext' {
4095
- /// <reference types="react" />
4096
4230
  import { useLinkedAccounts } from '@layerfi/components/hooks/useLinkedAccounts/index';
4097
4231
  export type LinkedAccountsContextType = ReturnType<typeof useLinkedAccounts>;
4098
4232
  export const LinkedAccountsContext: import("react").Context<{
4099
- data?: import("@layerfi/components/types/linked_accounts").LinkedAccount[] | undefined;
4233
+ data?: import("@layerfi/components/types/linked_accounts").LinkedAccount[];
4100
4234
  isLoading: boolean;
4101
4235
  loadingStatus: import("@layerfi/components/types/general").LoadedStatus;
4102
4236
  isValidating: boolean;
4103
4237
  error: unknown;
4104
- addConnection: (source: import("@layerfi/components/types/linked_accounts").Source) => void;
4105
- removeConnection: (source: import("@layerfi/components/types/linked_accounts").Source, sourceId: string) => void;
4106
- repairConnection: (source: import("@layerfi/components/types/linked_accounts").Source, sourceId: string) => void;
4238
+ addConnection: (source: import("@layerfi/components/types/linked_accounts").AccountSource) => void;
4239
+ removeConnection: (source: import("@layerfi/components/types/linked_accounts").AccountSource, sourceId: string) => void;
4240
+ repairConnection: (source: import("@layerfi/components/types/linked_accounts").AccountSource, sourceId: string) => void;
4107
4241
  updateConnectionStatus: () => void;
4108
- refetchAccounts: () => void;
4242
+ refetchAccounts: () => import("@layerfi/components/types/utility/promises").Awaitable<void>;
4109
4243
  syncAccounts: () => void;
4110
- unlinkAccount: (source: import("@layerfi/components/types/linked_accounts").Source, accountId: string) => void;
4111
- confirmAccount: (source: import("@layerfi/components/types/linked_accounts").Source, accountId: string) => void;
4112
- denyAccount: (source: import("@layerfi/components/types/linked_accounts").Source, accountId: string) => void;
4113
- breakConnection: (source: import("@layerfi/components/types/linked_accounts").Source, connectionExternalId: string) => void;
4244
+ unlinkAccount: (source: import("@layerfi/components/types/linked_accounts").AccountSource, accountId: string) => void;
4245
+ confirmAccount: (source: import("@layerfi/components/types/linked_accounts").AccountSource, accountId: string) => void;
4246
+ excludeAccount: (source: import("@layerfi/components/types/linked_accounts").AccountSource, accountId: string) => void;
4247
+ breakConnection: (source: import("@layerfi/components/types/linked_accounts").AccountSource, connectionExternalId: string) => void;
4114
4248
  }>;
4115
4249
 
4116
4250
  }
@@ -4119,7 +4253,6 @@ declare module '@layerfi/components/contexts/LinkedAccountsContext/index' {
4119
4253
 
4120
4254
  }
4121
4255
  declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/ProfitAndLossComparisonContext' {
4122
- /// <reference types="react" />
4123
4256
  import { S3PresignedUrl } from '@layerfi/components/types/general';
4124
4257
  export const PNLComparisonContext: import("react").Context<{
4125
4258
  data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
@@ -4132,9 +4265,9 @@ declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/Prof
4132
4265
  setCompareMonths: (months: number) => void;
4133
4266
  compareOptions: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[];
4134
4267
  setCompareOptions: (options: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[]) => void;
4135
- refetch: (dateRange: import("@layerfi/components/types").DateRange, actAsInitial?: boolean | undefined) => void;
4136
- getProfitAndLossComparisonCsv: (dateRange: import("@layerfi/components/types").DateRange, moneyFormat?: import("../../types").MoneyFormat | undefined) => Promise<{
4137
- data?: S3PresignedUrl | undefined;
4268
+ refetch: (dateRange: import("@layerfi/components/types").DateRange, actAsInitial?: boolean) => void;
4269
+ getProfitAndLossComparisonCsv: (dateRange: import("@layerfi/components/types").DateRange, moneyFormat?: import("../../types").MoneyFormat) => Promise<{
4270
+ data?: S3PresignedUrl;
4138
4271
  error?: unknown;
4139
4272
  }>;
4140
4273
  }>;
@@ -4145,7 +4278,6 @@ declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/inde
4145
4278
 
4146
4279
  }
4147
4280
  declare module '@layerfi/components/contexts/ReceiptsContext/ReceiptsContext' {
4148
- /// <reference types="react" />
4149
4281
  import { useReceipts } from '@layerfi/components/hooks/useReceipts/index';
4150
4282
  export type ReceiptsContextType = ReturnType<typeof useReceipts>;
4151
4283
  export const ReceiptsContext: import("react").Context<{
@@ -4165,7 +4297,6 @@ declare module '@layerfi/components/contexts/ReceiptsContext/index' {
4165
4297
 
4166
4298
  }
4167
4299
  declare module '@layerfi/components/contexts/StatementOfCashContext/StatementOfCashFlowContext' {
4168
- /// <reference types="react" />
4169
4300
  import { useStatementOfCashFlow } from '@layerfi/components/hooks/useStatementOfCashFlow/index';
4170
4301
  export type StatementOfCashFlowContextType = ReturnType<typeof useStatementOfCashFlow>;
4171
4302
  export const StatementOfCashFlowContext: import("react").Context<{
@@ -4196,14 +4327,13 @@ declare module '@layerfi/components/contexts/TableContext/index' {
4196
4327
 
4197
4328
  }
4198
4329
  declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
4199
- /// <reference types="react" />
4200
4330
  import { useTasks } from '@layerfi/components/hooks/useTasks/index';
4201
4331
  export type TasksContextType = ReturnType<typeof useTasks>;
4202
4332
  export const TasksContext: import("react").Context<{
4203
- data?: import("@layerfi/components/types/tasks").TaskTypes[] | undefined;
4204
- isLoading?: boolean | undefined;
4205
- loadedStatus?: import("@layerfi/components/types/general").LoadedStatus | undefined;
4206
- isValidating?: boolean | undefined;
4333
+ data?: import("@layerfi/components/types/tasks").TaskTypes[];
4334
+ isLoading?: boolean;
4335
+ loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
4336
+ isValidating?: boolean;
4207
4337
  error?: unknown;
4208
4338
  refetch: () => void;
4209
4339
  submitResponseToTask: (taskId: string, userResponse: string) => void;
@@ -4214,6 +4344,22 @@ declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
4214
4344
  declare module '@layerfi/components/contexts/TasksContext/index' {
4215
4345
  export { TasksContext } from '@layerfi/components/contexts/TasksContext/TasksContext';
4216
4346
 
4347
+ }
4348
+ declare module '@layerfi/components/hooks/useAuth' {
4349
+ export function useAuth(): import("swr").SWRResponse<{
4350
+ access_token: string;
4351
+ token_type: string;
4352
+ expires_in: number;
4353
+ apiUrl: "https://api.layerfi.com" | "https://sandbox.layerfi.com" | "https://staging.layerfi.com";
4354
+ }, any, {
4355
+ refreshInterval: (latestData: {
4356
+ access_token: string;
4357
+ token_type: string;
4358
+ expires_in: number;
4359
+ apiUrl: "https://api.layerfi.com" | "https://sandbox.layerfi.com" | "https://staging.layerfi.com";
4360
+ } | undefined) => number;
4361
+ }>;
4362
+
4217
4363
  }
4218
4364
  declare module '@layerfi/components/hooks/useBalanceSheet/index' {
4219
4365
  export { useBalanceSheet } from '@layerfi/components/hooks/useBalanceSheet/useBalanceSheet';
@@ -4255,9 +4401,11 @@ declare module '@layerfi/components/hooks/useBankTransactions/types' {
4255
4401
  dateRange?: Partial<DateRange>;
4256
4402
  tagFilter?: TagFilterInput;
4257
4403
  }
4258
- export type UseBankTransactions = (params?: {
4404
+ export type UseBankTransactionsParams = {
4259
4405
  scope?: DisplayState;
4260
- }) => {
4406
+ monthlyView?: boolean;
4407
+ };
4408
+ export type UseBankTransactions = (params?: UseBankTransactionsParams) => {
4261
4409
  data?: BankTransaction[];
4262
4410
  metadata?: Metadata;
4263
4411
  loadingStatus: LoadedStatus;
@@ -4281,7 +4429,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/types' {
4281
4429
 
4282
4430
  }
4283
4431
  declare module '@layerfi/components/hooks/useBankTransactions/useBankTransactions' {
4284
- import { UseBankTransactions } from '@layerfi/components/hooks/useBankTransactions/types';
4432
+ import { UseBankTransactions } from "@layerfi/components/hooks/useBankTransactions/types";
4285
4433
  export const useBankTransactions: UseBankTransactions;
4286
4434
 
4287
4435
  }
@@ -4391,7 +4539,6 @@ declare module '@layerfi/components/hooks/useElementSize/index' {
4391
4539
 
4392
4540
  }
4393
4541
  declare module '@layerfi/components/hooks/useElementSize/useElementSize' {
4394
- /// <reference types="react" />
4395
4542
  export const useElementSize: <T extends HTMLElement>(callback: (target: T, entry: ResizeObserverEntry, size: {
4396
4543
  width: number;
4397
4544
  height: number;
@@ -4405,10 +4552,26 @@ declare module '@layerfi/components/hooks/useElementViewSize/index' {
4405
4552
 
4406
4553
  }
4407
4554
  declare module '@layerfi/components/hooks/useElementViewSize/useElementViewSize' {
4408
- /// <reference types="react" />
4409
4555
  import { View } from '@layerfi/components/types/general';
4410
4556
  export const useElementViewSize: <T extends HTMLElement>(callback: (view: View) => void) => import("react").RefObject<T>;
4411
4557
 
4558
+ }
4559
+ declare module '@layerfi/components/hooks/useIsVisible/index' {
4560
+ export { useIsVisible } from '@layerfi/components/hooks/useIsVisible/useIsVisible';
4561
+
4562
+ }
4563
+ declare module '@layerfi/components/hooks/useIsVisible/useIsVisible' {
4564
+ /**
4565
+ * Attach via ref to the element you want to monitor visibility of the element on the page
4566
+ *
4567
+ * @example
4568
+ * const scrollPaginationRef = useRef(null)
4569
+ * const isVisible = useIsVisible(scrollPaginationRef)
4570
+ *
4571
+ * <div ref={scrollPaginationRef} />
4572
+ */
4573
+ export const useIsVisible: (ref: React.RefObject<HTMLElement>) => boolean;
4574
+
4412
4575
  }
4413
4576
  declare module '@layerfi/components/hooks/useJournal/index' {
4414
4577
  export { useJournal } from '@layerfi/components/hooks/useJournal/useJournal';
@@ -4494,23 +4657,25 @@ declare module '@layerfi/components/hooks/useLinkedAccounts/mockData' {
4494
4657
  }
4495
4658
  declare module '@layerfi/components/hooks/useLinkedAccounts/useLinkedAccounts' {
4496
4659
  import { LoadedStatus } from '@layerfi/components/types/general';
4497
- import { LinkedAccount, Source } from '@layerfi/components/types/linked_accounts';
4660
+ import { LinkedAccount, AccountSource } from '@layerfi/components/types/linked_accounts';
4661
+ import type { Awaitable } from '@layerfi/components/types/utility/promises';
4662
+ export function getAccountsNeedingConfirmation(linkedAccounts: ReadonlyArray<LinkedAccount>): LinkedAccount[];
4498
4663
  type UseLinkedAccounts = () => {
4499
4664
  data?: LinkedAccount[];
4500
4665
  isLoading: boolean;
4501
4666
  loadingStatus: LoadedStatus;
4502
4667
  isValidating: boolean;
4503
4668
  error: unknown;
4504
- addConnection: (source: Source) => void;
4505
- removeConnection: (source: Source, sourceId: string) => void;
4506
- repairConnection: (source: Source, sourceId: string) => void;
4669
+ addConnection: (source: AccountSource) => void;
4670
+ removeConnection: (source: AccountSource, sourceId: string) => void;
4671
+ repairConnection: (source: AccountSource, sourceId: string) => void;
4507
4672
  updateConnectionStatus: () => void;
4508
- refetchAccounts: () => void;
4673
+ refetchAccounts: () => Awaitable<void>;
4509
4674
  syncAccounts: () => void;
4510
- unlinkAccount: (source: Source, accountId: string) => void;
4511
- confirmAccount: (source: Source, accountId: string) => void;
4512
- denyAccount: (source: Source, accountId: string) => void;
4513
- breakConnection: (source: Source, connectionExternalId: string) => void;
4675
+ unlinkAccount: (source: AccountSource, accountId: string) => void;
4676
+ confirmAccount: (source: AccountSource, accountId: string) => void;
4677
+ excludeAccount: (source: AccountSource, accountId: string) => void;
4678
+ breakConnection: (source: AccountSource, connectionExternalId: string) => void;
4514
4679
  };
4515
4680
  export const useLinkedAccounts: UseLinkedAccounts;
4516
4681
  export {};
@@ -4599,7 +4764,7 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossLTM'
4599
4764
  data: ProfitAndLossSummaryData[];
4600
4765
  isLoading?: boolean;
4601
4766
  loaded?: LoadedStatus;
4602
- error?: any;
4767
+ error?: unknown;
4603
4768
  pullData: (date: Date) => void;
4604
4769
  refetch: () => void;
4605
4770
  };
@@ -4626,7 +4791,7 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossQuery
4626
4791
  data?: ProfitAndLoss;
4627
4792
  isLoading: boolean;
4628
4793
  isValidating: boolean;
4629
- error: any;
4794
+ error: unknown;
4630
4795
  refetch: () => void;
4631
4796
  startDate: Date;
4632
4797
  endDate: Date;
@@ -5164,6 +5329,43 @@ declare module '@layerfi/components/models/Money' {
5164
5329
  };
5165
5330
  export default _default;
5166
5331
 
5332
+ }
5333
+ declare module '@layerfi/components/providers/AccountConfirmationStoreProvider' {
5334
+ import React, { type PropsWithChildren } from 'react';
5335
+ const ACCOUNT_CONFIRMATION_VISIBILITY: readonly ["PRELOADED", "DEFAULT", "DISMISSED"];
5336
+ type AccountConfirmationVisibility = typeof ACCOUNT_CONFIRMATION_VISIBILITY[number];
5337
+ type AccountConfirmationStoreShape = {
5338
+ visibility: AccountConfirmationVisibility;
5339
+ actions: {
5340
+ dismiss: () => void;
5341
+ preload: () => void;
5342
+ reset: () => void;
5343
+ };
5344
+ };
5345
+ export function useAccountConfirmationStore(): AccountConfirmationStoreShape;
5346
+ export function useAccountConfirmationStoreActions(): {
5347
+ dismiss: () => void;
5348
+ preload: () => void;
5349
+ reset: () => void;
5350
+ };
5351
+ type AccountConfirmationStoreProviderProps = PropsWithChildren<{
5352
+ initialVisibility?: AccountConfirmationVisibility;
5353
+ }>;
5354
+ export function AccountConfirmationStoreProvider({ children, initialVisibility, }: AccountConfirmationStoreProviderProps): React.JSX.Element;
5355
+ export {};
5356
+
5357
+ }
5358
+ declare module '@layerfi/components/providers/AuthInputProvider' {
5359
+ import React, { type PropsWithChildren } from 'react';
5360
+ type AuthInputShape = {
5361
+ appId?: string;
5362
+ appSecret?: string;
5363
+ businessAccessToken?: string;
5364
+ };
5365
+ export function useAuthInput(): AuthInputShape;
5366
+ export function AuthInputProvider({ appId, appSecret, businessAccessToken, children, }: PropsWithChildren<AuthInputShape>): React.JSX.Element;
5367
+ export {};
5368
+
5167
5369
  }
5168
5370
  declare module '@layerfi/components/providers/BankTransactionsProvider/BankTransactionsProvider' {
5169
5371
  import React, { ReactNode } from 'react';
@@ -5180,38 +5382,83 @@ declare module '@layerfi/components/providers/BankTransactionsProvider/index' {
5180
5382
  }
5181
5383
  declare module '@layerfi/components/providers/BusinessProvider/BusinessProvider' {
5182
5384
  import React, { PropsWithChildren } from 'react';
5183
- import { Props } from '@layerfi/components/providers/LayerProvider/LayerProvider';
5184
- export const BusinessProvider: ({ appId, appSecret, businessId, children, businessAccessToken, environment, theme, usePlaidSandbox, onError, eventCallbacks, }: PropsWithChildren<Props>) => React.JSX.Element;
5385
+ import { LayerProviderProps } from '@layerfi/components/providers/LayerProvider/LayerProvider';
5386
+ type BusinessProviderProps = PropsWithChildren<Pick<LayerProviderProps, 'businessId' | 'theme' | 'onError' | 'eventCallbacks'>>;
5387
+ export const BusinessProvider: ({ businessId, children, theme, onError, eventCallbacks, }: PropsWithChildren<BusinessProviderProps>) => React.JSX.Element;
5388
+ export {};
5389
+
5390
+ }
5391
+ declare module '@layerfi/components/providers/Environment/EnvironmentInputProvider' {
5392
+ import React, { type PropsWithChildren } from 'react';
5393
+ import { type Environment } from '@layerfi/components/providers/Environment/environmentConfigs';
5394
+ type EnvironmentInputShape = {
5395
+ environment?: Environment;
5396
+ usePlaidSandbox?: boolean;
5397
+ };
5398
+ export function useEnvironment(): {
5399
+ environment: "sandbox" | "production" | "staging" | "internalStaging";
5400
+ apiUrl: "https://api.layerfi.com" | "https://sandbox.layerfi.com" | "https://staging.layerfi.com";
5401
+ authUrl: "https://auth.layerfi.com/oauth2/token";
5402
+ scope: "https://api.layerfi.com/production" | "https://sandbox.layerfi.com/sandbox";
5403
+ usePlaidSandbox: boolean;
5404
+ };
5405
+ export function EnvironmentInputProvider({ children, environment, usePlaidSandbox, }: PropsWithChildren<EnvironmentInputShape>): React.JSX.Element;
5406
+ export {};
5407
+
5408
+ }
5409
+ declare module '@layerfi/components/providers/Environment/environmentConfigs' {
5410
+ const ENVIRONMENTS: readonly ["production", "sandbox", "staging", "internalStaging"];
5411
+ export type Environment = typeof ENVIRONMENTS[number];
5412
+ export const EnvironmentConfigs: {
5413
+ readonly production: {
5414
+ readonly apiUrl: "https://api.layerfi.com";
5415
+ readonly authUrl: "https://auth.layerfi.com/oauth2/token";
5416
+ readonly scope: "https://api.layerfi.com/production";
5417
+ readonly usePlaidSandbox: false;
5418
+ };
5419
+ readonly sandbox: {
5420
+ readonly apiUrl: "https://sandbox.layerfi.com";
5421
+ readonly authUrl: "https://auth.layerfi.com/oauth2/token";
5422
+ readonly scope: "https://sandbox.layerfi.com/sandbox";
5423
+ readonly usePlaidSandbox: true;
5424
+ };
5425
+ readonly staging: {
5426
+ readonly apiUrl: "https://staging.layerfi.com";
5427
+ readonly authUrl: "https://auth.layerfi.com/oauth2/token";
5428
+ readonly scope: "https://sandbox.layerfi.com/sandbox";
5429
+ readonly usePlaidSandbox: true;
5430
+ };
5431
+ readonly internalStaging: {
5432
+ readonly apiUrl: "https://staging.layerfi.com";
5433
+ readonly authUrl: "https://auth.layerfi.com/oauth2/token";
5434
+ readonly scope: "https://sandbox.layerfi.com/sandbox";
5435
+ readonly usePlaidSandbox: true;
5436
+ };
5437
+ };
5438
+ export {};
5185
5439
 
5186
5440
  }
5187
5441
  declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
5188
5442
  import React, { PropsWithChildren } from 'react';
5189
5443
  import { LayerError } from '@layerfi/components/models/ErrorHandler';
5190
5444
  import { LayerThemeConfig } from '@layerfi/components/types/layer_context';
5191
- type LayerEnvironmentConfig = {
5192
- url: string;
5193
- scope: string;
5194
- apiUrl: string;
5195
- usePlaidSandbox: boolean;
5196
- };
5197
- export const LayerEnvironment: Record<string, LayerEnvironmentConfig>;
5445
+ import type { Environment } from '@layerfi/components/providers/Environment/environmentConfigs';
5198
5446
  export type EventCallbacks = {
5199
5447
  onTransactionCategorized?: (bankTransactionId: string) => void;
5200
5448
  onTransactionsFetched?: () => void;
5201
5449
  };
5202
- export type Props = {
5450
+ export type LayerProviderProps = {
5203
5451
  businessId: string;
5204
5452
  appId?: string;
5205
5453
  appSecret?: string;
5206
5454
  businessAccessToken?: string;
5207
- environment?: keyof typeof LayerEnvironment;
5455
+ environment?: Environment;
5208
5456
  theme?: LayerThemeConfig;
5209
5457
  usePlaidSandbox?: boolean;
5210
5458
  onError?: (error: LayerError) => void;
5211
5459
  eventCallbacks?: EventCallbacks;
5212
5460
  };
5213
- export const LayerProvider: (props: PropsWithChildren<Props>) => React.JSX.Element;
5214
- export {};
5461
+ export const LayerProvider: ({ appId, appSecret, businessAccessToken, environment, usePlaidSandbox, ...restProps }: PropsWithChildren<LayerProviderProps>) => React.JSX.Element;
5215
5462
 
5216
5463
  }
5217
5464
  declare module '@layerfi/components/providers/LayerProvider/index' {
@@ -5219,12 +5466,8 @@ declare module '@layerfi/components/providers/LayerProvider/index' {
5219
5466
 
5220
5467
  }
5221
5468
  declare module '@layerfi/components/providers/LinkedAccountsProvider/LinkedAccountsProvider' {
5222
- import React, { ReactNode } from 'react';
5223
- interface LinkedAccountsProviderProps {
5224
- children: ReactNode;
5225
- }
5226
- export const LinkedAccountsProvider: ({ children, }: LinkedAccountsProviderProps) => React.JSX.Element;
5227
- export {};
5469
+ import React, { type PropsWithChildren } from 'react';
5470
+ export const LinkedAccountsProvider: ({ children, }: PropsWithChildren) => React.JSX.Element;
5228
5471
 
5229
5472
  }
5230
5473
  declare module '@layerfi/components/providers/LinkedAccountsProvider/index' {
@@ -5447,7 +5690,7 @@ declare module '@layerfi/components/types/chart_of_accounts' {
5447
5690
  export interface ChartOfAccounts {
5448
5691
  type: string;
5449
5692
  accounts: Account[];
5450
- entries?: any[];
5693
+ entries?: unknown[];
5451
5694
  }
5452
5695
  export interface AccountEntry {
5453
5696
  account: Account;
@@ -5543,6 +5786,7 @@ declare module '@layerfi/components/types/general' {
5543
5786
  fileType: string;
5544
5787
  fileName: string;
5545
5788
  createdAt: string;
5789
+ documentId?: string;
5546
5790
  }
5547
5791
  export type LoadedStatus = 'initial' | 'loading' | 'complete';
5548
5792
  export enum DataModel {
@@ -5625,19 +5869,14 @@ declare module '@layerfi/components/types/layer_context' {
5625
5869
  import { LayerError } from '@layerfi/components/models/ErrorHandler';
5626
5870
  import { EventCallbacks } from '@layerfi/components/providers/LayerProvider/LayerProvider';
5627
5871
  import { Business, Category } from '@layerfi/components/types';
5628
- import { ExpiringOAuthResponse } from '@layerfi/components/types/authentication';
5629
5872
  import { DataModel } from '@layerfi/components/types/general';
5630
5873
  export type LayerContextValues = {
5631
- auth: ExpiringOAuthResponse;
5632
5874
  businessId: string;
5633
5875
  business?: Business;
5634
5876
  categories: Category[];
5635
- apiUrl: string;
5636
5877
  theme?: LayerThemeConfig;
5637
5878
  colors: ColorsPalette;
5638
- usePlaidSandbox: boolean;
5639
5879
  onboardingStep?: OnboardingStep;
5640
- environment: string;
5641
5880
  toasts: (ToastProps & {
5642
5881
  isExiting: boolean;
5643
5882
  })[];
@@ -5703,7 +5942,6 @@ declare module '@layerfi/components/types/layer_context' {
5703
5942
  }
5704
5943
  export type OnboardingStep = undefined | 'connectAccount' | 'complete';
5705
5944
  export enum LayerContextActionName {
5706
- setAuth = "LayerContext.setAuth",
5707
5945
  setBusiness = "LayerContext.setBusiness",
5708
5946
  setCategories = "LayerContext.setCategories",
5709
5947
  setTheme = "LayerContext.setTheme",
@@ -5714,11 +5952,6 @@ declare module '@layerfi/components/types/layer_context' {
5714
5952
  setToastExit = "LayerContext.setToastExit"
5715
5953
  }
5716
5954
  export type LayerContextAction = {
5717
- type: LayerContextActionName.setAuth;
5718
- payload: {
5719
- auth: LayerContextValues['auth'];
5720
- };
5721
- } | {
5722
5955
  type: LayerContextActionName.setBusiness;
5723
5956
  payload: {
5724
5957
  business: LayerContextValues['business'];
@@ -5880,19 +6113,31 @@ declare module '@layerfi/components/types/line_item' {
5880
6113
 
5881
6114
  }
5882
6115
  declare module '@layerfi/components/types/linked_accounts' {
5883
- import { PlaidInstitution } from 'react-plaid-link';
5884
- export interface LinkedAccounts {
5885
- type: string;
5886
- external_accounts: LinkedAccount[];
5887
- }
5888
- export interface LinkedAccount {
6116
+ import type { PlaidInstitution } from 'react-plaid-link';
6117
+ import type { EnumWithUnknownValues } from '@layerfi/components/types/utility/enumWithUnknownValues';
6118
+ export type PublicToken = {
6119
+ public_token: string;
6120
+ institution: PlaidInstitution | null;
6121
+ };
6122
+ export type AccountSource = EnumWithUnknownValues<'PLAID' | 'STRIPE'>;
6123
+ const KNOWN_ACCOUNT_NOTIFICATION_TYPES: readonly ["CONFIRM_RELEVANT", "CONFIRM_UNIQUE"];
6124
+ type KnownAccountNotificationType = typeof KNOWN_ACCOUNT_NOTIFICATION_TYPES[number];
6125
+ const KNOWN_ACCOUNT_NOTIFICATION_SCOPES: readonly ["USER"];
6126
+ type KnownAccountNotificationScope = typeof KNOWN_ACCOUNT_NOTIFICATION_SCOPES[number];
6127
+ type AccountNotificationType = EnumWithUnknownValues<KnownAccountNotificationType>;
6128
+ type AccountNotificationScope = EnumWithUnknownValues<KnownAccountNotificationScope>;
6129
+ type AccountNotification = {
6130
+ type: AccountNotificationType;
6131
+ scope: AccountNotificationScope;
6132
+ };
6133
+ export type LinkedAccount = {
5889
6134
  id: string;
5890
6135
  external_account_external_id: string;
5891
- external_account_source: Source;
6136
+ external_account_source: AccountSource;
5892
6137
  external_account_name: string;
5893
6138
  latest_balance_timestamp: {
5894
6139
  external_account_external_id: string;
5895
- external_account_source: Source;
6140
+ external_account_source: AccountSource;
5896
6141
  balance: number;
5897
6142
  at: string;
5898
6143
  created_at: string;
@@ -5902,18 +6147,18 @@ declare module '@layerfi/components/types/linked_accounts' {
5902
6147
  name: string;
5903
6148
  logo: string | null;
5904
6149
  };
6150
+ notifications?: ReadonlyArray<AccountNotification>;
5905
6151
  mask?: string;
5906
6152
  connection_id?: string;
5907
6153
  connection_external_id?: string;
5908
6154
  connection_needs_repair_as_of: string | null;
5909
- requires_user_confirmation_as_of: string | null;
5910
6155
  is_syncing: boolean;
5911
- }
5912
- export type PublicToken = {
5913
- public_token: string;
5914
- institution: PlaidInstitution | null;
5915
6156
  };
5916
- export type Source = 'PLAID' | 'STRIPE';
6157
+ export type LinkedAccounts = {
6158
+ type: string;
6159
+ external_accounts: Array<LinkedAccount>;
6160
+ };
6161
+ export {};
5917
6162
 
5918
6163
  }
5919
6164
  declare module '@layerfi/components/types/profit_and_loss' {
@@ -6089,6 +6334,25 @@ declare module '@layerfi/components/types/tasks' {
6089
6334
  export type TasksResponseType = 'FREE_RESPONSE' | 'UPLOAD_DOCUMENT';
6090
6335
  export function isComplete(taskType: TasksStatusType): boolean;
6091
6336
 
6337
+ }
6338
+ declare module '@layerfi/components/types/utility/enumWithUnknownValues' {
6339
+ type UnknownEnumValue = string & Record<never, never>;
6340
+ export type EnumWithUnknownValues<T extends string> = T | UnknownEnumValue;
6341
+ export {};
6342
+
6343
+ }
6344
+ declare module '@layerfi/components/types/utility/oneOf' {
6345
+ type OnlyFirst<First, Second> = First & {
6346
+ [Key in keyof Omit<Second, keyof First>]: never;
6347
+ };
6348
+ type MergeTypes<Types extends Array<unknown>, Result = Record<never, never>> = Types extends [infer Head, ...infer Remaining] ? MergeTypes<Remaining, Result & Head> : Result;
6349
+ export type OneOf<Types extends Array<unknown>, Result = never, AllProperties = MergeTypes<Types>> = Types extends [infer Head, ...infer Remaining] ? OneOf<Remaining, Result | OnlyFirst<Head, AllProperties>, AllProperties> : Result;
6350
+ export {};
6351
+
6352
+ }
6353
+ declare module '@layerfi/components/types/utility/promises' {
6354
+ export type Awaitable<T> = T | Promise<T>;
6355
+
6092
6356
  }
6093
6357
  declare module '@layerfi/components/types' {
6094
6358
  export { OAuthResponse } from '@layerfi/components/types/authentication';
@@ -6124,11 +6388,11 @@ declare module '@layerfi/components/utils/bankTransactions' {
6124
6388
  import { CategoryOption } from '@layerfi/components/components/CategorySelect/CategorySelect';
6125
6389
  import { BankTransaction, DateRange } from '@layerfi/components/types';
6126
6390
  export const hasMatch: (bankTransaction?: BankTransaction) => boolean;
6127
- export const isCredit: ({ direction }: Pick<BankTransaction, 'direction'>) => boolean;
6391
+ export const isCredit: ({ direction }: Pick<BankTransaction, "direction">) => boolean;
6128
6392
  export const isAlreadyMatched: (bankTransaction?: BankTransaction) => string | undefined;
6129
6393
  export const countTransactionsToReview: ({ transactions, dateRange, }: {
6130
- transactions?: BankTransaction[] | undefined;
6131
- dateRange?: DateRange | undefined;
6394
+ transactions?: BankTransaction[];
6395
+ dateRange?: DateRange;
6132
6396
  }) => number;
6133
6397
  export const getCategorizePayload: (category: CategoryOption) => {
6134
6398
  type: "Exclusion";
@@ -6245,6 +6509,15 @@ declare module '@layerfi/components/utils/styleUtils/toDataProperties' {
6245
6509
  export function toDataProperties<T extends Record<string, unknown>>(input: T): DataProperties<T>;
6246
6510
  export {};
6247
6511
 
6512
+ }
6513
+ declare module '@layerfi/components/utils/swr/defaultSWRConfig' {
6514
+ export const DEFAULT_SWR_CONFIG: {
6515
+ readonly refreshInterval: 0;
6516
+ readonly revalidateOnFocus: false;
6517
+ readonly revalidateOnReconnect: false;
6518
+ readonly revalidateIfStale: false;
6519
+ };
6520
+
6248
6521
  }
6249
6522
  declare module '@layerfi/components/views/AccountingOverview/AccountingOverview' {
6250
6523
  import React, { ReactNode } from 'react';