@layerfi/components 0.1.28 → 0.1.30

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
@@ -31,22 +31,27 @@ declare module '@layerfi/components/api/layer/authenticated_http' {
31
31
  params?: Params | undefined;
32
32
  body?: Body_1 | undefined;
33
33
  } | undefined) => Promise<Return>;
34
+ export const postWithFormData: <Return extends Record<string, unknown> = Record<string, unknown>>(url: string, formData: FormData, baseUrl: string, accessToken: string | undefined) => Promise<Return>;
34
35
 
35
36
  }
36
37
  declare module '@layerfi/components/api/layer/balance_sheet' {
37
38
  import { BalanceSheet } from '@layerfi/components/types';
38
- export interface GetBalanceSheetParams {
39
+ export const getBalanceSheet: (baseUrl: string, accessToken: string | undefined, options?: {
40
+ params?: GetBalanceSheetParams | undefined;
41
+ } | undefined) => () => Promise<GetBalanceSheetReturn>;
42
+ export type GetBalanceSheetReturn = {
43
+ data?: BalanceSheet;
44
+ error?: unknown;
45
+ };
46
+ export interface GetBalanceSheetParams extends Record<string, string | undefined> {
39
47
  businessId: string;
40
- date: string;
48
+ effectiveDate: string;
41
49
  }
42
- export const getBalanceSheet: (_token: string, _params: {
43
- params: GetBalanceSheetParams;
44
- }) => () => BalanceSheet;
45
50
 
46
51
  }
47
52
  declare module '@layerfi/components/api/layer/bankTransactions' {
48
53
  import { CategoryUpdate, BankTransaction, Metadata } from '@layerfi/components/types';
49
- import { BankTransactionMatch, BankTransactionMatchType } from '@layerfi/components/types/bank_transactions';
54
+ import { BankTransactionMatch, BankTransactionMatchType, BankTransactionMetadata, DocumentS3Urls, FileMetadata } from '@layerfi/components/types/bank_transactions';
50
55
  import { S3PresignedUrl } from '@layerfi/components/types/general';
51
56
  export type GetBankTransactionsReturn = {
52
57
  data?: BankTransaction[];
@@ -93,6 +98,36 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
93
98
  data?: S3PresignedUrl | undefined;
94
99
  error?: unknown;
95
100
  }>;
101
+ export const getBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
102
+ params?: Record<string, string | undefined> | undefined;
103
+ } | undefined) => () => Promise<{
104
+ data: BankTransactionMetadata;
105
+ errors: unknown;
106
+ }>;
107
+ export const updateBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
108
+ params?: Record<string, string | undefined> | undefined;
109
+ body?: {
110
+ memo: string;
111
+ } | undefined;
112
+ } | undefined) => Promise<{
113
+ data: BankTransactionMetadata;
114
+ errors: unknown;
115
+ }>;
116
+ export const listBankTransactionDocuments: (baseUrl: string, accessToken: string | undefined, options?: {
117
+ params?: Record<string, string | undefined> | undefined;
118
+ } | undefined) => () => Promise<{
119
+ data: DocumentS3Urls;
120
+ errors: unknown;
121
+ }>;
122
+ export const uploadBankTransactionDocument: (baseUrl: string, accessToken: string) => ({ businessId, bankTransactionId, file, documentType, }: {
123
+ businessId: string;
124
+ bankTransactionId: string;
125
+ file: File;
126
+ documentType: string;
127
+ }) => Promise<{
128
+ data: FileMetadata;
129
+ errors: unknown;
130
+ }>;
96
131
 
97
132
  }
98
133
  declare module '@layerfi/components/api/layer/business' {
@@ -352,9 +387,9 @@ declare module '@layerfi/components/api/layer' {
352
387
  } | undefined) => Promise<{
353
388
  data: import("@layerfi/components/types").Account;
354
389
  }>;
355
- getBalanceSheet: (_token: string, _params: {
356
- params: import("@layerfi/components/api/layer/balance_sheet").GetBalanceSheetParams;
357
- }) => () => import("@layerfi/components/types").BalanceSheet;
390
+ getBalanceSheet: (baseUrl: string, accessToken: string | undefined, options?: {
391
+ params?: import("@layerfi/components/api/layer/balance_sheet").GetBalanceSheetParams | undefined;
392
+ } | undefined) => () => Promise<import("@layerfi/components/api/layer/balance_sheet").GetBalanceSheetReturn>;
358
393
  getBankTransactions: (baseUrl: string, accessToken: string | undefined, options?: {
359
394
  params?: import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsParams | undefined;
360
395
  } | undefined) => () => Promise<import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsReturn>;
@@ -364,6 +399,36 @@ declare module '@layerfi/components/api/layer' {
364
399
  data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
365
400
  error?: unknown;
366
401
  }>;
