@layerfi/components 0.1.107 → 0.1.108-alpha.1

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
@@ -1658,17 +1658,20 @@ declare module '@layerfi/components/components/BankTransactionsTable/BankTransac
1658
1658
  }
1659
1659
  declare module '@layerfi/components/components/BaseConfirmationModal/BaseConfirmationModal' {
1660
1660
  import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
1661
+ import { type ReactNode } from 'react';
1661
1662
  import { Awaitable } from '@layerfi/components/types/utility/promises';
1662
1663
  export type BaseConfirmationModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
1663
1664
  title: string;
1664
- description: string;
1665
+ description?: string;
1666
+ content?: ReactNode;
1665
1667
  onConfirm: () => Awaitable<void>;
1666
1668
  confirmLabel?: string;
1667
1669
  retryLabel?: string;
1668
1670
  cancelLabel?: string;
1669
1671
  errorText?: string;
1672
+ closeOnConfirm?: boolean;
1670
1673
  };
1671
- export function BaseConfirmationModal({ isOpen, onOpenChange, title, description, onConfirm, confirmLabel, retryLabel, cancelLabel, errorText, }: BaseConfirmationModalProps): import("react/jsx-runtime").JSX.Element;
1674
+ export function BaseConfirmationModal({ isOpen, onOpenChange, title, description, content, onConfirm, confirmLabel, retryLabel, cancelLabel, errorText, closeOnConfirm, }: BaseConfirmationModalProps): import("react/jsx-runtime").JSX.Element;
1672
1675
 
1673
1676
  }
1674
1677
  declare module '@layerfi/components/components/BaseDetailView/BaseDetailView' {
@@ -2795,21 +2798,6 @@ declare module '@layerfi/components/components/DetailReportBreadcrumb/DetailRepo
2795
2798
  }
2796
2799
  export const DetailReportBreadcrumb: ({ breadcrumbs, subtitle, onBreadcrumbClick, }: DetailReportBreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
2797
2800
 
2798
- }
2799
- declare module '@layerfi/components/components/DetailReportHeader/DetailReportHeader' {
2800
- import { ReactNode } from 'react';
2801
- export interface DetailReportHeaderProps {
2802
- title: ReactNode;
2803
- onClose: () => void;
2804
- className?: string;
2805
- }
2806
- export const DetailReportHeader: ({ title, onClose, className, }: DetailReportHeaderProps) => import("react/jsx-runtime").JSX.Element;
2807
-
2808
- }
2809
- declare module '@layerfi/components/components/DetailReportHeader/index' {
2810
- export { DetailReportHeader } from '@layerfi/components/components/DetailReportHeader/DetailReportHeader';
2811
- export type { DetailReportHeaderProps } from '@layerfi/components/components/DetailReportHeader/DetailReportHeader';
2812
-
2813
2801
  }
2814
2802
  declare module '@layerfi/components/components/DetailsList/DetailsList' {
2815
2803
  import { ReactNode } from 'react';
@@ -3265,6 +3253,14 @@ declare module '@layerfi/components/components/Integrations/IntegrationsQuickboo
3265
3253
  declare module '@layerfi/components/components/Invoices/InvoiceDetail/InvoiceDetail' {
3266
3254
  export const InvoiceDetail: () => import("react/jsx-runtime").JSX.Element;
3267
3255
 
3256
+ }
3257
+ declare module '@layerfi/components/components/Invoices/InvoiceDetail/InvoiceDetailHeaderMenu' {
3258
+ type InvoiceDetailHeaderMenuProps = {
3259
+ onEditInvoice: () => void;
3260
+ };
3261
+ export const InvoiceDetailHeaderMenu: ({ onEditInvoice }: InvoiceDetailHeaderMenuProps) => import("react/jsx-runtime").JSX.Element | null;
3262
+ export {};
3263
+
3268
3264
  }
3269
3265
  declare module '@layerfi/components/components/Invoices/InvoiceForm/InvoiceForm' {
3270
3266
  import React from 'react';
@@ -3450,67 +3446,171 @@ declare module '@layerfi/components/components/Invoices/InvoicePaymentForm/useIn
3450
3446
  readonly amount: import("effect/BigDecimal").BigDecimal;
3451
3447
  readonly referenceNumber: string;
3452
3448
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3453
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3449
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3454
3450
  }, import("@tanstack/react-form").FormValidateOrFn<{
3455
3451
  readonly memo: string;
3456
3452
  readonly amount: import("effect/BigDecimal").BigDecimal;
3457
3453
  readonly referenceNumber: string;
3458
3454
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3459
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3455
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3460
3456
  }>, import("@tanstack/react-form").FormValidateOrFn<{
3461
3457
  readonly memo: string;
3462
3458
  readonly amount: import("effect/BigDecimal").BigDecimal;
3463
3459
  readonly referenceNumber: string;
3464
3460
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3465
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3461
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3466
3462
  }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3467
3463
  readonly memo: string;
3468
3464
  readonly amount: import("effect/BigDecimal").BigDecimal;
3469
3465
  readonly referenceNumber: string;
3470
3466
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3471
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3467
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3472
3468
  }>, import("@tanstack/react-form").FormValidateOrFn<{
3473
3469
  readonly memo: string;
3474
3470
  readonly amount: import("effect/BigDecimal").BigDecimal;
3475
3471
  readonly referenceNumber: string;
3476
3472
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3477
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3473
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3478
3474
  }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3479
3475
  readonly memo: string;
3480
3476
  readonly amount: import("effect/BigDecimal").BigDecimal;
3481
3477
  readonly referenceNumber: string;
3482
3478
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3483
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3479
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3484
3480
  }>, import("@tanstack/react-form").FormValidateOrFn<{
3485
3481
  readonly memo: string;
3486
3482
  readonly amount: import("effect/BigDecimal").BigDecimal;
3487
3483
  readonly referenceNumber: string;
3488
3484
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3489
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3485
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3490
3486
  }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3491
3487
  readonly memo: string;
3492
3488
  readonly amount: import("effect/BigDecimal").BigDecimal;
3493
3489
  readonly referenceNumber: string;
3494
3490
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3495
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3491
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3496
3492
  }>, import("@tanstack/react-form").FormValidateOrFn<{
3497
3493
  readonly memo: string;
3498
3494
  readonly amount: import("effect/BigDecimal").BigDecimal;
3499
3495
  readonly referenceNumber: string;
3500
3496
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3501
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3497
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3502
3498
  }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3503
3499
  readonly memo: string;
3504
3500
  readonly amount: import("effect/BigDecimal").BigDecimal;
3505
3501
  readonly referenceNumber: string;
3506
3502
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3507
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3503
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3508
3504
  }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3509
3505
  readonly memo: string;
3510
3506
  readonly amount: import("effect/BigDecimal").BigDecimal;
3511
3507
  readonly referenceNumber: string;
3512
3508
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3513
- readonly paidAt: import("@internationalized/date").ZonedDateTime;
3509
+ readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
3510
+ }>, unknown, {
3511
+ readonly BaseFormTextField: typeof import("@layerfi/components/features/forms/components/BaseFormTextField").BaseFormTextField;
3512
+ readonly FormBigDecimalField: typeof import("@layerfi/components/features/forms/components/FormBigDecimalField").FormBigDecimalField;
3513
+ readonly FormCheckboxField: typeof import("@layerfi/components/features/forms/components/FormCheckboxField").FormCheckboxField;
3514
+ readonly FormDateField: typeof import("@layerfi/components/features/forms/components/FormDateField").FormDateField;
3515
+ readonly FormTextAreaField: typeof import("@layerfi/components/features/forms/components/FormTextAreaField").FormTextAreaField;
3516
+ readonly FormTextField: typeof import("@layerfi/components/features/forms/components/FormTextField").FormTextField;
3517
+ }, {}>;
3518
+ submitError: string | undefined;
3519
+ };
3520
+ export {};
3521
+
3522
+ }
3523
+ declare module '@layerfi/components/components/Invoices/InvoiceRefundForm/InvoiceRefundForm' {
3524
+ import React from 'react';
3525
+ import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
3526
+ import type { CustomerRefund } from '@layerfi/components/features/invoices/customerRefundSchemas';
3527
+ export type InvoiceRefundFormProps = {
3528
+ onSuccess: (refund: CustomerRefund) => void;
3529
+ invoice: Invoice;
3530
+ };
3531
+ export const InvoiceRefundForm: React.ForwardRefExoticComponent<InvoiceRefundFormProps & React.RefAttributes<unknown>>;
3532
+
3533
+ }
3534
+ declare module '@layerfi/components/components/Invoices/InvoiceRefundForm/formUtils' {
3535
+ import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
3536
+ import type { InvoiceRefundForm } from '@layerfi/components/components/Invoices/InvoiceRefundForm/invoiceRefundFormSchemas';
3537
+ export const getInvoiceRefundFormDefaultValues: (invoice: Invoice) => InvoiceRefundForm;
3538
+ export const validateInvoiceRefundForm: ({ invoiceRefund, invoice }: {
3539
+ invoiceRefund: InvoiceRefundForm;
3540
+ invoice: Invoice;
3541
+ }) => ({
3542
+ completedAt: string;
3543
+ method?: undefined;
3544
+ } | {
3545
+ method: string;
3546
+ completedAt?: undefined;
3547
+ })[] | null;
3548
+ export const convertInvoiceRefundFormToParams: (form: InvoiceRefundForm) => unknown;
3549
+
3550
+ }
3551
+ declare module '@layerfi/components/components/Invoices/InvoiceRefundForm/invoiceRefundFormSchemas' {
3552
+ import { Schema } from 'effect';
3553
+ export const InvoiceRefundFormSchema: Schema.Struct<{
3554
+ amount: typeof Schema.BigDecimal;
3555
+ method: Schema.NullOr<Schema.Enums<typeof import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod>>;
3556
+ completedAt: Schema.NullOr<Schema.declare<import("@internationalized/date").ZonedDateTime, import("@internationalized/date").ZonedDateTime, readonly [], never>>;
3557
+ }>;
3558
+ export type InvoiceRefundForm = typeof InvoiceRefundFormSchema.Type;
3559
+
3560
+ }
3561
+ declare module '@layerfi/components/components/Invoices/InvoiceRefundForm/useInvoiceRefundForm' {
3562
+ import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
3563
+ import { type CustomerRefund } from '@layerfi/components/features/invoices/customerRefundSchemas';
3564
+ type onSuccessFn = (refund: CustomerRefund) => void;
3565
+ type UseInvoiceRefundFormProps = {
3566
+ onSuccess: onSuccessFn;
3567
+ invoice: Invoice;
3568
+ };
3569
+ export const useInvoiceRefundForm: ({ onSuccess, invoice }: UseInvoiceRefundFormProps) => {
3570
+ form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<{
3571
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3572
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3573
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3574
+ }, import("@tanstack/react-form").FormValidateOrFn<{
3575
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3576
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3577
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3578
+ }>, import("@tanstack/react-form").FormValidateOrFn<{
3579
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3580
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3581
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3582
+ }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3583
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3584
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3585
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3586
+ }>, import("@tanstack/react-form").FormValidateOrFn<{
3587
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3588
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3589
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3590
+ }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3591
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3592
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3593
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3594
+ }>, import("@tanstack/react-form").FormValidateOrFn<{
3595
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3596
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3597
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3598
+ }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3599
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3600
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3601
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3602
+ }>, import("@tanstack/react-form").FormValidateOrFn<{
3603
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3604
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3605
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3606
+ }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3607
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3608
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3609
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3610
+ }>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
3611
+ readonly amount: import("effect/BigDecimal").BigDecimal;
3612
+ readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
3613
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
3514
3614
  }>, unknown, {
3515
3615
  readonly BaseFormTextField: typeof import("@layerfi/components/features/forms/components/BaseFormTextField").BaseFormTextField;
3516
3616
  readonly FormBigDecimalField: typeof import("@layerfi/components/features/forms/components/FormBigDecimalField").FormBigDecimalField;
@@ -3544,7 +3644,8 @@ declare module '@layerfi/components/components/Invoices/InvoiceTable/InvoiceTabl
3544
3644
  Sent = "Sent",
3545
3645
  Paid = "Paid",
3546
3646
  WrittenOff = "Written Off",
3547
- Voided = "Voided"
3647
+ Voided = "Voided",
3648
+ Refunded = "Refunded"
3548
3649
  }
