@layerfi/components 0.1.104 → 0.1.106-alpha

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
@@ -1076,15 +1076,16 @@ declare module '@layerfi/components/components/Badge/Badge' {
1076
1076
  ERROR = "error"
1077
1077
  }
1078
1078
  export interface BadgeProps {
1079
- children: ReactNode;
1079
+ children?: ReactNode;
1080
1080
  icon?: ReactNode;
1081
1081
  onClick?: ButtonProps['onClick'];
1082
1082
  tooltip?: ReactNode;
1083
1083
  size?: BadgeSize;
1084
1084
  variant?: BadgeVariant;
1085
1085
  hoverable?: boolean;
1086
+ iconOnly?: boolean;
1086
1087
  }
1087
- export const Badge: ({ icon, onClick, children, tooltip, size, variant, hoverable, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
1088
+ export const Badge: ({ icon, onClick, children, tooltip, size, variant, hoverable, iconOnly, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
1088
1089
 
1089
1090
  }
1090
1091
  declare module '@layerfi/components/components/Badge/index' {
@@ -1122,6 +1123,7 @@ declare module '@layerfi/components/components/BalanceSheet/BalanceSheet' {
1122
1123
  asWidget?: boolean;
1123
1124
  stringOverrides?: BalanceSheetStringOverrides;
1124
1125
  }>;
1126
+ export const StandaloneBalanceSheet: (props: BalanceSheetProps) => import("react/jsx-runtime").JSX.Element;
1125
1127
  export const BalanceSheet: (props: BalanceSheetProps) => import("react/jsx-runtime").JSX.Element;
1126
1128
 
1127
1129
  }
@@ -1160,7 +1162,7 @@ declare module '@layerfi/components/components/BalanceSheet/download/useBalanceS
1160
1162
 
1161
1163
  }
1162
1164
  declare module '@layerfi/components/components/BalanceSheet/index' {
1163
- export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
1165
+ export { BalanceSheet, StandaloneBalanceSheet } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
1164
1166
 
1165
1167
  }
1166
1168
  declare module '@layerfi/components/components/BalanceSheetDatePicker/BalanceSheetDatePicker' {
@@ -1553,6 +1555,7 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1553
1555
  * @deprecated `mode` can be inferred from the bookkeeping configuration of a business
1554
1556
  */
1555
1557
  mode?: BankTransactionsMode;
1558
+ showCustomerVendor?: boolean;
1556
1559
  showDescriptions?: boolean;
1557
1560
  showReceiptUploads?: boolean;
1558
1561
  showTooltips?: boolean;
@@ -1568,7 +1571,7 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1568
1571
  onError?: (error: LayerError) => void;
1569
1572
  showTags?: boolean;
1570
1573
  }
1571
- export const BankTransactions: ({ onError, showTags, mode, ...props }: BankTransactionsWithErrorProps) => import("react/jsx-runtime").JSX.Element;
1574
+ export const BankTransactions: ({ onError, showTags, showCustomerVendor, mode, ...props }: BankTransactionsWithErrorProps) => import("react/jsx-runtime").JSX.Element;
1572
1575
 
1573
1576
  }
1574
1577
  declare module '@layerfi/components/components/BankTransactions/BankTransactionsHeader' {
@@ -2624,6 +2627,75 @@ declare module '@layerfi/components/components/DataState/DataState' {
2624
2627
  declare module '@layerfi/components/components/DataState/index' {
2625
2628
  export { DataState, DataStateStatus } from '@layerfi/components/components/DataState/DataState';
2626
2629
 
2630
+ }
2631
+ declare module '@layerfi/components/components/DataTable/DataTable' {
2632
+ export type Column<TData, K> = {
2633
+ id: K;
2634
+ header?: React.ReactNode;
2635
+ cell: (row: TData) => React.ReactNode;
2636
+ isRowHeader?: true;
2637
+ };
2638
+ export type ColumnConfig<TData, TColumns extends string> = {
2639
+ [K in TColumns]: Column<TData, K>;
2640
+ };
2641
+ export interface DataTableProps<TData, TColumns extends string> {
2642
+ columnConfig: ColumnConfig<TData, TColumns>;
2643
+ data: TData[] | undefined;
2644
+ componentName: string;
2645
+ ariaLabel: string;
2646
+ isLoading: boolean;
2647
+ isError: boolean;
2648
+ slots: {
2649
+ EmptyState: React.FC;
2650
+ ErrorState: React.FC;
2651
+ };
2652
+ }
2653
+ export const DataTable: <TData extends {
2654
+ id: string;
2655
+ }, TColumns extends string>({ columnConfig, data, isLoading, isError, componentName, ariaLabel, slots, }: DataTableProps<TData, TColumns>) => import("react/jsx-runtime").JSX.Element;
2656
+
2657
+ }
2658
+ declare module '@layerfi/components/components/DataTable/DataTableHeader' {
2659
+ import { type SearchFieldProps } from '@layerfi/components/components/SearchField/SearchField';
2660
+ interface CountProps {
2661
+ showCount?: true;
2662
+ totalCount?: string;
2663
+ }
2664
+ interface ClearFiltersButtonProps {
2665
+ onClick: () => void;
2666
+ }
2667
+ interface DataTableHeaderProps {
2668
+ name: string;
2669
+ count?: CountProps;
2670
+ slotProps?: {
2671
+ SearchField?: SearchFieldProps;
2672
+ ClearFiltersButton?: ClearFiltersButtonProps;
2673
+ };
2674
+ slots?: {
2675
+ HeaderActions?: React.FC;
2676
+ HeaderFilters?: React.FC;
2677
+ Filters?: React.FC;
2678
+ };
2679
+ }
2680
+ export const DataTableHeader: ({ name, count, slotProps, slots }: DataTableHeaderProps) => import("react/jsx-runtime").JSX.Element;
2681
+ export {};
2682
+
2683
+ }
2684
+ declare module '@layerfi/components/components/DataTable/PaginatedTable' {
2685
+ import { type DataTableProps } from '@layerfi/components/components/DataTable/DataTable';
2686
+ interface PaginationProps {
2687
+ pageSize?: number;
2688
+ hasMore?: boolean;
2689
+ fetchMore?: () => void;
2690
+ }
2691
+ interface PaginatedTableProps<TData, TColumns extends string> extends DataTableProps<TData, TColumns> {
2692
+ paginationProps: PaginationProps;
2693
+ }
2694
+ export function PaginatedTable<TData extends {
2695
+ id: string;
2696
+ }, TColumns extends string>({ data, isLoading, isError, columnConfig, componentName, ariaLabel, paginationProps, slots, }: PaginatedTableProps<TData, TColumns>): import("react/jsx-runtime").JSX.Element;
2697
+ export {};
2698
+
2627
2699
  }
2628
2700
  declare module '@layerfi/components/components/DatePicker/DatePicker' {
2629
2701
  import { type FC } from 'react';
@@ -2706,7 +2778,7 @@ declare module '@layerfi/components/components/DateTime/index' {
2706
2778
  declare module '@layerfi/components/components/DetailsList/DetailsList' {
2707
2779
  import { ReactNode } from 'react';
2708
2780
  export interface DetailsListProps {
2709
- title?: string;
2781
+ title?: ReactNode;
2710
2782
  className?: string;
2711
2783
  titleClassName?: string;
2712
2784
  children: ReactNode;
@@ -3174,6 +3246,202 @@ declare module '@layerfi/components/components/Integrations/IntegrationsQuickboo
3174
3246
  }
3175
3247
  export const getQuickbooksConnectionSyncUiState: (quickbooksConnectionStatus: StatusOfQuickbooksConnection) => QuickbooksConnectionSyncUiState;
3176
3248
 
3249
+ }
3250
+ declare module '@layerfi/components/components/Invoices/InvoiceForm/useInvoiceForm' {
3251
+ import { FormValidateOrFn, FormAsyncValidateOrFn } from '@tanstack/react-form';
3252
+ import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
3253
+ import { UpsertInvoiceMode } from '@layerfi/components/features/invoices/api/useUpsertInvoice';
3254
+ type UseInvoiceFormProps = {
3255
+ onSuccess?: (invoice: Invoice) => void;
3256
+ mode: UpsertInvoiceMode.Create;
3257
+ } | {
3258
+ onSuccess?: (invoice: Invoice) => void;
3259
+ mode: UpsertInvoiceMode.Update;
3260
+ invoice: Invoice;
3261
+ };
3262
+ export const useInvoiceForm: (props: UseInvoiceFormProps) => {
3263
+ form: import("@tanstack/react-form").ReactFormExtendedApi<{
3264
+ readonly memo: string | null;
3265
+ readonly sentAt: Date;
3266
+ readonly dueAt: Date;
3267
+ readonly invoiceNumber: string | undefined;
3268
+ readonly lineItems: readonly {
3269
+ readonly description: string | undefined;
3270
+ readonly product: string;
3271
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3272
+ readonly unitPrice: number;
3273
+ }[];
3274
+ readonly additionalDiscount: number | undefined;
3275
+ readonly customerId: string;
3276
+ readonly additionalSalesTaxes: readonly {
3277
+ readonly amount: number;
3278
+ }[] | undefined;
3279
+ }, FormValidateOrFn<{
3280
+ readonly memo: string | null;
3281
+ readonly sentAt: Date;
3282
+ readonly dueAt: Date;
3283
+ readonly invoiceNumber: string | undefined;
3284
+ readonly lineItems: readonly {
3285
+ readonly description: string | undefined;
3286
+ readonly product: string;
3287
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3288
+ readonly unitPrice: number;
3289
+ }[];
3290
+ readonly additionalDiscount: number | undefined;
3291
+ readonly customerId: string;
3292
+ readonly additionalSalesTaxes: readonly {
3293
+ readonly amount: number;
3294
+ }[] | undefined;
3295
+ }>, FormValidateOrFn<{
3296
+ readonly memo: string | null;
3297
+ readonly sentAt: Date;
3298
+ readonly dueAt: Date;
3299
+ readonly invoiceNumber: string | undefined;
3300
+ readonly lineItems: readonly {
3301
+ readonly description: string | undefined;
3302
+ readonly product: string;
3303
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3304
+ readonly unitPrice: number;
3305
+ }[];
3306
+ readonly additionalDiscount: number | undefined;
3307
+ readonly customerId: string;
3308
+ readonly additionalSalesTaxes: readonly {
3309
+ readonly amount: number;
3310
+ }[] | undefined;
3311
+ }>, FormValidateOrFn<{
3312
+ readonly memo: string | null;
3313
+ readonly sentAt: Date;
3314
+ readonly dueAt: Date;
3315
+ readonly invoiceNumber: string | undefined;
3316
+ readonly lineItems: readonly {
3317
+ readonly description: string | undefined;
3318
+ readonly product: string;
3319
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3320
+ readonly unitPrice: number;
3321
+ }[];
3322
+ readonly additionalDiscount: number | undefined;
3323
+ readonly customerId: string;
3324
+ readonly additionalSalesTaxes: readonly {
3325
+ readonly amount: number;
3326
+ }[] | undefined;
3327
+ }>, FormValidateOrFn<{
3328
+ readonly memo: string | null;
3329
+ readonly sentAt: Date;
3330
+ readonly dueAt: Date;
3331
+ readonly invoiceNumber: string | undefined;
3332
+ readonly lineItems: readonly {
3333
+ readonly description: string | undefined;
3334
+ readonly product: string;
3335
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3336
+ readonly unitPrice: number;
3337
+ }[];
3338
+ readonly additionalDiscount: number | undefined;
3339
+ readonly customerId: string;
3340
+ readonly additionalSalesTaxes: readonly {
3341
+ readonly amount: number;
3342
+ }[] | undefined;
3343
+ }>, FormAsyncValidateOrFn<{
3344
+ readonly memo: string | null;
3345
+ readonly sentAt: Date;
3346
+ readonly dueAt: Date;
3347
+ readonly invoiceNumber: string | undefined;
3348
+ readonly lineItems: readonly {
3349
+ readonly description: string | undefined;
3350
+ readonly product: string;
3351
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3352
+ readonly unitPrice: number;
3353
+ }[];
3354
+ readonly additionalDiscount: number | undefined;
3355
+ readonly customerId: string;
3356
+ readonly additionalSalesTaxes: readonly {
3357
+ readonly amount: number;
3358
+ }[] | undefined;
3359
+ }>, FormValidateOrFn<{
3360
+ readonly memo: string | null;
3361
+ readonly sentAt: Date;
3362
+ readonly dueAt: Date;
3363
+ readonly invoiceNumber: string | undefined;
3364
+ readonly lineItems: readonly {
3365
+ readonly description: string | undefined;
3366
+ readonly product: string;
3367
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3368
+ readonly unitPrice: number;
3369
+ }[];
3370
+ readonly additionalDiscount: number | undefined;
3371
+ readonly customerId: string;
3372
+ readonly additionalSalesTaxes: readonly {
3373
+ readonly amount: number;
3374
+ }[] | undefined;
3375
+ }>, FormAsyncValidateOrFn<{
3376
+ readonly memo: string | null;
3377
+ readonly sentAt: Date;
3378
+ readonly dueAt: Date;
3379
+ readonly invoiceNumber: string | undefined;
3380
+ readonly lineItems: readonly {
3381
+ readonly description: string | undefined;
3382
+ readonly product: string;
3383
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3384
+ readonly unitPrice: number;
3385
+ }[];
3386
+ readonly additionalDiscount: number | undefined;
3387
+ readonly customerId: string;
3388
+ readonly additionalSalesTaxes: readonly {
3389
+ readonly amount: number;
3390
+ }[] | undefined;
3391
+ }>, FormAsyncValidateOrFn<{
3392
+ readonly memo: string | null;
3393
+ readonly sentAt: Date;
3394
+ readonly dueAt: Date;
3395
+ readonly invoiceNumber: string | undefined;
3396
+ readonly lineItems: readonly {
3397
+ readonly description: string | undefined;
3398
+ readonly product: string;
3399
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3400
+ readonly unitPrice: number;
3401
+ }[];
3402
+ readonly additionalDiscount: number | undefined;
3403
+ readonly customerId: string;
3404
+ readonly additionalSalesTaxes: readonly {
3405
+ readonly amount: number;
3406
+ }[] | undefined;
3407
+ }>, FormAsyncValidateOrFn<{
3408
+ readonly memo: string | null;
3409
+ readonly sentAt: Date;
3410
+ readonly dueAt: Date;
3411
+ readonly invoiceNumber: string | undefined;
3412
+ readonly lineItems: readonly {
3413
+ readonly description: string | undefined;
3414
+ readonly product: string;
3415
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
3416
+ readonly unitPrice: number;
3417
+ }[];
3418
+ readonly additionalDiscount: number | undefined;
3419
+ readonly customerId: string;
3420
+ readonly additionalSalesTaxes: readonly {
3421
+ readonly amount: number;
3422
+ }[] | undefined;
3423
+ }>>;
3424
+ submitError: string | undefined;
3425
+ isFormValid: boolean;
3426
+ };
3427
+ export {};
3428
+
3429
+ }
3430
+ declare module '@layerfi/components/components/Invoices/Invoices' {
3431
+ interface InvoicesStringOverrides {
3432
+ title?: string;
3433
+ }
3434
+ export interface InvoicesProps {
3435
+ showTitle?: boolean;
3436
+ stringOverrides?: InvoicesStringOverrides;
3437
+ }
3438
+ export const unstable_Invoices: ({ showTitle, stringOverrides, }: InvoicesProps) => import("react/jsx-runtime").JSX.Element;
3439
+ export {};
3440
+
3441
+ }
3442
+ declare module '@layerfi/components/components/Invoices/InvoicesTable' {
3443
+ export const InvoicesTable: () => import("react/jsx-runtime").JSX.Element;
3444
+
3177
3445
  }
3178
3446
  declare module '@layerfi/components/components/Journal/Journal' {
3179
3447
  import { JournalTableStringOverrides } from '@layerfi/components/components/JournalTable/JournalTableWithPanel';
@@ -3331,6 +3599,7 @@ declare module '@layerfi/components/components/LedgerAccount/LedgerAccountIndex'
3331
3599
  dateColumnHeader?: string;
3332
3600
  journalIdColumnHeader?: string;
3333
3601
  sourceColumnHeader?: string;
3602
+ accountColumnHeader?: string;
3334
3603
  debitColumnHeader?: string;
3335
3604
  creditColumnHeader?: string;
3336
3605
  runningBalanceColumnHeader?: string;
@@ -3352,12 +3621,14 @@ declare module '@layerfi/components/components/LedgerAccount/LedgerAccountIndex'
3352
3621
  declare module '@layerfi/components/components/LedgerAccount/LedgerAccountRow' {
3353
3622
  import { LedgerAccountLineItem } from '@layerfi/components/types';
3354
3623
  import { View } from '@layerfi/components/types/general';
3624
+ import { LedgerAccountNodeType } from '@layerfi/components/types/chart_of_accounts';
3355
3625
  export interface LedgerAccountRowProps {
3356
3626
  row: LedgerAccountLineItem;
3357
3627
  index: number;
3358
3628
  view: View;
3629
+ nodeType?: LedgerAccountNodeType;
3359
3630
  }
3360
- export const LedgerAccountRow: ({ row, index, view, }: LedgerAccountRowProps) => import("react/jsx-runtime").JSX.Element;
3631
+ export const LedgerAccountRow: ({ row, index, view, nodeType, }: LedgerAccountRowProps) => import("react/jsx-runtime").JSX.Element;
3361
3632
 
3362
3633
  }
3363
3634
  declare module '@layerfi/components/components/LedgerAccount/index' {
@@ -3537,12 +3808,13 @@ declare module '@layerfi/components/components/LinkedAccounts/LinkedAccounts' {
3537
3808
  showLedgerBalance?: boolean;
3538
3809
  showUnlinkItem?: boolean;
3539
3810
  showBreakConnection?: boolean;
3811
+ showAddAccount?: boolean;
3540
3812
  stringOverrides?: {
3541
3813
  title?: string;
3542
3814
  };
3543
3815
  }
3544
3816
  export const LinkedAccounts: (props: LinkedAccountsProps) => import("react/jsx-runtime").JSX.Element;
3545
- export const LinkedAccountsComponent: ({ asWidget, elevated, showLedgerBalance, showUnlinkItem, showBreakConnection, stringOverrides, }: LinkedAccountsProps) => import("react/jsx-runtime").JSX.Element;
3817
+ export const LinkedAccountsComponent: ({ asWidget, elevated, showLedgerBalance, showUnlinkItem, showBreakConnection, showAddAccount, stringOverrides, }: LinkedAccountsProps) => import("react/jsx-runtime").JSX.Element;
3546
3818
 
3547
3819
  }
3548
3820
  declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountsContent' {
@@ -3551,8 +3823,9 @@ declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountsCont
3551
3823
  showLedgerBalance?: boolean;
3552
3824
  showUnlinkItem?: boolean;
3553
3825
  showBreakConnection?: boolean;
3826
+ showAddAccount?: boolean;
3554
3827
  }
3555
- export const LinkedAccountsContent: ({ asWidget, showLedgerBalance, showUnlinkItem, showBreakConnection, }: LinkedAccountsDataProps) => import("react/jsx-runtime").JSX.Element;
3828
+ export const LinkedAccountsContent: ({ asWidget, showLedgerBalance, showUnlinkItem, showBreakConnection, showAddAccount, }: LinkedAccountsDataProps) => import("react/jsx-runtime").JSX.Element;
3556
3829
  export {};
3557
3830
 
3558
3831
  }
@@ -3722,13 +3995,7 @@ declare module '@layerfi/components/components/Pagination/Pagination' {
3722
3995
  hasMore?: boolean;
3723
3996
  fetchMore?: () => void;
3724
3997
  }
3725
- /**
3726
- * Pagination wrapped into container with spacing and positioning.
3727
- * Use PaginationContent component, if you want to render plain pagination element
3728
- * without spacings and positioning.
3729
- */
3730
- export const Pagination: (props: PaginationProps) => import("react/jsx-runtime").JSX.Element;
3731
- export const PaginationContent: ({ onPageChange, totalCount, siblingCount, currentPage, pageSize, hasMore, fetchMore, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
3998
+ export const Pagination: ({ onPageChange, totalCount, siblingCount, currentPage, pageSize, hasMore, fetchMore, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
3732
3999
 
3733
4000
  }
3734
4001
  declare module '@layerfi/components/components/Pagination/index' {
@@ -3843,9 +4110,10 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
3843
4110
  comparisonConfig?: ProfitAndLossCompareConfig;
3844
4111
  reportingBasis?: ReportingBasis;
3845
4112
  asContainer?: boolean;
4113
+ withReportsModeProvider?: boolean;
3846
4114
  };
3847
4115
  const ProfitAndLoss: {
3848
- ({ children, tagFilter, comparisonConfig, reportingBasis, asContainer, }: Props): import("react/jsx-runtime").JSX.Element;
4116
+ ({ withReportsModeProvider, ...restProps }: Props): import("react/jsx-runtime").JSX.Element;
3849
4117
  Chart: ({ forceRerenderOnDataChange, tagFilter, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => import("react/jsx-runtime").JSX.Element;
3850
4118
  Context: import("react").Context<{
3851
4119
  data: import("@layerfi/components/types").ProfitAndLoss | undefined;
@@ -3856,11 +4124,6 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
3856
4124
  isLoading: boolean;
3857
4125
  isValidating: boolean;
3858
4126
  error: unknown;
3859
- dateRange: {
3860
- startDate: Date;
3861
- endDate: Date;
3862
- };
3863
- changeDateRange: ({ startDate: start, endDate: end }: import("@layerfi/components/types").DateRange) => void;
3864
4127
  refetch: () => void;
3865
4128
  sidebarScope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope;
3866
4129
  setSidebarScope: import("react").Dispatch<import("react").SetStateAction<import("../../hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope>>;
@@ -3868,6 +4131,10 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
3868
4131
  filters: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").ProfitAndLossFilters;
3869
4132
  setFilterTypes: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, types: string[]) => void;
3870
4133
  tagFilter: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").PnlTagFilter | undefined;
4134
+ dateRange: {
4135
+ startDate: Date;
4136
+ endDate: Date;
4137
+ };
3871
4138
  }>;
3872
4139
  ComparisonContext: import("react").Context<{
3873
4140
  data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
@@ -4245,14 +4512,13 @@ declare module '@layerfi/components/components/ProjectProfitability/ProjectSelec
4245
4512
 
4246
4513
  }
4247
4514
  declare module '@layerfi/components/components/SearchField/SearchField' {
4248
- type SearchFieldProps = {
4515
+ export type SearchFieldProps = {
4249
4516
  value: string;
4250
4517
  slot?: string;
4251
4518
  onChange: (value: string) => void;
4252
4519
  label: string;
4253
4520
  };
4254
4521
  export function SearchField({ slot, label, ...restProps }: SearchFieldProps): import("react/jsx-runtime").JSX.Element;
4255
- export {};
4256
4522
 
4257
4523
  }
4258
4524
  declare module '@layerfi/components/components/SelectVendor/SelectVendor' {
@@ -4321,6 +4587,7 @@ declare module '@layerfi/components/components/StatementOfCashFlow/StatementOfCa
4321
4587
  export type StatementOfCashFlowProps = TimeRangePickerConfig & {
4322
4588
  stringOverrides?: StatementOfCashFlowStringOverrides;
4323
4589
  };
4590
+ export const StandaloneStatementOfCashFlow: (props: StatementOfCashFlowProps) => import("react/jsx-runtime").JSX.Element;
4324
4591
  export const StatementOfCashFlow: (props: StatementOfCashFlowProps) => import("react/jsx-runtime").JSX.Element;
4325
4592
 
4326
4593
  }
@@ -4372,7 +4639,7 @@ declare module '@layerfi/components/components/StatementOfCashFlow/download/useC
4372
4639
 
4373
4640
  }
4374
4641
  declare module '@layerfi/components/components/StatementOfCashFlow/index' {
4375
- export { StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
4642
+ export { StatementOfCashFlow, StandaloneStatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
4376
4643
 
4377
4644
  }
4378
4645
  declare module '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable' {
@@ -5096,6 +5363,50 @@ declare module '@layerfi/components/components/ui/Checkbox/Checkbox' {
5096
5363
  export function CheckboxWithTooltip({ tooltip, ...props }: CheckboxWithTooltipProps): import("react/jsx-runtime").JSX.Element;
5097
5364
  export {};
5098
5365
 
5366
+ }
5367
+ declare module '@layerfi/components/components/ui/ComboBox/ComboBox' {
5368
+ import { type ReactNode } from 'react';
5369
+ import type { OneOf } from '@layerfi/components/types/utility/oneOf';
5370
+ type ComboBoxOption = {
5371
+ label: string;
5372
+ value: string;
5373
+ isDisabled?: boolean;
5374
+ };
5375
+ type OptionsOrGroups<T> = OneOf<[
5376
+ {
5377
+ options: ReadonlyArray<T>;
5378
+ },
5379
+ {
5380
+ groups: ReadonlyArray<{
5381
+ label: string;
5382
+ options: ReadonlyArray<T>;
5383
+ }>;
5384
+ }
5385
+ ]>;
5386
+ type AriaLabelProps = Pick<React.AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby'>;
5387
+ type ComboBoxProps<T extends ComboBoxOption> = {
5388
+ className?: string;
5389
+ selectedValue: T | null;
5390
+ onSelectedValueChange: (value: T | null) => void;
5391
+ onInputValueChange?: (value: string) => void;
5392
+ placeholder: string;
5393
+ slots?: {
5394
+ EmptyMessage?: ReactNode;
5395
+ ErrorMessage?: ReactNode;
5396
+ SelectedValue?: ReactNode;
5397
+ };
5398
+ inputId?: string;
5399
+ isDisabled?: boolean;
5400
+ isError?: boolean;
5401
+ isLoading?: boolean;
5402
+ isMutating?: boolean;
5403
+ isSearchable?: boolean;
5404
+ isClearable?: boolean;
5405
+ displayDisabledAsSelected?: boolean;
5406
+ } & OptionsOrGroups<T> & AriaLabelProps;
5407
+ export function ComboBox<T extends ComboBoxOption>({ className, selectedValue, onSelectedValueChange, options, groups, onInputValueChange, placeholder, slots, inputId, isDisabled, isError, isLoading, isMutating, isSearchable, isClearable, displayDisabledAsSelected, ...ariaProps }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
5408
+ export {};
5409
+
5099
5410
  }
5100
5411
  declare module '@layerfi/components/components/ui/DropdownMenu/DropdownMenu' {
5101
5412
  import React, { PropsWithChildren } from 'react';
@@ -5167,7 +5478,7 @@ declare module '@layerfi/components/components/ui/ListBox/ListBox' {
5167
5478
  pbs?: import("@layerfi/components/components/ui/sharedUITypes").Spacing;
5168
5479
  size?: "xs" | "sm" | "md" | "lg";
5169
5480
  status?: "error";
5170
- variant?: "subtle";
5481
+ variant?: "placeholder" | "subtle";
5171
5482
  weight?: "normal" | "bold";
5172
5483
  } & {
5173
5484
  children?: import("react").ReactNode | undefined;
@@ -5246,7 +5557,7 @@ declare module '@layerfi/components/components/ui/Modal/ModalSlots' {
5246
5557
  pbs?: import("@layerfi/components/components/ui/sharedUITypes").Spacing;
5247
5558
  size?: "xs" | "sm" | "md" | "lg";
5248
5559
  status?: "error";
5249
- variant?: "subtle";
5560
+ variant?: "placeholder" | "subtle";
5250
5561
  weight?: "normal" | "bold";
5251
5562
  } & {
5252
5563
  children?: import("react").ReactNode | undefined;
@@ -5271,6 +5582,10 @@ declare module '@layerfi/components/components/ui/Popover/Popover' {
5271
5582
  export const Popover: import("react").ForwardRefExoticComponent<PopoverProps & import("react").RefAttributes<HTMLElement>>;
5272
5583
  export {};
5273
5584
 
5585
+ }
5586
+ declare module '@layerfi/components/components/ui/Portal/Portal' {
5587
+ export const PORTAL_CLASS_NAME = "Layer__Portal";
5588
+
5274
5589
  }
5275
5590
  declare module '@layerfi/components/components/ui/SearchField/MinimalSearchField' {
5276
5591
  import { type SearchFieldProps as ReactAriaSearchFieldProps } from 'react-aria-components';
@@ -5295,7 +5610,7 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
5295
5610
  import { type PropsWithChildren } from 'react';
5296
5611
  import type { Spacing } from '@layerfi/components/components/ui/sharedUITypes';
5297
5612
  export type StackProps = PropsWithChildren<{
5298
- align?: 'start' | 'center';
5613
+ align?: 'start' | 'center' | 'baseline';
5299
5614
  gap?: Spacing;
5300
5615
  justify?: 'start' | 'center' | 'end' | 'space-between';
5301
5616
  overflow?: 'scroll' | 'hidden' | 'auto' | 'clip' | 'visible';
@@ -5310,7 +5625,7 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
5310
5625
  className?: string;
5311
5626
  }>;
5312
5627
  export const VStack: import("react").ForwardRefExoticComponent<{
5313
- align?: "start" | "center";
5628
+ align?: "start" | "center" | "baseline";
5314
5629
  gap?: Spacing;
5315
5630
  justify?: "start" | "center" | "end" | "space-between";
5316
5631
  overflow?: "scroll" | "hidden" | "auto" | "clip" | "visible";
@@ -5327,7 +5642,7 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
5327
5642
  children?: import("react").ReactNode | undefined;
5328
5643
  } & import("react").RefAttributes<HTMLDivElement>>;
5329
5644
  export const HStack: import("react").ForwardRefExoticComponent<{
5330
- align?: "start" | "center";
5645
+ align?: "start" | "center" | "baseline";
5331
5646
  gap?: Spacing;
5332
5647
  justify?: "start" | "center" | "end" | "space-between";
5333
5648
  overflow?: "scroll" | "hidden" | "auto" | "clip" | "visible";
@@ -5345,6 +5660,32 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
5345
5660
  } & import("react").RefAttributes<HTMLDivElement>>;
5346
5661
  export const Spacer: () => import("react/jsx-runtime").JSX.Element;
5347
5662
 
5663
+ }
5664
+ declare module '@layerfi/components/components/ui/Table/Table' {
5665
+ import { type CellProps, type ColumnProps, type RowProps, type TableBodyProps, type TableHeaderProps, type TableProps } from 'react-aria-components';
5666
+ const Table: import("react").ForwardRefExoticComponent<TableProps & import("react").RefAttributes<HTMLTableElement>>;
5667
+ const TableHeader: (<T>(props: TableHeaderProps<T> & {
5668
+ ref?: React.Ref<HTMLTableSectionElement>;
5669
+ }) => React.ReactElement) & {
5670
+ displayName?: string;
5671
+ };
5672
+ const TableBody: (<T>(props: TableBodyProps<T> & {
5673
+ ref?: React.Ref<HTMLTableSectionElement>;
5674
+ }) => React.ReactElement) & {
5675
+ displayName?: string;
5676
+ };
5677
+ const Row: (<T>(props: RowProps<T> & {
5678
+ ref?: React.Ref<HTMLTableRowElement>;
5679
+ }) => React.ReactElement) & {
5680
+ displayName?: string;
5681
+ };
5682
+ type ColumnStyleProps = {
5683
+ textAlign?: 'left' | 'center' | 'right';
5684
+ };
5685
+ const Column: import("react").ForwardRefExoticComponent<ColumnProps & ColumnStyleProps & import("react").RefAttributes<HTMLTableColElement>>;
5686
+ const Cell: import("react").ForwardRefExoticComponent<CellProps & import("react").RefAttributes<HTMLTableCellElement>>;
5687
+ export { Table, TableBody, TableHeader, Cell, Column, Row, };
5688
+
5348
5689
  }
5349
5690
  declare module '@layerfi/components/components/ui/TagGroup/TagGroup' {
5350
5691
  import { TagGroup as ReactAriaTagGroup, TagList as ReactAriaTagList, Tag as ReactAriaTag } from 'react-aria-components';
@@ -5397,7 +5738,7 @@ declare module '@layerfi/components/components/ui/Typography/Text' {
5397
5738
  pbs?: Spacing;
5398
5739
  size?: 'xs' | 'sm' | 'md' | 'lg';
5399
5740
  status?: 'error';
5400
- variant?: 'subtle';
5741
+ variant?: 'placeholder' | 'subtle';
5401
5742
  weight?: 'normal' | 'bold';
5402
5743
  };
5403
5744
  type TextRenderingProps = {
@@ -5863,11 +6204,13 @@ declare module '@layerfi/components/contexts/LedgerAccountsContext/LedgerAccount
5863
6204
  error?: unknown;
5864
6205
  errorEntry?: unknown;
5865
6206
  refetch: () => void;
5866
- accountId?: string;
5867
- setAccountId: (id?: string) => void;
6207
+ selectedAccount: import("@layerfi/components/types/chart_of_accounts").LedgerAccountBalanceWithNodeType | undefined;
6208
+ setSelectedAccount: (account: import("@layerfi/components/types/chart_of_accounts").LedgerAccountBalanceWithNodeType | undefined) => void;
5868
6209
  selectedEntryId?: string;
5869
6210
  setSelectedEntryId: (id?: string) => void;
5870
6211
  closeSelectedEntry: () => void;
6212
+ hasMore: boolean;
6213
+ fetchMore: () => void;
5871
6214
  }>;
5872
6215
 
5873
6216
  }
@@ -6106,10 +6449,11 @@ declare module '@layerfi/components/features/customerVendor/components/CustomerV
6106
6449
  type CustomerVendorSelectorProps = {
6107
6450
  selectedCustomerVendor: CustomerVendor | null;
6108
6451
  onSelectedCustomerVendorChange: (customerVendor: CustomerVendor | null) => void;
6452
+ placeholder: string;
6109
6453
  isMutating?: boolean;
6110
6454
  isReadOnly?: boolean;
6111
6455
  };
6112
- export function CustomerVendorSelector({ selectedCustomerVendor, onSelectedCustomerVendorChange, isMutating, isReadOnly, }: CustomerVendorSelectorProps): import("react/jsx-runtime").JSX.Element | null;
6456
+ export function CustomerVendorSelector({ selectedCustomerVendor, onSelectedCustomerVendorChange, placeholder, isMutating, isReadOnly, }: CustomerVendorSelectorProps): import("react/jsx-runtime").JSX.Element | null;
6113
6457
  export {};
6114
6458
 
6115
6459
  }
@@ -6125,6 +6469,7 @@ declare module '@layerfi/components/features/customerVendor/customerVendorSchema
6125
6469
  email: Schema.NullOr<typeof Schema.String>;
6126
6470
  mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
6127
6471
  officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
6472
+ addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
6128
6473
  status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
6129
6474
  memo: Schema.NullOr<typeof Schema.String>;
6130
6475
  _local: Schema.optional<Schema.Struct<{
@@ -6153,6 +6498,7 @@ declare module '@layerfi/components/features/customerVendor/customerVendorSchema
6153
6498
  readonly email: string | null;
6154
6499
  readonly mobile_phone: string | null;
6155
6500
  readonly office_phone: string | null;
6501
+ readonly address_string: string | null;
6156
6502
  readonly status: string;
6157
6503
  readonly memo: string | null;
6158
6504
  readonly customerVendorType: "CUSTOMER";
@@ -6181,6 +6527,7 @@ declare module '@layerfi/components/features/customerVendor/customerVendorSchema
6181
6527
  readonly email: string | null;
6182
6528
  readonly mobilePhone: string | null;
6183
6529
  readonly officePhone: string | null;
6530
+ readonly addressString: string | null;
6184
6531
  readonly status: "ACTIVE" | "ARCHIVED";
6185
6532
  readonly memo: string | null;
6186
6533
  readonly _local?: {
@@ -6216,6 +6563,7 @@ declare module '@layerfi/components/features/customers/api/useListCustomers' {
6216
6563
  email: Schema.NullOr<typeof Schema.String>;
6217
6564
  mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
6218
6565
  officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
6566
+ addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
6219
6567
  status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
6220
6568
  memo: Schema.NullOr<typeof Schema.String>;
6221
6569
  _local: Schema.optional<Schema.Struct<{
@@ -6243,6 +6591,7 @@ declare module '@layerfi/components/features/customers/api/useListCustomers' {
6243
6591
  readonly email: string | null;
6244
6592
  readonly mobilePhone: string | null;
6245
6593
  readonly officePhone: string | null;
6594
+ readonly addressString: string | null;
6246
6595
  readonly status: "ACTIVE" | "ARCHIVED";
6247
6596
  readonly memo: string | null;
6248
6597
  readonly _local?: {
@@ -6279,6 +6628,7 @@ declare module '@layerfi/components/features/customers/customersSchemas' {
6279
6628
  email: Schema.NullOr<typeof Schema.String>;
6280
6629
  mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
6281
6630
  officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
6631
+ addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
6282
6632
  status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
6283
6633
  memo: Schema.NullOr<typeof Schema.String>;
6284
6634
  _local: Schema.optional<Schema.Struct<{
@@ -6293,6 +6643,7 @@ declare module '@layerfi/components/features/customers/customersSchemas' {
6293
6643
  readonly email: string | null;
6294
6644
  readonly mobilePhone: string | null;
6295
6645
  readonly officePhone: string | null;
6646
+ readonly addressString: string | null;
6296
6647
  readonly status: "ACTIVE" | "ARCHIVED";
6297
6648
  readonly memo: string | null;
6298
6649
  readonly _local?: {
@@ -6306,6 +6657,7 @@ declare module '@layerfi/components/features/customers/customersSchemas' {
6306
6657
  readonly email: string | null;
6307
6658
  readonly mobile_phone: string | null;
6308
6659
  readonly office_phone: string | null;
6660
+ readonly address_string: string | null;
6309
6661
  readonly status: string;
6310
6662
  readonly memo: string | null;
6311
6663
  readonly _local?: {
@@ -6313,6 +6665,744 @@ declare module '@layerfi/components/features/customers/customersSchemas' {
6313
6665
  } | undefined;
6314
6666
  };
6315
6667
 
6668
+ }
6669
+ declare module '@layerfi/components/features/invoices/api/useListInvoices' {
6670
+ import { type SWRInfiniteResponse } from 'swr/infinite';
6671
+ import { Schema } from 'effect';
6672
+ import { type PaginationParams, type SortParams } from '@layerfi/components/types/utility/pagination';
6673
+ import { InvoiceStatus, type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
6674
+ export const LIST_INVOICES_TAG_KEY = "#list-invoices";
6675
+ type ListInvoicesBaseParams = {
6676
+ businessId: string;
6677
+ };
6678
+ type ListInvoicesFilterParams = {
6679
+ status?: ReadonlyArray<InvoiceStatus>;
6680
+ dueAtStart?: Date;
6681
+ dueAtEnd?: Date;
6682
+ };
6683
+ enum SortBy {
6684
+ SentAt = "sent_at"
6685
+ }
6686
+ type ListInvoicesOptions = ListInvoicesFilterParams & PaginationParams & SortParams<SortBy>;
6687
+ type ListInvoicesParams = ListInvoicesBaseParams & ListInvoicesOptions;
6688
+ const ListInvoicesReturnSchema: Schema.Struct<{
6689
+ data: Schema.Array$<Schema.Struct<{
6690
+ id: typeof Schema.UUID;
6691
+ businessId: Schema.PropertySignature<":", string, "business_id", ":", string, false, never>;
6692
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
6693
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<InvoiceStatus, InvoiceStatus, never>>;
6694
+ sentAt: Schema.PropertySignature<":", Date | null, "sent_at", ":", string | null, false, never>;
6695
+ dueAt: Schema.PropertySignature<":", Date | null, "due_at", ":", string | null, false, never>;
6696
+ paidAt: Schema.PropertySignature<":", Date | null, "paid_at", ":", string | null, false, never>;
6697
+ voidedAt: Schema.PropertySignature<":", Date | null, "voided_at", ":", string | null, false, never>;
6698
+ invoiceNumber: Schema.PropertySignature<":", string | null, "invoice_number", ":", string | null, false, never>;
6699
+ recipientName: Schema.PropertySignature<":", string | null, "recipient_name", ":", string | null, false, never>;
6700
+ customer: Schema.NullOr<Schema.Struct<{
6701
+ id: typeof Schema.UUID;
6702
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
6703
+ individualName: Schema.PropertySignature<":", string | null, "individual_name", ":", string | null, false, never>;
6704
+ companyName: Schema.PropertySignature<":", string | null, "company_name", ":", string | null, false, never>;
6705
+ email: Schema.NullOr<typeof Schema.String>;
6706
+ mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
6707
+ officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
6708
+ addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
6709
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
6710
+ memo: Schema.NullOr<typeof Schema.String>;
6711
+ _local: Schema.optional<Schema.Struct<{
6712
+ isOptimistic: typeof Schema.Boolean;
6713
+ }>>;
6714
+ }>>;
6715
+ lineItems: Schema.PropertySignature<":", readonly {
6716
+ readonly id: string;
6717
+ readonly externalId: string | null;
6718
+ readonly memo: string | null;
6719
+ readonly description: string | null;
6720
+ readonly product: string | null;
6721
+ readonly subtotal: number;
6722
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
6723
+ readonly invoiceId: string;
6724
+ readonly unitPrice: number;
6725
+ readonly discountAmount: number;
6726
+ readonly salesTaxTotal: number;
6727
+ readonly totalAmount: number;
6728
+ }[], "line_items", ":", readonly {
6729
+ readonly id: string;
6730
+ readonly external_id: string | null;
6731
+ readonly memo: string | null;
6732
+ readonly description: string | null;
6733
+ readonly product: string | null;
6734
+ readonly subtotal: number;
6735
+ readonly quantity: string;
6736
+ readonly invoice_id: string;
6737
+ readonly unit_price: number;
6738
+ readonly discount_amount: number;
6739
+ readonly sales_taxes_total: number;
6740
+ readonly total_amount: number;
6741
+ }[], false, never>;
6742
+ subtotal: typeof Schema.Number;
6743
+ additionalDiscount: Schema.PropertySignature<":", number, "additional_discount", ":", number, false, never>;
6744
+ additionalSalesTaxesTotal: Schema.PropertySignature<":", number, "additional_sales_taxes_total", ":", number, false, never>;
6745
+ totalAmount: Schema.PropertySignature<":", number, "total_amount", ":", number, false, never>;
6746
+ outstandingBalance: Schema.PropertySignature<":", number, "outstanding_balance", ":", number, false, never>;
6747
+ importedAt: Schema.PropertySignature<":", Date, "imported_at", ":", string, false, never>;
6748
+ updatedAt: Schema.PropertySignature<":", Date | null, "updated_at", ":", string | null, false, never>;
6749
+ memo: Schema.NullOr<typeof Schema.String>;
6750
+ }>>;
6751
+ meta: Schema.Struct<{
6752
+ pagination: Schema.Struct<{
6753
+ cursor: Schema.NullOr<typeof Schema.String>;
6754
+ hasMore: Schema.PropertySignature<":", boolean, "has_more", ":", boolean, false, never>;
6755
+ totalCount: Schema.PropertySignature<":", number | undefined, "total_count", ":", number | undefined, false, never>;
6756
+ }>;
6757
+ }>;
6758
+ }>;
6759
+ type ListInvoicesReturn = typeof ListInvoicesReturnSchema.Type;
6760
+ class ListInvoicesSWRResponse {
6761
+ private swrResponse;
6762
+ constructor(swrResponse: SWRInfiniteResponse<ListInvoicesReturn>);
6763
+ get data(): {
6764
+ readonly data: readonly {
6765
+ readonly id: string;
6766
+ readonly externalId: string | null;
6767
+ readonly status: InvoiceStatus;
6768
+ readonly memo: string | null;
6769
+ readonly customer: {
6770
+ readonly id: string;
6771
+ readonly externalId: string | null;
6772
+ readonly individualName: string | null;
6773
+ readonly companyName: string | null;
6774
+ readonly email: string | null;
6775
+ readonly mobilePhone: string | null;
6776
+ readonly officePhone: string | null;
6777
+ readonly addressString: string | null;
6778
+ readonly status: "ACTIVE" | "ARCHIVED";
6779
+ readonly memo: string | null;
6780
+ readonly _local?: {
6781
+ readonly isOptimistic: boolean;
6782
+ } | undefined;
6783
+ } | null;
6784
+ readonly businessId: string;
6785
+ readonly updatedAt: Date | null;
6786
+ readonly subtotal: number;
6787
+ readonly paidAt: Date | null;
6788
+ readonly totalAmount: number;
6789
+ readonly sentAt: Date | null;
6790
+ readonly dueAt: Date | null;
6791
+ readonly voidedAt: Date | null;
6792
+ readonly invoiceNumber: string | null;
6793
+ readonly recipientName: string | null;
6794
+ readonly lineItems: readonly {
6795
+ readonly id: string;
6796
+ readonly externalId: string | null;
6797
+ readonly memo: string | null;
6798
+ readonly description: string | null;
6799
+ readonly product: string | null;
6800
+ readonly subtotal: number;
6801
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
6802
+ readonly invoiceId: string;
6803
+ readonly unitPrice: number;
6804
+ readonly discountAmount: number;
6805
+ readonly salesTaxTotal: number;
6806
+ readonly totalAmount: number;
6807
+ }[];
6808
+ readonly additionalDiscount: number;
6809
+ readonly additionalSalesTaxesTotal: number;
6810
+ readonly outstandingBalance: number;
6811
+ readonly importedAt: Date;
6812
+ }[];
6813
+ readonly meta: {
6814
+ readonly pagination: {
6815
+ readonly cursor: string | null;
6816
+ readonly totalCount: number | undefined;
6817
+ readonly hasMore: boolean;
6818
+ };
6819
+ };
6820
+ }[] | undefined;
6821
+ get size(): number;
6822
+ get setSize(): (size: number | ((_size: number) => number)) => Promise<{
6823
+ readonly data: readonly {
6824
+ readonly id: string;
6825
+ readonly externalId: string | null;
6826
+ readonly status: InvoiceStatus;
6827
+ readonly memo: string | null;
6828
+ readonly customer: {
6829
+ readonly id: string;
6830
+ readonly externalId: string | null;
6831
+ readonly individualName: string | null;
6832
+ readonly companyName: string | null;
6833
+ readonly email: string | null;
6834
+ readonly mobilePhone: string | null;
6835
+ readonly officePhone: string | null;
6836
+ readonly addressString: string | null;
6837
+ readonly status: "ACTIVE" | "ARCHIVED";
6838
+ readonly memo: string | null;
6839
+ readonly _local?: {
6840
+ readonly isOptimistic: boolean;
6841
+ } | undefined;
6842
+ } | null;
6843
+ readonly businessId: string;
6844
+ readonly updatedAt: Date | null;
6845
+ readonly subtotal: number;
6846
+ readonly paidAt: Date | null;
6847
+ readonly totalAmount: number;
6848
+ readonly sentAt: Date | null;
6849
+ readonly dueAt: Date | null;
6850
+ readonly voidedAt: Date | null;
6851
+ readonly invoiceNumber: string | null;
6852
+ readonly recipientName: string | null;
6853
+ readonly lineItems: readonly {
6854
+ readonly id: string;
6855
+ readonly externalId: string | null;
6856
+ readonly memo: string | null;
6857
+ readonly description: string | null;
6858
+ readonly product: string | null;
6859
+ readonly subtotal: number;
6860
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
6861
+ readonly invoiceId: string;
6862
+ readonly unitPrice: number;
6863
+ readonly discountAmount: number;
6864
+ readonly salesTaxTotal: number;
6865
+ readonly totalAmount: number;
6866
+ }[];
6867
+ readonly additionalDiscount: number;
6868
+ readonly additionalSalesTaxesTotal: number;
6869
+ readonly outstandingBalance: number;
6870
+ readonly importedAt: Date;
6871
+ }[];
6872
+ readonly meta: {
6873
+ readonly pagination: {
6874
+ readonly cursor: string | null;
6875
+ readonly totalCount: number | undefined;
6876
+ readonly hasMore: boolean;
6877
+ };
6878
+ };
6879
+ }[] | undefined>;
6880
+ get isLoading(): boolean;
6881
+ get isValidating(): boolean;
6882
+ get isError(): boolean;
6883
+ get refetch(): import("swr/infinite").SWRInfiniteKeyedMutator<{
6884
+ readonly data: readonly {
6885
+ readonly id: string;
6886
+ readonly externalId: string | null;
6887
+ readonly status: InvoiceStatus;
6888
+ readonly memo: string | null;
6889
+ readonly customer: {
6890
+ readonly id: string;
6891
+ readonly externalId: string | null;
6892
+ readonly individualName: string | null;
6893
+ readonly companyName: string | null;
6894
+ readonly email: string | null;
6895
+ readonly mobilePhone: string | null;
6896
+ readonly officePhone: string | null;
6897
+ readonly addressString: string | null;
6898
+ readonly status: "ACTIVE" | "ARCHIVED";
6899
+ readonly memo: string | null;
6900
+ readonly _local?: {
6901
+ readonly isOptimistic: boolean;
6902
+ } | undefined;
6903
+ } | null;
6904
+ readonly businessId: string;
6905
+ readonly updatedAt: Date | null;
6906
+ readonly subtotal: number;
6907
+ readonly paidAt: Date | null;
6908
+ readonly totalAmount: number;
6909
+ readonly sentAt: Date | null;
6910
+ readonly dueAt: Date | null;
6911
+ readonly voidedAt: Date | null;
6912
+ readonly invoiceNumber: string | null;
6913
+ readonly recipientName: string | null;
6914
+ readonly lineItems: readonly {
6915
+ readonly id: string;
6916
+ readonly externalId: string | null;
6917
+ readonly memo: string | null;
6918
+ readonly description: string | null;
6919
+ readonly product: string | null;
6920
+ readonly subtotal: number;
6921
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
6922
+ readonly invoiceId: string;
6923
+ readonly unitPrice: number;
6924
+ readonly discountAmount: number;
6925
+ readonly salesTaxTotal: number;
6926
+ readonly totalAmount: number;
6927
+ }[];
6928
+ readonly additionalDiscount: number;
6929
+ readonly additionalSalesTaxesTotal: number;
6930
+ readonly outstandingBalance: number;
6931
+ readonly importedAt: Date;
6932
+ }[];
6933
+ readonly meta: {
6934
+ readonly pagination: {
6935
+ readonly cursor: string | null;
6936
+ readonly totalCount: number | undefined;
6937
+ readonly hasMore: boolean;
6938
+ };
6939
+ };
6940
+ }[]>;
6941
+ }
6942
+ export const listInvoices: (baseUrl: string, accessToken: string | undefined, options?: {
6943
+ params?: ListInvoicesParams | undefined;
6944
+ } | undefined) => () => Promise<{
6945
+ readonly data: readonly {
6946
+ readonly id: string;
6947
+ readonly externalId: string | null;
6948
+ readonly status: InvoiceStatus;
6949
+ readonly memo: string | null;
6950
+ readonly customer: {
6951
+ readonly id: string;
6952
+ readonly externalId: string | null;
6953
+ readonly individualName: string | null;
6954
+ readonly companyName: string | null;
6955
+ readonly email: string | null;
6956
+ readonly mobilePhone: string | null;
6957
+ readonly officePhone: string | null;
6958
+ readonly addressString: string | null;
6959
+ readonly status: "ACTIVE" | "ARCHIVED";
6960
+ readonly memo: string | null;
6961
+ readonly _local?: {
6962
+ readonly isOptimistic: boolean;
6963
+ } | undefined;
6964
+ } | null;
6965
+ readonly businessId: string;
6966
+ readonly updatedAt: Date | null;
6967
+ readonly subtotal: number;
6968
+ readonly paidAt: Date | null;
6969
+ readonly totalAmount: number;
6970
+ readonly sentAt: Date | null;
6971
+ readonly dueAt: Date | null;
6972
+ readonly voidedAt: Date | null;
6973
+ readonly invoiceNumber: string | null;
6974
+ readonly recipientName: string | null;
6975
+ readonly lineItems: readonly {
6976
+ readonly id: string;
6977
+ readonly externalId: string | null;
6978
+ readonly memo: string | null;
6979
+ readonly description: string | null;
6980
+ readonly product: string | null;
6981
+ readonly subtotal: number;
6982
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
6983
+ readonly invoiceId: string;
6984
+ readonly unitPrice: number;
6985
+ readonly discountAmount: number;
6986
+ readonly salesTaxTotal: number;
6987
+ readonly totalAmount: number;
6988
+ }[];
6989
+ readonly additionalDiscount: number;
6990
+ readonly additionalSalesTaxesTotal: number;
6991
+ readonly outstandingBalance: number;
6992
+ readonly importedAt: Date;
6993
+ }[];
6994
+ readonly meta: {
6995
+ readonly pagination: {
6996
+ readonly cursor: string | null;
6997
+ readonly totalCount: number | undefined;
6998
+ readonly hasMore: boolean;
6999
+ };
7000
+ };
7001
+ }>;
7002
+ export function useListInvoices({ status, dueAtStart, dueAtEnd, sortBy, sortOrder, limit, showTotalCount, }?: ListInvoicesOptions): ListInvoicesSWRResponse;
7003
+ export function useInvoicesInvalidator(): {
7004
+ invalidateInvoices: () => Promise<undefined[]>;
7005
+ debouncedInvalidateInvoices: import("lodash").DebouncedFunc<() => Promise<undefined[]>>;
7006
+ };
7007
+ export function useInvoicesOptimisticUpdater(): {
7008
+ optimisticallyUpdateInvoices: (transformInvoice: (invoice: Invoice) => Invoice) => Promise<undefined[]>;
7009
+ };
7010
+ export {};
7011
+
7012
+ }
7013
+ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
7014
+ import type { Key } from 'swr';
7015
+ import { type SWRMutationResponse } from 'swr/mutation';
7016
+ import { type UpsertInvoice } from '@layerfi/components/features/invoices/invoiceSchemas';
7017
+ import { Schema } from 'effect';
7018
+ export enum UpsertInvoiceMode {
7019
+ Create = "Create",
7020
+ Update = "Update"
7021
+ }
7022
+ const UpsertInvoiceReturnSchema: Schema.Struct<{
7023
+ data: Schema.Struct<{
7024
+ id: typeof Schema.UUID;
7025
+ businessId: Schema.PropertySignature<":", string, "business_id", ":", string, false, never>;
7026
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
7027
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus, import("../invoiceSchemas").InvoiceStatus, never>>;
7028
+ sentAt: Schema.PropertySignature<":", Date | null, "sent_at", ":", string | null, false, never>;
7029
+ dueAt: Schema.PropertySignature<":", Date | null, "due_at", ":", string | null, false, never>;
7030
+ paidAt: Schema.PropertySignature<":", Date | null, "paid_at", ":", string | null, false, never>;
7031
+ voidedAt: Schema.PropertySignature<":", Date | null, "voided_at", ":", string | null, false, never>;
7032
+ invoiceNumber: Schema.PropertySignature<":", string | null, "invoice_number", ":", string | null, false, never>;
7033
+ recipientName: Schema.PropertySignature<":", string | null, "recipient_name", ":", string | null, false, never>;
7034
+ customer: Schema.NullOr<Schema.Struct<{
7035
+ id: typeof Schema.UUID;
7036
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
7037
+ individualName: Schema.PropertySignature<":", string | null, "individual_name", ":", string | null, false, never>;
7038
+ companyName: Schema.PropertySignature<":", string | null, "company_name", ":", string | null, false, never>;
7039
+ email: Schema.NullOr<typeof Schema.String>;
7040
+ mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
7041
+ officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
7042
+ addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
7043
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
7044
+ memo: Schema.NullOr<typeof Schema.String>;
7045
+ _local: Schema.optional<Schema.Struct<{
7046
+ isOptimistic: typeof Schema.Boolean;
7047
+ }>>;
7048
+ }>>;
7049
+ lineItems: Schema.PropertySignature<":", readonly {
7050
+ readonly id: string;
7051
+ readonly externalId: string | null;
7052
+ readonly memo: string | null;
7053
+ readonly description: string | null;
7054
+ readonly product: string | null;
7055
+ readonly subtotal: number;
7056
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
7057
+ readonly invoiceId: string;
7058
+ readonly unitPrice: number;
7059
+ readonly discountAmount: number;
7060
+ readonly salesTaxTotal: number;
7061
+ readonly totalAmount: number;
7062
+ }[], "line_items", ":", readonly {
7063
+ readonly id: string;
7064
+ readonly external_id: string | null;
7065
+ readonly memo: string | null;
7066
+ readonly description: string | null;
7067
+ readonly product: string | null;
7068
+ readonly subtotal: number;
7069
+ readonly quantity: string;
7070
+ readonly invoice_id: string;
7071
+ readonly unit_price: number;
7072
+ readonly discount_amount: number;
7073
+ readonly sales_taxes_total: number;
7074
+ readonly total_amount: number;
7075
+ }[], false, never>;
7076
+ subtotal: typeof Schema.Number;
7077
+ additionalDiscount: Schema.PropertySignature<":", number, "additional_discount", ":", number, false, never>;
7078
+ additionalSalesTaxesTotal: Schema.PropertySignature<":", number, "additional_sales_taxes_total", ":", number, false, never>;
7079
+ totalAmount: Schema.PropertySignature<":", number, "total_amount", ":", number, false, never>;
7080
+ outstandingBalance: Schema.PropertySignature<":", number, "outstanding_balance", ":", number, false, never>;
7081
+ importedAt: Schema.PropertySignature<":", Date, "imported_at", ":", string, false, never>;
7082
+ updatedAt: Schema.PropertySignature<":", Date | null, "updated_at", ":", string | null, false, never>;
7083
+ memo: Schema.NullOr<typeof Schema.String>;
7084
+ }>;
7085
+ }>;
7086
+ type UpsertInvoiceReturn = typeof UpsertInvoiceReturnSchema.Type;
7087
+ type UpsertInvoiceSWRMutationResponse = SWRMutationResponse<UpsertInvoiceReturn, unknown, Key, UpsertInvoice>;
7088
+ class UpsertInvoiceSWRResponse {
7089
+ private swrResponse;
7090
+ constructor(swrResponse: UpsertInvoiceSWRMutationResponse);
7091
+ get data(): {
7092
+ readonly data: {
7093
+ readonly id: string;
7094
+ readonly externalId: string | null;
7095
+ readonly status: import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus;
7096
+ readonly memo: string | null;
7097
+ readonly customer: {
7098
+ readonly id: string;
7099
+ readonly externalId: string | null;
7100
+ readonly individualName: string | null;
7101
+ readonly companyName: string | null;
7102
+ readonly email: string | null;
7103
+ readonly mobilePhone: string | null;
7104
+ readonly officePhone: string | null;
7105
+ readonly addressString: string | null;
7106
+ readonly status: "ACTIVE" | "ARCHIVED";
7107
+ readonly memo: string | null;
7108
+ readonly _local?: {
7109
+ readonly isOptimistic: boolean;
7110
+ } | undefined;
7111
+ } | null;
7112
+ readonly businessId: string;
7113
+ readonly updatedAt: Date | null;
7114
+ readonly subtotal: number;
7115
+ readonly paidAt: Date | null;
7116
+ readonly totalAmount: number;
7117
+ readonly sentAt: Date | null;
7118
+ readonly dueAt: Date | null;
7119
+ readonly voidedAt: Date | null;
7120
+ readonly invoiceNumber: string | null;
7121
+ readonly recipientName: string | null;
7122
+ readonly lineItems: readonly {
7123
+ readonly id: string;
7124
+ readonly externalId: string | null;
7125
+ readonly memo: string | null;
7126
+ readonly description: string | null;
7127
+ readonly product: string | null;
7128
+ readonly subtotal: number;
7129
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
7130
+ readonly invoiceId: string;
7131
+ readonly unitPrice: number;
7132
+ readonly discountAmount: number;
7133
+ readonly salesTaxTotal: number;
7134
+ readonly totalAmount: number;
7135
+ }[];
7136
+ readonly additionalDiscount: number;
7137
+ readonly additionalSalesTaxesTotal: number;
7138
+ readonly outstandingBalance: number;
7139
+ readonly importedAt: Date;
7140
+ };
7141
+ } | undefined;
7142
+ get trigger(): import("swr/mutation").TriggerWithArgs<{
7143
+ readonly data: {
7144
+ readonly id: string;
7145
+ readonly externalId: string | null;
7146
+ readonly status: import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus;
7147
+ readonly memo: string | null;
7148
+ readonly customer: {
7149
+ readonly id: string;
7150
+ readonly externalId: string | null;
7151
+ readonly individualName: string | null;
7152
+ readonly companyName: string | null;
7153
+ readonly email: string | null;
7154
+ readonly mobilePhone: string | null;
7155
+ readonly officePhone: string | null;
7156
+ readonly addressString: string | null;
7157
+ readonly status: "ACTIVE" | "ARCHIVED";
7158
+ readonly memo: string | null;
7159
+ readonly _local?: {
7160
+ readonly isOptimistic: boolean;
7161
+ } | undefined;
7162
+ } | null;
7163
+ readonly businessId: string;
7164
+ readonly updatedAt: Date | null;
7165
+ readonly subtotal: number;
7166
+ readonly paidAt: Date | null;
7167
+ readonly totalAmount: number;
7168
+ readonly sentAt: Date | null;
7169
+ readonly dueAt: Date | null;
7170
+ readonly voidedAt: Date | null;
7171
+ readonly invoiceNumber: string | null;
7172
+ readonly recipientName: string | null;
7173
+ readonly lineItems: readonly {
7174
+ readonly id: string;
7175
+ readonly externalId: string | null;
7176
+ readonly memo: string | null;
7177
+ readonly description: string | null;
7178
+ readonly product: string | null;
7179
+ readonly subtotal: number;
7180
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
7181
+ readonly invoiceId: string;
7182
+ readonly unitPrice: number;
7183
+ readonly discountAmount: number;
7184
+ readonly salesTaxTotal: number;
7185
+ readonly totalAmount: number;
7186
+ }[];
7187
+ readonly additionalDiscount: number;
7188
+ readonly additionalSalesTaxesTotal: number;
7189
+ readonly outstandingBalance: number;
7190
+ readonly importedAt: Date;
7191
+ };
7192
+ }, unknown, Key, {
7193
+ readonly memo: string | null;
7194
+ readonly sentAt: Date;
7195
+ readonly dueAt: Date;
7196
+ readonly invoiceNumber: string | undefined;
7197
+ readonly lineItems: readonly {
7198
+ readonly description: string | undefined;
7199
+ readonly product: string;
7200
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
7201
+ readonly unitPrice: number;
7202
+ }[];
7203
+ readonly additionalDiscount: number | undefined;
7204
+ readonly customerId: string;
7205
+ readonly additionalSalesTaxes: readonly {
7206
+ readonly amount: number;
7207
+ }[] | undefined;
7208
+ }>;
7209
+ get isMutating(): boolean;
7210
+ get isError(): boolean;
7211
+ }
7212
+ const CreateParamsSchema: Schema.Struct<{
7213
+ businessId: typeof Schema.String;
7214
+ }>;
7215
+ const UpdateParamsSchema: Schema.Struct<{
7216
+ businessId: typeof Schema.String;
7217
+ invoiceId: typeof Schema.String;
7218
+ }>;
7219
+ export type CreateParams = typeof CreateParamsSchema.Type;
7220
+ export type UpdateParams = typeof UpdateParamsSchema.Type;
7221
+ export type UpsertParams = CreateParams | UpdateParams;
7222
+ type UseUpsertInvoiceProps = {
7223
+ mode: UpsertInvoiceMode.Create;
7224
+ } | {
7225
+ mode: UpsertInvoiceMode.Update;
7226
+ invoiceId: string;
7227
+ };
7228
+ export const useUpsertInvoice: (props: UseUpsertInvoiceProps) => UpsertInvoiceSWRResponse;
7229
+ export {};
7230
+
7231
+ }
7232
+ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
7233
+ import { Schema } from 'effect';
7234
+ export enum InvoiceStatus {
7235
+ Voided = "VOIDED",
7236
+ Paid = "PAID",
7237
+ WrittenOff = "WRITTEN_OFF",
7238
+ PartiallyWrittenOff = "PARTIALLY_WRITTEN_OFF",
7239
+ PartiallyPaid = "PARTIALLY_PAID",
7240
+ Sent = "SENT"
7241
+ }
7242
+ export const TransformedInvoiceStatusSchema: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<InvoiceStatus, InvoiceStatus, never>>;
7243
+ export const InvoiceLineItemSchema: Schema.Struct<{
7244
+ id: typeof Schema.UUID;
7245
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
7246
+ invoiceId: Schema.PropertySignature<":", string, "invoice_id", ":", string, false, never>;
7247
+ description: Schema.NullOr<typeof Schema.String>;
7248
+ product: Schema.NullOr<typeof Schema.String>;
7249
+ unitPrice: Schema.PropertySignature<":", number, "unit_price", ":", number, false, never>;
7250
+ quantity: typeof Schema.BigDecimal;
7251
+ subtotal: typeof Schema.Number;
7252
+ discountAmount: Schema.PropertySignature<":", number, "discount_amount", ":", number, false, never>;
7253
+ salesTaxTotal: Schema.PropertySignature<":", number, "sales_taxes_total", ":", number, false, never>;
7254
+ totalAmount: Schema.PropertySignature<":", number, "total_amount", ":", number, false, never>;
7255
+ memo: Schema.NullOr<typeof Schema.String>;
7256
+ }>;
7257
+ export const InvoiceSchema: Schema.Struct<{
7258
+ id: typeof Schema.UUID;
7259
+ businessId: Schema.PropertySignature<":", string, "business_id", ":", string, false, never>;
7260
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
7261
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<InvoiceStatus, InvoiceStatus, never>>;
7262
+ sentAt: Schema.PropertySignature<":", Date | null, "sent_at", ":", string | null, false, never>;
7263
+ dueAt: Schema.PropertySignature<":", Date | null, "due_at", ":", string | null, false, never>;
7264
+ paidAt: Schema.PropertySignature<":", Date | null, "paid_at", ":", string | null, false, never>;
7265
+ voidedAt: Schema.PropertySignature<":", Date | null, "voided_at", ":", string | null, false, never>;
7266
+ invoiceNumber: Schema.PropertySignature<":", string | null, "invoice_number", ":", string | null, false, never>;
7267
+ recipientName: Schema.PropertySignature<":", string | null, "recipient_name", ":", string | null, false, never>;
7268
+ customer: Schema.NullOr<Schema.Struct<{
7269
+ id: typeof Schema.UUID;
7270
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
7271
+ individualName: Schema.PropertySignature<":", string | null, "individual_name", ":", string | null, false, never>;
7272
+ companyName: Schema.PropertySignature<":", string | null, "company_name", ":", string | null, false, never>;
7273
+ email: Schema.NullOr<typeof Schema.String>;
7274
+ mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
7275
+ officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
7276
+ addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
7277
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
7278
+ memo: Schema.NullOr<typeof Schema.String>;
7279
+ _local: Schema.optional<Schema.Struct<{
7280
+ isOptimistic: typeof Schema.Boolean;
7281
+ }>>;
7282
+ }>>;
7283
+ lineItems: Schema.PropertySignature<":", readonly {
7284
+ readonly id: string;
7285
+ readonly externalId: string | null;
7286
+ readonly memo: string | null;
7287
+ readonly description: string | null;
7288
+ readonly product: string | null;
7289
+ readonly subtotal: number;
7290
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
7291
+ readonly invoiceId: string;
7292
+ readonly unitPrice: number;
7293
+ readonly discountAmount: number;
7294
+ readonly salesTaxTotal: number;
7295
+ readonly totalAmount: number;
7296
+ }[], "line_items", ":", readonly {
7297
+ readonly id: string;
7298
+ readonly external_id: string | null;
7299
+ readonly memo: string | null;
7300
+ readonly description: string | null;
7301
+ readonly product: string | null;
7302
+ readonly subtotal: number;
7303
+ readonly quantity: string;
7304
+ readonly invoice_id: string;
7305
+ readonly unit_price: number;
7306
+ readonly discount_amount: number;
7307
+ readonly sales_taxes_total: number;
7308
+ readonly total_amount: number;
7309
+ }[], false, never>;
7310
+ subtotal: typeof Schema.Number;
7311
+ additionalDiscount: Schema.PropertySignature<":", number, "additional_discount", ":", number, false, never>;
7312
+ additionalSalesTaxesTotal: Schema.PropertySignature<":", number, "additional_sales_taxes_total", ":", number, false, never>;
7313
+ totalAmount: Schema.PropertySignature<":", number, "total_amount", ":", number, false, never>;
7314
+ outstandingBalance: Schema.PropertySignature<":", number, "outstanding_balance", ":", number, false, never>;
7315
+ importedAt: Schema.PropertySignature<":", Date, "imported_at", ":", string, false, never>;
7316
+ updatedAt: Schema.PropertySignature<":", Date | null, "updated_at", ":", string | null, false, never>;
7317
+ memo: Schema.NullOr<typeof Schema.String>;
7318
+ }>;
7319
+ export const UpsertInvoiceTaxLineItemSchema: Schema.Struct<{
7320
+ amount: Schema.filter<typeof Schema.NumberFromString>;
7321
+ }>;
7322
+ export const UpsertInvoiceLineItemSchema: Schema.Struct<{
7323
+ description: Schema.PropertySignature<":", string | undefined, "description", ":", string | undefined, false, never>;
7324
+ product: Schema.PropertySignature<":", string, "product", ":", string, false, never>;
7325
+ unitPrice: Schema.PropertySignature<":", number, "unit_price", ":", string, false, never>;
7326
+ quantity: Schema.PropertySignature<":", import("effect/BigDecimal").BigDecimal, "quantity", ":", string, false, never>;
7327
+ }>;
7328
+ export const UpsertInvoiceSchema: Schema.Struct<{
7329
+ sentAt: Schema.PropertySignature<":", Date, "sent_at", ":", string, false, never>;
7330
+ dueAt: Schema.PropertySignature<":", Date, "due_at", ":", string, false, never>;
7331
+ invoiceNumber: Schema.PropertySignature<":", string | undefined, "invoice_number", ":", string | undefined, false, never>;
7332
+ customerId: Schema.PropertySignature<":", string, "customer_id", ":", string, false, never>;
7333
+ memo: Schema.NullOr<typeof Schema.String>;
7334
+ lineItems: Schema.PropertySignature<":", readonly {
7335
+ readonly description: string | undefined;
7336
+ readonly product: string;
7337
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
7338
+ readonly unitPrice: number;
7339
+ }[], "line_items", ":", readonly {
7340
+ readonly description: string | undefined;
7341
+ readonly product: string;
7342
+ readonly quantity: string;
7343
+ readonly unit_price: string;
7344
+ }[], false, never>;
7345
+ additionalDiscount: Schema.PropertySignature<":", number | undefined, "additional_discount", ":", string | undefined, false, never>;
7346
+ additionalSalesTaxes: Schema.PropertySignature<":", readonly {
7347
+ readonly amount: number;
7348
+ }[] | undefined, "additional_sales_taxes", ":", readonly {
7349
+ readonly amount: string;
7350
+ }[] | undefined, false, never>;
7351
+ }>;
7352
+ export type Invoice = typeof InvoiceSchema.Type;
7353
+ export type UpsertInvoice = typeof UpsertInvoiceSchema.Type;
7354
+
7355
+ }
7356
+ declare module '@layerfi/components/features/ledger/accounts/[ledgerAccountId]/api/useListLedgerAccountLines' {
7357
+ import { LedgerAccountLineItem, LedgerAccountLineItems } from '@layerfi/components/types/ledger_accounts';
7358
+ export const LIST_LEDGER_ACCOUNT_LINES_TAG_KEY = "#list-ledger-account-lines";
7359
+ type GetLedgerAccountLinesParams = {
7360
+ businessId: string;
7361
+ accountId: string;
7362
+ include_entries_before_activation?: boolean;
7363
+ include_child_account_lines?: boolean;
7364
+ start_date?: string;
7365
+ end_date?: string;
7366
+ sort_by?: 'entry_at' | 'entry_number' | 'created_at';
7367
+ sort_order?: 'ASC' | 'ASCENDING' | 'DESC' | 'DESCENDING' | 'DES';
7368
+ cursor?: string;
7369
+ limit?: number;
7370
+ show_total_count?: boolean;
7371
+ };
7372
+ type ListLedgerAccountLinesReturn = {
7373
+ data: LedgerAccountLineItems;
7374
+ meta?: {
7375
+ pagination: {
7376
+ cursor?: string;
7377
+ has_more: boolean;
7378
+ total_count?: number;
7379
+ };
7380
+ };
7381
+ };
7382
+ export const listLedgerAccountLines: (baseUrl: string, accessToken: string | undefined, options?: {
7383
+ params?: GetLedgerAccountLinesParams | undefined;
7384
+ } | undefined) => () => Promise<ListLedgerAccountLinesReturn>;
7385
+ export type UseListLedgerAccountLinesOptions = {
7386
+ accountId: string;
7387
+ include_entries_before_activation?: boolean;
7388
+ include_child_account_lines?: boolean;
7389
+ start_date?: string;
7390
+ end_date?: string;
7391
+ sort_by?: 'entry_at' | 'entry_number' | 'created_at';
7392
+ sort_order?: 'ASC' | 'ASCENDING' | 'DESC' | 'DESCENDING' | 'DES';
7393
+ limit?: number;
7394
+ show_total_count?: boolean;
7395
+ };
7396
+ export function useListLedgerAccountLines({ accountId, include_entries_before_activation, include_child_account_lines, start_date, end_date, sort_by, sort_order, limit, show_total_count, }: UseListLedgerAccountLinesOptions): import("swr/infinite").SWRInfiniteResponse<ListLedgerAccountLinesReturn, any>;
7397
+ export function useLedgerAccountLinesInvalidator(): {
7398
+ invalidateLedgerAccountLines: () => Promise<undefined[]>;
7399
+ debouncedInvalidateLedgerAccountLines: import("lodash").DebouncedFunc<() => Promise<undefined[]>>;
7400
+ };
7401
+ export function useLedgerAccountLinesOptimisticUpdater(): {
7402
+ optimisticallyUpdateLedgerAccountLines: (transformLineItem: (lineItem: LedgerAccountLineItem) => LedgerAccountLineItem) => Promise<undefined[]>;
7403
+ };
7404
+ export {};
7405
+
6316
7406
  }
6317
7407
  declare module '@layerfi/components/features/ledger/entries/[ledgerEntryId]/tags/api/useRemoveTagFromLedgerEntry' {
6318
7408
  type RemoveTagFromLedgerEntryArg = {
@@ -6507,11 +7597,11 @@ declare module '@layerfi/components/features/tags/components/TagSelector' {
6507
7597
  export type Tag = typeof TagSchema.Type;
6508
7598
  type TagSelectorProps = {
6509
7599
  selectedTags: ReadonlyArray<Tag>;
6510
- isReadOnly?: boolean;
6511
7600
  onAddTag: (tagValue: TagValue) => void;
6512
7601
  onRemoveTag: (tag: Tag) => void;
7602
+ isReadOnly?: boolean;
6513
7603
  };
6514
- export function TagSelector({ selectedTags, isReadOnly, onAddTag, onRemoveTag, }: TagSelectorProps): import("react/jsx-runtime").JSX.Element | null;
7604
+ export function TagSelector({ selectedTags, onAddTag, onRemoveTag, isReadOnly, }: TagSelectorProps): import("react/jsx-runtime").JSX.Element | null;
6515
7605
  export {};
6516
7606
 
6517
7607
  }
@@ -7105,6 +8195,24 @@ declare module '@layerfi/components/hooks/customAccounts/useCustomAccounts' {
7105
8195
  export function useCustomAccounts({ userCreated }?: useCustomAccountsParams): import("swr").SWRResponse<import("./types").CustomAccount[], any, any>;
7106
8196
  export {};
7107
8197
 
8198
+ }
8199
+ declare module '@layerfi/components/hooks/mutation/useMinMutatingMutation' {
8200
+ import type { Key } from 'swr';
8201
+ import type { SWRMutationResponse } from 'swr/mutation';
8202
+ type UseMinLoadingMutationOptions<TData, TError, TMutationKey extends Key, TExtraArg> = {
8203
+ swrMutationResponse: SWRMutationResponse<TData, TError, TMutationKey, TExtraArg>;
8204
+ minMutatingMs?: number;
8205
+ };
8206
+ /**
8207
+ * Motivation:
8208
+ * - Some mutations are so fast that relying on the `isMutating` state can cause flickering.
8209
+ *
8210
+ * Any SWR mutation response wrapped in this hook will appear to be mutating for a minimum
8211
+ * duration.
8212
+ */
8213
+ export function useMinMutatingMutation<TData, TError, TMutationKey extends Key, TExtraArg>({ swrMutationResponse, minMutatingMs, }: UseMinLoadingMutationOptions<TData, TError, TMutationKey, TExtraArg>): SWRMutationResponse<TData, TError, TMutationKey, TExtraArg>;
8214
+ export {};
8215
+
7108
8216
  }
7109
8217
  declare module '@layerfi/components/hooks/ref/useStopClickEventsRef' {
7110
8218
  export function useStopClickEventsRefCallback(): (element: HTMLElement | null) => void;
@@ -7213,13 +8321,17 @@ declare module '@layerfi/components/hooks/useBankTransactions/useBankTransaction
7213
8321
  tagFilterQueryString?: string;
7214
8322
  };
7215
8323
  export function useBankTransactions({ categorized, direction, query, startDate, endDate, tagFilterQueryString, }: UseBankTransactionsOptions): import("swr/infinite").SWRInfiniteResponse<GetBankTransactionsReturn, any>;
8324
+ type BankTransactionsInvalidateOptions = {
8325
+ withPrecedingOptimisticUpdate?: boolean;
8326
+ };
7216
8327
  export function useBankTransactionsInvalidator(): {
7217
- invalidateBankTransactions: () => Promise<undefined[]>;
7218
- debouncedInvalidateBankTransactions: import("lodash").DebouncedFunc<() => Promise<undefined[]>>;
8328
+ invalidateBankTransactions: (invalidateOptions?: BankTransactionsInvalidateOptions) => Promise<undefined[]>;
8329
+ debouncedInvalidateBankTransactions: import("lodash").DebouncedFunc<(invalidateOptions?: BankTransactionsInvalidateOptions) => Promise<undefined[]>>;
7219
8330
  };
7220
8331
  export function useBankTransactionsOptimisticUpdater(): {
7221
8332
  optimisticallyUpdateBankTransactions: (transformTransaction: (txn: BankTransaction) => BankTransaction) => Promise<undefined[]>;
7222
8333
  };
8334
+ export {};
7223
8335
 
7224
8336
  }
7225
8337
  declare module '@layerfi/components/hooks/useBankTransactions/useBankTransactionsDownload' {
@@ -7540,6 +8652,7 @@ declare module '@layerfi/components/hooks/useLedgerAccounts/index' {
7540
8652
  }
7541
8653
  declare module '@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts' {
7542
8654
  import { LedgerAccounts, LedgerAccountsEntry } from '@layerfi/components/types';
8655
+ import type { LedgerAccountBalanceWithNodeType } from '@layerfi/components/types/chart_of_accounts';
7543
8656
  type UseLedgerAccounts = (showReversalEntries: boolean) => {
7544
8657
  data?: LedgerAccounts;
7545
8658
  entryData?: LedgerAccountsEntry;
@@ -7550,11 +8663,13 @@ declare module '@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts' {
7550
8663
  error?: unknown;
7551
8664
  errorEntry?: unknown;
7552
8665
  refetch: () => void;
7553
- accountId?: string;
7554
- setAccountId: (id?: string) => void;
8666
+ selectedAccount: LedgerAccountBalanceWithNodeType | undefined;
8667
+ setSelectedAccount: (account: LedgerAccountBalanceWithNodeType | undefined) => void;
7555
8668
  selectedEntryId?: string;
7556
8669
  setSelectedEntryId: (id?: string) => void;
7557
8670
  closeSelectedEntry: () => void;
8671
+ hasMore: boolean;
8672
+ fetchMore: () => void;
7558
8673
  };
7559
8674
  export const useLedgerAccounts: UseLedgerAccounts;
7560
8675
  export {};
@@ -7602,24 +8717,23 @@ declare module '@layerfi/components/hooks/useLinkedAccounts/useListExternalAccou
7602
8717
  export function useListExternalAccounts(): import("swr").SWRResponse<import("../../types/linked_accounts").LinkedAccount[], any, any>;
7603
8718
 
7604
8719
  }
7605
- declare module '@layerfi/components/hooks/usePagination/index' {
7606
- export { usePagination, DOTS } from '@layerfi/components/hooks/usePagination/usePagination';
7607
-
7608
- }
7609
- declare module '@layerfi/components/hooks/usePagination/usePagination' {
7610
- export const DOTS = "...";
8720
+ declare module '@layerfi/components/hooks/usePaginationRange/usePaginationRange' {
8721
+ export enum Dots {
8722
+ DotsLeft = "DotsLeft",
8723
+ DotsRight = "DotsRight"
8724
+ }
7611
8725
  export interface UsePaginationProps {
7612
8726
  totalCount: number;
7613
8727
  pageSize: number;
7614
8728
  siblingCount?: number;
7615
8729
  currentPage: number;
7616
8730
  }
7617
- export type UsePaginationReturn = (string | number)[] | undefined;
7618
- export const usePagination: ({ totalCount, pageSize, siblingCount, currentPage, }: UsePaginationProps) => UsePaginationReturn;
8731
+ export type UsePaginationReturn = (Dots | number)[];
8732
+ export const usePaginationRange: ({ totalCount, pageSize, siblingCount, currentPage, }: UsePaginationProps) => UsePaginationReturn;
7619
8733
 
7620
8734
  }
7621
8735
  declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
7622
- import { ReportingBasis, SortDirection, type DateRange } from '@layerfi/components/types';
8736
+ import { ReportingBasis, SortDirection } from '@layerfi/components/types';
7623
8737
  export type Scope = 'expenses' | 'revenue';
7624
8738
  export type SidebarScope = Scope | undefined;
7625
8739
  export type PnlTagFilter = {
@@ -7645,11 +8759,6 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
7645
8759
  isLoading: boolean;
7646
8760
  isValidating: boolean;
7647
8761
  error: unknown;
7648
- dateRange: {
7649
- startDate: Date;
7650
- endDate: Date;
7651
- };
7652
- changeDateRange: ({ startDate: start, endDate: end }: DateRange) => void;
7653
8762
  refetch: () => void;
7654
8763
  sidebarScope: SidebarScope;
7655
8764
  setSidebarScope: import("react").Dispatch<import("react").SetStateAction<SidebarScope>>;
@@ -7657,6 +8766,10 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
7657
8766
  filters: ProfitAndLossFilters;
7658
8767
  setFilterTypes: (scope: Scope, types: string[]) => void;
7659
8768
  tagFilter: PnlTagFilter | undefined;
8769
+ dateRange: {
8770
+ startDate: Date;
8771
+ endDate: Date;
8772
+ };
7660
8773
  };
7661
8774
  export {};
7662
8775
 
@@ -7991,6 +9104,12 @@ declare module '@layerfi/components/icons/ChevronRight' {
7991
9104
  const ChevronRight: ({ ...props }: IconSvgProps) => import("react/jsx-runtime").JSX.Element;
7992
9105
  export default ChevronRight;
7993
9106
 
9107
+ }
9108
+ declare module '@layerfi/components/icons/ChevronRightFill' {
9109
+ import { IconSvgProps } from '@layerfi/components/icons/types';
9110
+ const ChevronRightFill: ({ size, ...props }: IconSvgProps) => import("react/jsx-runtime").JSX.Element;
9111
+ export default ChevronRightFill;
9112
+
7994
9113
  }
7995
9114
  declare module '@layerfi/components/icons/ChevronUp' {
7996
9115
  import { SVGProps } from 'react';
@@ -8281,8 +9400,8 @@ declare module '@layerfi/components/index' {
8281
9400
  export { BankTransactions } from '@layerfi/components/components/BankTransactions/BankTransactions';
8282
9401
  export { Integrations } from '@layerfi/components/components/Integrations/Integrations';
8283
9402
  export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
8284
- export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
8285
- export { StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/index';
9403
+ export { StandaloneBalanceSheet as BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
9404
+ export { StandaloneStatementOfCashFlow as StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/index';
8286
9405
  export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
8287
9406
  export { Journal } from '@layerfi/components/components/Journal/index';
8288
9407
  export { Tasks } from '@layerfi/components/components/Tasks/Tasks';
@@ -8297,6 +9416,7 @@ declare module '@layerfi/components/index' {
8297
9416
  export { unstable_BillsView } from '@layerfi/components/views/Bills';
8298
9417
  export { Reports } from '@layerfi/components/views/Reports/index';
8299
9418
  export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
9419
+ export { unstable_Invoices } from '@layerfi/components/components/Invoices/Invoices';
8300
9420
  export { useLayerContext } from '@layerfi/components/contexts/LayerContext/index';
8301
9421
  export { useBankTransactionsContext } from '@layerfi/components/contexts/BankTransactionsContext/index';
8302
9422
  export { BankTransactionsProvider } from '@layerfi/components/providers/BankTransactionsProvider/index';
@@ -8461,32 +9581,30 @@ declare module '@layerfi/components/providers/GlobalDateStore/GlobalDateStorePro
8461
9581
  export type DatePickerMode = typeof _DATE_PICKER_MODES[number];
8462
9582
  const _RANGE_PICKER_MODES: readonly ["dayRangePicker", "monthPicker", "monthRangePicker", "yearPicker"];
8463
9583
  export type DateRangePickerMode = typeof _RANGE_PICKER_MODES[number];
9584
+ export const isDateRangePickerMode: (mode: string) => mode is DateRangePickerMode;
8464
9585
  export function useGlobalDate(): {
8465
9586
  date: Date;
8466
- displayMode: "dayPicker";
8467
9587
  };
8468
9588
  export function useGlobalDateActions(): {
8469
- set: (options: {
9589
+ setDate: (options: {
8470
9590
  date: Date;
8471
9591
  }) => void;
8472
9592
  };
8473
- export function useGlobalDateRange(): {
9593
+ export function useGlobalDateRange({ displayMode }: {
9594
+ displayMode: DateRangePickerMode;
9595
+ }): {
8474
9596
  start: Date;
8475
9597
  end: Date;
8476
- rangeDisplayMode: "dayRangePicker" | "monthPicker" | "monthRangePicker" | "yearPicker";
8477
9598
  };
8478
9599
  export function useGlobalDateRangeActions(): {
8479
- setRange: (options: {
9600
+ setRangeWithExplicitDisplayMode: (options: {
8480
9601
  start: Date;
8481
9602
  end: Date;
8482
- }) => void;
8483
- setRangeDisplayMode: (options: {
8484
9603
  rangeDisplayMode: DateRangePickerMode;
8485
9604
  }) => void;
8486
- setRangeWithExplicitDisplayMode: (options: {
9605
+ setDateRange: (options: {
8487
9606
  start: Date;
8488
9607
  end: Date;
8489
- rangeDisplayMode: DateRangePickerMode;
8490
9608
  }) => void;
8491
9609
  setMonth: (options: {
8492
9610
  start: Date;
@@ -8511,23 +9629,27 @@ declare module '@layerfi/components/providers/GlobalDateStore/GlobalDateStorePro
8511
9629
 
8512
9630
  }
8513
9631
  declare module '@layerfi/components/providers/GlobalDateStore/useGlobalDateRangePicker' {
8514
- import { type DateRangePickerMode } from '@layerfi/components/providers/GlobalDateStore/GlobalDateStoreProvider';
8515
- export function useGlobalDateRangePicker({ allowedDatePickerModes, defaultDatePickerMode, onSetMonth, }: {
9632
+ import { DateRangePickerMode } from '@layerfi/components/providers/GlobalDateStore/GlobalDateStoreProvider';
9633
+ import { type UnifiedPickerMode } from '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector';
9634
+ import { type ReadonlyArrayWithAtLeastOne } from '@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback';
9635
+ export const getAllowedDateRangePickerModes: ({ allowedDatePickerModes, defaultDatePickerMode, }: {
8516
9636
  allowedDatePickerModes?: ReadonlyArray<DateRangePickerMode>;
8517
9637
  defaultDatePickerMode?: DateRangePickerMode;
8518
- onSetMonth?: (startOfMonth: Date) => void;
8519
- }): {
8520
- allowedDateRangePickerModes: import("@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback").ReadonlyArrayWithAtLeastOne<"dayRangePicker" | "monthPicker" | "monthRangePicker" | "yearPicker">;
9638
+ }) => ReadonlyArrayWithAtLeastOne<DateRangePickerMode>;
9639
+ export const getInitialDateRangePickerMode: ({ allowedDatePickerModes, defaultDatePickerMode, }: {
9640
+ allowedDatePickerModes?: ReadonlyArray<DateRangePickerMode>;
9641
+ defaultDatePickerMode?: DateRangePickerMode;
9642
+ }) => DateRangePickerMode;
9643
+ export type UseGlobalDateRangePickerProps = {
9644
+ displayMode: DateRangePickerMode;
9645
+ setDisplayMode: (displayMode: DateRangePickerMode) => void;
9646
+ };
9647
+ export function useGlobalDateRangePicker({ displayMode, setDisplayMode }: UseGlobalDateRangePickerProps): {
8521
9648
  dateFormat: "MMM d" | undefined;
8522
9649
  rangeDisplayMode: "dayRangePicker" | "monthPicker" | "monthRangePicker" | "yearPicker";
8523
- selected: Date | [Date, Date];
8524
- setSelected: ({ start, end }: {
8525
- start: Date;
8526
- end: Date;
8527
- }) => void;
8528
- setRangeDisplayMode: (options: {
8529
- rangeDisplayMode: DateRangePickerMode;
8530
- }) => void;
9650
+ onChangeMode: (newMode: UnifiedPickerMode) => void;
9651
+ dateOrDateRange: Date | [Date, Date];
9652
+ onChangeDateOrDateRange: (dates: Date | [Date, Date | null]) => void;
8531
9653
  };
8532
9654
 
8533
9655
  }
@@ -8598,6 +9720,32 @@ declare module '@layerfi/components/providers/ReceiptsProvider/ReceiptsProvider'
8598
9720
  declare module '@layerfi/components/providers/ReceiptsProvider/index' {
8599
9721
  export { ReceiptsProvider } from '@layerfi/components/providers/ReceiptsProvider/ReceiptsProvider';
8600
9722
 
9723
+ }
9724
+ declare module '@layerfi/components/providers/ReportsModeStoreProvider/ReportsModeStoreProvider' {
9725
+ import { type PropsWithChildren } from 'react';
9726
+ import type { DatePickerMode, DateRangePickerMode } from '@layerfi/components/providers/GlobalDateStore/GlobalDateStoreProvider';
9727
+ export enum ReportKey {
9728
+ ProfitAndLoss = "ProfitAndLoss",
9729
+ BalanceSheet = "BalanceSheet",
9730
+ StatementOfCashFlows = "StatementOfCashFlows"
9731
+ }
9732
+ export type ReportModes = {
9733
+ [ReportKey.ProfitAndLoss]: DateRangePickerMode;
9734
+ [ReportKey.BalanceSheet]: DatePickerMode;
9735
+ [ReportKey.StatementOfCashFlows]: DateRangePickerMode;
9736
+ };
9737
+ type MutableReportKey = Exclude<ReportKey, ReportKey.BalanceSheet>;
9738
+ export function useReportMode<K extends ReportKey>(report: K): ReportModes[K] | undefined;
9739
+ export function useReportModeActions(): {
9740
+ setModeForReport: <K extends MutableReportKey>(report: K, mode: ReportModes[K]) => void;
9741
+ };
9742
+ export function useReportModeWithFallback<K extends ReportKey>(report: K, fallback: ReportModes[K]): ReportModes[K];
9743
+ type ReportsModeStoreProviderProps = PropsWithChildren<{
9744
+ initialModes: Partial<ReportModes>;
9745
+ }>;
9746
+ export function ReportsModeStoreProvider({ children, initialModes, }: ReportsModeStoreProviderProps): import("react/jsx-runtime").JSX.Element;
9747
+ export {};
9748
+
8601
9749
  }
8602
9750
  declare module '@layerfi/components/public/styles/publicClassname' {
8603
9751
  export const PUBLIC_CLASSNAME = "Layer__Public";
@@ -9028,6 +10176,14 @@ declare module '@layerfi/components/types/chart_of_accounts' {
9028
10176
  stable_name: string;
9029
10177
  };
9030
10178
  };
10179
+ export enum LedgerAccountNodeType {
10180
+ Leaf = "Leaf",
10181
+ Root = "Root",
10182
+ Parent = "Parent"
10183
+ }
10184
+ export type LedgerAccountBalanceWithNodeType = LedgerAccountBalance & {
10185
+ nodeType: LedgerAccountNodeType;
10186
+ };
9031
10187
 
9032
10188
  }
9033
10189
  declare module '@layerfi/components/types/file_upload' {
@@ -9887,6 +11043,32 @@ declare module '@layerfi/components/types/utility/oneOf' {
9887
11043
  export type OneOf<Types extends Array<unknown>, Result = never, AllProperties = MergeTypes<Types>> = Types extends [infer Head, ...infer Remaining] ? OneOf<Remaining, Result | OnlyFirst<Head, AllProperties>, AllProperties> : Result;
9888
11044
  export {};
9889
11045
 
11046
+ }
11047
+ declare module '@layerfi/components/types/utility/pagination' {
11048
+ import { Schema } from 'effect';
11049
+ export enum SortOrder {
11050
+ ASC = "ASC",
11051
+ ASCENDING = "ASCENDING",
11052
+ DES = "DES",
11053
+ DESC = "DESC",
11054
+ DESCENDING = "DESCENDING"
11055
+ }
11056
+ export type SortParams<T> = {
11057
+ sortBy?: T;
11058
+ sortOrder?: SortOrder;
11059
+ };
11060
+ export type PaginationParams = {
11061
+ cursor?: string | null;
11062
+ limit?: number;
11063
+ showTotalCount?: boolean;
11064
+ };
11065
+ export const PaginatedResponseMetaSchema: Schema.Struct<{
11066
+ cursor: Schema.NullOr<typeof Schema.String>;
11067
+ hasMore: Schema.PropertySignature<":", boolean, "has_more", ":", boolean, false, never>;
11068
+ totalCount: Schema.PropertySignature<":", number | undefined, "total_count", ":", number | undefined, false, never>;
11069
+ }>;
11070
+ export type PaginatedResponseMeta = typeof PaginatedResponseMetaSchema.Type;
11071
+
9890
11072
  }
9891
11073
  declare module '@layerfi/components/types/utility/promises' {
9892
11074
  export type Awaitable<T> = T | Promise<T>;
@@ -10212,12 +11394,16 @@ declare module '@layerfi/components/utils/swr/defaultSWRConfig' {
10212
11394
 
10213
11395
  }
10214
11396
  declare module '@layerfi/components/utils/swr/useGlobalInvalidator' {
11397
+ type GlobalInvalidateOptions = {
11398
+ withPrecedingOptimisticUpdate?: boolean;
11399
+ };
10215
11400
  export function useGlobalInvalidator(): {
10216
- invalidate: (predicate: (tags: ReadonlyArray<string>) => boolean) => Promise<undefined[]>;
11401
+ invalidate: (predicate: (tags: ReadonlyArray<string>) => boolean, { withPrecedingOptimisticUpdate }?: GlobalInvalidateOptions) => Promise<undefined[]>;
10217
11402
  };
10218
11403
  export function useGlobalOptimisticUpdater(): {
10219
11404
  optimisticUpdate: <unsafe_TData>(predicate: (tags: ReadonlyArray<string>) => boolean, optimisticUpdateCallback: (displayedData: unsafe_TData) => unsafe_TData) => Promise<undefined[]>;
10220
11405
  };
11406
+ export {};
10221
11407
 
10222
11408
  }
10223
11409
  declare module '@layerfi/components/utils/swr/withSWRKeyTags' {
@@ -10226,6 +11412,7 @@ declare module '@layerfi/components/utils/swr/withSWRKeyTags' {
10226
11412
  }
10227
11413
  declare module '@layerfi/components/utils/time/timeUtils' {
10228
11414
  export const toLocalDateString: (date: Date) => string;
11415
+ export function getDueDifference(dueDate: Date): number;
10229
11416
 
10230
11417
  }
10231
11418
  declare module '@layerfi/components/utils/vendors' {
@@ -10312,6 +11499,7 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
10312
11499
  showTitle?: boolean;
10313
11500
  elevatedLinkedAccounts?: boolean;
10314
11501
  showBreakConnection?: boolean;
11502
+ showCustomerVendor?: boolean;
10315
11503
  showDescriptions?: boolean;
10316
11504
  showLedgerBalance?: boolean;
10317
11505
  showReceiptUploads?: boolean;
@@ -10319,6 +11507,7 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
10319
11507
  showTooltips?: boolean;
10320
11508
  showUnlinkItem?: boolean;
10321
11509
  showUploadOptions?: boolean;
11510
+ showAddAccount?: boolean;
10322
11511
  /**
10323
11512
  * @deprecated `mode` can be inferred from the bookkeeping configuration of a business
10324
11513
  */
@@ -10326,7 +11515,7 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
10326
11515
  mobileComponent?: MobileComponentType;
10327
11516
  stringOverrides?: BankTransactionsWithLinkedAccountsStringOverrides;
10328
11517
  }
10329
- export const BankTransactionsWithLinkedAccounts: ({ title, showTitle, elevatedLinkedAccounts, mode, showBreakConnection, showDescriptions, showLedgerBalance, showReceiptUploads, showTags, showTooltips, showUnlinkItem, showUploadOptions, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => import("react/jsx-runtime").JSX.Element;
11518
+ export const BankTransactionsWithLinkedAccounts: ({ title, showTitle, elevatedLinkedAccounts, mode, showBreakConnection, showCustomerVendor, showDescriptions, showLedgerBalance, showReceiptUploads, showTags, showTooltips, showUnlinkItem, showUploadOptions, showAddAccount, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => import("react/jsx-runtime").JSX.Element;
10330
11519
  export {};
10331
11520
 
10332
11521
  }