402
+ getBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
403
+ params?: Record<string, string | undefined> | undefined;
404
+ } | undefined) => () => Promise<{
405
+ data: import("@layerfi/components/types/bank_transactions").BankTransactionMetadata;
406
+ errors: unknown;
407
+ }>;
408
+ listBankTransactionDocuments: (baseUrl: string, accessToken: string | undefined, options?: {
409
+ params?: Record<string, string | undefined> | undefined;
410
+ } | undefined) => () => Promise<{
411
+ data: import("@layerfi/components/types/bank_transactions").DocumentS3Urls;
412
+ errors: unknown;
413
+ }>;
414
+ updateBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
415
+ params?: Record<string, string | undefined> | undefined;
416
+ body?: {
417
+ memo: string;
418
+ } | undefined;
419
+ } | undefined) => Promise<{
420
+ data: import("@layerfi/components/types/bank_transactions").BankTransactionMetadata;
421
+ errors: unknown;
422
+ }>;
423
+ uploadBankTransactionDocument: (baseUrl: string, accessToken: string) => ({ businessId, bankTransactionId, file, documentType, }: {
424
+ businessId: string;
425
+ bankTransactionId: string;
426
+ file: File;
427
+ documentType: string;
428
+ }) => Promise<{
429
+ data: import("@layerfi/components/types/bank_transactions").FileMetadata;
430
+ errors: unknown;
431
+ }>;
367
432
  getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
368
433
  params?: Record<string, string | undefined> | undefined;