3549
3650
  export type InvoiceStatusOption = {
3550
3651
  label: string;
@@ -3590,6 +3691,50 @@ declare module '@layerfi/components/components/Invoices/Invoices' {
3590
3691
  export const unstable_Invoices: ({ showTitle, stringOverrides }: InvoicesProps) => import("react/jsx-runtime").JSX.Element;
3591
3692
  export {};
3592
3693
 
3694
+ }
3695
+ declare module '@layerfi/components/components/Invoices/Modal/InvoiceRefundModal' {
3696
+ import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
3697
+ import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
3698
+ type InvoiceRefundModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
3699
+ invoice: Invoice;
3700
+ onSuccess: (invoice: Invoice) => void;
3701
+ };
3702
+ export function InvoiceRefundModal({ isOpen, onOpenChange, invoice, onSuccess }: InvoiceRefundModalProps): import("react/jsx-runtime").JSX.Element;
3703
+ export {};
3704
+
3705
+ }
3706
+ declare module '@layerfi/components/components/Invoices/Modal/InvoiceResetModal' {
3707
+ import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
3708
+ import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
3709
+ type InvoiceResetModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
3710
+ invoice: Invoice;
3711
+ onSuccess: (invoice: Invoice) => void;
3712
+ };
3713
+ export function InvoiceResetModal({ isOpen, onOpenChange, invoice, onSuccess }: InvoiceResetModalProps): import("react/jsx-runtime").JSX.Element;
3714
+ export {};
3715
+
3716
+ }
3717
+ declare module '@layerfi/components/components/Invoices/Modal/InvoiceVoidModal' {
3718
+ import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
3719
+ import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
3720
+ type InvoiceVoidModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
3721
+ invoiceId: string;
3722
+ onSuccess: (invoice: Invoice) => void;
3723
+ };
3724
+ export function InvoiceVoidModal({ isOpen, onOpenChange, invoiceId, onSuccess }: InvoiceVoidModalProps): import("react/jsx-runtime").JSX.Element;
3725
+ export {};
3726
+
3727
+ }
3728
+ declare module '@layerfi/components/components/Invoices/Modal/InvoiceWriteoffModal' {
3729
+ import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
3730
+ import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
3731
+ type InvoiceWriteoffModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
3732
+ invoice: Invoice;
3733
+ onSuccess: (invoice: Invoice) => void;
3734
+ };
3735
+ export function InvoiceWriteoffModal({ isOpen, onOpenChange, invoice, onSuccess }: InvoiceWriteoffModalProps): import("react/jsx-runtime").JSX.Element;
3736
+ export {};
3737
+
3593
3738
  }
3594
3739
  declare module '@layerfi/components/components/Journal/Journal' {
3595
3740
  import { JournalTableStringOverrides } from '@layerfi/components/components/JournalTable/JournalTableWithPanel';
@@ -4517,6 +4662,19 @@ declare module '@layerfi/components/components/ProfitAndLossDetailReport/ProfitA
4517
4662
  }
4518
4663
  export const ProfitAndLossDetailReport: ({ lineItemName, breadcrumbPath, onClose, onBreadcrumbClick, stringOverrides, }: ProfitAndLossDetailReportProps) => import("react/jsx-runtime").JSX.Element;
4519
4664
 
4665
+ }
4666
+ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/DetailReportModal' {
4667
+ import { type ProfitAndLossDetailReportProps } from '@layerfi/components/components/ProfitAndLossDetailReport/ProfitAndLossDetailReport';
4668
+ import { type SelectedLineItem } from '@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport';
4669
+ export interface DetailReportModalProps {
4670
+ isOpen: boolean;
4671
+ onOpenChange: (isOpen: boolean) => void;
4672
+ selectedItem: SelectedLineItem | null;
4673
+ onBreadcrumbClick?: (lineItemName: string) => void;
4674
+ stringOverrides?: ProfitAndLossDetailReportProps['stringOverrides'];
4675
+ }
4676
+ export function DetailReportModal({ isOpen, onOpenChange, selectedItem, onBreadcrumbClick, stringOverrides, }: DetailReportModalProps): import("react/jsx-runtime").JSX.Element;
4677
+
4520
4678
  }
4521
4679
  declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/DetailedChart' {
4522
4680
  import { SidebarScope } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
@@ -4554,13 +4712,14 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Detai
4554
4712
  sortBy: (scope: Scope, field: string, direction?: SortDirection) => void;
4555
4713
  chartColorsList?: string[];
4556
4714
  stringOverrides?: DetailedTableStringOverrides;
4715
+ onValueClick?: (item: PnlChartLineItem) => void;
4557
4716
  }
4558
4717
  export interface TypeColorMapping {
4559
4718
  color: string;
4560
4719
  opacity: number;
4561
4720
  }
4562
4721
  export const mapTypesToColors: (data: PnlChartLineItem[], colorList?: string[]) => TypeColorMapping[];
4563
- export const DetailedTable: ({ filteredData, sidebarScope, filters, sortBy, hoveredItem, setHoveredItem, chartColorsList, stringOverrides, }: DetailedTableProps) => import("react/jsx-runtime").JSX.Element;
4722
+ export const DetailedTable: ({ filteredData, sidebarScope, filters, sortBy, hoveredItem, setHoveredItem, chartColorsList, stringOverrides, onValueClick, }: DetailedTableProps) => import("react/jsx-runtime").JSX.Element;
4564
4723
 
4565
4724
  }
4566
4725
  declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Filters' {
@@ -4578,8 +4737,10 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Filte
4578
4737
  declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts' {
4579
4738
  import { SidebarScope } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
