@layerfi/components 0.1.80 → 0.1.82

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
@@ -20,17 +20,24 @@ declare module '@layerfi/components/api/layer/authenticated_http' {
20
20
  }
21
21
  declare module '@layerfi/components/api/layer/balance_sheet' {
22
22
  import { BalanceSheet } from '@layerfi/components/types';
23
- export const getBalanceSheet: (baseUrl: string, accessToken: string | undefined, options?: {
24
- params?: GetBalanceSheetParams | undefined;
25
- } | undefined) => () => Promise<GetBalanceSheetReturn>;
26
- export type GetBalanceSheetReturn = {
23
+ import type { S3PresignedUrl } from '@layerfi/components/types/general';
24
+ type GetBalanceSheetParams = {
25
+ businessId: string;
26
+ effectiveDate: string;
27
+ };
28
+ type GetBalanceSheetReturn = {
27
29
  data?: BalanceSheet;
28
30
  error?: unknown;
29
31
  };
30
- export interface GetBalanceSheetParams extends Record<string, string | undefined> {
31
- businessId: string;
32
- effectiveDate: string;
33
- }
32
+ export const getBalanceSheet: (baseUrl: string, accessToken: string | undefined, options?: {
33
+ params?: GetBalanceSheetParams | undefined;
34
+ } | undefined) => () => Promise<GetBalanceSheetReturn>;
35
+ export const getBalanceSheetCSV: (baseUrl: string, accessToken: string | undefined, options?: {
36
+ params?: GetBalanceSheetParams | undefined;
37
+ } | undefined) => () => Promise<{
38
+ data: S3PresignedUrl;
39
+ }>;
40
+ export {};
34
41
 
35
42
  }
36
43
  declare module '@layerfi/components/api/layer/bankTransactions' {
@@ -414,44 +421,64 @@ declare module '@layerfi/components/api/layer/quickbooks' {
414
421
  }
415
422
  declare module '@layerfi/components/api/layer/statement-of-cash-flow' {
416
423
  import { StatementOfCashFlow } from '@layerfi/components/types';
417
- export const getStatementOfCashFlow: (baseUrl: string, accessToken: string | undefined, options?: {
418
- params?: GetStatementOfCashFlowParams | undefined;
419
- } | undefined) => () => Promise<GetStatementOfCashFlowReturn>;
420
- export type GetStatementOfCashFlowReturn = {
421
- data?: StatementOfCashFlow;
422
- error?: unknown;
423
- };
424
- export interface GetStatementOfCashFlowParams extends Record<string, string | undefined> {
424
+ import type { S3PresignedUrl } from '@layerfi/components/types/general';
425
+ type GetStatementOfCashFlowParams = {
425
426
  businessId: string;
426
427
  startDate: string;
427
428
  endDate: string;
428
- }
429
+ };
430
+ type GetStatementOfCashFlowReturn = {
431
+ data?: StatementOfCashFlow;
432
+ error?: unknown;
433
+ };
434
+ export const getStatementOfCashFlow: (baseUrl: string, accessToken: string | undefined, options?: {
435
+ params?: GetStatementOfCashFlowParams | undefined;
436
+ } | undefined) => () => Promise<GetStatementOfCashFlowReturn>;
437
+ export const getCashflowStatementCSV: (baseUrl: string, accessToken: string | undefined, options?: {
438
+ params?: GetStatementOfCashFlowParams | undefined;
439
+ } | undefined) => () => Promise<{
440
+ data: S3PresignedUrl;
441
+ }>;
442
+ export {};
429
443
 
430
444
  }
431
445
  declare module '@layerfi/components/api/layer/tasks' {
432
446
  import { FileMetadata } from '@layerfi/components/types/file_upload';
433
- import { TaskTypes } from '@layerfi/components/types/tasks';
447
+ import { Task } from '@layerfi/components/types/tasks';
434
448
  export const getTasks: (baseUrl: string, accessToken: string | undefined, options?: {
435
449
  params?: Record<string, string | undefined> | undefined;
436
450
  } | undefined) => () => Promise<{
437
- data: TaskTypes[];
451
+ data: Task[];
438
452
  }>;
439
453
  export const submitResponseToTask: (baseUrl: string, accessToken: string | undefined, options?: {
440
454
  params?: Record<string, string | undefined> | undefined;
441
455
  body?: Record<string, unknown> | undefined;
442
456
  } | undefined) => Promise<{
443
- data: TaskTypes;
457
+ data: Task;
458
+ }>;
459
+ export const updateUploadDocumentTaskDescription: (baseUrl: string, accessToken: string | undefined, options?: {
460
+ params?: Record<string, string | undefined> | undefined;
461
+ body?: Record<string, unknown> | undefined;
462
+ } | undefined) => Promise<{
463
+ data: Task;
444
464
  }>;
445
465
  export const markTaskAsComplete: (baseUrl: string, accessToken: string | undefined, options?: {
446
466
  params?: Record<string, string | undefined> | undefined;
447
467
  body?: Record<string, unknown> | undefined;
448
468
  } | undefined) => Promise<{
449
- data: TaskTypes;
469
+ data: Task;
470
+ }>;
471
+ export const deleteTaskUploads: (baseUrl: string, accessToken: string | undefined, options?: {
472
+ params?: Record<string, string | undefined> | undefined;
473
+ body?: Record<string, unknown> | undefined;
474
+ } | undefined) => Promise<{
475
+ data: Task;
450
476
  }>;
451
- export const completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, file, }: {
477
+ export const completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, files, description, }: {
452
478
  businessId: string;
453
479
  taskId: string;
454
- file: File;
480
+ files: File[];
481
+ description?: string;
455
482
  }) => Promise<{
456
483
  data: FileMetadata;
457
484
  errors: unknown;
@@ -495,8 +522,14 @@ declare module '@layerfi/components/api/layer' {
495
522
  data: import("@layerfi/components/types").Account;
496
523
  }>;
497
524
  getBalanceSheet: (baseUrl: string, accessToken: string | undefined, options?: {
498
- params?: import("@layerfi/components/api/layer/balance_sheet").GetBalanceSheetParams | undefined;
499
- } | undefined) => () => Promise<import("@layerfi/components/api/layer/balance_sheet").GetBalanceSheetReturn>;
525
+ params?: {
526
+ businessId: string;
527
+ effectiveDate: string;
528
+ } | undefined;
529
+ } | undefined) => () => Promise<{
530
+ data?: import("@layerfi/components/types").BalanceSheet;
531
+ error?: unknown;
532
+ }>;
500
533
  getBankTransactions: (baseUrl: string, accessToken: string | undefined, options?: {
501
534
  params?: import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsParams | undefined;
502
535
  } | undefined) => () => Promise<import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsReturn>;
