@layerfi/components 0.1.67 → 0.1.69

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
@@ -51,7 +51,8 @@ declare module '@layerfi/components/api/layer/balance_sheet' {
51
51
  }
52
52
  declare module '@layerfi/components/api/layer/bankTransactions' {
53
53
  import { CategoryUpdate, BankTransaction, Metadata } from '@layerfi/components/types';
54
- import { BankTransactionMatch, BankTransactionMatchType, BankTransactionMetadata, DocumentS3Urls, FileMetadata } from '@layerfi/components/types/bank_transactions';
54
+ import { BankTransactionMatch, BankTransactionMatchType, BankTransactionMetadata, DocumentS3Urls } from '@layerfi/components/types/bank_transactions';
55
+ import { FileMetadata } from '@layerfi/components/types/file_upload';
55
56
  import { S3PresignedUrl } from '@layerfi/components/types/general';
56
57
  export type GetBankTransactionsReturn = {
57
58
  data?: BankTransaction[];
@@ -65,6 +66,7 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
65
66
  direction?: 'INFLOW' | 'OUTFLOW';
66
67
  startDate?: string;
67
68
  endDate?: string;
69
+ tagFilterString?: string;
68
70
  sortOrder?: 'ASC' | 'DESC';
69
71
  sortBy?: string;
70
72
  }
@@ -124,6 +126,19 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
124
126
  data: DocumentS3Urls;
125
127
  errors: unknown;
126
128
  }>;