4580
4739
  import { DetailedTableStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/DetailedTable';
4740
+ import type { ProfitAndLossDetailReportProps } from '@layerfi/components/components/ProfitAndLossDetailReport/ProfitAndLossDetailReport';
4581
4741
  export interface ProfitAndLossDetailedChartsStringOverrides {
4582
4742
  detailedTableStringOverrides?: DetailedTableStringOverrides;
4743
+ detailReportStringOverrides?: ProfitAndLossDetailReportProps['stringOverrides'];
4583
4744
  }
4584
4745
  export const ProfitAndLossDetailedCharts: ({ scope, hideClose, showDatePicker, chartColorsList, stringOverrides, }: {
4585
4746
  scope?: SidebarScope;
@@ -4636,6 +4797,7 @@ declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLoss
4636
4797
  import { View as ViewType } from '@layerfi/components/types/general';
4637
4798
  import { ReportsStringOverrides } from '@layerfi/components/views/Reports/Reports';
4638
4799
  import type { TimeRangePickerConfig } from '@layerfi/components/views/Reports/reportTypes';
4800
+ import { BreadcrumbItem } from '@layerfi/components/components/DetailReportBreadcrumb/DetailReportBreadcrumb';
4639
4801
  import { LinkingMetadata } from '@layerfi/components/contexts/InAppLinkContext';
4640
4802
  type ViewBreakpoint = ViewType | undefined;
4641
4803
  export type ProfitAndLossReportProps = {
@@ -4643,6 +4805,10 @@ declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLoss
4643
4805
  view?: ViewBreakpoint;
4644
4806
  renderInAppLink?: (source: LinkingMetadata) => ReactNode;
4645
4807
  } & TimeRangePickerConfig;
4808
+ export type SelectedLineItem = {
4809
+ lineItemName: string;
4810
+ breadcrumbPath: BreadcrumbItem[];
4811
+ };
4646
4812
  export const ProfitAndLossReport: ({ stringOverrides, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, view, renderInAppLink, }: ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
4647
4813
  export {};
4648
4814
 
@@ -5146,16 +5312,19 @@ declare module '@layerfi/components/components/Tasks/TasksList' {
5146
5312
  pageSize?: number;
5147
5313
  mobile?: boolean;
5148
5314
  };
5149
- export function TasksList({ pageSize, mobile }: TasksListProps): import("react/jsx-runtime").JSX.Element;
5315
+ export const TasksList: ({ pageSize, mobile }: TasksListProps) => import("react/jsx-runtime").JSX.Element;
5150
5316
  export {};
5151
5317
 
5152
5318
  }
5153
5319
  declare module '@layerfi/components/components/Tasks/TasksListItem' {
5154
5320
  import { type UserVisibleTask } from '@layerfi/components/utils/bookkeeping/tasks/bookkeepingTasksFilters';
5155
- export const TasksListItem: ({ task, defaultOpen, }: {
5321
+ type TasksListItemProps = {
5156
5322
  task: UserVisibleTask;
5157
5323
  defaultOpen: boolean;
5158
- }) => import("react/jsx-runtime").JSX.Element;
5324
+ onExpandTask?: (isOpen: boolean) => void;
5325
+ };
5326
+ export const TasksListItem: import("react").ForwardRefExoticComponent<TasksListItemProps & import("react").RefAttributes<HTMLDivElement>>;
5327
+ export {};
5159
5328
 
5160
5329
  }
5161
5330
  declare module '@layerfi/components/components/Tasks/TasksListMobile' {
@@ -5757,7 +5926,7 @@ declare module '@layerfi/components/components/ui/Date/Date' {
5757
5926
 
5758
5927
  }
5759
5928
  declare module '@layerfi/components/components/ui/DropdownMenu/DropdownMenu' {
5760
- import React, { PropsWithChildren } from 'react';
5929
+ import React, { type PropsWithChildren } from 'react';
5761
5930
  type DropdownMenuProps = PropsWithChildren<{
5762
5931
  className?: string;
5763
5932
  ariaLabel?: string;
@@ -5769,18 +5938,15 @@ declare module '@layerfi/components/components/ui/DropdownMenu/DropdownMenu' {
5769
5938
  width?: number | string;
5770
5939
  };
5771
5940
  };
5941
+ variant?: 'compact';
5772
5942
  }>;
5773
5943
  type MenuItemProps = PropsWithChildren<{
5774
5944
  isDisabled?: boolean;
5775
5945
  onClick?: () => void;
5776
5946
  }>;
5777
- export const Heading: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
5778
- export const Separator: () => import("react/jsx-runtime").JSX.Element;
5779
5947
  export const MenuItem: ({ children, onClick, isDisabled }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
5780
- export const MenuList: ({ children }: {
5781
- children: React.ReactNode | React.ReactNode[];
5782
- }) => import("react/jsx-runtime").JSX.Element;
5783
- export const DropdownMenu: ({ children, ariaLabel, slots, slotProps }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
5948
+ export const MenuList: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
5949
+ export const DropdownMenu: ({ children, ariaLabel, variant, slots, slotProps }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
5784
5950
  export {};
5785
5951
 
5786
5952
  }
@@ -5878,7 +6044,7 @@ declare module '@layerfi/components/components/ui/Meter/Meter' {
5878
6044
  declare module '@layerfi/components/components/ui/Modal/Modal' {
5879
6045
  import { type ComponentProps } from 'react';
5880
6046
  import { type DialogProps, type ModalOverlayProps } from 'react-aria-components';
5881
- type ModalSize = 'md' | 'lg';
6047
+ type ModalSize = 'md' | 'lg' | 'xl';
5882
6048
  type ModalVariant = 'center' | 'drawer' | 'mobile-drawer';
5883
6049
  const ModalOverlay: import("react").ForwardRefExoticComponent<Omit<ModalOverlayProps, "className"> & {
5884
6050
  variant: ModalVariant;
@@ -7191,8 +7357,9 @@ declare module '@layerfi/components/features/invoices/api/useListInvoices' {
7191
7357
  type ListInvoicesBaseParams = {
7192
7358
  businessId: string;
7193
7359
  };
7194
- type ListInvoicesFilterParams = {
7360
+ export type ListInvoicesFilterParams = {
7195
7361
  status?: ReadonlyArray<InvoiceStatus>;
7362
+ query?: string;
7196
7363
  dueAtStart?: Date;
7197
7364
  dueAtEnd?: Date;
7198
7365
  };
@@ -7515,7 +7682,7 @@ declare module '@layerfi/components/features/invoices/api/useListInvoices' {
7515
7682
  };
7516
7683
  };
7517
7684
  }>;
7518
- export function useListInvoices({ status, dueAtStart, dueAtEnd, sortBy, sortOrder, limit, showTotalCount, }?: ListInvoicesOptions): ListInvoicesSWRResponse;
7685
+ export function useListInvoices({ status, query, dueAtStart, dueAtEnd, sortBy, sortOrder, limit, showTotalCount, }?: ListInvoicesOptions): ListInvoicesSWRResponse;
7519
7686
  export function useInvoicesGlobalCacheActions(): {
7520
7687
  patchInvoiceByKey: (updatedInvoice: Invoice) => Promise<({
7521
7688
  readonly data: readonly {
@@ -7752,141 +7919,74 @@ declare module '@layerfi/components/features/invoices/api/useListInvoices' {
7752
7919
  export {};
7753
7920
 
7754
7921
  }
7755
- declare module '@layerfi/components/features/invoices/api/useUpsertDedicatedInvoicePayment' {
7922
+ declare module '@layerfi/components/features/invoices/api/useRefundInvoice' {
7756
7923
  import type { Key } from 'swr';
7757
7924
  import { type SWRMutationResponse } from 'swr/mutation';
7758
- import { InvoiceStatus, type Invoice, type InvoicePayment, type UpsertDedicatedInvoicePaymentSchema } from '@layerfi/components/features/invoices/invoiceSchemas';
7759
7925
  import { Schema } from 'effect';
7760
- export enum UpsertDedicatedInvoicePaymentMode {
7761
- Create = "Create",
7762
- Update = "Update"
7763
- }
7764
- type UpsertDedicatedInvoicePaymentBody = typeof UpsertDedicatedInvoicePaymentSchema.Encoded;
7765
- const UpsertDedicatedInvoicePaymentReturnSchema: Schema.Struct<{
7926
+ import { CreateCustomerRefundSchema } from '@layerfi/components/features/invoices/customerRefundSchemas';
7927
+ import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
7928
+ const RefundInvoiceReturnSchema: Schema.Struct<{
7766
7929
  data: Schema.Struct<{
7767
- amount: typeof Schema.Number;
7768
- method: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod, import("../../../components/PaymentMethod/schemas").PaymentMethod, never>>;
7769
- at: Schema.propertySignature<typeof Schema.Date>;
7930
+ externalId: Schema.PropertySignature<":", string | undefined, "external_id", ":", string | undefined, false, never>;
7931
+ refundedAmount: Schema.PropertySignature<":", number, "refunded_amount", ":", number, false, never>;
7932
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<import("@layerfi/components/features/invoices/customerRefundSchemas").CustomerRefundStatus, import("../customerRefundSchemas").CustomerRefundStatus, never>>;
7933
+ completedAt: Schema.PropertySignature<":", Date, "completed_at", ":", string, false, never>;
7934
+ isDedicated: Schema.PropertySignature<":", boolean, "is_dedicated", ":", boolean, false, never>;
7770
7935
  referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
7771
7936
  memo: Schema.NullOr<typeof Schema.String>;
7772
7937
  }>;
7773
7938
  }>;
7774
- type UpsertDedicatedInvoicePaymentReturn = typeof UpsertDedicatedInvoicePaymentReturnSchema.Type;
7775
- type UpsertDedicatedInvoicePaymentSWRMutationResponse = SWRMutationResponse<UpsertDedicatedInvoicePaymentReturn, unknown, Key, UpsertDedicatedInvoicePaymentBody>;
7776
- class UpsertDedicatedInvoicePaymentSWRResponse {
7939
+ type RefundInvoiceBody = typeof CreateCustomerRefundSchema.Encoded;
7940
+ type RefundInvoiceReturn = typeof RefundInvoiceReturnSchema.Type;
7941
+ type RefundInvoiceSWRMutationResponse = SWRMutationResponse<RefundInvoiceReturn, unknown, Key, RefundInvoiceBody>;
7942
+ class RefundInvoiceSWRResponse {
7777
7943
  private swrResponse;
7778
- constructor(swrResponse: UpsertDedicatedInvoicePaymentSWRMutationResponse);
7944
+ constructor(swrResponse: RefundInvoiceSWRMutationResponse);
7779
7945
  get data(): {
7780
7946
  readonly data: {
7781
- readonly at: Date;
7947
+ readonly externalId: string | undefined;
7948
+ readonly status: import("@layerfi/components/features/invoices/customerRefundSchemas").CustomerRefundStatus;
7782
7949
  readonly memo: string | null;
7783
- readonly amount: number;
7784
7950
  readonly referenceNumber: string | null;
7785
- readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod;
7951
+ readonly completedAt: Date;
7952
+ readonly refundedAmount: number;
7953
+ readonly isDedicated: boolean;
7786
7954
  };
7787
7955
  } | undefined;
7788
7956
  get trigger(): import("swr/mutation").TriggerWithArgs<{
7789
7957
  readonly data: {
7790
- readonly at: Date;
7958
+ readonly externalId: string | undefined;
7959
+ readonly status: import("@layerfi/components/features/invoices/customerRefundSchemas").CustomerRefundStatus;
7791
7960
  readonly memo: string | null;
7792
- readonly amount: number;
7793
7961
  readonly referenceNumber: string | null;
7794
- readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod;
7962
+ readonly completedAt: Date;
7963
+ readonly refundedAmount: number;
7964
+ readonly isDedicated: boolean;
7795
7965
  };
7796
7966
  }, unknown, Key, {
7797
- readonly amount: number;
7967
+ readonly completed_at: string;
7798
7968
  readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod;
7969
+ readonly external_id?: string | undefined;
7799
7970
  readonly memo?: string | undefined;
7800
7971
  readonly reference_number?: string | undefined;
7801
- readonly paid_at?: string | undefined;
7972
+ readonly refunded_amount?: number | undefined;
7802
7973
  }>;
7803
7974
  get isMutating(): boolean;
7804
7975
  get isError(): boolean;
7805
7976
  }
7806
- const CreateParamsSchema: Schema.Struct<{
7807
- businessId: typeof Schema.String;
7808
- invoiceId: typeof Schema.String;
7809
- }>;
7810
- const UpdateParamsSchema: Schema.Struct<{
7811
- businessId: typeof Schema.String;
7812
- invoiceId: typeof Schema.String;
7813
- invoicePaymentId: typeof Schema.String;
7814
- }>;
7815
- export type CreateParams = typeof CreateParamsSchema.Type;
7816
- export type UpdateParams = typeof UpdateParamsSchema.Type;
7817
- export type UpsertParams = CreateParams | UpdateParams;
7818
- export const updateInvoiceWithPayment: (invoice: Invoice, invoicePayment: InvoicePayment) => {
7819
- status: InvoiceStatus;
7820
- outstandingBalance: number;
7821
- id: string;
7822
- externalId: string | null;
7823
- memo: string | null;
7824
- customer: {
7825
- readonly id: string;
7826
- readonly externalId: string | null;
7827
- readonly individualName: string | null;
7828
- readonly companyName: string | null;
7829
- readonly email: string | null;
7830
- readonly mobilePhone: string | null;
7831
- readonly officePhone: string | null;
7832
- readonly addressString: string | null;
7833
- readonly status: "ACTIVE" | "ARCHIVED";
7834
- readonly memo: string | null;
7835
- readonly _local?: {
7836
- readonly isOptimistic: boolean;
7837
- } | undefined;
7838
- } | null;
7839
- invoiceNumber: string | null;
7840
- recipientName: string | null;
7841
- businessId: string;
7842
- lineItems: readonly {
7843
- readonly id: string;
7844
- readonly externalId: string | null;
7845
- readonly memo: string | null;
7846
- readonly description: string | null;
7847
- readonly invoiceId: string;
7848
- readonly product: string | null;
7849
- readonly subtotal: number;
7850
- readonly quantity: import("effect/BigDecimal").BigDecimal;
7851
- readonly unitPrice: number;
7852
- readonly discountAmount: number;
7853
- readonly salesTaxTotal: number;
7854
- readonly totalAmount: number;
7855
- }[];
7856
- updatedAt: Date | null;
7857
- subtotal: number;
7858
- paidAt: Date | null;
7859
- totalAmount: number;
7860
- sentAt: Date | null;
7861
- dueAt: Date | null;
7862
- voidedAt: Date | null;
7863
- additionalDiscount: number;
7864
- additionalSalesTaxesTotal: number;
7865
- importedAt: Date;
7866
- };
7867
- type UseUpsertDedicatedInvoicePaymentProps = {
7868
- mode: UpsertDedicatedInvoicePaymentMode.Create;
7869
- invoiceId: string;
7870
- } | {
7871
- mode: UpsertDedicatedInvoicePaymentMode.Update;
7977
+ export const updateInvoiceWithRefund: (invoice: Invoice) => Invoice;
7978
+ type UseRefundInvoiceProps = {
7872
7979
  invoiceId: string;
7873
- invoicePaymentId: string;
7874
7980
  };
7875
- export const useUpsertDedicatedInvoicePayment: (props: UseUpsertDedicatedInvoicePaymentProps) => UpsertDedicatedInvoicePaymentSWRResponse;
7981
+ export const useRefundInvoice: ({ invoiceId }: UseRefundInvoiceProps) => RefundInvoiceSWRResponse;
7876
7982
  export {};
7877
7983
 
7878
7984
  }
7879
- declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
7985
+ declare module '@layerfi/components/features/invoices/api/useResetInvoice' {
7880
7986
  import type { Key } from 'swr';
7881
7987
  import { type SWRMutationResponse } from 'swr/mutation';
7882
- import { type UpsertInvoiceSchema } from '@layerfi/components/features/invoices/invoiceSchemas';
7883
7988
  import { Schema } from 'effect';
7884
- export enum UpsertInvoiceMode {
7885
- Create = "Create",
7886
- Update = "Update"
7887
- }
7888
- type UpsertInvoiceBody = typeof UpsertInvoiceSchema.Encoded;
7889
- const UpsertInvoiceReturnSchema: Schema.Struct<{
7989
+ const ResetInvoiceReturnSchema: Schema.Struct<{
7890
7990
  data: Schema.Struct<{
7891
7991
  id: typeof Schema.UUID;
7892
7992
  businessId: Schema.PropertySignature<":", string, "business_id", ":", string, false, never>;
@@ -7950,11 +8050,11 @@ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
7950
8050
  memo: Schema.NullOr<typeof Schema.String>;
7951
8051
  }>;
7952
8052
  }>;
7953
- type UpsertInvoiceReturn = typeof UpsertInvoiceReturnSchema.Type;
7954
- type UpsertInvoiceSWRMutationResponse = SWRMutationResponse<UpsertInvoiceReturn, unknown, Key, UpsertInvoiceBody>;
7955
- class UpsertInvoiceSWRResponse {
8053
+ type ResetInvoiceReturn = typeof ResetInvoiceReturnSchema.Type;
8054
+ type ResetInvoiceSWRMutationResponse = SWRMutationResponse<ResetInvoiceReturn, unknown, Key, never>;
8055
+ class ResetInvoiceSWRResponse {
7956
8056
  private swrResponse;
7957
- constructor(swrResponse: UpsertInvoiceSWRMutationResponse);
8057
+ constructor(swrResponse: ResetInvoiceSWRMutationResponse);
7958
8058
  get data(): {
7959
8059
  readonly data: {
7960
8060
  readonly id: string;
@@ -8006,7 +8106,7 @@ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
8006
8106
  readonly importedAt: Date;
8007
8107
  };
8008
8108
  } | undefined;
8009
- get trigger(): import("swr/mutation").TriggerWithArgs<{
8109
+ get trigger(): import("swr/mutation").TriggerWithoutArgs<{
8010
8110
  readonly data: {
8011
8111
  readonly id: string;
8012
8112
  readonly externalId: string | null;
@@ -8056,45 +8156,636 @@ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
8056
8156
  readonly outstandingBalance: number;
8057
8157
  readonly importedAt: Date;
8058
8158
  };
8059
- }, unknown, Key, {
8060
- readonly memo: string | null;
8061
- readonly invoice_number: string | undefined;
8062
- readonly line_items: readonly {
8063
- readonly description: string;
8064
- readonly product: string;
8065
- readonly quantity: string;
8066
- readonly unit_price: number;
8067
- readonly sales_taxes: readonly {
8068
- readonly amount: number;
8069
- }[] | undefined;
8070
- }[];
8071
- readonly sent_at: string;
8072
- readonly due_at: string;
8073
- readonly additional_discount: number | undefined;
8074
- readonly customer_id: string;
8075
- }>;
8159
+ }, unknown, Key, never>;
8076
8160
  get isMutating(): boolean;
8077
8161
  get isError(): boolean;
8078
8162
  }
8079
- const CreateParamsSchema: Schema.Struct<{
8080
- businessId: typeof Schema.String;
8081
- }>;
8082
- const UpdateParamsSchema: Schema.Struct<{
8083
- businessId: typeof Schema.String;
8163
+ type UseResetInvoiceProps = {
8164
+ invoiceId: string;
8165
+ };
8166
+ export const useResetInvoice: ({ invoiceId }: UseResetInvoiceProps) => ResetInvoiceSWRResponse;
8167
+ export {};
8168
+
8169
+ }
8170
+ declare module '@layerfi/components/features/invoices/api/useUpsertDedicatedInvoicePayment' {
8171
+ import type { Key } from 'swr';
8172
+ import { type SWRMutationResponse } from 'swr/mutation';
8173
+ import { InvoiceStatus, type Invoice, type InvoicePayment, type UpsertDedicatedInvoicePaymentSchema } from '@layerfi/components/features/invoices/invoiceSchemas';
8174
+ import { Schema } from 'effect';
8175
+ export enum UpsertDedicatedInvoicePaymentMode {
8176
+ Create = "Create",
8177
+ Update = "Update"
8178
+ }
8179
+ type UpsertDedicatedInvoicePaymentBody = typeof UpsertDedicatedInvoicePaymentSchema.Encoded;
8180
+ const UpsertDedicatedInvoicePaymentReturnSchema: Schema.Struct<{
8181
+ data: Schema.Struct<{
8182
+ amount: typeof Schema.Number;
8183
+ method: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod, import("../../../components/PaymentMethod/schemas").PaymentMethod, never>>;
8184
+ at: Schema.propertySignature<typeof Schema.Date>;
8185
+ referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
8186
+ memo: Schema.NullOr<typeof Schema.String>;
8187
+ }>;
8188
+ }>;
8189
+ type UpsertDedicatedInvoicePaymentReturn = typeof UpsertDedicatedInvoicePaymentReturnSchema.Type;
8190
+ type UpsertDedicatedInvoicePaymentSWRMutationResponse = SWRMutationResponse<UpsertDedicatedInvoicePaymentReturn, unknown, Key, UpsertDedicatedInvoicePaymentBody>;
8191
+ class UpsertDedicatedInvoicePaymentSWRResponse {
8192
+ private swrResponse;
8193
+ constructor(swrResponse: UpsertDedicatedInvoicePaymentSWRMutationResponse);
8194
+ get data(): {
8195
+ readonly data: {
8196
+ readonly at: Date;
8197
+ readonly memo: string | null;
8198
+ readonly amount: number;
8199
+ readonly referenceNumber: string | null;
8200
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod;
8201
+ };
8202
+ } | undefined;
8203
+ get trigger(): import("swr/mutation").TriggerWithArgs<{
8204
+ readonly data: {
8205
+ readonly at: Date;
8206
+ readonly memo: string | null;
8207
+ readonly amount: number;
8208
+ readonly referenceNumber: string | null;
8209
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod;
8210
+ };
8211
+ }, unknown, Key, {
8212
+ readonly amount: number;
8213
+ readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod;
8214
+ readonly paid_at: string;
8215
+ readonly memo?: string | undefined;
8216
+ readonly reference_number?: string | undefined;
8217
+ }>;
8218
+ get isMutating(): boolean;
8219
+ get isError(): boolean;
8220
+ }
8221
+ const CreateParamsSchema: Schema.Struct<{
8222
+ businessId: typeof Schema.String;
8223
+ invoiceId: typeof Schema.String;
8224
+ }>;
8225
+ const UpdateParamsSchema: Schema.Struct<{
8226
+ businessId: typeof Schema.String;
8084
8227
  invoiceId: typeof Schema.String;
8228
+ invoicePaymentId: typeof Schema.String;
8229
+ }>;
8230
+ export type CreateParams = typeof CreateParamsSchema.Type;
8231
+ export type UpdateParams = typeof UpdateParamsSchema.Type;
8232
+ export type UpsertParams = CreateParams | UpdateParams;
8233
+ export const updateInvoiceWithPayment: (invoice: Invoice, invoicePayment: InvoicePayment) => {
8234
+ status: InvoiceStatus;
8235
+ outstandingBalance: number;
8236
+ id: string;
8237
+ externalId: string | null;
8238
+ memo: string | null;
8239
+ customer: {
8240
+ readonly id: string;
8241
+ readonly externalId: string | null;
8242
+ readonly individualName: string | null;
8243
+ readonly companyName: string | null;
8244
+ readonly email: string | null;
8245
+ readonly mobilePhone: string | null;
8246
+ readonly officePhone: string | null;
8247
+ readonly addressString: string | null;
8248
+ readonly status: "ACTIVE" | "ARCHIVED";
8249
+ readonly memo: string | null;
8250
+ readonly _local?: {
8251
+ readonly isOptimistic: boolean;
8252
+ } | undefined;
8253
+ } | null;
8254
+ invoiceNumber: string | null;
8255
+ recipientName: string | null;
8256
+ businessId: string;
8257
+ lineItems: readonly {
8258
+ readonly id: string;
8259
+ readonly externalId: string | null;
8260
+ readonly memo: string | null;
8261
+ readonly description: string | null;
8262
+ readonly invoiceId: string;
8263
+ readonly product: string | null;
8264
+ readonly subtotal: number;
8265
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
8266
+ readonly unitPrice: number;
8267
+ readonly discountAmount: number;
8268
+ readonly salesTaxTotal: number;
8269
+ readonly totalAmount: number;
8270
+ }[];
8271
+ updatedAt: Date | null;
8272
+ subtotal: number;
8273
+ paidAt: Date | null;
8274
+ totalAmount: number;
8275
+ sentAt: Date | null;
8276
+ dueAt: Date | null;
8277
+ voidedAt: Date | null;
8278
+ additionalDiscount: number;
8279
+ additionalSalesTaxesTotal: number;
8280
+ importedAt: Date;
8281
+ };
8282
+ type UseUpsertDedicatedInvoicePaymentProps = {
8283
+ mode: UpsertDedicatedInvoicePaymentMode.Create;
8284
+ invoiceId: string;
8285
+ } | {
8286
+ mode: UpsertDedicatedInvoicePaymentMode.Update;
8287
+ invoiceId: string;
8288
+ invoicePaymentId: string;
8289
+ };
8290
+ export const useUpsertDedicatedInvoicePayment: (props: UseUpsertDedicatedInvoicePaymentProps) => UpsertDedicatedInvoicePaymentSWRResponse;
8291
+ export {};
8292
+
8293
+ }
8294
+ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
8295
+ import type { Key } from 'swr';
8296
+ import { type SWRMutationResponse } from 'swr/mutation';
8297
+ import { type UpsertInvoiceSchema } from '@layerfi/components/features/invoices/invoiceSchemas';
8298
+ import { Schema } from 'effect';
8299
+ export enum UpsertInvoiceMode {
8300
+ Create = "Create",
8301
+ Update = "Update"
8302
+ }
8303
+ type UpsertInvoiceBody = typeof UpsertInvoiceSchema.Encoded;
8304
+ const UpsertInvoiceReturnSchema: Schema.Struct<{
8305
+ data: Schema.Struct<{
8306
+ id: typeof Schema.UUID;
8307
+ businessId: Schema.PropertySignature<":", string, "business_id", ":", string, false, never>;
8308
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
8309
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus, import("../invoiceSchemas").InvoiceStatus, never>>;
8310
+ sentAt: Schema.PropertySignature<":", Date | null, "sent_at", ":", string | null, false, never>;
8311
+ dueAt: Schema.PropertySignature<":", Date | null, "due_at", ":", string | null, false, never>;
8312
+ paidAt: Schema.PropertySignature<":", Date | null, "paid_at", ":", string | null, false, never>;
8313
+ voidedAt: Schema.PropertySignature<":", Date | null, "voided_at", ":", string | null, false, never>;
8314
+ invoiceNumber: Schema.PropertySignature<":", string | null, "invoice_number", ":", string | null, false, never>;
8315
+ recipientName: Schema.PropertySignature<":", string | null, "recipient_name", ":", string | null, false, never>;
8316
+ customer: Schema.NullOr<Schema.Struct<{
8317
+ id: typeof Schema.UUID;
8318
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
8319
+ individualName: Schema.PropertySignature<":", string | null, "individual_name", ":", string | null, false, never>;
8320
+ companyName: Schema.PropertySignature<":", string | null, "company_name", ":", string | null, false, never>;
8321
+ email: Schema.NullOr<typeof Schema.String>;
8322
+ mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
8323
+ officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
8324
+ addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
8325
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
8326
+ memo: Schema.NullOr<typeof Schema.String>;
8327
+ _local: Schema.optional<Schema.Struct<{
8328
+ isOptimistic: typeof Schema.Boolean;
8329
+ }>>;
8330
+ }>>;
8331
+ lineItems: Schema.PropertySignature<":", readonly {
8332
+ readonly id: string;
8333
+ readonly externalId: string | null;
8334
+ readonly memo: string | null;
8335
+ readonly description: string | null;
8336
+ readonly invoiceId: string;
8337
+ readonly product: string | null;
8338
+ readonly subtotal: number;
8339
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
8340
+ readonly unitPrice: number;
8341
+ readonly discountAmount: number;
8342
+ readonly salesTaxTotal: number;
8343
+ readonly totalAmount: number;
8344
+ }[], "line_items", ":", readonly {
8345
+ readonly id: string;
8346
+ readonly external_id: string | null;
8347
+ readonly memo: string | null;
8348
+ readonly description: string | null;
8349
+ readonly invoice_id: string;
8350
+ readonly product: string | null;
8351
+ readonly subtotal: number;
8352
+ readonly quantity: string;
8353
+ readonly unit_price: number;
8354
+ readonly discount_amount: number;
8355
+ readonly sales_taxes_total: number;
8356
+ readonly total_amount: number;
8357
+ }[], false, never>;
8358
+ subtotal: typeof Schema.Number;
8359
+ additionalDiscount: Schema.PropertySignature<":", number, "additional_discount", ":", number, false, never>;
8360
+ additionalSalesTaxesTotal: Schema.PropertySignature<":", number, "additional_sales_taxes_total", ":", number, false, never>;
8361
+ totalAmount: Schema.PropertySignature<":", number, "total_amount", ":", number, false, never>;
8362
+ outstandingBalance: Schema.PropertySignature<":", number, "outstanding_balance", ":", number, false, never>;
8363
+ importedAt: Schema.PropertySignature<":", Date, "imported_at", ":", string, false, never>;
8364
+ updatedAt: Schema.PropertySignature<":", Date | null, "updated_at", ":", string | null, false, never>;
8365
+ memo: Schema.NullOr<typeof Schema.String>;
8366
+ }>;
8367
+ }>;
8368
+ type UpsertInvoiceReturn = typeof UpsertInvoiceReturnSchema.Type;
8369
+ type UpsertInvoiceSWRMutationResponse = SWRMutationResponse<UpsertInvoiceReturn, unknown, Key, UpsertInvoiceBody>;
8370
+ class UpsertInvoiceSWRResponse {
8371
+ private swrResponse;
8372
+ constructor(swrResponse: UpsertInvoiceSWRMutationResponse);
8373
+ get data(): {
8374
+ readonly data: {
8375
+ readonly id: string;
8376
+ readonly externalId: string | null;
8377
+ readonly status: import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus;
8378
+ readonly memo: string | null;
8379
+ readonly customer: {
8380
+ readonly id: string;
8381
+ readonly externalId: string | null;
8382
+ readonly individualName: string | null;
8383
+ readonly companyName: string | null;
8384
+ readonly email: string | null;
8385
+ readonly mobilePhone: string | null;
8386
+ readonly officePhone: string | null;
8387
+ readonly addressString: string | null;
8388
+ readonly status: "ACTIVE" | "ARCHIVED";
8389
+ readonly memo: string | null;
8390
+ readonly _local?: {
8391
+ readonly isOptimistic: boolean;
8392
+ } | undefined;
8393
+ } | null;
8394
+ readonly invoiceNumber: string | null;
8395
+ readonly recipientName: string | null;
8396
+ readonly businessId: string;
8397
+ readonly lineItems: readonly {
8398
+ readonly id: string;
8399
+ readonly externalId: string | null;
8400
+ readonly memo: string | null;
8401
+ readonly description: string | null;
8402
+ readonly invoiceId: string;
8403
+ readonly product: string | null;
8404
+ readonly subtotal: number;
8405
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
8406
+ readonly unitPrice: number;
8407
+ readonly discountAmount: number;
8408
+ readonly salesTaxTotal: number;
8409
+ readonly totalAmount: number;
8410
+ }[];
8411
+ readonly updatedAt: Date | null;
8412
+ readonly subtotal: number;
8413
+ readonly paidAt: Date | null;
8414
+ readonly totalAmount: number;
8415
+ readonly sentAt: Date | null;
8416
+ readonly dueAt: Date | null;
8417
+ readonly voidedAt: Date | null;
8418
+ readonly additionalDiscount: number;
8419
+ readonly additionalSalesTaxesTotal: number;
8420
+ readonly outstandingBalance: number;
8421
+ readonly importedAt: Date;
8422
+ };
8423
+ } | undefined;
8424
+ get trigger(): import("swr/mutation").TriggerWithArgs<{
8425
+ readonly data: {
8426
+ readonly id: string;
8427
+ readonly externalId: string | null;
8428
+ readonly status: import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus;
8429
+ readonly memo: string | null;
8430
+ readonly customer: {
8431
+ readonly id: string;
8432
+ readonly externalId: string | null;
8433
+ readonly individualName: string | null;
8434
+ readonly companyName: string | null;
8435
+ readonly email: string | null;
8436
+ readonly mobilePhone: string | null;
8437
+ readonly officePhone: string | null;
8438
+ readonly addressString: string | null;
8439
+ readonly status: "ACTIVE" | "ARCHIVED";
8440
+ readonly memo: string | null;
8441
+ readonly _local?: {
8442
+ readonly isOptimistic: boolean;
8443
+ } | undefined;
8444
+ } | null;
8445
+ readonly invoiceNumber: string | null;
8446
+ readonly recipientName: string | null;
8447
+ readonly businessId: string;
8448
+ readonly lineItems: readonly {
8449
+ readonly id: string;
8450
+ readonly externalId: string | null;
8451
+ readonly memo: string | null;
8452
+ readonly description: string | null;
8453
+ readonly invoiceId: string;
8454
+ readonly product: string | null;
8455
+ readonly subtotal: number;
8456
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
8457
+ readonly unitPrice: number;
8458
+ readonly discountAmount: number;
8459
+ readonly salesTaxTotal: number;
8460
+ readonly totalAmount: number;
8461
+ }[];
8462
+ readonly updatedAt: Date | null;
8463
+ readonly subtotal: number;
8464
+ readonly paidAt: Date | null;
8465
+ readonly totalAmount: number;
8466
+ readonly sentAt: Date | null;
8467
+ readonly dueAt: Date | null;
8468
+ readonly voidedAt: Date | null;
8469
+ readonly additionalDiscount: number;
8470
+ readonly additionalSalesTaxesTotal: number;
8471
+ readonly outstandingBalance: number;
8472
+ readonly importedAt: Date;
8473
+ };
8474
+ }, unknown, Key, {
8475
+ readonly line_items: readonly {
8476
+ readonly description: string;
8477
+ readonly product: string;
8478
+ readonly quantity: string;
8479
+ readonly unit_price: number;
8480
+ readonly sales_taxes?: readonly {
8481
+ readonly amount: number;
8482
+ }[] | undefined;
8483
+ }[];
8484
+ readonly sent_at: string;
8485
+ readonly due_at: string;
8486
+ readonly customer_id: string;
8487
+ readonly memo?: string | undefined;
8488
+ readonly invoice_number?: string | undefined;
8489
+ readonly additional_discount?: number | undefined;
8490
+ }>;
8491
+ get isMutating(): boolean;
8492
+ get isError(): boolean;
8493
+ }
8494
+ const CreateParamsSchema: Schema.Struct<{
8495
+ businessId: typeof Schema.String;
8496
+ }>;
8497
+ const UpdateParamsSchema: Schema.Struct<{
8498
+ businessId: typeof Schema.String;
8499
+ invoiceId: typeof Schema.String;
8500
+ }>;
8501
+ export type CreateParams = typeof CreateParamsSchema.Type;
8502
+ export type UpdateParams = typeof UpdateParamsSchema.Type;
8503
+ export type UpsertParams = CreateParams | UpdateParams;
8504
+ type UseUpsertInvoiceProps = {
8505
+ mode: UpsertInvoiceMode.Create;
8506
+ } | {
8507
+ mode: UpsertInvoiceMode.Update;
8508
+ invoiceId: string;
8509
+ };
8510
+ export const useUpsertInvoice: (props: UseUpsertInvoiceProps) => UpsertInvoiceSWRResponse;
8511
+ export {};
8512
+
8513
+ }
8514
+ declare module '@layerfi/components/features/invoices/api/useVoidInvoice' {
8515
+ import type { Key } from 'swr';
8516
+ import { type SWRMutationResponse } from 'swr/mutation';
8517
+ import { Schema } from 'effect';
8518
+ const VoidInvoiceReturnSchema: Schema.Struct<{
8519
+ data: Schema.Struct<{
8520
+ id: typeof Schema.UUID;
8521
+ businessId: Schema.PropertySignature<":", string, "business_id", ":", string, false, never>;
8522
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
8523
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus, import("../invoiceSchemas").InvoiceStatus, never>>;
8524
+ sentAt: Schema.PropertySignature<":", Date | null, "sent_at", ":", string | null, false, never>;
8525
+ dueAt: Schema.PropertySignature<":", Date | null, "due_at", ":", string | null, false, never>;
8526
+ paidAt: Schema.PropertySignature<":", Date | null, "paid_at", ":", string | null, false, never>;
8527
+ voidedAt: Schema.PropertySignature<":", Date | null, "voided_at", ":", string | null, false, never>;
8528
+ invoiceNumber: Schema.PropertySignature<":", string | null, "invoice_number", ":", string | null, false, never>;
8529
+ recipientName: Schema.PropertySignature<":", string | null, "recipient_name", ":", string | null, false, never>;
8530
+ customer: Schema.NullOr<Schema.Struct<{
8531
+ id: typeof Schema.UUID;
8532
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
8533
+ individualName: Schema.PropertySignature<":", string | null, "individual_name", ":", string | null, false, never>;
8534
+ companyName: Schema.PropertySignature<":", string | null, "company_name", ":", string | null, false, never>;
8535
+ email: Schema.NullOr<typeof Schema.String>;
8536
+ mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
8537
+ officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
8538
+ addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
8539
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
8540
+ memo: Schema.NullOr<typeof Schema.String>;
8541
+ _local: Schema.optional<Schema.Struct<{
8542
+ isOptimistic: typeof Schema.Boolean;
8543
+ }>>;
8544
+ }>>;
8545
+ lineItems: Schema.PropertySignature<":", readonly {
8546
+ readonly id: string;
8547
+ readonly externalId: string | null;
8548
+ readonly memo: string | null;
8549
+ readonly description: string | null;
8550
+ readonly invoiceId: string;
8551
+ readonly product: string | null;
8552
+ readonly subtotal: number;
8553
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
8554
+ readonly unitPrice: number;
8555
+ readonly discountAmount: number;
8556
+ readonly salesTaxTotal: number;
8557
+ readonly totalAmount: number;
8558
+ }[], "line_items", ":", readonly {
8559
+ readonly id: string;
8560
+ readonly external_id: string | null;
8561
+ readonly memo: string | null;
8562
+ readonly description: string | null;
8563
+ readonly invoice_id: string;
8564
+ readonly product: string | null;
8565
+ readonly subtotal: number;
8566
+ readonly quantity: string;
8567
+ readonly unit_price: number;
8568
+ readonly discount_amount: number;
8569
+ readonly sales_taxes_total: number;
8570
+ readonly total_amount: number;
8571
+ }[], false, never>;
8572
+ subtotal: typeof Schema.Number;
8573
+ additionalDiscount: Schema.PropertySignature<":", number, "additional_discount", ":", number, false, never>;
8574
+ additionalSalesTaxesTotal: Schema.PropertySignature<":", number, "additional_sales_taxes_total", ":", number, false, never>;
8575
+ totalAmount: Schema.PropertySignature<":", number, "total_amount", ":", number, false, never>;
8576
+ outstandingBalance: Schema.PropertySignature<":", number, "outstanding_balance", ":", number, false, never>;
8577
+ importedAt: Schema.PropertySignature<":", Date, "imported_at", ":", string, false, never>;
8578
+ updatedAt: Schema.PropertySignature<":", Date | null, "updated_at", ":", string | null, false, never>;
8579
+ memo: Schema.NullOr<typeof Schema.String>;
8580
+ }>;
8085
8581
  }>;
8086
- export type CreateParams = typeof CreateParamsSchema.Type;
8087
- export type UpdateParams = typeof UpdateParamsSchema.Type;
8088
- export type UpsertParams = CreateParams | UpdateParams;
8089
- type UseUpsertInvoiceProps = {
8090
- mode: UpsertInvoiceMode.Create;
8091
- } | {
8092
- mode: UpsertInvoiceMode.Update;
8582
+ type VoidInvoiceReturn = typeof VoidInvoiceReturnSchema.Type;
8583
+ type VoidInvoiceSWRMutationResponse = SWRMutationResponse<VoidInvoiceReturn, unknown, Key, never>;
8584
+ class VoidInvoiceSWRResponse {
8585
+ private swrResponse;
8586
+ constructor(swrResponse: VoidInvoiceSWRMutationResponse);
8587
+ get data(): {
8588
+ readonly data: {
8589
+ readonly id: string;
8590
+ readonly externalId: string | null;
8591
+ readonly status: import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus;
8592
+ readonly memo: string | null;
8593
+ readonly customer: {
8594
+ readonly id: string;
8595
+ readonly externalId: string | null;
8596
+ readonly individualName: string | null;
8597
+ readonly companyName: string | null;
8598
+ readonly email: string | null;
8599
+ readonly mobilePhone: string | null;
8600
+ readonly officePhone: string | null;
8601
+ readonly addressString: string | null;
8602
+ readonly status: "ACTIVE" | "ARCHIVED";
8603
+ readonly memo: string | null;
8604
+ readonly _local?: {
8605
+ readonly isOptimistic: boolean;
8606
+ } | undefined;
8607
+ } | null;
8608
+ readonly invoiceNumber: string | null;
8609
+ readonly recipientName: string | null;
8610
+ readonly businessId: string;
8611
+ readonly lineItems: readonly {
8612
+ readonly id: string;
8613
+ readonly externalId: string | null;
8614
+ readonly memo: string | null;
8615
+ readonly description: string | null;
8616
+ readonly invoiceId: string;
8617
+ readonly product: string | null;
8618
+ readonly subtotal: number;
8619
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
8620
+ readonly unitPrice: number;
8621
+ readonly discountAmount: number;
8622
+ readonly salesTaxTotal: number;
8623
+ readonly totalAmount: number;
8624
+ }[];
8625
+ readonly updatedAt: Date | null;
8626
+ readonly subtotal: number;
8627
+ readonly paidAt: Date | null;
8628
+ readonly totalAmount: number;
8629
+ readonly sentAt: Date | null;
8630
+ readonly dueAt: Date | null;
8631
+ readonly voidedAt: Date | null;
8632
+ readonly additionalDiscount: number;
8633
+ readonly additionalSalesTaxesTotal: number;
8634
+ readonly outstandingBalance: number;
8635
+ readonly importedAt: Date;
8636
+ };
8637
+ } | undefined;
8638
+ get trigger(): import("swr/mutation").TriggerWithoutArgs<{
8639
+ readonly data: {
8640
+ readonly id: string;
8641
+ readonly externalId: string | null;
8642
+ readonly status: import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus;
8643
+ readonly memo: string | null;
8644
+ readonly customer: {
8645
+ readonly id: string;
8646
+ readonly externalId: string | null;
8647
+ readonly individualName: string | null;
8648
+ readonly companyName: string | null;
8649
+ readonly email: string | null;
8650
+ readonly mobilePhone: string | null;
8651
+ readonly officePhone: string | null;
8652
+ readonly addressString: string | null;
8653
+ readonly status: "ACTIVE" | "ARCHIVED";
8654
+ readonly memo: string | null;
8655
+ readonly _local?: {
8656
+ readonly isOptimistic: boolean;
8657
+ } | undefined;
8658
+ } | null;
8659
+ readonly invoiceNumber: string | null;
8660
+ readonly recipientName: string | null;
8661
+ readonly businessId: string;
8662
+ readonly lineItems: readonly {
8663
+ readonly id: string;
8664
+ readonly externalId: string | null;
8665
+ readonly memo: string | null;
8666
+ readonly description: string | null;
8667
+ readonly invoiceId: string;
8668
+ readonly product: string | null;
8669
+ readonly subtotal: number;
8670
+ readonly quantity: import("effect/BigDecimal").BigDecimal;
8671
+ readonly unitPrice: number;
8672
+ readonly discountAmount: number;
8673
+ readonly salesTaxTotal: number;
8674
+ readonly totalAmount: number;
8675
+ }[];
8676
+ readonly updatedAt: Date | null;
8677
+ readonly subtotal: number;
8678
+ readonly paidAt: Date | null;
8679
+ readonly totalAmount: number;
8680
+ readonly sentAt: Date | null;
8681
+ readonly dueAt: Date | null;
8682
+ readonly voidedAt: Date | null;
8683
+ readonly additionalDiscount: number;
8684
+ readonly additionalSalesTaxesTotal: number;
8685
+ readonly outstandingBalance: number;
8686
+ readonly importedAt: Date;
8687
+ };
8688
+ }, unknown, Key, never>;
8689
+ get isMutating(): boolean;
8690
+ get isError(): boolean;
8691
+ }
8692
+ type UseVoidInvoiceProps = {
8093
8693
  invoiceId: string;
8094
8694
  };
8095
- export const useUpsertInvoice: (props: UseUpsertInvoiceProps) => UpsertInvoiceSWRResponse;
8695
+ export const useVoidInvoice: ({ invoiceId }: UseVoidInvoiceProps) => VoidInvoiceSWRResponse;
8696
+ export {};
8697
+
8698
+ }
8699
+ declare module '@layerfi/components/features/invoices/api/useWriteoffInvoice' {
8700
+ import { Schema } from 'effect';
8701
+ import type { Key } from 'swr';
8702
+ import { type SWRMutationResponse } from 'swr/mutation';
8703
+ import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
8704
+ import { type CreateInvoiceWriteoff } from '@layerfi/components/features/invoices/invoiceWriteoffSchemas';
8705
+ const WriteoffInvoiceReturnSchema: Schema.Struct<{
8706
+ data: Schema.Struct<{
8707
+ invoiceId: Schema.PropertySignature<":", string, "invoice_id", ":", string, false, never>;
8708
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
8709
+ amount: typeof Schema.Number;
8710
+ writeOffMode: Schema.PropertySignature<":", import("@layerfi/components/features/invoices/invoiceWriteoffSchemas").InvoiceWriteoffMode, "write_off_mode", ":", string, false, never>;
8711
+ writeOffAt: Schema.PropertySignature<":", Date, "write_off_at", ":", string, false, never>;
8712
+ referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
8713
+ memo: Schema.NullOr<typeof Schema.String>;
8714
+ }>;
8715
+ }>;
8716
+ type WriteoffInvoiceReturn = typeof WriteoffInvoiceReturnSchema.Type;
8717
+ type WriteoffInvoiceSWRMutationResponse = SWRMutationResponse<WriteoffInvoiceReturn, unknown, Key, CreateInvoiceWriteoff>;
8718
+ class WriteoffInvoiceSWRResponse {
8719
+ private swrResponse;
8720
+ constructor(swrResponse: WriteoffInvoiceSWRMutationResponse);
8721
+ get data(): {
8722
+ readonly data: {
8723
+ readonly externalId: string | null;
8724
+ readonly memo: string | null;
8725
+ readonly amount: number;
8726
+ readonly referenceNumber: string | null;
8727
+ readonly invoiceId: string;
8728
+ readonly writeOffMode: import("@layerfi/components/features/invoices/invoiceWriteoffSchemas").InvoiceWriteoffMode;
8729
+ readonly writeOffAt: Date;
8730
+ };
8731
+ } | undefined;
8732
+ get trigger(): import("swr/mutation").TriggerWithArgs<{
8733
+ readonly data: {
8734
+ readonly externalId: string | null;
8735
+ readonly memo: string | null;
8736
+ readonly amount: number;
8737
+ readonly referenceNumber: string | null;
8738
+ readonly invoiceId: string;
8739
+ readonly writeOffMode: import("@layerfi/components/features/invoices/invoiceWriteoffSchemas").InvoiceWriteoffMode;
8740
+ readonly writeOffAt: Date;
8741
+ };
8742
+ }, unknown, Key, {
8743
+ readonly externalId?: string | undefined;
8744
+ readonly memo?: string | undefined;
8745
+ readonly amount: number;
8746
+ readonly referenceNumber?: string | undefined;
8747
+ readonly writeOffMode?: import("@layerfi/components/features/invoices/invoiceWriteoffSchemas").InvoiceWriteoffMode | undefined;
8748
+ readonly writeOffAt: Date;
8749
+ }>;
8750
+ get isMutating(): boolean;
8751
+ get isError(): boolean;
8752
+ }
8753
+ export const updateInvoiceWithWriteoff: (invoice: Invoice) => Invoice;
8754
+ type UseWriteoffInvoiceProps = {
8755
+ invoiceId: string;
8756
+ };
8757
+ export const useWriteoffInvoice: ({ invoiceId }: UseWriteoffInvoiceProps) => WriteoffInvoiceSWRResponse;
8096
8758
  export {};
8097
8759
 
8760
+ }
8761
+ declare module '@layerfi/components/features/invoices/customerRefundSchemas' {
8762
+ import { Schema } from 'effect';
8763
+ export enum CustomerRefundStatus {
8764
+ Paid = "PAID",
8765
+ PartiallyPaid = "PARTIALLY_PAID",
8766
+ Sent = "SENT"
8767
+ }
8768
+ export const TransformedCustomerRefundStatusSchema: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<CustomerRefundStatus, CustomerRefundStatus, never>>;
8769
+ export const CreateCustomerRefundSchema: Schema.Struct<{
8770
+ externalId: Schema.PropertySignature<"?:", string | undefined, "external_id", "?:", string | undefined, false, never>;
8771
+ refundedAmount: Schema.PropertySignature<"?:", number | undefined, "refunded_amount", "?:", number | undefined, false, never>;
8772
+ completedAt: Schema.PropertySignature<":", Date, "completed_at", ":", string, false, never>;
8773
+ method: Schema.Enums<typeof import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod>;
8774
+ referenceNumber: Schema.PropertySignature<"?:", string | undefined, "reference_number", "?:", string | undefined, false, never>;
8775
+ memo: Schema.optional<typeof Schema.String>;
8776
+ }>;
8777
+ export type CreateCustomerRefund = typeof CreateCustomerRefundSchema.Type;
8778
+ export const CustomerRefundSchema: Schema.Struct<{
8779
+ externalId: Schema.PropertySignature<":", string | undefined, "external_id", ":", string | undefined, false, never>;
8780
+ refundedAmount: Schema.PropertySignature<":", number, "refunded_amount", ":", number, false, never>;
8781
+ status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<CustomerRefundStatus, CustomerRefundStatus, never>>;
8782
+ completedAt: Schema.PropertySignature<":", Date, "completed_at", ":", string, false, never>;
8783
+ isDedicated: Schema.PropertySignature<":", boolean, "is_dedicated", ":", boolean, false, never>;
8784
+ referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
8785
+ memo: Schema.NullOr<typeof Schema.String>;
8786
+ }>;
8787
+ export type CustomerRefund = typeof CustomerRefundSchema.Type;
8788
+
8098
8789
  }
8099
8790
  declare module '@layerfi/components/features/invoices/invoiceSchemas' {
8100
8791
  import { Schema } from 'effect';
@@ -8105,7 +8796,8 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
8105
8796
  WrittenOff = "WRITTEN_OFF",
8106
8797
  PartiallyWrittenOff = "PARTIALLY_WRITTEN_OFF",
8107
8798
  PartiallyPaid = "PARTIALLY_PAID",
8108
- Sent = "SENT"
8799
+ Sent = "SENT",
8800
+ Refunded = "REFUNDED"
8109
8801
  }
8110
8802
  export const TransformedInvoiceStatusSchema: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<InvoiceStatus, InvoiceStatus, never>>;
8111
8803
  export const InvoiceLineItemSchema: Schema.Struct<{
@@ -8194,9 +8886,9 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
8194
8886
  product: typeof Schema.String;
8195
8887
  unitPrice: Schema.PropertySignature<":", number, "unit_price", ":", number, false, never>;
8196
8888
  quantity: typeof Schema.BigDecimal;
8197
- salesTaxes: Schema.PropertySignature<":", readonly {
8889
+ salesTaxes: Schema.PropertySignature<"?:", readonly {
8198
8890
  readonly amount: number;
8199
- }[] | undefined, "sales_taxes", ":", readonly {
8891
+ }[] | undefined, "sales_taxes", "?:", readonly {
8200
8892
  readonly amount: number;
8201
8893
  }[] | undefined, false, never>;
8202
8894
  }>;
@@ -8204,15 +8896,15 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
8204
8896
  export const UpsertInvoiceSchema: Schema.Struct<{
8205
8897
  sentAt: Schema.PropertySignature<":", Date, "sent_at", ":", string, false, never>;
8206
8898
  dueAt: Schema.PropertySignature<":", Date, "due_at", ":", string, false, never>;
8207
- invoiceNumber: Schema.PropertySignature<":", string | undefined, "invoice_number", ":", string | undefined, false, never>;
8899
+ invoiceNumber: Schema.PropertySignature<"?:", string | undefined, "invoice_number", "?:", string | undefined, false, never>;
8208
8900
  customerId: Schema.PropertySignature<":", string, "customer_id", ":", string, false, never>;
8209
- memo: Schema.NullOr<typeof Schema.String>;
8901
+ memo: Schema.optional<typeof Schema.String>;
8210
8902
  lineItems: Schema.PropertySignature<":", readonly {
8211
8903
  readonly description: string;
8212
8904
  readonly product: string;
8213
8905
  readonly quantity: import("effect/BigDecimal").BigDecimal;
8214
8906
  readonly unitPrice: number;
8215
- readonly salesTaxes: readonly {
8907
+ readonly salesTaxes?: readonly {
8216
8908
  readonly amount: number;
8217
8909
  }[] | undefined;
8218
8910
  }[], "line_items", ":", readonly {
@@ -8220,11 +8912,11 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
8220
8912
  readonly product: string;
8221
8913
  readonly quantity: string;
8222
8914
  readonly unit_price: number;
8223
- readonly sales_taxes: readonly {
8915
+ readonly sales_taxes?: readonly {
8224
8916
  readonly amount: number;
8225
8917
  }[] | undefined;
8226
8918
  }[], false, never>;
8227
- additionalDiscount: Schema.PropertySignature<":", number | undefined, "additional_discount", ":", number | undefined, false, never>;
8919
+ additionalDiscount: Schema.PropertySignature<"?:", number | undefined, "additional_discount", "?:", number | undefined, false, never>;
8228
8920
  }>;
8229
8921
  export type UpsertInvoice = typeof UpsertInvoiceSchema.Type;
8230
8922
  export const InvoiceFormLineItemSchema: Schema.Struct<{
@@ -8298,7 +8990,7 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
8298
8990
  export const UpsertDedicatedInvoicePaymentSchema: Schema.Struct<{
8299
8991
  amount: typeof Schema.Number;
8300
8992
  method: Schema.Enums<typeof import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod>;
8301
- paidAt: Schema.PropertySignature<"?:", Date | undefined, "paid_at", "?:", string | undefined, false, never>;
8993
+ paidAt: Schema.PropertySignature<":", Date, "paid_at", ":", string, false, never>;
8302
8994
  referenceNumber: Schema.PropertySignature<"?:", string | undefined, "reference_number", "?:", string | undefined, false, never>;
8303
8995
  memo: Schema.optional<typeof Schema.String>;
8304
8996
  }>;
@@ -8306,7 +8998,7 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
8306
8998
  export const DedicatedInvoicePaymentFormSchema: Schema.Struct<{
8307
8999
  amount: typeof Schema.BigDecimal;
8308
9000
  method: Schema.NullOr<Schema.Enums<typeof import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod>>;
8309
- paidAt: Schema.declare<import("@internationalized/date").ZonedDateTime, import("@internationalized/date").ZonedDateTime, readonly [], never>;
9001
+ paidAt: Schema.NullOr<Schema.declare<import("@internationalized/date").ZonedDateTime, import("@internationalized/date").ZonedDateTime, readonly [], never>>;
8310
9002
  referenceNumber: typeof Schema.String;
8311
9003
  memo: typeof Schema.String;
8312
9004
  }>;
@@ -8320,6 +9012,34 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
8320
9012
  }>;
8321
9013
  export type InvoicePayment = typeof InvoicePaymentSchema.Type;
8322
9014
 
9015
+ }
9016
+ declare module '@layerfi/components/features/invoices/invoiceWriteoffSchemas' {
9017
+ import { Schema } from 'effect';
9018
+ export enum InvoiceWriteoffMode {
9019
+ Expense = "EXPENSE",
9020
+ RevenueReversal = "REVENUE_REVERSAL"
9021
+ }
9022
+ export const TransformedInvoiceWriteoffModeSchema: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<InvoiceWriteoffMode, InvoiceWriteoffMode, never>>;
9023
+ export const CreateInvoiceWriteoffSchema: Schema.Struct<{
9024
+ externalId: Schema.PropertySignature<"?:", string | undefined, "external_id", "?:", string | undefined, false, never>;
9025
+ amount: typeof Schema.Number;
9026
+ writeOffMode: Schema.PropertySignature<"?:", InvoiceWriteoffMode | undefined, "write_off_mode", "?:", InvoiceWriteoffMode | undefined, false, never>;
9027
+ writeOffAt: Schema.PropertySignature<":", Date, "write_off_at", ":", string, false, never>;
9028
+ referenceNumber: Schema.PropertySignature<"?:", string | undefined, "reference_number", "?:", string | undefined, false, never>;
9029
+ memo: Schema.optional<typeof Schema.String>;
9030
+ }>;
9031
+ export type CreateInvoiceWriteoff = typeof CreateInvoiceWriteoffSchema.Type;
9032
+ export const InvoiceWriteoffSchema: Schema.Struct<{
9033
+ invoiceId: Schema.PropertySignature<":", string, "invoice_id", ":", string, false, never>;
9034
+ externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
9035
+ amount: typeof Schema.Number;
9036
+ writeOffMode: Schema.PropertySignature<":", InvoiceWriteoffMode, "write_off_mode", ":", string, false, never>;
9037
+ writeOffAt: Schema.PropertySignature<":", Date, "write_off_at", ":", string, false, never>;
9038
+ referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
9039
+ memo: Schema.NullOr<typeof Schema.String>;
9040
+ }>;
9041
+ export type InvoiceWriteoff = typeof InvoiceWriteoffSchema.Type;
9042
+
8323
9043
  }
8324
9044
  declare module '@layerfi/components/features/ledger/accounts/[ledgerAccountId]/api/useDeleteLedgerAccount' {
8325
9045
  export function useDeleteAccountFromLedger(): import("swr/mutation").SWRMutationResponse<Record<string, never>, any, () => {
@@ -9652,6 +10372,15 @@ declare module '@layerfi/components/hooks/useLinkedAccounts/useListExternalAccou
9652
10372
  export const EXTERNAL_ACCOUNTS_TAG_KEY = "#external-accounts";
9653
10373
  export function useListExternalAccounts(): import("swr").SWRResponse<import("../../types/linked_accounts").LinkedAccount[], any, any>;
9654
10374
 
10375
+ }
10376
+ declare module '@layerfi/components/hooks/useMediaQuery' {
10377
+ /**
10378
+ * Hook to track media query matches
10379
+ * @param query - CSS media query string (e.g., '(max-width: 768px)')
10380
+ * @returns boolean indicating if the media query matches
10381
+ */
10382
+ export function useMediaQuery(query: string): boolean;
10383
+
9655
10384
  }
9656
10385
  declare module '@layerfi/components/hooks/usePaginationRange/usePaginationRange' {
9657
10386
  export enum Dots {
@@ -11540,6 +12269,21 @@ declare module '@layerfi/components/hooks/useReceipts/useReceipts' {
11540
12269
  export const useReceipts: UseReceipts;
11541
12270
  export {};
11542
12271
 
12272
+ }
12273
+ declare module '@layerfi/components/hooks/useResponsiveColumnVisibility' {
12274
+ import type { VisibilityState } from '@tanstack/react-table';
12275
+ export interface ResponsiveColumnConfig {
12276
+ /** Columns to show on mobile (max-width: 768px) */
12277
+ mobileColumns: string[];
12278
+ /** Columns to show on desktop (min-width: 769px) */
12279
+ desktopColumns: string[];
12280
+ }
12281
+ /**
12282
+ * Hook to manage responsive column visibility for tables
12283
+ * Returns a columnVisibility state object that can be passed to TanStack Table
12284
+ */
12285
+ export function useResponsiveColumnVisibility(config: ResponsiveColumnConfig): VisibilityState;
12286
+
11543
12287
  }
11544
12288
  declare module '@layerfi/components/hooks/useStatementOfCashFlow/useStatementOfCashFlow' {
11545
12289
  export function useStatementOfCashFlow({ startDate, endDate, }: {
@@ -12239,8 +12983,9 @@ declare module '@layerfi/components/providers/InvoiceStore/InvoiceStoreProvider'
12239
12983
  import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
12240
12984
  import { type InvoiceStatusOption } from '@layerfi/components/components/Invoices/InvoiceTable/InvoiceTable';
12241
12985
  import type { InvoiceFormMode } from '@layerfi/components/components/Invoices/InvoiceForm/InvoiceForm';
12242
- type InvoiceTableQuery = {
12986
+ export type InvoiceTableFilters = {
12243
12987
  status: InvoiceStatusOption;
12988
+ query: string;
12244
12989
  };
12245
12990
  export enum InvoiceRoute {
12246
12991
  Table = "Table",
@@ -12255,9 +13000,9 @@ declare module '@layerfi/components/providers/InvoiceStore/InvoiceStoreProvider'
12255
13000
  type InvoiceRouteState = InvoiceDetailRouteState | InvoiceTableRouteState;
12256
13001
  export function useInvoiceRouteState(): InvoiceRouteState;
12257
13002
  export function useInvoiceDetail(): InvoiceFormMode;
12258
- export function useInvoiceTableQuery(): {
12259
- query: InvoiceTableQuery;
12260
- setQuery: (patchQuery: Partial<InvoiceTableQuery>) => void;
13003
+ export function useInvoiceTableFilters(): {
13004
+ tableFilters: InvoiceTableFilters;
13005
+ setTableFilters: (patchFilters: Partial<InvoiceTableFilters>) => void;
12261
13006
  };
12262
13007
  export function useInvoiceNavigation(): {
12263
13008
  toCreateInvoice: () => void;