@@ -710,12 +743,13 @@ declare module '@layerfi/components/api/layer' {
710
743
  getTasks: (baseUrl: string, accessToken: string | undefined, options?: {
711
744
  params?: Record<string, string | undefined> | undefined;
712
745
  } | undefined) => () => Promise<{
713
- data: import("@layerfi/components/types/tasks").TaskTypes[];
746
+ data: import("@layerfi/components/types/tasks").Task[];
714
747
  }>;
715
- completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, file, }: {
748
+ completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, files, description, }: {
716
749
  businessId: string;
717
750
  taskId: string;
718
- file: File;
751
+ files: File[];
752
+ description?: string;
719
753
  }) => Promise<{
720
754
  data: import("@layerfi/components/types/file_upload").FileMetadata;
721
755
  errors: unknown;
@@ -724,7 +758,19 @@ declare module '@layerfi/components/api/layer' {
724
758
  params?: Record<string, string | undefined> | undefined;
725
759
  body?: Record<string, unknown> | undefined;
726
760
  } | undefined) => Promise<{
727
- data: import("@layerfi/components/types/tasks").TaskTypes;
761
+ data: import("@layerfi/components/types/tasks").Task;
762
+ }>;
763
+ deleteTaskUploads: (baseUrl: string, accessToken: string | undefined, options?: {
764
+ params?: Record<string, string | undefined> | undefined;
765
+ body?: Record<string, unknown> | undefined;
766
+ } | undefined) => Promise<{
767
+ data: import("@layerfi/components/types/tasks").Task;
768
+ }>;
769
+ updateUploadDocumentTaskDescription: (baseUrl: string, accessToken: string | undefined, options?: {
770
+ params?: Record<string, string | undefined> | undefined;
771
+ body?: Record<string, unknown> | undefined;
772
+ } | undefined) => Promise<{
773
+ data: import("@layerfi/components/types/tasks").Task;
728
774
  }>;
