@layerfi/components 0.1.34 → 0.1.36

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
@@ -323,6 +323,52 @@ declare module '@layerfi/components/api/layer/profit_and_loss' {
323
323
  error?: unknown;
324
324
  }>;
325
325
 
326
+ }
327
+ declare module '@layerfi/components/api/layer/quickbooks' {
328
+ import { StatusOfSyncFromQuickbooks } from "@layerfi/components/types/quickbooks";
329
+ export const syncFromQuickbooks: (baseUrl: string, accessToken: string | undefined, options?: {
330
+ params?: {
331
+ businessId: string;
332
+ } | undefined;
333
+ body?: Record<string, unknown> | undefined;
334
+ } | undefined) => Promise<Record<string, unknown>>;
335
+ export const statusOfSyncFromQuickbooks: (baseUrl: string, accessToken: string | undefined, options?: {
336
+ params?: {
337
+ businessId: string;
338
+ } | undefined;
339
+ } | undefined) => () => Promise<{
340
+ data: StatusOfSyncFromQuickbooks;
341
+ }>;
342
+ export const initQuickbooksOAuth: (baseUrl: string, accessToken: string | undefined, options?: {
343
+ params?: {
344
+ businessId: string;
345
+ } | undefined;
346
+ body?: Record<string, unknown> | undefined;
347
+ } | undefined) => Promise<{
348
+ data: {
349
+ type: "Quickbooks_Authorization_Params";
350
+ redirect_url: string;
351
+ };
352
+ }>;
353
+ export const unlinkQuickbooksConnection: (baseUrl: string, accessToken: string | undefined, options?: {
354
+ params?: {
355
+ businessId: string;
356
+ } | undefined;
357
+ body?: Record<string, unknown> | undefined;
358
+ } | undefined) => Promise<Record<string, unknown>>;
359
+ /**
360
+ * Lets user know if there exists an active Quickbooks connection or not
361
+ */
362
+ export const statusOfQuickbooksConnection: (baseUrl: string, accessToken: string | undefined, options?: {
363
+ params?: {
364
+ businessId: string;
365
+ } | undefined;
366
+ } | undefined) => () => Promise<{
367
+ data: {
368
+ is_connected: boolean;
369
+ };
370
+ }>;
371
+
326
372
  }
327
373
  declare module '@layerfi/components/api/layer/statement-of-cash-flow' {
328
374
  import { StatementOfCashFlow } from '@layerfi/components/types';
@@ -598,6 +644,45 @@ declare module '@layerfi/components/api/layer' {
598
644
  getStatementOfCashFlow: (baseUrl: string, accessToken: string | undefined, options?: {
599
645
  params?: import("@layerfi/components/api/layer/statement-of-cash-flow").GetStatementOfCashFlowParams | undefined;
600
646
  } | undefined) => () => Promise<import("@layerfi/components/api/layer/statement-of-cash-flow").GetStatementOfCashFlowReturn>;
647
+ syncFromQuickbooks: (baseUrl: string, accessToken: string | undefined, options?: {
648
+ params?: {
649
+ businessId: string;
650
+ } | undefined;
651
+ body?: Record<string, unknown> | undefined;
652
+ } | undefined) => Promise<Record<string, unknown>>;
653
+ statusOfSyncFromQuickbooks: (baseUrl: string, accessToken: string | undefined, options?: {
654
+ params?: {
655
+ businessId: string;
656
+ } | undefined;
657
+ } | undefined) => () => Promise<{
658
+ data: import("@layerfi/components/types/quickbooks").StatusOfSyncFromQuickbooks;
659
+ }>;
660
+ statusOfQuickbooksConnection: (baseUrl: string, accessToken: string | undefined, options?: {
661
+ params?: {
662
+ businessId: string;
663
+ } | undefined;
664
+ } | undefined) => () => Promise<{
665
+ data: {
666
+ is_connected: boolean;
667
+ };
668
+ }>;
669
+ initQuickbooksOAuth: (baseUrl: string, accessToken: string | undefined, options?: {
670
+ params?: {
671
+ businessId: string;
672
+ } | undefined;
673
+ body?: Record<string, unknown> | undefined;
674
+ } | undefined) => Promise<{
675
+ data: {
676
+ type: "Quickbooks_Authorization_Params";
677
+ redirect_url: string;
678
+ };
679
+ }>;
680
+ unlinkQuickbooksConnection: (baseUrl: string, accessToken: string | undefined, options?: {
681
+ params?: {
682
+ businessId: string;
683
+ } | undefined;
684
+ body?: Record<string, unknown> | undefined;
685
+ } | undefined) => Promise<Record<string, unknown>>;
601
686
  };
602
687
 
603
688
  }