369
434
  } | undefined) => () => Promise<{
@@ -605,8 +670,26 @@ declare module '@layerfi/components/components/BadgeLoader/index' {
605
670
 
606
671
  }
607
672
  declare module '@layerfi/components/components/BalanceSheet/BalanceSheet' {
608
- import React from 'react';
609
- export const BalanceSheet: () => React.JSX.Element;
673
+ import React, { PropsWithChildren } from 'react';
674
+ export type BalanceSheetViewProps = PropsWithChildren & {
675
+ withExpandAllButton?: boolean;
676
+ };
677
+ export type BalanceSheetProps = PropsWithChildren & {
678
+ effectiveDate: Date;
679
+ };
680
+ const BalanceSheet: {
681
+ (props: BalanceSheetProps): React.JSX.Element;
682
+ View: ({ withExpandAllButton, }: BalanceSheetViewProps) => React.JSX.Element;
683
+ };
684
+ export { BalanceSheet };
685
+
686
+ }
687
+ declare module '@layerfi/components/components/BalanceSheet/constants' {
688
+ export const BALANCE_SHEET_ROWS: {
689
+ name: string;
690
+ displayName: string;
691
+ lineItem: string;
692
+ }[];
610
693
 
611
694
  }
612
695
  declare module '@layerfi/components/components/BalanceSheet/index' {
@@ -615,17 +698,25 @@ declare module '@layerfi/components/components/BalanceSheet/index' {
615
698
  }
616
699
  declare module '@layerfi/components/components/BalanceSheetDatePicker/BalanceSheetDatePicker' {
617
700
  import React from 'react';
618
- type Props = {
619
- value: Date;
620
- onChange: React.ChangeEventHandler<HTMLInputElement>;
701
+ export type BalanceSheetDatePickerProps = {
702
+ effectiveDate: Date;
703
+ setEffectiveDate: (date: Date) => void;
621
704
  };
622
- export const BalanceSheetDatePicker: ({ value, onChange }: Props) => React.JSX.Element;
623
- export {};
705
+ export const BalanceSheetDatePicker: ({ effectiveDate, setEffectiveDate, }: BalanceSheetDatePickerProps) => React.JSX.Element;
624
706
 
625
707
  }
626
708
  declare module '@layerfi/components/components/BalanceSheetDatePicker/index' {
627
709
  export { BalanceSheetDatePicker } from '@layerfi/components/components/BalanceSheetDatePicker/BalanceSheetDatePicker';
628
710
 
711
+ }
712
+ declare module '@layerfi/components/components/BalanceSheetExpandAllButton/BalanceSheetExpandAllButton' {
713
+ import React from 'react';
714
+ export const BalanceSheetExpandAllButton: () => React.JSX.Element;
715
+
716
+ }
717
+ declare module '@layerfi/components/components/BalanceSheetExpandAllButton/index' {
718
+ export { BalanceSheetExpandAllButton } from '@layerfi/components/components/BalanceSheetExpandAllButton/BalanceSheetExpandAllButton';
719
+
629
720
  }
630
721
  declare module '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow' {
631
722
  import React from 'react';
@@ -644,6 +735,25 @@ declare module '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow'
644
735
  declare module '@layerfi/components/components/BalanceSheetRow/index' {
645
736
  export { BalanceSheetRow } from '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow';
646
737
 
738
+ }
739
+ declare module '@layerfi/components/components/BalanceSheetTable/BalanceSheetTable' {
740
+ import React from 'react';
741
+ import { BalanceSheet } from '@layerfi/components/types';
742
+ type BalanceSheetRowProps = {
743
+ name: string;
744
+ displayName: string;
745
+ lineItem: string;
746
+ };
747
+ export const BalanceSheetTable: ({ data, config, }: {
748
+ data: BalanceSheet;
749
+ config: BalanceSheetRowProps[];
750
+ }) => React.JSX.Element;
751
+ export {};
752
+
753
+ }
754
+ declare module '@layerfi/components/components/BalanceSheetTable/index' {
755
+ export { BalanceSheetTable } from '@layerfi/components/components/BalanceSheetTable/BalanceSheetTable';
756
+
647
757
  }
648
758
  declare module '@layerfi/components/components/BankTransactionList/Assignment' {
649
759
  import React from 'react';
@@ -1087,6 +1197,7 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
1087
1197
  disabled?: boolean;
1088
1198
  className?: string;
1089
1199
  excludeMatches?: boolean;
1200
+ asDrawer?: boolean;
1090
1201
  };
1091
1202
  export enum OptionActionType {
1092
1203
  CATEGORY = "category",
@@ -1111,7 +1222,18 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
1111
1222
  }
1112
1223
  export const mapCategoryToOption: (category: Category) => CategoryOption;
1113
1224
  export const mapSuggestedMatchToOption: (record: SuggestedMatch) => CategoryOption;
1114
- export const CategorySelect: ({ bankTransaction, name, value, onChange, disabled, className, excludeMatches, }: Props) => React.JSX.Element;
1225
+ export const CategorySelect: ({ bankTransaction, name, value, onChange, disabled, className, excludeMatches, asDrawer, }: Props) => React.JSX.Element;
1226
+ export {};
1227
+
1228
+ }
1229
+ declare module '@layerfi/components/components/CategorySelect/CategorySelectDrawer' {
1230
+ import React from 'react';
1231
+ import { CategoryOption } from '@layerfi/components/components/CategorySelect/CategorySelect';
1232
+ interface CategorySelectDrawerProps {
1233
+ onSelect: (value: CategoryOption) => void;
1234
+ selected?: CategoryOption;
1235
+ }
1236
+ export const CategorySelectDrawer: ({ onSelect, selected, }: CategorySelectDrawerProps) => React.JSX.Element;
1115
1237
  export {};
1116
1238
 
1117
1239
  }
@@ -1281,6 +1403,23 @@ declare module '@layerfi/components/components/DataState/DataState' {
1281
1403
  declare module '@layerfi/components/components/DataState/index' {
1282
1404
  export { DataState, DataStateStatus } from '@layerfi/components/components/DataState/DataState';
1283
1405
 
1406
+ }
1407
+ declare module '@layerfi/components/components/DateDayPicker/DateDayPicker' {
1408
+ import React from 'react';
1409
+ interface DateDayPickerProps {
1410
+ dateDay: Date;
1411
+ changeDateDay: (dateDay: Date) => void;
1412
+ enableFutureDates?: boolean;
1413
+ currentDateOption?: boolean;
1414
+ minDate?: Date;
1415
+ }
1416
+ export const DateDayPicker: ({ dateDay, changeDateDay, minDate, enableFutureDates, currentDateOption, }: DateDayPickerProps) => React.JSX.Element;
1417
+ export {};
1418
+
1419
+ }
1420
+ declare module '@layerfi/components/components/DateDayPicker/index' {
1421
+ export { DateDayPicker } from '@layerfi/components/components/DateDayPicker/DateDayPicker';
1422
+
1284
1423
  }
1285
1424
  declare module '@layerfi/components/components/DateMonthPicker/DateMonthPicker' {
1286
1425
  import React from 'react';
@@ -1346,7 +1485,7 @@ declare module '@layerfi/components/components/DetailsList/index' {
1346
1485
  }
1347
1486
  declare module '@layerfi/components/components/Drawer/Drawer' {
1348
1487
  import React from 'react';
1349
- export const Drawer: ({ isOpen, onClose, children }: {
1488
+ export const Drawer: ({ isOpen, onClose, children, }: {
1350
1489
  isOpen: boolean;
1351
1490
  onClose: () => void;
1352
1491
  children: React.ReactNode;
@@ -1401,19 +1540,6 @@ declare module '@layerfi/components/components/GlobalWidgets/GlobalWidgets' {
1401
1540
  declare module '@layerfi/components/components/GlobalWidgets/index' {
1402
1541
  export { GlobalWidgets } from '@layerfi/components/components/GlobalWidgets/GlobalWidgets';
1403
1542
 
1404
- }
1405
- declare module '@layerfi/components/components/Hello/Hello' {
1406
- import React from 'react';
1407
- type Props = {
1408
- user?: string | undefined;
1409
- };
1410
- export const Hello: ({ user }: Props) => React.JSX.Element;
1411
- export {};
1412
-
1413
- }
1414
- declare module '@layerfi/components/components/Hello/index' {
1415
- export { Hello } from '@layerfi/components/components/Hello/Hello';
1416
-
1417
1543
  }
1418
1544
  declare module '@layerfi/components/components/HoverMenu/HoverMenu' {
1419
1545
  import React, { ReactNode } from 'react';
@@ -1726,9 +1852,11 @@ declare module '@layerfi/components/components/LinkedAccounts/LinkedAccounts' {
1726
1852
  asWidget?: boolean;
1727
1853
  elevated?: boolean;
1728
1854
  showLedgerBalance?: boolean;
1855
+ showUnlinkItem?: boolean;
1856
+ showBreakConnection?: boolean;
1729
1857
  }
1730
1858
  export const LinkedAccounts: (props: LinkedAccountsProps) => React.JSX.Element;
1731
- export const LinkedAccountsComponent: ({ asWidget, elevated, showLedgerBalance, }: LinkedAccountsProps) => React.JSX.Element;
1859
+ export const LinkedAccountsComponent: ({ asWidget, elevated, showLedgerBalance, showUnlinkItem, showBreakConnection, }: LinkedAccountsProps) => React.JSX.Element;
1732
1860
 
1733
1861
  }
1734
1862
  declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountsContent' {
@@ -1736,8 +1864,10 @@ declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountsCont
1736
1864
  interface LinkedAccountsDataProps {
1737
1865
  asWidget?: boolean;
1738
1866
  showLedgerBalance?: boolean;
1867
+ showUnlinkItem?: boolean;
1868
+ showBreakConnection?: boolean;
1739
1869
  }
1740
- export const LinkedAccountsContent: ({ asWidget, showLedgerBalance, }: LinkedAccountsDataProps) => React.JSX.Element;
1870
+ export const LinkedAccountsContent: ({ asWidget, showLedgerBalance, showUnlinkItem, showBreakConnection, }: LinkedAccountsDataProps) => React.JSX.Element;
1741
1871
  export {};
1742
1872
 
1743
1873
  }
@@ -1804,7 +1934,7 @@ declare module '@layerfi/components/components/Onboarding/ConnectAccount' {
1804
1934
  onTransactionsToReviewClick?: () => void;
1805
1935
  currentMonthOnly?: boolean;
1806
1936
  }
1807
- export const ConnectAccount: ({ onboardingStep, onTransactionsToReviewClick, currentMonthOnly, }: ConnectAccountProps) => React.JSX.Element;
1937
+ export const ConnectAccount: ({ onboardingStep, onTransactionsToReviewClick, }: ConnectAccountProps) => React.JSX.Element;
1808
1938
 
1809
1939
  }
1810
1940
  declare module '@layerfi/components/components/Onboarding/Onboarding' {
@@ -1852,6 +1982,29 @@ declare module '@layerfi/components/components/Panel/Panel' {
1852
1982
  declare module '@layerfi/components/components/Panel/index' {
1853
1983
  export { Panel } from '@layerfi/components/components/Panel/Panel';
1854
1984
 
1985
+ }
1986
+ declare module '@layerfi/components/components/PanelView/PanelView' {
1987
+ import React, { ReactNode } from 'react';
1988
+ export interface PanelViewProps {
1989
+ children: ReactNode;
1990
+ title?: string;
1991
+ headerControls?: ReactNode;
1992
+ }
1993
+ export const PanelView: ({ title, children, headerControls, }: PanelViewProps) => React.JSX.Element;
1994
+
1995
+ }
1996
+ declare module '@layerfi/components/components/PanelView/index' {
1997
+ export { PanelView } from '@layerfi/components/components/PanelView/PanelView';
1998
+
1999
+ }
2000
+ declare module '@layerfi/components/components/PanelViewHeader/PanelViewHeader' {
2001
+ import React, { ReactNode } from 'react';
2002
+ export interface PanelViewHeaderProps {
2003
+ title?: string;
2004
+ controls?: ReactNode;
2005
+ }
2006
+ export const PanelViewHeader: ({ title, controls }: PanelViewHeaderProps) => React.JSX.Element;
2007
+
1855
2008
  }
1856
2009
  declare module '@layerfi/components/components/Pill/Pill' {
1857
2010
  import React, { PropsWithChildren } from 'react';
@@ -2095,17 +2248,6 @@ declare module '@layerfi/components/components/ProfitAndLossView/ProfitAndLossVi
2095
2248
  declare module '@layerfi/components/components/ProfitAndLossView/index' {
2096
2249
  export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/ProfitAndLossView';
2097
2250
 
2098
- }
2099
- declare module '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow' {
2100
- import React, { PropsWithChildren } from 'react';
2101
- type Props = PropsWithChildren;
2102
- export const SkeletonBalanceSheetRow: ({ children }: Props) => React.JSX.Element;
2103
- export {};
2104
-
2105
- }
2106
- declare module '@layerfi/components/components/SkeletonBalanceSheetRow/index' {
2107
- export { SkeletonBalanceSheetRow } from '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow';
2108
-
2109
2251
  }
2110
2252
  declare module '@layerfi/components/components/SkeletonLoader/SkeletonLoader' {
2111
2253
  import React from 'react';
@@ -2319,13 +2461,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
2319
2461
  floating: HTMLElement | null;
2320
2462
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
2321
2463
  context: {
2464
+ update: () => void;
2322
2465
  x: number;
2323
2466
  y: number;
2324
2467
  placement: import("@floating-ui/utils").Placement;
2325
2468
  strategy: import("@floating-ui/utils").Strategy;
2326
2469
  middlewareData: import("@floating-ui/core").MiddlewareData;
2327
2470
  isPositioned: boolean;
2328
- update: () => void;
2329
2471
  floatingStyles: React.CSSProperties;
2330
2472
  open: boolean;
2331
2473
  onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
@@ -2368,13 +2510,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
2368
2510
  floating: HTMLElement | null;
2369
2511
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
2370
2512
  context: {
2513
+ update: () => void;
2371
2514
  x: number;
2372
2515
  y: number;
2373
2516
  placement: import("@floating-ui/utils").Placement;
2374
2517
  strategy: import("@floating-ui/utils").Strategy;
2375
2518
  middlewareData: import("@floating-ui/core").MiddlewareData;
2376
2519
  isPositioned: boolean;
2377
- update: () => void;
2378
2520
  floatingStyles: React.CSSProperties;
2379
2521
  open: boolean;
2380
2522
  onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
@@ -2403,9 +2545,9 @@ declare module '@layerfi/components/components/TransactionToReviewCard/Transacti
2403
2545
  import React from 'react';
2404
2546
  export interface TransactionToReviewCardProps {
2405
2547
  onClick?: () => void;
2406
- currentMonthOnly?: true;
2548
+ usePnlDateRange?: boolean;
2407
2549
  }
2408
- export const TransactionToReviewCard: ({ onClick, currentMonthOnly, }: TransactionToReviewCardProps) => React.JSX.Element;
2550
+ export const TransactionToReviewCard: ({ onClick, usePnlDateRange, }: TransactionToReviewCardProps) => React.JSX.Element;
2409
2551
 
2410
2552
  }
2411
2553
  declare module '@layerfi/components/components/TransactionToReviewCard/index' {
@@ -2577,6 +2719,21 @@ declare module '@layerfi/components/config/theme' {
2577
2719
  };
2578
2720
  };
2579
2721
 
2722
+ }
2723
+ declare module '@layerfi/components/contexts/BalanceSheetContext/BalanceSheetContext' {
2724
+ /// <reference types="react" />
2725
+ import { useBalanceSheet } from '@layerfi/components/hooks/useBalanceSheet/index';
2726
+ export type BalanceSheetContextType = ReturnType<typeof useBalanceSheet>;
2727
+ export const BalanceSheetContext: import("react").Context<{
2728
+ data: import("@layerfi/components/types").BalanceSheet | undefined;
2729
+ isLoading: boolean;
2730
+ error: unknown;
2731
+ }>;
2732
+
2733
+ }
2734
+ declare module '@layerfi/components/contexts/BalanceSheetContext/index' {
2735
+ export { BalanceSheetContext } from '@layerfi/components/contexts/BalanceSheetContext/BalanceSheetContext';
2736
+
2580
2737
  }
2581
2738
  declare module '@layerfi/components/contexts/BankTransactionsContext/BankTransactionsContext' {
2582
2739
  /// <reference types="react" />
@@ -2663,6 +2820,8 @@ declare module '@layerfi/components/contexts/DrawerContext/DrawerContext' {
2663
2820
  export const DrawerContext: import("react").Context<{
2664
2821
  content?: import("react").ReactNode;
2665
2822
  setContent: (content: import("react").ReactNode) => void;
2823
+ finishClosing: () => void;
2824
+ isClosing: boolean;
2666
2825
  close: () => void;
2667
2826
  }>;
2668
2827
 
@@ -2687,7 +2846,7 @@ declare module '@layerfi/components/contexts/JournalContext/JournalContext' {
2687
2846
  selectedEntryId?: string | undefined;
2688
2847
  setSelectedEntryId: (id?: string | undefined) => void;
2689
2848
  closeSelectedEntry: () => void;
2690
- create: (newJournalEntry: import("@layerfi/components/types/journal").NewJournalEntry) => void;
2849
+ create: (newJournalEntry: import("@layerfi/components/types/journal").NewApiJournalEntry) => void;
2691
2850
  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;
2692
2851
  submitForm: () => void;
2693
2852
  cancelForm: () => void;
@@ -2773,6 +2932,24 @@ declare module '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccount
2773
2932
  declare module '@layerfi/components/contexts/LinkedAccountsContext/index' {
2774
2933
  export { LinkedAccountsContext } from '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccountsContext';
2775
2934
 
2935
+ }
2936
+ declare module '@layerfi/components/contexts/TableExpandContext/TableExpandContext' {
2937
+ import React, { ReactNode } from 'react';
2938
+ interface TableExpandContextType {
2939
+ tableExpandState: boolean;
2940
+ toggleTableExpandState: () => void;
2941
+ }
2942
+ export const TableExpandContext: React.Context<TableExpandContextType>;
2943
+ interface TableExpandProviderProps {
2944
+ children: ReactNode;
2945
+ }
2946
+ export const TableExpandProvider: React.FC<TableExpandProviderProps>;
2947
+ export {};
2948
+
2949
+ }
2950
+ declare module '@layerfi/components/contexts/TableExpandContext/index' {
2951
+ export { TableExpandContext, TableExpandProvider } from '@layerfi/components/contexts/TableExpandContext/TableExpandContext';
2952
+
2776
2953
  }
2777
2954
  declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
2778
2955
  /// <reference types="react" />
@@ -2930,6 +3107,8 @@ declare module '@layerfi/components/hooks/useDrawer/useDrawer' {
2930
3107
  type UseDrawer = () => {
2931
3108
  content?: ReactNode;
2932
3109
  setContent: (content: ReactNode) => void;
3110
+ finishClosing: () => void;
3111
+ isClosing: boolean;
2933
3112
  close: () => void;
2934
3113
  };
2935
3114
  export const useDrawer: UseDrawer;
@@ -2958,7 +3137,7 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
2958
3137
  import { Direction, FormError, FormErrorWithId } from '@layerfi/components/types';
2959
3138
  import { LedgerAccountBalance } from '@layerfi/components/types/chart_of_accounts';
2960
3139
  import { BaseSelectOption } from '@layerfi/components/types/general';
2961
- import { JournalEntry, NewJournalEntry } from '@layerfi/components/types/journal';
3140
+ import { JournalEntry, NewApiJournalEntry, NewFormJournalEntry } from '@layerfi/components/types/journal';
2962
3141
  type UseJournal = () => {
2963
3142
  data?: JournalEntry[];
2964
3143
  isLoading?: boolean;
@@ -2971,7 +3150,7 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
2971
3150
  selectedEntryId?: string;
2972
3151
  setSelectedEntryId: (id?: string) => void;
2973
3152
  closeSelectedEntry: () => void;
2974
- create: (newJournalEntry: NewJournalEntry) => void;
3153
+ create: (newJournalEntry: NewApiJournalEntry) => void;
2975
3154
  changeFormData: (name: string, value: string | BaseSelectOption | undefined | number, lineItemIndex?: number, accounts?: LedgerAccountBalance[] | undefined) => void;
2976
3155
  submitForm: () => void;
2977
3156
  cancelForm: () => void;
@@ -2985,7 +3164,7 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
2985
3164
  };
2986
3165
  export interface JournalFormTypes {
2987
3166
  action: string;
2988
- data: NewJournalEntry;
3167
+ data: NewFormJournalEntry;
2989
3168
  errors?: {
2990
3169
  entry: FormError[];
2991
3170
  lineItems: FormErrorWithId[];
@@ -3169,6 +3348,20 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossQuery
3169
3348
  export const useProfitAndLossQuery: UseProfitAndLossQueryReturn;
3170
3349
  export {};
3171
3350
 
3351
+ }
3352
+ declare module '@layerfi/components/hooks/useTableExpandRow/index' {
3353
+ export { useTableExpandRow } from '@layerfi/components/hooks/useTableExpandRow/useTableExpandRow';
3354
+
3355
+ }
3356
+ declare module '@layerfi/components/hooks/useTableExpandRow/useTableExpandRow' {
3357
+ /// <reference types="react" />
3358
+ export const useTableExpandRow: (index: number, defaultOpen?: boolean) => {
3359
+ isOpen: boolean;
3360
+ setIsOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
3361
+ showComponent: boolean;
3362
+ INDENTATION: number;
3363
+ };
3364
+
3172
3365
  }
3173
3366
  declare module '@layerfi/components/hooks/useTasks/index' {
3174
3367
  export { useTasks } from '@layerfi/components/hooks/useTasks/useTasks';
@@ -3232,13 +3425,6 @@ declare module '@layerfi/components/icons/Bell' {
3232
3425
  const Bell: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
3233
3426
  export default Bell;
3234
3427
 
3235
- }
3236
- declare module '@layerfi/components/icons/Calendar' {
3237
- import * as React from 'react';
3238
- import { SVGProps } from 'react';
3239
- const Calendar: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
3240
- export default Calendar;
3241
-
3242
3428
  }
3243
3429
  declare module '@layerfi/components/icons/Check' {
3244
3430
  import * as React from 'react';
@@ -3465,20 +3651,19 @@ declare module '@layerfi/components/icons/types' {
3465
3651
  }
3466
3652
  declare module '@layerfi/components/index' {
3467
3653
  export { LayerProvider } from '@layerfi/components/providers/LayerProvider/index';
3468
- export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
3469
- export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
3470
- export { Hello } from '@layerfi/components/components/Hello/index';
3654
+ export { Onboarding } from '@layerfi/components/components/Onboarding/index';
3471
3655
  export { LinkedAccounts } from '@layerfi/components/components/LinkedAccounts/index';
3656
+ export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
3472
3657
  export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
3473
- export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
3658
+ export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
3474
3659
  export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
3475
3660
  export { Journal } from '@layerfi/components/components/Journal/index';
3476
- export { Onboarding } from '@layerfi/components/components/Onboarding/index';
3477
3661
  export { Tasks } from '@layerfi/components/components/Tasks/index';
3478
3662
  export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
3479
3663
  export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
3480
- export { Reports } from '@layerfi/components/views/Reports/index';
3481
3664
  export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/index';
3665
+ export { Reports } from '@layerfi/components/views/Reports/index';
3666
+ export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
3482
3667
  export { useLayerContext } from '@layerfi/components/contexts/LayerContext/index';
3483
3668
  export { useBankTransactionsContext } from '@layerfi/components/contexts/BankTransactionsContext/index';
3484
3669
 
@@ -3590,14 +3775,15 @@ declare module '@layerfi/components/types/balance_sheet' {
3590
3775
  type: 'Balance_Sheet';
3591
3776
  start_date: string;
3592
3777
  end_date: string;
3593
- assets: LineItem[];
3594
- liabilities_and_equity: LineItem[];
3778
+ assets: LineItem;
3779
+ liabilities_and_equity: LineItem;
3595
3780
  fully_categorized: boolean;
3596
3781
  }
3597
3782
 
3598
3783
  }
3599
3784
  declare module '@layerfi/components/types/bank_transactions' {
3600
3785
  import { Categorization, CategorizationStatus, Category } from '@layerfi/components/types/categories';
3786
+ import { S3PresignedUrl } from "@layerfi/components/types/general";
3601
3787
  export enum Direction {
3602
3788
  CREDIT = "CREDIT",
3603
3789
  DEBIT = "DEBIT"
@@ -3652,6 +3838,20 @@ declare module '@layerfi/components/types/bank_transactions' {
3652
3838
  type: string;
3653
3839
  };
3654
3840
  }
3841
+ export interface BankTransactionMetadata {
3842
+ memo: string | null;
3843
+ }
3844
+ export interface DocumentS3Urls {
3845
+ type: 'Document_S3_Urls';
3846
+ documentUrls: S3PresignedUrl[];
3847
+ }
3848
+ export interface FileMetadata {
3849
+ type: 'File_Metadata';
3850
+ id: string | null;
3851
+ fileType: string;
3852
+ fileName: string;
3853
+ documentType: string;
3854
+ }
3655
3855
 
3656
3856
  }
3657
3857
  declare module '@layerfi/components/types/business' {
@@ -3716,7 +3916,7 @@ declare module '@layerfi/components/types/categories' {
3716
3916
  suggestions: Category[];
3717
3917
  }
3718
3918
  export type Categorization = AutoCategorization | SuggestedCategorization;
3719
- export type CategoryPayloadObject = {
3919
+ export type AccountIdentifierPayloadObject = {
3720
3920
  type: 'StableName';
3721
3921
  stable_name: string;
3722
3922
  } | {
@@ -3725,12 +3925,12 @@ declare module '@layerfi/components/types/categories' {
3725
3925
  };
3726
3926
  export type SingleCategoryUpdate = {
3727
3927
  type: 'Category';
3728
- category: CategoryPayloadObject;
3928
+ category: AccountIdentifierPayloadObject;
3729
3929
  };
3730
3930
  export type SplitCategoryUpdate = {
3731
3931
  type: 'Split';
3732
3932
  entries: {
3733
- category: string | CategoryPayloadObject;
3933
+ category: string | AccountIdentifierPayloadObject;
3734
3934
  amount: number;
3735
3935
  }[];
3736
3936
  };
@@ -3830,6 +4030,7 @@ declare module '@layerfi/components/types/general' {
3830
4030
  declare module '@layerfi/components/types/journal' {
3831
4031
  import { Account } from '@layerfi/components/types';
3832
4032
  import { Direction } from '@layerfi/components/types/bank_transactions';
4033
+ import { AccountIdentifierPayloadObject } from '@layerfi/components/types/categories';
3833
4034
  import { LedgerEntrySource } from '@layerfi/components/types/ledger_accounts';
3834
4035
  export interface JournalEntry {
3835
4036
  id: string;
@@ -3853,7 +4054,18 @@ declare module '@layerfi/components/types/journal' {
3853
4054
  entry_at: string;
3854
4055
  createdAt: string;
3855
4056
  }
3856
- export type NewJournalEntry = {
4057
+ export type NewApiJournalEntry = {
4058
+ entry_at: string;
4059
+ created_by: string;
4060
+ memo: string;
4061
+ line_items: NewApiJournalEntryLineItem[];
4062
+ };
4063
+ export type NewApiJournalEntryLineItem = {
4064
+ account_identifier: AccountIdentifierPayloadObject;
4065
+ amount: number;
4066
+ direction: Direction;
4067
+ };
4068
+ export type NewFormJournalEntry = {
3857
4069
  entry_at: string;
3858
4070
  created_by: string;
3859
4071
  memo: string;
@@ -4234,13 +4446,13 @@ declare module '@layerfi/components/types' {
4234
4446
  }
4235
4447
  declare module '@layerfi/components/utils/bankTransactions' {
4236
4448
  import { CategoryOption } from '@layerfi/components/components/CategorySelect/CategorySelect';
4237
- import { BankTransaction } from '@layerfi/components/types';
4449
+ import { BankTransaction, DateRange } from '@layerfi/components/types';
4238
4450
  export const hasMatch: (bankTransaction?: BankTransaction) => boolean;
4239
4451
  export const isCredit: ({ direction }: Pick<BankTransaction, 'direction'>) => boolean;
4240
4452
  export const isAlreadyMatched: (bankTransaction?: BankTransaction) => string | undefined;
4241
- export const countTransactionsToReview: ({ transactions, currentMonthOnly, }: {
4453
+ export const countTransactionsToReview: ({ transactions, dateRange }: {
4242
4454
  transactions?: BankTransaction[] | undefined;
4243
- currentMonthOnly?: boolean | undefined;
4455
+ dateRange?: DateRange | undefined;
4244
4456
  }) => number;
4245
4457
  export const getCategorizePayload: (category: CategoryOption) => {
4246
4458
  type: "AccountId";
@@ -4306,6 +4518,12 @@ declare module '@layerfi/components/utils/helpers' {
4306
4518
  */
4307
4519
  export const convertToStableName: (name: string) => string;
4308
4520
 
4521
+ }
4522
+ declare module '@layerfi/components/utils/journal' {
4523
+ import { AccountIdentifierPayloadObject } from '@layerfi/components/types/categories';
4524
+ import { JournalEntryLineItem } from '@layerfi/components/types/journal';
4525
+ export const getAccountIdentifierPayload: (journalLineItem: JournalEntryLineItem) => AccountIdentifierPayloadObject;
4526
+
4309
4527
  }
4310
4528
  declare module '@layerfi/components/utils/profitAndLossUtils' {
4311
4529
  import { SidebarScope } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
@@ -4338,11 +4556,13 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
4338
4556
  title?: string;
4339
4557
  elevatedLinkedAccounts?: boolean;
4340
4558
  showLedgerBalance?: boolean;
4559
+ showUnlinkItem?: boolean;
4560
+ showBreakConnection?: boolean;
4341
4561
  showDescriptions?: boolean;
4342
4562
  showReceiptUploads?: boolean;
4343
4563
  mobileComponent?: MobileComponentType;
4344
4564
  }
4345
- export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showDescriptions, showReceiptUploads, mobileComponent, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
4565
+ export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, showDescriptions, showReceiptUploads, mobileComponent, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
4346
4566
 
4347
4567
  }
4348
4568
  declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index' {
@@ -4366,10 +4586,13 @@ declare module '@layerfi/components/views/Reports/Reports' {
4366
4586
  export interface ReportsProps {
4367
4587
  title?: string;
4368
4588
  }
4589
+ type ReportType = 'profitAndLoss' | 'balanceSheet';
4369
4590
  export interface ReportsPanelProps {
4370
4591
  containerRef: RefObject<HTMLDivElement>;
4592
+ openReport: ReportType;
4371
4593
  }
4372
4594
  export const Reports: ({ title }: ReportsProps) => React.JSX.Element;
4595
+ export {};
4373
4596
 
4374
4597
  }
4375
4598
  declare module '@layerfi/components/views/Reports/index' {