729
775
  breakPlaidItemConnection: (baseUrl: string, accessToken: string | undefined, options?: {
730
776
  params?: {
@@ -746,8 +792,15 @@ declare module '@layerfi/components/api/layer' {
746
792
  body?: Record<string, unknown> | undefined;
747
793
  } | undefined) => Promise<Record<string, unknown>>;
748
794
  getStatementOfCashFlow: (baseUrl: string, accessToken: string | undefined, options?: {
749
- params?: import("@layerfi/components/api/layer/statement-of-cash-flow").GetStatementOfCashFlowParams | undefined;
750
- } | undefined) => () => Promise<import("@layerfi/components/api/layer/statement-of-cash-flow").GetStatementOfCashFlowReturn>;
795
+ params?: {
796
+ businessId: string;
797
+ startDate: string;
798
+ endDate: string;
799
+ } | undefined;
800
+ } | undefined) => () => Promise<{
801
+ data?: import("@layerfi/components/types").StatementOfCashFlow;
802
+ error?: unknown;
803
+ }>;
751
804
  syncFromQuickbooks: (baseUrl: string, accessToken: string | undefined, options?: {
752
805
  params?: {
753
806
  businessId: string;
@@ -902,6 +955,33 @@ declare module '@layerfi/components/components/BalanceSheet/constants' {
902
955
  lineItem: string;
903
956
  }[];
904
957
 
958
+ }
959
+ declare module '@layerfi/components/components/BalanceSheet/download/BalanceSheetDownloadButton' {
960
+ import React from 'react';
961
+ type BalanceSheetDownloadButtonProps = {
962
+ effectiveDate: Date;
963
+ iconOnly?: boolean;
964
+ };
965
+ export function BalanceSheetDownloadButton({ effectiveDate, iconOnly, }: BalanceSheetDownloadButtonProps): React.JSX.Element;
966
+ export {};
967
+
968
+ }
969
+ declare module '@layerfi/components/components/BalanceSheet/download/useBalanceSheetDownload' {
970
+ import type { S3PresignedUrl } from '@layerfi/components/types/general';
971
+ import type { Awaitable } from '@layerfi/components/types/utility/promises';
972
+ type UseBalanceSheetOptions = {
973
+ effectiveDate: Date;
974
+ onSuccess?: (url: S3PresignedUrl) => Awaitable<unknown>;
975
+ };
976
+ export function useBalanceSheetDownload({ effectiveDate, onSuccess, }: UseBalanceSheetOptions): import("swr/mutation").SWRMutationResponse<unknown, any, () => {
977
+ accessToken: string;
978
+ apiUrl: string;
979
+ businessId: string;
980
+ effectiveDate: Date;
981
+ tags: string[];
982
+ } | undefined, never>;
983
+ export {};
984
+
905
985
  }
906
986
  declare module '@layerfi/components/components/BalanceSheet/index' {
907
987
  export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
@@ -1018,11 +1098,12 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
1018
1098
  purpose: Purpose;
1019
1099
  bankTransaction: BankTransaction;
1020
1100
  showTooltips: boolean;
1101
+ showCategorization?: boolean;
1021
1102
  showReceiptUploads?: boolean;
1022
1103
  showDescriptions?: boolean;
1023
1104
  isOpen?: boolean;
1024
1105
  }
1025
- export const BankTransactionMobileForms: ({ purpose, bankTransaction, showTooltips, showReceiptUploads, showDescriptions, isOpen, }: BankTransactionMobileFormsProps) => React.JSX.Element;
1106
+ export const BankTransactionMobileForms: ({ purpose, bankTransaction, showTooltips, showCategorization, showReceiptUploads, showDescriptions, isOpen, }: BankTransactionMobileFormsProps) => React.JSX.Element;
1026
1107
  export {};
1027
1108
 
1028
1109
  }
@@ -1084,10 +1165,11 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Busines
1084
1165
  interface BusinessFormProps {
1085
1166
  bankTransaction: BankTransaction;
1086
1167
  showTooltips: boolean;
1168
+ showCategorization?: boolean;
1087
1169
  showReceiptUploads?: boolean;
1088
1170
  showDescriptions?: boolean;
1089
1171
  }
1090
- export const BusinessForm: ({ bankTransaction, showTooltips, showReceiptUploads, showDescriptions, }: BusinessFormProps) => React.JSX.Element;
1172
+ export const BusinessForm: ({ bankTransaction, showTooltips, showCategorization, showReceiptUploads, showDescriptions, }: BusinessFormProps) => React.JSX.Element;
1091
1173
  export {};
1092
1174
 
1093
1175
  }
@@ -1119,6 +1201,7 @@ declare module '@layerfi/components/components/BankTransactionMobileList/SplitAn
1119
1201
  interface SplitAndMatchFormProps {
1120
1202
  bankTransaction: BankTransaction;
1121
1203
  showTooltips: boolean;
1204
+ showCategorization?: boolean;
1122
1205
  showReceiptUploads?: boolean;
1123
1206
  showDescriptions?: boolean;
1124
1207
  }