@@ -1117,6 +1202,14 @@ declare module '@layerfi/components/components/Button/CloseButton' {
1117
1202
  }
1118
1203
  export const CloseButton: ({ className, children, textOnly, ...props }: CloseButtonProps) => React.JSX.Element;
1119
1204
 
1205
+ }
1206
+ declare module '@layerfi/components/components/Button/ExpandButton' {
1207
+ import React, { ButtonHTMLAttributes } from 'react';
1208
+ export interface ExpandButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
1209
+ collapsed?: boolean;
1210
+ }
1211
+ export const ExpandButton: ({ className, children, collapsed, ...props }: ExpandButtonProps) => React.JSX.Element;
1212
+
1120
1213
  }
1121
1214
  declare module '@layerfi/components/components/Button/IconButton' {
1122
1215
  import React, { ButtonHTMLAttributes, ReactNode } from 'react';
@@ -1127,6 +1220,22 @@ declare module '@layerfi/components/components/Button/IconButton' {
1127
1220
  }
1128
1221
  export const IconButton: ({ className, children, icon, active, withBorder, ...props }: IconButtonProps) => React.JSX.Element;
1129
1222
 
1223
+ }
1224
+ declare module '@layerfi/components/components/Button/Link' {
1225
+ import React, { HTMLAttributeAnchorTarget, LinkHTMLAttributes, ReactNode } from 'react';
1226
+ import { ButtonVariant, ButtonJustify } from '@layerfi/components/components/Button/Button';
1227
+ export interface LinkProps extends LinkHTMLAttributes<HTMLAnchorElement> {
1228
+ variant?: ButtonVariant;
1229
+ leftIcon?: ReactNode;
1230
+ rightIcon?: ReactNode;
1231
+ iconOnly?: ReactNode;
1232
+ iconAsPrimary?: boolean;
1233
+ justify?: ButtonJustify;
1234
+ fullWidth?: boolean;
1235
+ target: HTMLAttributeAnchorTarget;
1236
+ }
1237
+ export const Link: ({ className, children, variant, leftIcon, rightIcon, iconOnly, iconAsPrimary, justify, fullWidth, ...props }: LinkProps) => React.JSX.Element;
1238
+
1130
1239
  }