129
+ export const getBankTransactionDocument: (baseUrl: string, accessToken: string | undefined, options?: {
130
+ params?: Record<string, string | undefined> | undefined;
131
+ } | undefined) => () => Promise<{
132
+ data: S3PresignedUrl;
133
+ errors: unknown;
134
+ }>;
135
+ export const archiveBankTransactionDocument: (baseUrl: string, accessToken: string | undefined, options?: {
136
+ params?: Record<string, string | undefined> | undefined;
137
+ body?: Record<string, unknown> | undefined;
138
+ } | undefined) => Promise<{
139
+ data: {};
140
+ errors: unknown;
141
+ }>;
127
142
  export const uploadBankTransactionDocument: (baseUrl: string, accessToken: string) => ({ businessId, bankTransactionId, file, documentType, }: {
128
143
  businessId: string;
129
144
  bankTransactionId: string;
@@ -406,6 +421,7 @@ declare module '@layerfi/components/api/layer/statement-of-cash-flow' {
406
421
 
407
422
  }
408
423
  declare module '@layerfi/components/api/layer/tasks' {
424
+ import { FileMetadata } from '@layerfi/components/types/file_upload';
409
425
  import { TaskTypes } from '@layerfi/components/types/tasks';
410
426
  export const getTasks: (baseUrl: string, accessToken: string | undefined, options?: {
411
427
  params?: Record<string, string | undefined> | undefined;
@@ -424,6 +440,14 @@ declare module '@layerfi/components/api/layer/tasks' {
424
440
  } | undefined) => Promise<{
425
441
  data: TaskTypes;
426
442
  }>;
443
+ export const completeTaskWithUpload: (baseUrl: string, accessToken: string) => ({ businessId, taskId, file, }: {
444
+ businessId: string;
445
+ taskId: string;
446
+ file: File;
447
+ }) => Promise<{
448
+ data: FileMetadata;
449
+ errors: unknown;
450
+ }>;
427
451
 
428
452
  }
429
453
  declare module '@layerfi/components/api/layer' {
@@ -492,6 +516,19 @@ declare module '@layerfi/components/api/layer' {
492
516
  data: import("@layerfi/components/types/bank_transactions").DocumentS3Urls;
493
517
  errors: unknown;
494
518
  }>;
519
+ getBankTransactionDocument: (baseUrl: string, accessToken: string | undefined, options?: {
520
+ params?: Record<string, string | undefined> | undefined;
521
+ } | undefined) => () => Promise<{
522
+ data: import("@layerfi/components/types/general").S3PresignedUrl;
523
+ errors: unknown;
524
+ }>;
525
+ archiveBankTransactionDocument: (baseUrl: string, accessToken: string | undefined, options?: {
526
+ params?: Record<string, string | undefined> | undefined;
527
+ body?: Record<string, unknown> | undefined;
528
+ } | undefined) => Promise<{
529
+ data: {};
530
+ errors: unknown;
531
+ }>;
495
532
  updateBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
496
533
  params?: Record<string, string | undefined> | undefined;
497
534
  body?: {
@@ -507,7 +544,7 @@ declare module '@layerfi/components/api/layer' {
507
544
  file: File;
508
545
  documentType: string;
509
546
  }) => Promise<{
510
- data: import("@layerfi/components/types/bank_transactions").FileMetadata;
547
+ data: import("@layerfi/components/types/file_upload").FileMetadata;
511
548
  errors: unknown;
512
549
  }>;
513
550
  getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
@@ -649,6 +686,14 @@ declare module '@layerfi/components/api/layer' {
649
686
  } | undefined) => () => Promise<{
650
687
  data: import("@layerfi/components/types/tasks").TaskTypes[];
651
688
  }>;
689
+ completeTaskWithUpload: (baseUrl: string, accessToken: string) => ({ businessId, taskId, file, }: {
690
+ businessId: string;
691
+ taskId: string;
692
+ file: File;
693
+ }) => Promise<{
694
+ data: import("@layerfi/components/types/file_upload").FileMetadata;
695
+ errors: unknown;
696
+ }>;
652
697
  submitResponseToTask: (baseUrl: string, accessToken: string | undefined, options?: {
653
698
  params?: Record<string, string | undefined> | undefined;
654
699
  body?: Record<string, unknown> | undefined;
@@ -1249,7 +1294,7 @@ declare module '@layerfi/components/components/BankTransactions/utils' {
1249
1294
  }
1250
1295
  declare module '@layerfi/components/components/BankTransactionsLoader/BankTransactionsLoader' {
1251
1296
  import React from 'react';
1252
- export const BankTransactionsLoader: ({ isLoading, showTooltips }: {
1297
+ export const BankTransactionsLoader: ({ isLoading, showTooltips, }: {
1253
1298
  isLoading: boolean;
1254
1299
  showTooltips: boolean;
1255
1300
  }) => React.JSX.Element;
@@ -1379,8 +1424,13 @@ declare module '@layerfi/components/components/Button/IconButton' {
1379
1424
  icon: ReactNode;
1380
1425
  active?: boolean;
1381
1426
  withBorder?: boolean;
1427
+ href?: HTMLAnchorElement['href'];
1428
+ target?: HTMLAnchorElement['target'];
1429
+ rel?: HTMLAnchorElement['rel'];
1430
+ download?: HTMLAnchorElement['download'];
1431
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void;
1382
1432
  }
1383
- export const IconButton: ({ className, children, icon, active, withBorder, ...props }: IconButtonProps) => React.JSX.Element;
1433
+ export const IconButton: ({ className, children, icon, active, withBorder, href, target, rel, download, ...props }: IconButtonProps) => React.JSX.Element;
1384
1434
 
1385
1435
  }
1386
1436
  declare module '@layerfi/components/components/Button/Link' {
@@ -1901,6 +1951,15 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/Expand
1901
1951
  export type SaveHandle = {
1902
1952
  save: () => void;
1903
1953
  };
1954
+ export interface DocumentWithStatus {
1955
+ id?: string;
1956
+ url?: string;
1957
+ status: 'pending' | 'uploaded' | 'failed' | 'deleting';
1958
+ type?: string;
1959
+ name?: string;
1960
+ date?: string;
1961
+ error?: string;
1962
+ }
1904
1963
  export const ExpandedBankTransactionRow: React.ForwardRefExoticComponent<Props & React.RefAttributes<SaveHandle>>;
1905
1964
  export {};
1906
1965
 
@@ -1908,6 +1967,28 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/Expand
1908
1967
  declare module '@layerfi/components/components/ExpandedBankTransactionRow/index' {
1909
1968
  export { ExpandedBankTransactionRow } from '@layerfi/components/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow';
1910
1969
 
1970
+ }
1971
+ declare module '@layerfi/components/components/FileThumb/FileThumb' {
1972
+ import React from 'react';
1973
+ export interface FileThumbProps {
1974
+ url?: string;
1975
+ type?: string;
1976
+ uploadPending?: boolean;
1977
+ deletePending?: boolean;
1978
+ name?: string;
1979
+ date?: string;
1980
+ onDelete?: () => void;
1981
+ enableOpen?: boolean;
1982
+ onOpen?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
1983
+ enableDownload?: boolean;
1984
+ error?: string;
1985
+ }
1986
+ export const FileThumb: ({ url, type, uploadPending, deletePending, name, date, onDelete, enableOpen, onOpen, enableDownload, error, }: FileThumbProps) => React.JSX.Element;
1987
+
1988
+ }
1989
+ declare module '@layerfi/components/components/FileThumb/index' {
1990
+ export { FileThumb } from '@layerfi/components/components/FileThumb/FileThumb';
1991
+
1911
1992
  }
1912
1993
  declare module '@layerfi/components/components/GlobalWidgets/GlobalWidgets' {
1913
1994
  import React from 'react';
@@ -1993,8 +2074,10 @@ declare module '@layerfi/components/components/Input/FileInput' {
1993
2074
  export interface FileInputProps {
1994
2075
  text?: string;
1995
2076
  onUpload?: (file: File) => void;
2077
+ disabled?: boolean;
2078
+ secondary?: boolean;
1996
2079
  }
1997
- export const FileInput: ({ text, onUpload }: FileInputProps) => React.JSX.Element;
2080
+ export const FileInput: ({ text, onUpload, disabled, secondary, }: FileInputProps) => React.JSX.Element;
1998
2081
 
1999
2082
  }
2000
2083
  declare module '@layerfi/components/components/Input/Input' {
@@ -2533,7 +2616,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2533
2616
  };
2534
2617
  const ProfitAndLoss: {
2535
2618
  ({ children, tagFilter, reportingBasis, asContainer, }: Props): React.JSX.Element;
2536
- Chart: ({ forceRerenderOnDataChange, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => React.JSX.Element;
2619
+ Chart: ({ forceRerenderOnDataChange, tagFilter, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => React.JSX.Element;
2537
2620
  Context: React.Context<{
2538
2621
  data: import("@layerfi/components/types").ProfitAndLoss | undefined;
2539
2622
  filteredDataRevenue: import("@layerfi/components/types/line_item").LineBaseItem[];
@@ -2570,14 +2653,14 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2570
2653
  }>;
2571
2654
  }>;
2572
2655
  DatePicker: ({ datePickerMode, }: import("@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker").ProfitAndLossDatePickerProps) => React.JSX.Element;
2573
- CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2656
+ CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/index").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2574
2657
  Summaries: ({ vertical, actionable, revenueLabel, stringOverrides, }: {
2575
2658
  vertical?: boolean | undefined;
2576
2659
  actionable?: boolean | undefined;
2577
2660
  revenueLabel?: string | undefined;
2578
2661
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides | undefined;
2579
2662
  }) => React.JSX.Element;
2580
- Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").ProfilAndLostTableProps) => React.JSX.Element;
2663
+ Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").ProfitAndLossTableProps) => React.JSX.Element;
2581
2664
  DetailedCharts: ({ scope, hideClose, showDatePicker, chartColorsList, stringOverrides, }: {
2582
2665
  scope?: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope;
2583
2666
  hideClose?: boolean | undefined;
@@ -2621,8 +2704,12 @@ declare module '@layerfi/components/components/ProfitAndLossChart/ProfitAndLossC
2621
2704
  import React from 'react';
2622
2705
  export interface Props {
2623
2706
  forceRerenderOnDataChange?: boolean;
2707
+ tagFilter?: {
2708
+ key: string;
2709
+ values: string[];
2710
+ };
2624
2711
  }
2625
- export const ProfitAndLossChart: ({ forceRerenderOnDataChange, }: Props) => React.JSX.Element;
2712
+ export const ProfitAndLossChart: ({ forceRerenderOnDataChange, tagFilter, }: Props) => React.JSX.Element;
2626
2713
 
2627
2714
  }
2628
2715
  declare module '@layerfi/components/components/ProfitAndLossChart/index' {
@@ -2647,11 +2734,12 @@ declare module '@layerfi/components/components/ProfitAndLossCompareOptions/Profi
2647
2734
  tagKey: string;
2648
2735
  tagValues: string[];
2649
2736
  } | 'None';
2737
+ export const tagFilterToQueryString: (tagFilter: TagFilterInput) => string;
2650
2738
  export const ProfitAndLossCompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2651
2739
 
2652
2740
  }
2653
2741
  declare module '@layerfi/components/components/ProfitAndLossCompareOptions/index' {
2654
- export { ProfitAndLossCompareOptions } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
2742
+ export { ProfitAndLossCompareOptions, ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
2655
2743
 
2656
2744
  }
2657
2745
  declare module '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker' {
@@ -2790,7 +2878,7 @@ declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLoss
2790
2878
  import { View as ViewType } from '@layerfi/components/types/general';
2791
2879
  import { ReportsStringOverrides } from '@layerfi/components/views/Reports/Reports';
2792
2880
  import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
2793
- import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
2881
+ import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/index';
2794
2882
  type ViewBreakpoint = ViewType | undefined;
2795
2883
  export interface ProfitAndLossReportProps {
2796
2884
  stringOverrides?: ReportsStringOverrides;
@@ -2855,18 +2943,18 @@ declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossT
2855
2943
  profitBeforeTaxesLabel?: string;
2856
2944
  netProfitLabel?: string;
2857
2945
  }
2858
- export type ProfilAndLostTableProps = {
2946
+ export type ProfitAndLossTableProps = {
2859
2947
  lockExpanded?: boolean;
2860
2948
  asContainer?: boolean;
2861
2949
  stringOverrides?: ProfitAndLossTableStringOverrides;
2862
2950
  };
2863
- export const ProfitAndLossTableComponent: ({ asContainer, stringOverrides, }: ProfilAndLostTableProps) => React.JSX.Element;
2951
+ export const ProfitAndLossTableComponent: ({ asContainer, stringOverrides, }: ProfitAndLossTableProps) => React.JSX.Element;
2864
2952
 
2865
2953
  }
2866
2954
  declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableWithProvider' {
2867
2955
  import React from 'react';
2868
- import { ProfilAndLostTableProps } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent';
2869
- export const ProfitAndLossTableWithProvider: (props: ProfilAndLostTableProps) => React.JSX.Element;
2956
+ import { ProfitAndLossTableProps } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent';
2957
+ export const ProfitAndLossTableWithProvider: (props: ProfitAndLossTableProps) => React.JSX.Element;
2870
2958
 
2871
2959
  }
2872
2960
  declare module '@layerfi/components/components/ProfitAndLossTable/empty_profit_and_loss_report' {
@@ -3120,6 +3208,7 @@ declare module '@layerfi/components/components/Tasks/Tasks' {
3120
3208
  error?: unknown;
3121
3209
  refetch: () => void;
3122
3210
  submitResponseToTask: (taskId: string, userResponse: string) => void;
3211
+ uploadDocumentForTask: (taskId: string, file: File) => void;
3123
3212
  }>;
3124
3213
  export const useTasksContext: () => {
3125
3214
  data?: import("@layerfi/components/types/tasks").TaskTypes[] | undefined;
@@ -3129,6 +3218,7 @@ declare module '@layerfi/components/components/Tasks/Tasks' {
3129
3218
  error?: unknown;
3130
3219
  refetch: () => void;
3131
3220
  submitResponseToTask: (taskId: string, userResponse: string) => void;
3221
+ uploadDocumentForTask: (taskId: string, file: File) => void;
3132
3222
  };
3133
3223
  export interface TasksStringOverrides {
3134
3224
  header?: string;
@@ -3310,13 +3400,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3310
3400
  floating: HTMLElement | null;
3311
3401
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
3312
3402
  context: {
3313
- update: () => void;
3403
+ placement: import("@floating-ui/utils").Placement;
3314
3404
  x: number;
3315
3405
  y: number;
3316
- placement: import("@floating-ui/utils").Placement;
3317
3406
  strategy: import("@floating-ui/utils").Strategy;
3318
3407
  middlewareData: import("@floating-ui/core").MiddlewareData;
3319
3408
  isPositioned: boolean;
3409
+ update: () => void;
3320
3410
  floatingStyles: React.CSSProperties;
3321
3411
  open: boolean;
3322
3412
  onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
@@ -3359,13 +3449,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3359
3449
  floating: HTMLElement | null;
3360
3450
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
3361
3451
  context: {
3362
- update: () => void;
3452
+ placement: import("@floating-ui/utils").Placement;
3363
3453
  x: number;
3364
3454
  y: number;
3365
- placement: import("@floating-ui/utils").Placement;
3366
3455
  strategy: import("@floating-ui/utils").Strategy;
3367
3456
  middlewareData: import("@floating-ui/core").MiddlewareData;
3368
3457
  isPositioned: boolean;
3458
+ update: () => void;
3369
3459
  floatingStyles: React.CSSProperties;
3370
3460
  open: boolean;
3371
3461
  onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
@@ -3395,8 +3485,12 @@ declare module '@layerfi/components/components/TransactionToReviewCard/Transacti
3395
3485
  export interface TransactionToReviewCardProps {
3396
3486
  onClick?: () => void;
3397
3487
  usePnlDateRange?: boolean;
3488
+ tagFilter?: {
3489
+ key: string;
3490
+ values: string[];
3491
+ };
3398
3492
  }
3399
- export const TransactionToReviewCard: ({ onClick, usePnlDateRange, }: TransactionToReviewCardProps) => React.JSX.Element;
3493
+ export const TransactionToReviewCard: ({ onClick, usePnlDateRange, tagFilter, }: TransactionToReviewCardProps) => React.JSX.Element;
3400
3494
 
3401
3495
  }
3402
3496
  declare module '@layerfi/components/components/TransactionToReviewCard/index' {
@@ -3885,6 +3979,7 @@ declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
3885
3979
  error?: unknown;
3886
3980
  refetch: () => void;
3887
3981
  submitResponseToTask: (taskId: string, userResponse: string) => void;
3982
+ uploadDocumentForTask: (taskId: string, file: File) => void;
3888
3983
  }>;
3889
3984
 
3890
3985
  }
@@ -3913,6 +4008,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/index' {
3913
4008
 
3914
4009
  }
3915
4010
  declare module '@layerfi/components/hooks/useBankTransactions/types' {
4011
+ import { TagFilterInput } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
3916
4012
  import { BankTransaction, CategoryUpdate, DateRange, Direction, DisplayState, Metadata } from '@layerfi/components/types';
3917
4013
  import { LoadedStatus } from '@layerfi/components/types/general';
3918
4014
  export interface NumericRangeFilter {
@@ -3929,6 +4025,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/types' {
3929
4025
  direction?: Direction[];
3930
4026
  categorizationStatus?: DisplayState;
3931
4027
  dateRange?: Partial<DateRange>;
4028
+ tagFilter?: TagFilterInput;
3932
4029
  }
3933
4030
  export type UseBankTransactions = (params?: {
3934
4031
  scope?: DisplayState;
@@ -4214,13 +4311,14 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
4214
4311
  import { LineBaseItem } from '@layerfi/components/types/line_item';
4215
4312
  export type Scope = 'expenses' | 'revenue';
4216
4313
  export type SidebarScope = Scope | undefined;
4314
+ export type PnlTagFilter = {
4315
+ key: string;
4316
+ values: string[];
4317
+ };
4217
4318
  type Props = {
4218
4319
  startDate?: Date;
4219
4320
  endDate?: Date;
4220
- tagFilter?: {
4221
- key: string;
4222
- values: string[];
4223
- };
4321
+ tagFilter?: PnlTagFilter;
4224
4322
  reportingBasis?: ReportingBasis;
4225
4323
  };
4226
4324
  type ProfitAndLossFilter = {
@@ -4389,6 +4487,11 @@ declare module '@layerfi/components/hooks/useTableExpandRow/useTableExpandRow' {
4389
4487
  declare module '@layerfi/components/hooks/useTasks/index' {
4390
4488
  export { useTasks } from '@layerfi/components/hooks/useTasks/useTasks';
4391
4489
 
4490
+ }
4491
+ declare module '@layerfi/components/hooks/useTasks/mockData' {
4492
+ import { TaskTypes } from '@layerfi/components/types/tasks';
4493
+ export const mockData: TaskTypes[];
4494
+
4392
4495
  }
4393
4496
  declare module '@layerfi/components/hooks/useTasks/useTasks' {
4394
4497
  import { LoadedStatus } from '@layerfi/components/types/general';
@@ -4401,6 +4504,7 @@ declare module '@layerfi/components/hooks/useTasks/useTasks' {
4401
4504
  error?: unknown;
4402
4505
  refetch: () => void;
4403
4506
  submitResponseToTask: (taskId: string, userResponse: string) => void;
4507
+ uploadDocumentForTask: (taskId: string, file: File) => void;
4404
4508
  };
4405
4509
  export const useTasks: UseTasks;
4406
4510
  export {};
@@ -4548,6 +4652,20 @@ declare module '@layerfi/components/icons/Expand' {
4548
4652
  const Expand: ({ ...props }: IconSvgProps) => React.JSX.Element;
4549
4653
  export default Expand;
4550
4654
 
4655
+ }
4656
+ declare module '@layerfi/components/icons/Eye' {
4657
+ import * as React from 'react';
4658
+ import { IconSvgProps } from '@layerfi/components/icons/types';
4659
+ const Eye: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
4660
+ export default Eye;
4661
+
4662
+ }
4663
+ declare module '@layerfi/components/icons/File' {
4664
+ import * as React from 'react';
4665
+ import { IconSvgProps } from '@layerfi/components/icons/types';
4666
+ const File: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
4667
+ export default File;
4668
+
4551
4669
  }
4552
4670
  declare module '@layerfi/components/icons/Folder' {
4553
4671
  import * as React from 'react';
@@ -4733,6 +4851,7 @@ declare module '@layerfi/components/index' {
4733
4851
  export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
4734
4852
  export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
4735
4853
  export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/index';
4854
+ export { ProjectProfitabilityView } from '@layerfi/components/views/ProjectProfitability/index';
4736
4855
  export { Reports } from '@layerfi/components/views/Reports/index';
4737
4856
  export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
4738
4857
  export { useLayerContext } from '@layerfi/components/contexts/LayerContext/index';
@@ -4927,6 +5046,8 @@ declare module '@layerfi/components/types/bank_transactions' {
4927
5046
  processing?: boolean;
4928
5047
  suggested_matches?: SuggestedMatch[];
4929
5048
  match?: BankTransactionMatch;
5049
+ document_ids: String[];
5050
+ metadata: BankTransactionMetadata;
4930
5051
  }
4931
5052
  export interface SuggestedMatch {
4932
5053
  id: string;
@@ -4958,13 +5079,6 @@ declare module '@layerfi/components/types/bank_transactions' {
4958
5079
  type: 'Document_S3_Urls';
4959
5080
  documentUrls: S3PresignedUrl[];
4960
5081
  }
4961
- export interface FileMetadata {
4962
- type: 'File_Metadata';
4963
- id: string | null;
4964
- fileType: string;
4965
- fileName: string;
4966
- documentType: string;
4967
- }
4968
5082
 
4969
5083
  }
4970
5084
  declare module '@layerfi/components/types/business' {
@@ -5129,6 +5243,17 @@ declare module '@layerfi/components/types/chart_of_accounts' {
5129
5243
  account_subtype?: string;
5130
5244
  };
5131
5245
 
5246
+ }
5247
+ declare module '@layerfi/components/types/file_upload' {
5248
+ export interface FileMetadata {
5249
+ type: 'File_Metadata';
5250
+ id: string | null;
5251
+ fileType: string;
5252
+ fileName: string;
5253
+ documentType: DocumentType;
5254
+ }
5255
+ export type DocumentType = 'RECEIPT' | 'BANK_STATEMENT' | 'LOAN_STATEMENT' | 'PAYROLL_STATEMENT' | 'PAYOUT_STATEMENT' | 'OTHER';
5256
+
5132
5257
  }
5133
5258
  declare module '@layerfi/components/types/general' {
5134
5259
  export type SortDirection = 'asc' | 'desc';
@@ -5141,6 +5266,8 @@ declare module '@layerfi/components/types/general' {
5141
5266
  type: 'S3_Presigned_Url';
5142
5267
  presignedUrl: string;
5143
5268
  fileType: string;
5269
+ fileName: string;
5270
+ createdAt: string;
5144
5271
  }
5145
5272
  export type LoadedStatus = 'initial' | 'loading' | 'complete';
5146
5273
  export enum DataModel {
@@ -5173,7 +5300,7 @@ declare module '@layerfi/components/types/journal' {
5173
5300
  entry_at: string;
5174
5301
  reversal_of_id: string | null;
5175
5302
  reversal_id: string | null;
5176
- line_items: JournalEntryLineItem[];
5303
+ line_items: JournalEntryLine[];
5177
5304
  source?: LedgerEntrySource;
5178
5305
  }
5179
5306
  export interface JournalEntryLine {
@@ -5434,9 +5561,16 @@ declare module '@layerfi/components/types/ledger_accounts' {
5434
5561
  invoice_number: string;
5435
5562
  amount: number;
5436
5563
  }
5564
+ export interface RefundLedgerEntrySource extends LedgerEntrySource {
5565
+ external_id: string;
5566
+ refund_id: string;
5567
+ refunded_to_customer_amount: number;
5568
+ recipient_name: string;
5569
+ }
5437
5570
  export interface RefundPaymentLedgerEntrySource extends LedgerEntrySource {
5438
5571
  external_id: string;
5439
5572
  refund_id: string;
5573
+ refund_payment_id: string;
5440
5574
  refunded_to_customer_amount: number;
5441
5575
  recipient_name: string;
5442
5576
  }
@@ -5659,6 +5793,7 @@ declare module '@layerfi/components/types/table' {
5659
5793
 
5660
5794
  }
5661
5795
  declare module '@layerfi/components/types/tasks' {
5796
+ import { DocumentType } from '@layerfi/components/types/file_upload';
5662
5797
  export interface TaskTypes {
5663
5798
  id: string;
5664
5799
  question: string;
@@ -5666,16 +5801,17 @@ declare module '@layerfi/components/types/tasks' {
5666
5801
  title: string;
5667
5802
  transaction_id: string | null;
5668
5803
  type: string;
5669
- user_marked_completed_at: string;
5670
- user_response: string;
5804
+ user_marked_completed_at: string | null;
5805
+ user_response: string | null;
5671
5806
  user_response_type: TasksResponseType;
5672
5807
  archived_at: string | null;
5673
- completed_at: string;
5808
+ completed_at: string | null;
5674
5809
  created_at: string;
5675
5810
  updated_at: string;
5811
+ document_type: DocumentType;
5676
5812
  }
5677
5813
  export type TasksStatusType = 'COMPLETED' | 'TODO' | 'USER_MARKED_COMPLETED';
5678
- export type TasksResponseType = 'FREE_RESPONSE';
5814
+ export type TasksResponseType = 'FREE_RESPONSE' | 'UPLOAD_DOCUMENT';
5679
5815
  export function isComplete(taskType: TasksStatusType): boolean;
5680
5816
 
5681
5817
  }
@@ -5820,6 +5956,7 @@ declare module '@layerfi/components/views/AccountingOverview/AccountingOverview'
5820
5956
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
5821
5957
  import { ProfitAndLossSummariesStringOverrides } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
5822
5958
  import { OnboardingStep } from '@layerfi/components/types/layer_context';
5959
+ import { TagOption } from '@layerfi/components/views/ProjectProfitability/ProjectProfitability';
5823
5960
  interface AccountingOverviewStringOverrides {
5824
5961
  header?: string;
5825
5962
  profitAndLoss?: {
@@ -5836,8 +5973,10 @@ declare module '@layerfi/components/views/AccountingOverview/AccountingOverview'
5836
5973
  middleBanner?: ReactNode;
5837
5974
  chartColorsList?: string[];
5838
5975
  stringOverrides?: AccountingOverviewStringOverrides;
5976
+ tagFilter?: TagOption;
5977
+ showTransactionsToReview?: boolean;
5839
5978
  }
5840
- export const AccountingOverview: ({ title, showTitle, enableOnboarding, onboardingStepOverride, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, }: AccountingOverviewProps) => React.JSX.Element;
5979
+ export const AccountingOverview: ({ title, showTitle, enableOnboarding, onboardingStepOverride, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, tagFilter, showTransactionsToReview, }: AccountingOverviewProps) => React.JSX.Element;
5841
5980
  export {};
5842
5981
 
5843
5982
  }
@@ -5927,6 +6066,32 @@ declare module '@layerfi/components/views/GeneralLedger/GeneralLedger' {
5927
6066
  declare module '@layerfi/components/views/GeneralLedger/index' {
5928
6067
  export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/GeneralLedger';
5929
6068
 
6069
+ }
6070
+ declare module '@layerfi/components/views/ProjectProfitability/ProjectProfitability' {
6071
+ import React from 'react';
6072
+ import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
6073
+ import { MoneyFormat } from '@layerfi/components/types';
6074
+ export type TagOption = {
6075
+ label: string;
6076
+ tagKey: string;
6077
+ tagValues: string[];
6078
+ };
6079
+ export interface ProjectsStringOverrides {
6080
+ title?: string;
6081
+ }
6082
+ export interface ProjectProfitabilityProps {
6083
+ valueOptions: TagOption[];
6084
+ showTitle?: boolean;
6085
+ stringOverrides?: ProjectsStringOverrides;
6086
+ datePickerMode?: DateRangeDatePickerModes;
6087
+ csvMoneyFormat?: MoneyFormat;
6088
+ }
6089
+ export const ProjectProfitabilityView: ({ valueOptions, showTitle, stringOverrides, datePickerMode, csvMoneyFormat, }: ProjectProfitabilityProps) => React.JSX.Element;
6090
+
6091
+ }
6092
+ declare module '@layerfi/components/views/ProjectProfitability/index' {
6093
+ export { ProjectProfitabilityView } from '@layerfi/components/views/ProjectProfitability/ProjectProfitability';
6094
+
5930
6095
  }
5931
6096
  declare module '@layerfi/components/views/Reports/Reports' {
5932
6097
  import React, { RefObject } from 'react';