@@ -1129,9 +1212,10 @@ declare module '@layerfi/components/components/BankTransactionMobileList/SplitAn
1129
1212
  declare module '@layerfi/components/components/BankTransactionMobileList/SplitForm' {
1130
1213
  import React from 'react';
1131
1214
  import { BankTransaction } from '@layerfi/components/types';
1132
- export const SplitForm: ({ bankTransaction, showTooltips, showReceiptUploads, showDescriptions, }: {
1215
+ export const SplitForm: ({ bankTransaction, showTooltips, showCategorization, showReceiptUploads, showDescriptions, }: {
1133
1216
  bankTransaction: BankTransaction;
1134
1217
  showTooltips: boolean;
1218
+ showCategorization?: boolean;
1135
1219
  showReceiptUploads?: boolean;
1136
1220
  showDescriptions?: boolean;
1137
1221
  }) => React.JSX.Element;
@@ -1910,10 +1994,12 @@ declare module '@layerfi/components/components/DatePicker/DatePicker' {
1910
1994
  import React, { type FC } from 'react';
1911
1995
  import { CustomDateRange } from '@layerfi/components/components/DatePicker/DatePickerOptions';
1912
1996
  import type { DatePickerMode, DatePickerModeSelectorProps } from '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector';
1997
+ type NavigationArrows = 'desktop' | 'mobile';
1913
1998
  interface DatePickerProps {
1914
1999
  mode: DatePickerMode;
1915
2000
  selected: Date | [Date | null, Date | null];
1916
2001
  onChange: (date: Date | [Date, Date | null]) => void;
2002
+ disabled?: boolean;
1917
2003
  allowedModes?: ReadonlyArray<DatePickerMode>;
1918
2004
  dateFormat?: string;
1919
2005
  timeIntervals?: number;
@@ -1926,13 +2012,13 @@ declare module '@layerfi/components/components/DatePicker/DatePicker' {
1926
2012
  currentDateOption?: boolean;
1927
2013
  minDate?: Date;
1928
2014
  maxDate?: Date;
1929
- navigateArrows?: boolean;
2015
+ navigateArrows?: NavigationArrows[];
1930
2016
  onChangeMode?: (mode: DatePickerMode) => void;
1931
2017
  slots?: {
1932
2018
  ModeSelector: FC<DatePickerModeSelectorProps>;
1933
2019
  };
1934
2020
  }
1935
- export const DatePicker: ({ selected, onChange, mode, allowedModes, dateFormat, timeIntervals, timeCaption, placeholderText: _placeholderText, customDateRanges, wrapperClassName, calendarClassName, popperClassName, minDate, maxDate, currentDateOption, navigateArrows, onChangeMode, slots, ...props }: DatePickerProps) => React.JSX.Element;
2021
+ export const DatePicker: ({ selected, onChange, disabled, mode, allowedModes, dateFormat, timeIntervals, timeCaption, placeholderText: _placeholderText, customDateRanges, wrapperClassName, calendarClassName, popperClassName, minDate, maxDate, currentDateOption, navigateArrows, onChangeMode, slots, ...props }: DatePickerProps) => React.JSX.Element;
1936
2022
  export {};
1937
2023
 
1938
2024
  }
@@ -1952,7 +2038,7 @@ declare module '@layerfi/components/components/DatePicker/DatePickerOptions' {
1952
2038
  declare module '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector' {
1953
2039
  import React from 'react';
1954
2040
  export type SingularPickerMode = 'dayPicker' | 'timePicker';
1955
- export type RangePickerMode = 'dayRangePicker' | 'monthRangePicker' | 'monthPicker';
2041
+ export type RangePickerMode = 'dayRangePicker' | 'monthRangePicker' | 'monthPicker' | 'yearPicker';
1956
2042
  export type DatePickerMode = SingularPickerMode | RangePickerMode;
1957
2043
  export const DEFAULT_ALLOWED_PICKER_MODES: readonly ["monthPicker"];
1958
2044
  export type DatePickerModeSelectorProps = {
@@ -2211,13 +2297,14 @@ declare module '@layerfi/components/components/Input/FileInput' {
2211
2297
  import React from 'react';
2212
2298
  export interface FileInputProps {
2213
2299
  text?: string;
2214
- onUpload?: (file: File) => void;
2300
+ onUpload?: (files: File[]) => void;
2215
2301
  disabled?: boolean;
2216
2302
  secondary?: boolean;
2217
2303
  iconOnly?: boolean;
2218
2304
  icon?: React.ReactNode;
2305
+ allowMultipleUploads?: boolean;
2219
2306
  }
2220
- export const FileInput: ({ text, onUpload, disabled, secondary, iconOnly, icon, }: FileInputProps) => React.JSX.Element;
2307
+ export const FileInput: ({ text, onUpload, disabled, secondary, iconOnly, icon, allowMultipleUploads, }: FileInputProps) => React.JSX.Element;
2221
2308
 
2222
2309
  }
2223
2310
  declare module '@layerfi/components/components/Input/Input' {
@@ -3309,6 +3396,36 @@ declare module '@layerfi/components/components/StatementOfCashFlow/constants' {
3309
3396
  }[];
3310
3397
  export const ADJUSTMENTS_ROW_NAME = "Adjustments to Net Income";
3311
3398
 
3399
+ }
3400
+ declare module '@layerfi/components/components/StatementOfCashFlow/download/CashflowStatementDownloadButton' {
3401
+ import React from 'react';
3402
+ type CashflowStatementDownloadButtonProps = {
3403
+ startDate: Date;
3404
+ endDate: Date;
3405
+ iconOnly?: boolean;
3406
+ };
3407
+ export function CashflowStatementDownloadButton({ startDate, endDate, iconOnly, }: CashflowStatementDownloadButtonProps): React.JSX.Element;
3408
+ export {};
3409
+
3410
+ }
3411
+ declare module '@layerfi/components/components/StatementOfCashFlow/download/useCashflowStatementDownload' {
3412
+ import type { S3PresignedUrl } from '@layerfi/components/types/general';
3413
+ import type { Awaitable } from '@layerfi/components/types/utility/promises';
3414
+ type UseCashflowStatementDownloadOptions = {
3415
+ startDate: Date;
3416
+ endDate: Date;
3417
+ onSuccess?: (url: S3PresignedUrl) => Awaitable<unknown>;
3418
+ };
3419
+ export function useCashflowStatementDownload({ startDate, endDate, onSuccess, }: UseCashflowStatementDownloadOptions): import("swr/mutation").SWRMutationResponse<unknown, any, () => {
3420
+ accessToken: string;
3421
+ apiUrl: string;
3422
+ businessId: string;
3423
+ startDate: Date;
3424
+ endDate: Date;
3425
+ tags: string[];
3426
+ } | undefined, never>;
3427
+ export {};
3428
+
3312
3429
  }
3313
3430
  declare module '@layerfi/components/components/StatementOfCashFlow/index' {
3314
3431
  export { StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
@@ -3446,24 +3563,50 @@ declare module '@layerfi/components/components/Tasks/Tasks' {
3446
3563
  import { useTasks } from '@layerfi/components/hooks/useTasks/index';
3447
3564
  export type UseTasksContextType = ReturnType<typeof useTasks>;
3448
3565
  export const UseTasksContext: React.Context<{
3449
- data?: import("@layerfi/components/types/tasks").TaskTypes[];
3566
+ data?: import("@layerfi/components/types/tasks").Task[];
3567
+ monthlyData?: import("@layerfi/components/types/tasks").TasksMonthly[];
3450
3568
  isLoading?: boolean;
3451
3569
  loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
3452
3570
  isValidating?: boolean;
3453
3571
  error?: unknown;
3572
+ currentDate: Date;
3573
+ setCurrentDate: (date: Date) => void;
3574
+ dateRange: {
3575
+ startDate: Date;
3576
+ endDate: Date;
3577
+ };
3578
+ setDateRange: (props: {
3579
+ startDate: Date;
3580
+ endDate: Date;
3581
+ }) => void;
3454
3582
  refetch: () => void;
3455
3583
  submitResponseToTask: (taskId: string, userResponse: string) => void;
3456
- uploadDocumentForTask: (taskId: string, file: File) => void;
3584
+ uploadDocumentsForTask: (taskId: string, files: File[], description?: string) => Promise<void>;
3585
+ deleteUploadsForTask: (taskId: string) => void;
3586
+ updateDocUploadTaskDescription: (taskId: string, userResponse: string) => void;
3457
3587
  }>;
3458
3588
  export const useTasksContext: () => {
3459
- data?: import("@layerfi/components/types/tasks").TaskTypes[];
3589
+ data?: import("@layerfi/components/types/tasks").Task[];
3590
+ monthlyData?: import("@layerfi/components/types/tasks").TasksMonthly[];
3460
3591
  isLoading?: boolean;
3461
3592
  loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
3462
3593
  isValidating?: boolean;
3463
3594
  error?: unknown;
3595
+ currentDate: Date;
3596
+ setCurrentDate: (date: Date) => void;
3597
+ dateRange: {
3598
+ startDate: Date;
3599
+ endDate: Date;
3600
+ };
3601
+ setDateRange: (props: {
3602
+ startDate: Date;
3603
+ endDate: Date;
3604
+ }) => void;
3464
3605
  refetch: () => void;
3465
3606
  submitResponseToTask: (taskId: string, userResponse: string) => void;
3466
- uploadDocumentForTask: (taskId: string, file: File) => void;
3607
+ uploadDocumentsForTask: (taskId: string, files: File[], description?: string) => Promise<void>;
3608
+ deleteUploadsForTask: (taskId: string) => void;
3609
+ updateDocUploadTaskDescription: (taskId: string, userResponse: string) => void;
3467
3610
  };
3468
3611
  export interface TasksStringOverrides {
3469
3612
  header?: string;
@@ -3518,10 +3661,10 @@ declare module '@layerfi/components/components/TasksList/index' {
3518
3661
  }
3519
3662
  declare module '@layerfi/components/components/TasksListItem/TasksListItem' {
3520
3663
  import React from 'react';
3521
- import { TaskTypes } from '@layerfi/components/types/tasks';
3664
+ import { Task } from '@layerfi/components/types/tasks';
3522
3665
  export const TasksListItem: ({ task, goToNextPageIfAllComplete, defaultOpen, }: {
3523
- task: TaskTypes;
3524
- goToNextPageIfAllComplete: (task: TaskTypes) => void;
3666
+ task: Task;
3667
+ goToNextPageIfAllComplete: (task: Task) => void;
3525
3668
  defaultOpen: boolean;
3526
3669
  }) => React.JSX.Element;
3527
3670
 
@@ -3529,6 +3672,47 @@ declare module '@layerfi/components/components/TasksListItem/TasksListItem' {
3529
3672
  declare module '@layerfi/components/components/TasksListItem/index' {
3530
3673
  export { TasksListItem } from '@layerfi/components/components/TasksListItem/TasksListItem';
3531
3674
 
3675
+ }
3676
+ declare module '@layerfi/components/components/TasksMonthSelector/TaskMonthTile' {
3677
+ import React from 'react';
3678
+ import { TaskMonthTileProps } from '@layerfi/components/components/TasksMonthSelector/types';
3679
+ const TaskMonthTile: ({ monthData, onClick, active, disabled }: TaskMonthTileProps) => React.JSX.Element;
3680
+ export { TaskMonthTile };
3681
+
3682
+ }
3683
+ declare module '@layerfi/components/components/TasksMonthSelector/TasksMonthSelector' {
3684
+ import React from 'react';
3685
+ import { TasksMonthSelectorProps } from '@layerfi/components/components/TasksMonthSelector/types';
3686
+ const TasksMonthSelector: ({ tasks, year, currentDate, onClick }: TasksMonthSelectorProps) => React.JSX.Element;
3687
+ export { TasksMonthSelector };
3688
+
3689
+ }
3690
+ declare module '@layerfi/components/components/TasksMonthSelector/types' {
3691
+ import { Task, TasksMonthly } from '@layerfi/components/types/tasks';
3692
+ export type TasksMonthSelectorProps = {
3693
+ tasks?: TasksMonthly[];
3694
+ currentDate: Date;
3695
+ year: number;
3696
+ onClick: (date: Date) => void;
3697
+ };
3698
+ export type MonthData = {
3699
+ year: number;
3700
+ month: number;
3701
+ total: number;
3702
+ completed: number;
3703
+ tasks: Task[];
3704
+ monthStr: string;
3705
+ startDate: Date;
3706
+ endDate: Date;
3707
+ disabled?: boolean;
3708
+ };
3709
+ export type TaskMonthTileProps = {
3710
+ monthData: MonthData;
3711
+ active?: boolean;
3712
+ disabled?: boolean;
3713
+ onClick: TasksMonthSelectorProps['onClick'];
3714
+ };
3715
+
3532
3716
  }
3533
3717
  declare module '@layerfi/components/components/TasksPending/TasksPending' {
3534
3718
  import React from 'react';
@@ -3910,7 +4094,8 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
3910
4094
  justify?: 'center';
3911
4095
  slot?: string;
3912
4096
  }>;
3913
- export function VStack({ align, children, gap, justify, ...restProps }: StackProps): React.JSX.Element;
4097
+ export function VStack(props: StackProps): React.JSX.Element;
4098
+ export function HStack(props: StackProps): React.JSX.Element;
3914
4099
 
3915
4100
  }
3916
4101
  declare module '@layerfi/components/components/ui/Typography/Heading' {
@@ -3956,6 +4141,23 @@ declare module '@layerfi/components/components/utility/ConditionalList' {
3956
4141
  export function ConditionalList<T>({ list, isLoading, Empty, Container, Loading, children }: ConditionalListProps<T>): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
3957
4142
  export {};
3958
4143
 
4144
+ }
4145
+ declare module '@layerfi/components/components/utility/InvisibleDownload' {
4146
+ import React from 'react';
4147
+ type InvisibleDownloadHandle = {
4148
+ trigger: (options: {
4149
+ url: string;
4150
+ }) => Promise<void>;
4151
+ };
4152
+ export function useInvisibleDownload(): {
4153
+ invisibleDownloadRef: React.RefObject<InvisibleDownloadHandle>;
4154
+ triggerInvisibleDownload: (options: {
4155
+ url: string;
4156
+ }) => void;
4157
+ };
4158
+ const InvisibleDownload: React.ForwardRefExoticComponent<React.RefAttributes<InvisibleDownloadHandle>>;
4159
+ export default InvisibleDownload;
4160
+
3959
4161
  }
3960
4162
  declare module '@layerfi/components/config/charts' {
3961
4163
  export const INACTIVE_OPACITY_LEVELS: number[];
@@ -4326,14 +4528,27 @@ declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
4326
4528
  import { useTasks } from '@layerfi/components/hooks/useTasks/index';
4327
4529
  export type TasksContextType = ReturnType<typeof useTasks>;
4328
4530
  export const TasksContext: import("react").Context<{
4329
- data?: import("@layerfi/components/types/tasks").TaskTypes[];
4531
+ data?: import("@layerfi/components/types/tasks").Task[];
4532
+ monthlyData?: import("@layerfi/components/types/tasks").TasksMonthly[];
4330
4533
  isLoading?: boolean;
4331
4534
  loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
4332
4535
  isValidating?: boolean;
4333
4536
  error?: unknown;
4537
+ currentDate: Date;
4538
+ setCurrentDate: (date: Date) => void;
4539
+ dateRange: {
4540
+ startDate: Date;
4541
+ endDate: Date;
4542
+ };
4543
+ setDateRange: (props: {
4544
+ startDate: Date;
4545
+ endDate: Date;
4546
+ }) => void;
4334
4547
  refetch: () => void;
4335
4548
  submitResponseToTask: (taskId: string, userResponse: string) => void;
4336
- uploadDocumentForTask: (taskId: string, file: File) => void;
4549
+ uploadDocumentsForTask: (taskId: string, files: File[], description?: string) => Promise<void>;
4550
+ deleteUploadsForTask: (taskId: string) => void;
4551
+ updateDocUploadTaskDescription: (taskId: string, userResponse: string) => void;
4337
4552
  }>;
4338
4553
 
4339
4554
  }
@@ -4542,14 +4757,13 @@ declare module '@layerfi/components/hooks/useElementSize/useElementSize' {
4542
4757
  clientHeight: number;
4543
4758
  }) => void) => import("react").RefObject<T>;
4544
4759
 
4545
- }
4546
- declare module '@layerfi/components/hooks/useElementViewSize/index' {
4547
- export { useElementViewSize } from '@layerfi/components/hooks/useElementViewSize/useElementViewSize';
4548
-
4549
4760
  }
4550
4761
  declare module '@layerfi/components/hooks/useElementViewSize/useElementViewSize' {
4551
4762
  import { View } from '@layerfi/components/types/general';
4552
- export const useElementViewSize: <T extends HTMLElement>(callback: (view: View) => void) => import("react").RefObject<T>;
4763
+ export const useElementViewSize: <T extends HTMLElement>() => {
4764
+ view: View;
4765
+ containerRef: import("react").RefObject<T>;
4766
+ };
4553
4767
 
4554
4768
  }
4555
4769
  declare module '@layerfi/components/hooks/useIsVisible/index' {
@@ -4901,22 +5115,39 @@ declare module '@layerfi/components/hooks/useTasks/index' {
4901
5115
 
4902
5116
  }
4903
5117
  declare module '@layerfi/components/hooks/useTasks/mockData' {
4904
- import { TaskTypes } from '@layerfi/components/types/tasks';
4905
- export const mockData: TaskTypes[];
5118
+ import { Task } from '@layerfi/components/types/tasks';
5119
+ export const mockData: Task[];
4906
5120
 
4907
5121
  }
4908
5122
  declare module '@layerfi/components/hooks/useTasks/useTasks' {
4909
5123
  import { LoadedStatus } from '@layerfi/components/types/general';
4910
- import { TaskTypes } from '@layerfi/components/types/tasks';
4911
- type UseTasks = () => {
4912
- data?: TaskTypes[];
5124
+ import { Task, TasksMonthly } from '@layerfi/components/types/tasks';
5125
+ type UseTasks = (props?: UseTasksProps) => {
5126
+ data?: Task[];
5127
+ monthlyData?: TasksMonthly[];
4913
5128
  isLoading?: boolean;
4914
5129
  loadedStatus?: LoadedStatus;
4915
5130
  isValidating?: boolean;
4916
5131
  error?: unknown;
5132
+ currentDate: Date;
5133
+ setCurrentDate: (date: Date) => void;
5134
+ dateRange: {
5135
+ startDate: Date;
5136
+ endDate: Date;
5137
+ };
5138
+ setDateRange: (props: {
5139
+ startDate: Date;
5140
+ endDate: Date;
5141
+ }) => void;
4917
5142
  refetch: () => void;
4918
5143
  submitResponseToTask: (taskId: string, userResponse: string) => void;
4919
- uploadDocumentForTask: (taskId: string, file: File) => void;
5144
+ uploadDocumentsForTask: (taskId: string, files: File[], description?: string) => Promise<void>;
5145
+ deleteUploadsForTask: (taskId: string) => void;
5146
+ updateDocUploadTaskDescription: (taskId: string, userResponse: string) => void;
5147
+ };
5148
+ type UseTasksProps = {
5149
+ startDate?: Date;
5150
+ endDate?: Date;
4920
5151
  };
4921
5152
  export const useTasks: UseTasks;
4922
5153
  export {};
@@ -6116,10 +6347,10 @@ declare module '@layerfi/components/types/linked_accounts' {
6116
6347
  institution: PlaidInstitution | null;
6117
6348
  };
6118
6349
  export type AccountSource = EnumWithUnknownValues<'PLAID' | 'STRIPE'>;
6119
- const KNOWN_ACCOUNT_NOTIFICATION_TYPES: readonly ["CONFIRM_RELEVANT", "CONFIRM_UNIQUE"];
6120
- type KnownAccountNotificationType = typeof KNOWN_ACCOUNT_NOTIFICATION_TYPES[number];
6121
- const KNOWN_ACCOUNT_NOTIFICATION_SCOPES: readonly ["USER"];
6122
- type KnownAccountNotificationScope = typeof KNOWN_ACCOUNT_NOTIFICATION_SCOPES[number];
6350
+ const _KNOWN_ACCOUNT_NOTIFICATION_TYPES: readonly ["CONFIRM_RELEVANT", "CONFIRM_UNIQUE"];
6351
+ type KnownAccountNotificationType = typeof _KNOWN_ACCOUNT_NOTIFICATION_TYPES[number];
6352
+ const _KNOWN_ACCOUNT_NOTIFICATION_SCOPES: readonly ["USER"];
6353
+ type KnownAccountNotificationScope = typeof _KNOWN_ACCOUNT_NOTIFICATION_SCOPES[number];
6123
6354
  type AccountNotificationType = EnumWithUnknownValues<KnownAccountNotificationType>;
6124
6355
  type AccountNotificationScope = EnumWithUnknownValues<KnownAccountNotificationScope>;
6125
6356
  type AccountNotification = {
@@ -6310,7 +6541,13 @@ declare module '@layerfi/components/types/table' {
6310
6541
  }
6311
6542
  declare module '@layerfi/components/types/tasks' {
6312
6543
  import { DocumentType } from '@layerfi/components/types/file_upload';
6313
- export interface TaskTypes {
6544
+ import { S3PresignedUrl } from '@layerfi/components/types/general';
6545
+ type Document = {
6546
+ document_type: DocumentType;
6547
+ file_name: string;
6548
+ presigned_url: S3PresignedUrl;
6549
+ };
6550
+ export type Task = {
6314
6551
  id: string;
6315
6552
  question: string;
6316
6553
  status: TasksStatusType;
@@ -6324,11 +6561,21 @@ declare module '@layerfi/components/types/tasks' {
6324
6561
  completed_at: string | null;
6325
6562
  created_at: string;
6326
6563
  updated_at: string;
6564
+ effective_date: string;
6327
6565
  document_type: DocumentType;
6328
- }
6566
+ documents: Document[];
6567
+ };
6329
6568
  export type TasksStatusType = 'COMPLETED' | 'TODO' | 'USER_MARKED_COMPLETED';
6330
6569
  export type TasksResponseType = 'FREE_RESPONSE' | 'UPLOAD_DOCUMENT';
6331
6570
  export function isComplete(taskType: TasksStatusType): boolean;
6571
+ export type TasksMonthly = {
6572
+ year: number;
6573
+ month: number;
6574
+ total: number;
6575
+ completed: number;
6576
+ tasks: Task[];
6577
+ };
6578
+ export {};
6332
6579
 
6333
6580
  }
6334
6581
  declare module '@layerfi/components/types/utility/enumWithUnknownValues' {
@@ -6429,6 +6676,10 @@ declare module '@layerfi/components/utils/colors' {
6429
6676
  */
6430
6677
  export const buildColorsPalette: (theme?: LayerThemeConfig) => ColorsPalette;
6431
6678
 
6679
+ }
6680
+ declare module '@layerfi/components/utils/delay/runDelayed' {
6681
+ export function runDelayedSync<T>(block: () => T, delayMs?: number): Promise<T>;
6682
+
6432
6683
  }
6433
6684
  declare module '@layerfi/components/utils/format' {
6434
6685
  /**
@@ -6486,10 +6737,16 @@ declare module '@layerfi/components/utils/profitAndLossUtils' {
6486
6737
  export const humanizeTitle: (sidebarView: SidebarScope) => "Expenses" | "Revenue" | "Profit & Loss";
6487
6738
  export const applyShare: (items: LineBaseItem[], total: number) => LineBaseItem[];
6488
6739
 
6740
+ }
6741
+ declare module '@layerfi/components/utils/request/toDefinedSearchParameters' {
6742
+ type ParameterValues = Date | string | number | boolean;
6743
+ export function toDefinedSearchParameters(input: Record<string, ParameterValues | null | undefined>): URLSearchParams;
6744
+ export {};
6745
+
6489
6746
  }
6490
6747
  declare module '@layerfi/components/utils/styleUtils/sizeVariants' {
6491
- const SIZE_VARIANTS: readonly ["sm", "lg"];
6492
- type SizeVariant = (typeof SIZE_VARIANTS)[number];
6748
+ const _SIZE_VARIANTS: readonly ["sm", "lg"];
6749
+ type SizeVariant = (typeof _SIZE_VARIANTS)[number];
6493
6750
  export type Variants = Partial<{
6494
6751
  size: SizeVariant;
6495
6752
  }>;