1131
1240
  declare module '@layerfi/components/components/Button/RetryButton' {
1132
1241
  import React, { ButtonHTMLAttributes } from 'react';
@@ -1171,6 +1280,8 @@ declare module '@layerfi/components/components/Button/index' {
1171
1280
  export { TextButton } from '@layerfi/components/components/Button/TextButton';
1172
1281
  export { BackButton } from '@layerfi/components/components/Button/BackButton';
1173
1282
  export { CloseButton } from '@layerfi/components/components/Button/CloseButton';
1283
+ export { ExpandButton } from '@layerfi/components/components/Button/ExpandButton';
1284
+ export { Link } from '@layerfi/components/components/Button/Link';
1174
1285
 
1175
1286
  }
1176
1287
  declare module '@layerfi/components/components/Card/Card' {
@@ -1587,6 +1698,19 @@ declare module '@layerfi/components/components/HoverMenu/HoverMenu' {
1587
1698
  declare module '@layerfi/components/components/HoverMenu/index' {
1588
1699
  export { HoverMenu, HoverMenuProps } from '@layerfi/components/components/HoverMenu/HoverMenu';
1589
1700
 
1701
+ }
1702
+ declare module '@layerfi/components/components/IconBox/IconBox' {
1703
+ import React, { ReactNode } from 'react';
1704
+ interface IconBoxProps {
1705
+ children: ReactNode;
1706
+ }
1707
+ export const IconBox: ({ children }: IconBoxProps) => React.JSX.Element;
1708
+ export {};
1709
+
1710
+ }
1711
+ declare module '@layerfi/components/components/IconBox/index' {
1712
+ export { IconBox } from '@layerfi/components/components/IconBox/IconBox';
1713
+
1590
1714
  }
1591
1715
  declare module '@layerfi/components/components/Input/FileInput' {
1592
1716
  import React from 'react';
@@ -2246,6 +2370,16 @@ declare module '@layerfi/components/components/ProfitAndLossView/ProfitAndLossVi
2246
2370
  declare module '@layerfi/components/components/ProfitAndLossView/index' {
2247
2371
  export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/ProfitAndLossView';
2248
2372
 
2373
+ }
2374
+ declare module '@layerfi/components/components/Quickbooks/Quickbooks' {
2375
+ import React from "react";
2376
+ const Quickbooks: () => React.JSX.Element;
2377
+ export { Quickbooks };
2378
+
2379
+ }
2380
+ declare module '@layerfi/components/components/Quickbooks/index' {
2381
+ export { Quickbooks } from '@layerfi/components/components/Quickbooks/Quickbooks';
2382
+
2249
2383
  }
2250
2384
  declare module '@layerfi/components/components/SkeletonLoader/SkeletonLoader' {
2251
2385
  import React from 'react';
@@ -2398,23 +2532,55 @@ declare module '@layerfi/components/components/Tabs/index' {
2398
2532
 
2399
2533
  }
2400
2534
  declare module '@layerfi/components/components/Tasks/Tasks' {
2401
- import React from 'react';
2402
- export const Tasks: ({ tasksHeader }: {
2535
+ import React, { ReactNode } from 'react';
2536
+ import { useTasks } from '@layerfi/components/hooks/useTasks/index';
2537
+ export type UseTasksContextType = ReturnType<typeof useTasks>;
2538
+ export const UseTasksContext: React.Context<{
2539
+ data?: import("@layerfi/components/types/tasks").TaskTypes[] | undefined;
2540
+ isLoading?: boolean | undefined;
2541
+ loadedStatus?: import("@layerfi/components/types/general").LoadedStatus | undefined;
2542
+ isValidating?: boolean | undefined;
2543
+ error?: unknown;
2544
+ refetch: () => void;
2545
+ submitResponseToTask: (taskId: string, userResponse: string) => void;
2546
+ }>;
2547
+ export const useTasksContext: () => {
2548
+ data?: import("@layerfi/components/types/tasks").TaskTypes[] | undefined;
2549
+ isLoading?: boolean | undefined;
2550
+ loadedStatus?: import("@layerfi/components/types/general").LoadedStatus | undefined;
2551
+ isValidating?: boolean | undefined;
2552
+ error?: unknown;
2553
+ refetch: () => void;
2554
+ submitResponseToTask: (taskId: string, userResponse: string) => void;
2555
+ };
2556
+ export const Tasks: ({ tasksHeader, collapsable, defaultCollapsed, collapsedWhenComplete, }: {
2403
2557
  tasksHeader?: string | undefined;
2558
+ collapsable?: boolean | undefined;
2559
+ defaultCollapsed?: boolean | undefined;
2560
+ collapsedWhenComplete?: boolean | undefined;
2404
2561
  }) => React.JSX.Element;
2405
- export const TasksComponent: ({ tasksHeader }: {
2562
+ export const TasksProvider: ({ children }: {
2563
+ children: ReactNode;
2564
+ }) => React.JSX.Element;
2565
+ export const TasksComponent: ({ tasksHeader, collapsable, defaultCollapsed, collapsedWhenComplete, }: {
2406
2566
  tasksHeader?: string | undefined;
2567
+ collapsable?: boolean | undefined;
2568
+ defaultCollapsed?: boolean | undefined;
2569
+ collapsedWhenComplete?: boolean | undefined;
2407
2570
  }) => React.JSX.Element;
2408
2571
 
2409
2572
  }
2410
2573
  declare module '@layerfi/components/components/Tasks/index' {
2411
- export { Tasks } from '@layerfi/components/components/Tasks/Tasks';
2574
+ export { Tasks, TasksProvider, TasksComponent } from '@layerfi/components/components/Tasks/Tasks';
2412
2575
 
2413
2576
  }
2414
2577
  declare module '@layerfi/components/components/TasksHeader/TasksHeader' {
2415
2578
  import React from 'react';
2416
- export const TasksHeader: ({ tasksHeader, }: {
2579
+ export const TasksHeader: ({ tasksHeader, collapsable, open, toggleContent, }: {
2417
2580
  tasksHeader?: string | undefined;
2581
+ collapsable?: boolean | undefined;
2582
+ open?: boolean | undefined;
2583
+ toggleContent: () => void;
2418
2584
  }) => React.JSX.Element;
2419
2585
 
2420
2586
  }
@@ -2717,6 +2883,20 @@ declare module '@layerfi/components/components/Typography/index' {
2717
2883
  export { Heading, HeadingSize } from '@layerfi/components/components/Typography/Heading';
2718
2884
  export { ErrorText } from '@layerfi/components/components/Typography/ErrorText';
2719
2885
 
2886
+ }
2887
+ declare module '@layerfi/components/components/UpsellBanner/BookkeepingUpsellBar' {
2888
+ import React from 'react';
2889
+ interface BookkeepingUpsellBarProps {
2890
+ onClick?: () => void;
2891
+ href?: string;
2892
+ }
2893
+ export const BookkeepingUpsellBar: ({ onClick, href, }: BookkeepingUpsellBarProps) => React.JSX.Element;
2894
+ export {};
2895
+
2896
+ }
2897
+ declare module '@layerfi/components/components/UpsellBanner/index' {
2898
+ export { BookkeepingUpsellBar } from '@layerfi/components/components/UpsellBanner/BookkeepingUpsellBar';
2899
+
2720
2900
  }
2721
2901
  declare module '@layerfi/components/components/View/View' {
2722
2902
  import React, { ReactNode } from 'react';
@@ -3078,6 +3258,7 @@ declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
3078
3258
  export const TasksContext: import("react").Context<{
3079
3259
  data?: import("@layerfi/components/types/tasks").TaskTypes[] | undefined;
3080
3260
  isLoading?: boolean | undefined;
3261
+ loadedStatus?: import("@layerfi/components/types/general").LoadedStatus | undefined;
3081
3262
  isValidating?: boolean | undefined;
3082
3263
  error?: unknown;
3083
3264
  refetch: () => void;
@@ -3486,6 +3667,22 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossQuery
3486
3667
  export const useProfitAndLossQuery: UseProfitAndLossQueryReturn;
3487
3668
  export {};
3488
3669
 
3670
+ }
3671
+ declare module '@layerfi/components/hooks/useQuickbooks/index' {
3672
+ export { useQuickbooks } from '@layerfi/components/hooks/useQuickbooks/useQuickbooks';
3673
+
3674
+ }
3675
+ declare module '@layerfi/components/hooks/useQuickbooks/useQuickbooks' {
3676
+ type UseQuickbooks = () => {
3677
+ linkQuickbooks: () => Promise<string>;
3678
+ unlinkQuickbooks: () => void;
3679
+ syncFromQuickbooks: () => void;
3680
+ isSyncingFromQuickbooks: boolean;
3681
+ quickbooksIsLinked: boolean | null;
3682
+ };
3683
+ export const useQuickbooks: UseQuickbooks;
3684
+ export {};
3685
+
3489
3686
  }
3490
3687
  declare module '@layerfi/components/hooks/useStatementOfCashFlow/index' {
3491
3688
  export { useStatementOfCashFlow } from '@layerfi/components/hooks/useStatementOfCashFlow/useStatementOfCashFlow';
@@ -3521,10 +3718,12 @@ declare module '@layerfi/components/hooks/useTasks/index' {
3521
3718
 
3522
3719
  }
3523
3720
  declare module '@layerfi/components/hooks/useTasks/useTasks' {
3721
+ import { LoadedStatus } from '@layerfi/components/types/general';
3524
3722
  import { TaskTypes } from '@layerfi/components/types/tasks';
3525
3723
  type UseTasks = () => {
3526
3724
  data?: TaskTypes[];
3527
3725
  isLoading?: boolean;
3726
+ loadedStatus?: LoadedStatus;
3528
3727
  isValidating?: boolean;
3529
3728
  error?: unknown;
3530
3729
  refetch: () => void;
@@ -3627,6 +3826,13 @@ declare module '@layerfi/components/icons/CloseIcon' {
3627
3826
  const CloseIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
3628
3827
  export default CloseIcon;
3629
3828
 
3829
+ }
3830
+ declare module '@layerfi/components/icons/Coffee' {
3831
+ import * as React from 'react';
3832
+ import { IconSvgProps } from '@layerfi/components/icons/types';
3833
+ const CoffeeIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
3834
+ export default CoffeeIcon;
3835
+
3630
3836
  }
3631
3837
  declare module '@layerfi/components/icons/CreditCard' {
3632
3838
  import * as React from 'react';
@@ -3717,6 +3923,13 @@ declare module '@layerfi/components/icons/PlusIcon' {
3717
3923
  const PlusIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
3718
3924
  export default PlusIcon;
3719
3925
 
3926
+ }
3927
+ declare module '@layerfi/components/icons/ProgressIcon' {
3928
+ import * as React from 'react';
3929
+ import { IconSvgProps } from '@layerfi/components/icons/types';
3930
+ const ProgressIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
3931
+ export default ProgressIcon;
3932
+
3720
3933
  }
3721
3934
  declare module '@layerfi/components/icons/RefreshCcw' {
3722
3935
  import * as React from 'react';
@@ -3800,12 +4013,14 @@ declare module '@layerfi/components/index' {
3800
4013
  export { Onboarding } from '@layerfi/components/components/Onboarding/index';
3801
4014
  export { LinkedAccounts } from '@layerfi/components/components/LinkedAccounts/index';
3802
4015
  export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
4016
+ export { Quickbooks } from '@layerfi/components/components/Quickbooks/index';
3803
4017
  export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
3804
4018
  export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
3805
4019
  export { StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/index';
3806
4020
  export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
3807
4021
  export { Journal } from '@layerfi/components/components/Journal/index';
3808
4022
  export { Tasks } from '@layerfi/components/components/Tasks/index';
4023
+ export { BookkeepingUpsellBar } from '@layerfi/components/components/UpsellBanner/index';
3809
4024
  export { BookkeepingOverview } from '@layerfi/components/views/BookkeepingOverview/index';
3810
4025
  export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
3811
4026
  export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
@@ -4543,6 +4758,7 @@ declare module '@layerfi/components/types/linked_accounts' {
4543
4758
  connection_external_id?: string;
4544
4759
  connection_needs_repair_as_of: string | null;
4545
4760
  requires_user_confirmation_as_of: string | null;
4761
+ is_syncing: boolean;
4546
4762
  }
4547
4763
  export type PublicToken = {
4548
4764
  public_token: string;
@@ -4589,6 +4805,12 @@ declare module '@layerfi/components/types/profit_and_loss' {
4589
4805
  months: ProfitAndLossSummary[];
4590
4806
  }
4591
4807
 
4808
+ }
4809
+ declare module '@layerfi/components/types/quickbooks' {
4810
+ export type StatusOfSyncFromQuickbooks = {
4811
+ is_syncing: boolean;
4812
+ };
4813
+
4592
4814
  }
4593
4815
  declare module '@layerfi/components/types/statement_of_cash_flow' {
4594
4816
  import { LineItem } from '@layerfi/components/types/line_item';
@@ -4796,13 +5018,14 @@ declare module '@layerfi/components/utils/profitAndLossUtils' {
4796
5018
 
4797
5019
  }
4798
5020
  declare module '@layerfi/components/views/AccountingOverview/AccountingOverview' {
4799
- import React from 'react';
5021
+ import React, { ReactNode } from 'react';
4800
5022
  export interface AccountingOverviewProps {
4801
5023
  title?: string;
4802
5024
  enableOnboarding?: boolean;
4803
5025
  onTransactionsToReviewClick?: () => void;
5026
+ middleBanner?: ReactNode;
4804
5027
  }
4805
- export const AccountingOverview: ({ title, enableOnboarding, onTransactionsToReviewClick, }: AccountingOverviewProps) => React.JSX.Element;
5028
+ export const AccountingOverview: ({ title, enableOnboarding, onTransactionsToReviewClick, middleBanner, }: AccountingOverviewProps) => React.JSX.Element;
4806
5029
 
4807
5030
  }
4808
5031
  declare module '@layerfi/components/views/AccountingOverview/index' {