@layerfi/components 0.1.107 → 0.1.108-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/cjs/index.cjs +1540 -770
- package/dist/esm/index.mjs +1215 -445
- package/dist/index.css +51 -30
- package/dist/index.d.ts +561 -36
- package/package.json +1 -1
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
|
|
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' {
|
|
@@ -3265,6 +3268,14 @@ declare module '@layerfi/components/components/Integrations/IntegrationsQuickboo
|
|
|
3265
3268
|
declare module '@layerfi/components/components/Invoices/InvoiceDetail/InvoiceDetail' {
|
|
3266
3269
|
export const InvoiceDetail: () => import("react/jsx-runtime").JSX.Element;
|
|
3267
3270
|
|
|
3271
|
+
}
|
|
3272
|
+
declare module '@layerfi/components/components/Invoices/InvoiceDetail/InvoiceDetailHeaderMenu' {
|
|
3273
|
+
type InvoiceDetailHeaderMenuProps = {
|
|
3274
|
+
onEditInvoice: () => void;
|
|
3275
|
+
};
|
|
3276
|
+
export const InvoiceDetailHeaderMenu: ({ onEditInvoice }: InvoiceDetailHeaderMenuProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3277
|
+
export {};
|
|
3278
|
+
|
|
3268
3279
|
}
|
|
3269
3280
|
declare module '@layerfi/components/components/Invoices/InvoiceForm/InvoiceForm' {
|
|
3270
3281
|
import React from 'react';
|
|
@@ -3450,67 +3461,171 @@ declare module '@layerfi/components/components/Invoices/InvoicePaymentForm/useIn
|
|
|
3450
3461
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3451
3462
|
readonly referenceNumber: string;
|
|
3452
3463
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3453
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3464
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3454
3465
|
}, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3455
3466
|
readonly memo: string;
|
|
3456
3467
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3457
3468
|
readonly referenceNumber: string;
|
|
3458
3469
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3459
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3470
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3460
3471
|
}>, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3461
3472
|
readonly memo: string;
|
|
3462
3473
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3463
3474
|
readonly referenceNumber: string;
|
|
3464
3475
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3465
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3476
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3466
3477
|
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3467
3478
|
readonly memo: string;
|
|
3468
3479
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3469
3480
|
readonly referenceNumber: string;
|
|
3470
3481
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3471
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3482
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3472
3483
|
}>, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3473
3484
|
readonly memo: string;
|
|
3474
3485
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3475
3486
|
readonly referenceNumber: string;
|
|
3476
3487
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3477
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3488
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3478
3489
|
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3479
3490
|
readonly memo: string;
|
|
3480
3491
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3481
3492
|
readonly referenceNumber: string;
|
|
3482
3493
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3483
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3494
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3484
3495
|
}>, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3485
3496
|
readonly memo: string;
|
|
3486
3497
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3487
3498
|
readonly referenceNumber: string;
|
|
3488
3499
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3489
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3500
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3490
3501
|
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3491
3502
|
readonly memo: string;
|
|
3492
3503
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3493
3504
|
readonly referenceNumber: string;
|
|
3494
3505
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3495
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3506
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3496
3507
|
}>, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3497
3508
|
readonly memo: string;
|
|
3498
3509
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3499
3510
|
readonly referenceNumber: string;
|
|
3500
3511
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3501
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3512
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3502
3513
|
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3503
3514
|
readonly memo: string;
|
|
3504
3515
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3505
3516
|
readonly referenceNumber: string;
|
|
3506
3517
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3507
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3518
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3508
3519
|
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3509
3520
|
readonly memo: string;
|
|
3510
3521
|
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3511
3522
|
readonly referenceNumber: string;
|
|
3512
3523
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3513
|
-
readonly paidAt: import("@internationalized/date").ZonedDateTime;
|
|
3524
|
+
readonly paidAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3525
|
+
}>, unknown, {
|
|
3526
|
+
readonly BaseFormTextField: typeof import("@layerfi/components/features/forms/components/BaseFormTextField").BaseFormTextField;
|
|
3527
|
+
readonly FormBigDecimalField: typeof import("@layerfi/components/features/forms/components/FormBigDecimalField").FormBigDecimalField;
|
|
3528
|
+
readonly FormCheckboxField: typeof import("@layerfi/components/features/forms/components/FormCheckboxField").FormCheckboxField;
|
|
3529
|
+
readonly FormDateField: typeof import("@layerfi/components/features/forms/components/FormDateField").FormDateField;
|
|
3530
|
+
readonly FormTextAreaField: typeof import("@layerfi/components/features/forms/components/FormTextAreaField").FormTextAreaField;
|
|
3531
|
+
readonly FormTextField: typeof import("@layerfi/components/features/forms/components/FormTextField").FormTextField;
|
|
3532
|
+
}, {}>;
|
|
3533
|
+
submitError: string | undefined;
|
|
3534
|
+
};
|
|
3535
|
+
export {};
|
|
3536
|
+
|
|
3537
|
+
}
|
|
3538
|
+
declare module '@layerfi/components/components/Invoices/InvoiceRefundForm/InvoiceRefundForm' {
|
|
3539
|
+
import React from 'react';
|
|
3540
|
+
import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3541
|
+
import type { CustomerRefund } from '@layerfi/components/features/invoices/customerRefundSchemas';
|
|
3542
|
+
export type InvoiceRefundFormProps = {
|
|
3543
|
+
onSuccess: (refund: CustomerRefund) => void;
|
|
3544
|
+
invoice: Invoice;
|
|
3545
|
+
};
|
|
3546
|
+
export const InvoiceRefundForm: React.ForwardRefExoticComponent<InvoiceRefundFormProps & React.RefAttributes<unknown>>;
|
|
3547
|
+
|
|
3548
|
+
}
|
|
3549
|
+
declare module '@layerfi/components/components/Invoices/InvoiceRefundForm/formUtils' {
|
|
3550
|
+
import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3551
|
+
import type { InvoiceRefundForm } from '@layerfi/components/components/Invoices/InvoiceRefundForm/invoiceRefundFormSchemas';
|
|
3552
|
+
export const getInvoiceRefundFormDefaultValues: (invoice: Invoice) => InvoiceRefundForm;
|
|
3553
|
+
export const validateInvoiceRefundForm: ({ invoiceRefund, invoice }: {
|
|
3554
|
+
invoiceRefund: InvoiceRefundForm;
|
|
3555
|
+
invoice: Invoice;
|
|
3556
|
+
}) => ({
|
|
3557
|
+
completedAt: string;
|
|
3558
|
+
method?: undefined;
|
|
3559
|
+
} | {
|
|
3560
|
+
method: string;
|
|
3561
|
+
completedAt?: undefined;
|
|
3562
|
+
})[] | null;
|
|
3563
|
+
export const convertInvoiceRefundFormToParams: (form: InvoiceRefundForm) => unknown;
|
|
3564
|
+
|
|
3565
|
+
}
|
|
3566
|
+
declare module '@layerfi/components/components/Invoices/InvoiceRefundForm/invoiceRefundFormSchemas' {
|
|
3567
|
+
import { Schema } from 'effect';
|
|
3568
|
+
export const InvoiceRefundFormSchema: Schema.Struct<{
|
|
3569
|
+
amount: typeof Schema.BigDecimal;
|
|
3570
|
+
method: Schema.NullOr<Schema.Enums<typeof import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod>>;
|
|
3571
|
+
completedAt: Schema.NullOr<Schema.declare<import("@internationalized/date").ZonedDateTime, import("@internationalized/date").ZonedDateTime, readonly [], never>>;
|
|
3572
|
+
}>;
|
|
3573
|
+
export type InvoiceRefundForm = typeof InvoiceRefundFormSchema.Type;
|
|
3574
|
+
|
|
3575
|
+
}
|
|
3576
|
+
declare module '@layerfi/components/components/Invoices/InvoiceRefundForm/useInvoiceRefundForm' {
|
|
3577
|
+
import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3578
|
+
import { type CustomerRefund } from '@layerfi/components/features/invoices/customerRefundSchemas';
|
|
3579
|
+
type onSuccessFn = (refund: CustomerRefund) => void;
|
|
3580
|
+
type UseInvoiceRefundFormProps = {
|
|
3581
|
+
onSuccess: onSuccessFn;
|
|
3582
|
+
invoice: Invoice;
|
|
3583
|
+
};
|
|
3584
|
+
export const useInvoiceRefundForm: ({ onSuccess, invoice }: UseInvoiceRefundFormProps) => {
|
|
3585
|
+
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<{
|
|
3586
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3587
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3588
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3589
|
+
}, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3590
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3591
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3592
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3593
|
+
}>, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3594
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3595
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3596
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3597
|
+
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3598
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3599
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3600
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3601
|
+
}>, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3602
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3603
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3604
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3605
|
+
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3606
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3607
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3608
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3609
|
+
}>, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3610
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3611
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3612
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3613
|
+
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3614
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3615
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3616
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3617
|
+
}>, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3618
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3619
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3620
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3621
|
+
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3622
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3623
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3624
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3625
|
+
}>, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3626
|
+
readonly amount: import("effect/BigDecimal").BigDecimal;
|
|
3627
|
+
readonly completedAt: import("@internationalized/date").ZonedDateTime | null;
|
|
3628
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod | null;
|
|
3514
3629
|
}>, unknown, {
|
|
3515
3630
|
readonly BaseFormTextField: typeof import("@layerfi/components/features/forms/components/BaseFormTextField").BaseFormTextField;
|
|
3516
3631
|
readonly FormBigDecimalField: typeof import("@layerfi/components/features/forms/components/FormBigDecimalField").FormBigDecimalField;
|
|
@@ -3544,7 +3659,8 @@ declare module '@layerfi/components/components/Invoices/InvoiceTable/InvoiceTabl
|
|
|
3544
3659
|
Sent = "Sent",
|
|
3545
3660
|
Paid = "Paid",
|
|
3546
3661
|
WrittenOff = "Written Off",
|
|
3547
|
-
Voided = "Voided"
|
|
3662
|
+
Voided = "Voided",
|
|
3663
|
+
Refunded = "Refunded"
|
|
3548
3664
|
}
|
|
3549
3665
|
export type InvoiceStatusOption = {
|
|
3550
3666
|
label: string;
|
|
@@ -3590,6 +3706,50 @@ declare module '@layerfi/components/components/Invoices/Invoices' {
|
|
|
3590
3706
|
export const unstable_Invoices: ({ showTitle, stringOverrides }: InvoicesProps) => import("react/jsx-runtime").JSX.Element;
|
|
3591
3707
|
export {};
|
|
3592
3708
|
|
|
3709
|
+
}
|
|
3710
|
+
declare module '@layerfi/components/components/Invoices/Modal/InvoiceRefundModal' {
|
|
3711
|
+
import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
|
|
3712
|
+
import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3713
|
+
type InvoiceRefundModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
|
|
3714
|
+
invoice: Invoice;
|
|
3715
|
+
onSuccess: (invoice: Invoice) => void;
|
|
3716
|
+
};
|
|
3717
|
+
export function InvoiceRefundModal({ isOpen, onOpenChange, invoice, onSuccess }: InvoiceRefundModalProps): import("react/jsx-runtime").JSX.Element;
|
|
3718
|
+
export {};
|
|
3719
|
+
|
|
3720
|
+
}
|
|
3721
|
+
declare module '@layerfi/components/components/Invoices/Modal/InvoiceResetModal' {
|
|
3722
|
+
import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
|
|
3723
|
+
import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3724
|
+
type InvoiceResetModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
|
|
3725
|
+
invoiceId: string;
|
|
3726
|
+
onSuccess: (invoice: Invoice) => void;
|
|
3727
|
+
};
|
|
3728
|
+
export function InvoiceResetModal({ isOpen, onOpenChange, invoiceId: _invoiceId }: InvoiceResetModalProps): import("react/jsx-runtime").JSX.Element;
|
|
3729
|
+
export {};
|
|
3730
|
+
|
|
3731
|
+
}
|
|
3732
|
+
declare module '@layerfi/components/components/Invoices/Modal/InvoiceVoidModal' {
|
|
3733
|
+
import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
|
|
3734
|
+
import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3735
|
+
type InvoiceVoidModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
|
|
3736
|
+
invoiceId: string;
|
|
3737
|
+
onSuccess: (invoice: Invoice) => void;
|
|
3738
|
+
};
|
|
3739
|
+
export function InvoiceVoidModal({ isOpen, onOpenChange, invoiceId, onSuccess }: InvoiceVoidModalProps): import("react/jsx-runtime").JSX.Element;
|
|
3740
|
+
export {};
|
|
3741
|
+
|
|
3742
|
+
}
|
|
3743
|
+
declare module '@layerfi/components/components/Invoices/Modal/InvoiceWriteoffModal' {
|
|
3744
|
+
import { ModalProps } from '@layerfi/components/components/ui/Modal/Modal';
|
|
3745
|
+
import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3746
|
+
type InvoiceWriteoffModalProps = Pick<ModalProps, 'isOpen' | 'onOpenChange'> & {
|
|
3747
|
+
invoice: Invoice;
|
|
3748
|
+
onSuccess: (invoice: Invoice) => void;
|
|
3749
|
+
};
|
|
3750
|
+
export function InvoiceWriteoffModal({ isOpen, onOpenChange, invoice, onSuccess }: InvoiceWriteoffModalProps): import("react/jsx-runtime").JSX.Element;
|
|
3751
|
+
export {};
|
|
3752
|
+
|
|
3593
3753
|
}
|
|
3594
3754
|
declare module '@layerfi/components/components/Journal/Journal' {
|
|
3595
3755
|
import { JournalTableStringOverrides } from '@layerfi/components/components/JournalTable/JournalTableWithPanel';
|
|
@@ -5757,7 +5917,7 @@ declare module '@layerfi/components/components/ui/Date/Date' {
|
|
|
5757
5917
|
|
|
5758
5918
|
}
|
|
5759
5919
|
declare module '@layerfi/components/components/ui/DropdownMenu/DropdownMenu' {
|
|
5760
|
-
import React, { PropsWithChildren } from 'react';
|
|
5920
|
+
import React, { type PropsWithChildren } from 'react';
|
|
5761
5921
|
type DropdownMenuProps = PropsWithChildren<{
|
|
5762
5922
|
className?: string;
|
|
5763
5923
|
ariaLabel?: string;
|
|
@@ -5769,18 +5929,15 @@ declare module '@layerfi/components/components/ui/DropdownMenu/DropdownMenu' {
|
|
|
5769
5929
|
width?: number | string;
|
|
5770
5930
|
};
|
|
5771
5931
|
};
|
|
5932
|
+
variant?: 'compact';
|
|
5772
5933
|
}>;
|
|
5773
5934
|
type MenuItemProps = PropsWithChildren<{
|
|
5774
5935
|
isDisabled?: boolean;
|
|
5775
5936
|
onClick?: () => void;
|
|
5776
5937
|
}>;
|
|
5777
|
-
export const Heading: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
5778
|
-
export const Separator: () => import("react/jsx-runtime").JSX.Element;
|
|
5779
5938
|
export const MenuItem: ({ children, onClick, isDisabled }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5780
|
-
export const MenuList: ({ children }:
|
|
5781
|
-
|
|
5782
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5783
|
-
export const DropdownMenu: ({ children, ariaLabel, slots, slotProps }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
5939
|
+
export const MenuList: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
5940
|
+
export const DropdownMenu: ({ children, ariaLabel, variant, slots, slotProps }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
5784
5941
|
export {};
|
|
5785
5942
|
|
|
5786
5943
|
}
|
|
@@ -7751,6 +7908,69 @@ declare module '@layerfi/components/features/invoices/api/useListInvoices' {
|
|
|
7751
7908
|
};
|
|
7752
7909
|
export {};
|
|
7753
7910
|
|
|
7911
|
+
}
|
|
7912
|
+
declare module '@layerfi/components/features/invoices/api/useRefundInvoice' {
|
|
7913
|
+
import type { Key } from 'swr';
|
|
7914
|
+
import { type SWRMutationResponse } from 'swr/mutation';
|
|
7915
|
+
import { Schema } from 'effect';
|
|
7916
|
+
import { CreateCustomerRefundSchema } from '@layerfi/components/features/invoices/customerRefundSchemas';
|
|
7917
|
+
import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
7918
|
+
const RefundInvoiceReturnSchema: Schema.Struct<{
|
|
7919
|
+
data: Schema.Struct<{
|
|
7920
|
+
externalId: Schema.PropertySignature<":", string | undefined, "external_id", ":", string | undefined, false, never>;
|
|
7921
|
+
refundedAmount: Schema.PropertySignature<":", number, "refunded_amount", ":", number, false, never>;
|
|
7922
|
+
status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<import("@layerfi/components/features/invoices/customerRefundSchemas").CustomerRefundStatus, import("../customerRefundSchemas").CustomerRefundStatus, never>>;
|
|
7923
|
+
completedAt: Schema.PropertySignature<":", Date, "completed_at", ":", string, false, never>;
|
|
7924
|
+
isDedicated: Schema.PropertySignature<":", boolean, "is_dedicated", ":", boolean, false, never>;
|
|
7925
|
+
referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
|
|
7926
|
+
memo: Schema.NullOr<typeof Schema.String>;
|
|
7927
|
+
}>;
|
|
7928
|
+
}>;
|
|
7929
|
+
type RefundInvoiceBody = typeof CreateCustomerRefundSchema.Encoded;
|
|
7930
|
+
type RefundInvoiceReturn = typeof RefundInvoiceReturnSchema.Type;
|
|
7931
|
+
type RefundInvoiceSWRMutationResponse = SWRMutationResponse<RefundInvoiceReturn, unknown, Key, RefundInvoiceBody>;
|
|
7932
|
+
class RefundInvoiceSWRResponse {
|
|
7933
|
+
private swrResponse;
|
|
7934
|
+
constructor(swrResponse: RefundInvoiceSWRMutationResponse);
|
|
7935
|
+
get data(): {
|
|
7936
|
+
readonly data: {
|
|
7937
|
+
readonly externalId: string | undefined;
|
|
7938
|
+
readonly status: import("@layerfi/components/features/invoices/customerRefundSchemas").CustomerRefundStatus;
|
|
7939
|
+
readonly memo: string | null;
|
|
7940
|
+
readonly referenceNumber: string | null;
|
|
7941
|
+
readonly completedAt: Date;
|
|
7942
|
+
readonly refundedAmount: number;
|
|
7943
|
+
readonly isDedicated: boolean;
|
|
7944
|
+
};
|
|
7945
|
+
} | undefined;
|
|
7946
|
+
get trigger(): import("swr/mutation").TriggerWithArgs<{
|
|
7947
|
+
readonly data: {
|
|
7948
|
+
readonly externalId: string | undefined;
|
|
7949
|
+
readonly status: import("@layerfi/components/features/invoices/customerRefundSchemas").CustomerRefundStatus;
|
|
7950
|
+
readonly memo: string | null;
|
|
7951
|
+
readonly referenceNumber: string | null;
|
|
7952
|
+
readonly completedAt: Date;
|
|
7953
|
+
readonly refundedAmount: number;
|
|
7954
|
+
readonly isDedicated: boolean;
|
|
7955
|
+
};
|
|
7956
|
+
}, unknown, Key, {
|
|
7957
|
+
readonly completed_at: string;
|
|
7958
|
+
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod;
|
|
7959
|
+
readonly external_id?: string | undefined;
|
|
7960
|
+
readonly memo?: string | undefined;
|
|
7961
|
+
readonly reference_number?: string | undefined;
|
|
7962
|
+
readonly refunded_amount?: number | undefined;
|
|
7963
|
+
}>;
|
|
7964
|
+
get isMutating(): boolean;
|
|
7965
|
+
get isError(): boolean;
|
|
7966
|
+
}
|
|
7967
|
+
export const updateInvoiceWithRefund: (invoice: Invoice) => Invoice;
|
|
7968
|
+
type UseRefundInvoiceProps = {
|
|
7969
|
+
invoiceId: string;
|
|
7970
|
+
};
|
|
7971
|
+
export const useRefundInvoice: ({ invoiceId }: UseRefundInvoiceProps) => RefundInvoiceSWRResponse;
|
|
7972
|
+
export {};
|
|
7973
|
+
|
|
7754
7974
|
}
|
|
7755
7975
|
declare module '@layerfi/components/features/invoices/api/useUpsertDedicatedInvoicePayment' {
|
|
7756
7976
|
import type { Key } from 'swr';
|
|
@@ -7796,9 +8016,9 @@ declare module '@layerfi/components/features/invoices/api/useUpsertDedicatedInvo
|
|
|
7796
8016
|
}, unknown, Key, {
|
|
7797
8017
|
readonly amount: number;
|
|
7798
8018
|
readonly method: import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod;
|
|
8019
|
+
readonly paid_at: string;
|
|
7799
8020
|
readonly memo?: string | undefined;
|
|
7800
8021
|
readonly reference_number?: string | undefined;
|
|
7801
|
-
readonly paid_at?: string | undefined;
|
|
7802
8022
|
}>;
|
|
7803
8023
|
get isMutating(): boolean;
|
|
7804
8024
|
get isError(): boolean;
|
|
@@ -8057,21 +8277,21 @@ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
|
|
|
8057
8277
|
readonly importedAt: Date;
|
|
8058
8278
|
};
|
|
8059
8279
|
}, unknown, Key, {
|
|
8060
|
-
readonly memo: string | null;
|
|
8061
|
-
readonly invoice_number: string | undefined;
|
|
8062
8280
|
readonly line_items: readonly {
|
|
8063
8281
|
readonly description: string;
|
|
8064
8282
|
readonly product: string;
|
|
8065
8283
|
readonly quantity: string;
|
|
8066
8284
|
readonly unit_price: number;
|
|
8067
|
-
readonly sales_taxes
|
|
8285
|
+
readonly sales_taxes?: readonly {
|
|
8068
8286
|
readonly amount: number;
|
|
8069
8287
|
}[] | undefined;
|
|
8070
8288
|
}[];
|
|
8071
8289
|
readonly sent_at: string;
|
|
8072
8290
|
readonly due_at: string;
|
|
8073
|
-
readonly additional_discount: number | undefined;
|
|
8074
8291
|
readonly customer_id: string;
|
|
8292
|
+
readonly memo?: string | undefined;
|
|
8293
|
+
readonly invoice_number?: string | undefined;
|
|
8294
|
+
readonly additional_discount?: number | undefined;
|
|
8075
8295
|
}>;
|
|
8076
8296
|
get isMutating(): boolean;
|
|
8077
8297
|
get isError(): boolean;
|
|
@@ -8095,6 +8315,282 @@ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
|
|
|
8095
8315
|
export const useUpsertInvoice: (props: UseUpsertInvoiceProps) => UpsertInvoiceSWRResponse;
|
|
8096
8316
|
export {};
|
|
8097
8317
|
|
|
8318
|
+
}
|
|
8319
|
+
declare module '@layerfi/components/features/invoices/api/useVoidInvoice' {
|
|
8320
|
+
import type { Key } from 'swr';
|
|
8321
|
+
import { type SWRMutationResponse } from 'swr/mutation';
|
|
8322
|
+
import { Schema } from 'effect';
|
|
8323
|
+
const VoidInvoiceReturnSchema: Schema.Struct<{
|
|
8324
|
+
data: Schema.Struct<{
|
|
8325
|
+
id: typeof Schema.UUID;
|
|
8326
|
+
businessId: Schema.PropertySignature<":", string, "business_id", ":", string, false, never>;
|
|
8327
|
+
externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
|
|
8328
|
+
status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus, import("../invoiceSchemas").InvoiceStatus, never>>;
|
|
8329
|
+
sentAt: Schema.PropertySignature<":", Date | null, "sent_at", ":", string | null, false, never>;
|
|
8330
|
+
dueAt: Schema.PropertySignature<":", Date | null, "due_at", ":", string | null, false, never>;
|
|
8331
|
+
paidAt: Schema.PropertySignature<":", Date | null, "paid_at", ":", string | null, false, never>;
|
|
8332
|
+
voidedAt: Schema.PropertySignature<":", Date | null, "voided_at", ":", string | null, false, never>;
|
|
8333
|
+
invoiceNumber: Schema.PropertySignature<":", string | null, "invoice_number", ":", string | null, false, never>;
|
|
8334
|
+
recipientName: Schema.PropertySignature<":", string | null, "recipient_name", ":", string | null, false, never>;
|
|
8335
|
+
customer: Schema.NullOr<Schema.Struct<{
|
|
8336
|
+
id: typeof Schema.UUID;
|
|
8337
|
+
externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
|
|
8338
|
+
individualName: Schema.PropertySignature<":", string | null, "individual_name", ":", string | null, false, never>;
|
|
8339
|
+
companyName: Schema.PropertySignature<":", string | null, "company_name", ":", string | null, false, never>;
|
|
8340
|
+
email: Schema.NullOr<typeof Schema.String>;
|
|
8341
|
+
mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
|
|
8342
|
+
officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
|
|
8343
|
+
addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
|
|
8344
|
+
status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
|
|
8345
|
+
memo: Schema.NullOr<typeof Schema.String>;
|
|
8346
|
+
_local: Schema.optional<Schema.Struct<{
|
|
8347
|
+
isOptimistic: typeof Schema.Boolean;
|
|
8348
|
+
}>>;
|
|
8349
|
+
}>>;
|
|
8350
|
+
lineItems: Schema.PropertySignature<":", readonly {
|
|
8351
|
+
readonly id: string;
|
|
8352
|
+
readonly externalId: string | null;
|
|
8353
|
+
readonly memo: string | null;
|
|
8354
|
+
readonly description: string | null;
|
|
8355
|
+
readonly invoiceId: string;
|
|
8356
|
+
readonly product: string | null;
|
|
8357
|
+
readonly subtotal: number;
|
|
8358
|
+
readonly quantity: import("effect/BigDecimal").BigDecimal;
|
|
8359
|
+
readonly unitPrice: number;
|
|
8360
|
+
readonly discountAmount: number;
|
|
8361
|
+
readonly salesTaxTotal: number;
|
|
8362
|
+
readonly totalAmount: number;
|
|
8363
|
+
}[], "line_items", ":", readonly {
|
|
8364
|
+
readonly id: string;
|
|
8365
|
+
readonly external_id: string | null;
|
|
8366
|
+
readonly memo: string | null;
|
|
8367
|
+
readonly description: string | null;
|
|
8368
|
+
readonly invoice_id: string;
|
|
8369
|
+
readonly product: string | null;
|
|
8370
|
+
readonly subtotal: number;
|
|
8371
|
+
readonly quantity: string;
|
|
8372
|
+
readonly unit_price: number;
|
|
8373
|
+
readonly discount_amount: number;
|
|
8374
|
+
readonly sales_taxes_total: number;
|
|
8375
|
+
readonly total_amount: number;
|
|
8376
|
+
}[], false, never>;
|
|
8377
|
+
subtotal: typeof Schema.Number;
|
|
8378
|
+
additionalDiscount: Schema.PropertySignature<":", number, "additional_discount", ":", number, false, never>;
|
|
8379
|
+
additionalSalesTaxesTotal: Schema.PropertySignature<":", number, "additional_sales_taxes_total", ":", number, false, never>;
|
|
8380
|
+
totalAmount: Schema.PropertySignature<":", number, "total_amount", ":", number, false, never>;
|
|
8381
|
+
outstandingBalance: Schema.PropertySignature<":", number, "outstanding_balance", ":", number, false, never>;
|
|
8382
|
+
importedAt: Schema.PropertySignature<":", Date, "imported_at", ":", string, false, never>;
|
|
8383
|
+
updatedAt: Schema.PropertySignature<":", Date | null, "updated_at", ":", string | null, false, never>;
|
|
8384
|
+
memo: Schema.NullOr<typeof Schema.String>;
|
|
8385
|
+
}>;
|
|
8386
|
+
}>;
|
|
8387
|
+
type VoidInvoiceReturn = typeof VoidInvoiceReturnSchema.Type;
|
|
8388
|
+
type VoidInvoiceSWRMutationResponse = SWRMutationResponse<VoidInvoiceReturn, unknown, Key, never>;
|
|
8389
|
+
class VoidInvoiceSWRResponse {
|
|
8390
|
+
private swrResponse;
|
|
8391
|
+
constructor(swrResponse: VoidInvoiceSWRMutationResponse);
|
|
8392
|
+
get data(): {
|
|
8393
|
+
readonly data: {
|
|
8394
|
+
readonly id: string;
|
|
8395
|
+
readonly externalId: string | null;
|
|
8396
|
+
readonly status: import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus;
|
|
8397
|
+
readonly memo: string | null;
|
|
8398
|
+
readonly customer: {
|
|
8399
|
+
readonly id: string;
|
|
8400
|
+
readonly externalId: string | null;
|
|
8401
|
+
readonly individualName: string | null;
|
|
8402
|
+
readonly companyName: string | null;
|
|
8403
|
+
readonly email: string | null;
|
|
8404
|
+
readonly mobilePhone: string | null;
|
|
8405
|
+
readonly officePhone: string | null;
|
|
8406
|
+
readonly addressString: string | null;
|
|
8407
|
+
readonly status: "ACTIVE" | "ARCHIVED";
|
|
8408
|
+
readonly memo: string | null;
|
|
8409
|
+
readonly _local?: {
|
|
8410
|
+
readonly isOptimistic: boolean;
|
|
8411
|
+
} | undefined;
|
|
8412
|
+
} | null;
|
|
8413
|
+
readonly invoiceNumber: string | null;
|
|
8414
|
+
readonly recipientName: string | null;
|
|
8415
|
+
readonly businessId: string;
|
|
8416
|
+
readonly lineItems: readonly {
|
|
8417
|
+
readonly id: string;
|
|
8418
|
+
readonly externalId: string | null;
|
|
8419
|
+
readonly memo: string | null;
|
|
8420
|
+
readonly description: string | null;
|
|
8421
|
+
readonly invoiceId: string;
|
|
8422
|
+
readonly product: string | null;
|
|
8423
|
+
readonly subtotal: number;
|
|
8424
|
+
readonly quantity: import("effect/BigDecimal").BigDecimal;
|
|
8425
|
+
readonly unitPrice: number;
|
|
8426
|
+
readonly discountAmount: number;
|
|
8427
|
+
readonly salesTaxTotal: number;
|
|
8428
|
+
readonly totalAmount: number;
|
|
8429
|
+
}[];
|
|
8430
|
+
readonly updatedAt: Date | null;
|
|
8431
|
+
readonly subtotal: number;
|
|
8432
|
+
readonly paidAt: Date | null;
|
|
8433
|
+
readonly totalAmount: number;
|
|
8434
|
+
readonly sentAt: Date | null;
|
|
8435
|
+
readonly dueAt: Date | null;
|
|
8436
|
+
readonly voidedAt: Date | null;
|
|
8437
|
+
readonly additionalDiscount: number;
|
|
8438
|
+
readonly additionalSalesTaxesTotal: number;
|
|
8439
|
+
readonly outstandingBalance: number;
|
|
8440
|
+
readonly importedAt: Date;
|
|
8441
|
+
};
|
|
8442
|
+
} | undefined;
|
|
8443
|
+
get trigger(): import("swr/mutation").TriggerWithoutArgs<{
|
|
8444
|
+
readonly data: {
|
|
8445
|
+
readonly id: string;
|
|
8446
|
+
readonly externalId: string | null;
|
|
8447
|
+
readonly status: import("@layerfi/components/features/invoices/invoiceSchemas").InvoiceStatus;
|
|
8448
|
+
readonly memo: string | null;
|
|
8449
|
+
readonly customer: {
|
|
8450
|
+
readonly id: string;
|
|
8451
|
+
readonly externalId: string | null;
|
|
8452
|
+
readonly individualName: string | null;
|
|
8453
|
+
readonly companyName: string | null;
|
|
8454
|
+
readonly email: string | null;
|
|
8455
|
+
readonly mobilePhone: string | null;
|
|
8456
|
+
readonly officePhone: string | null;
|
|
8457
|
+
readonly addressString: string | null;
|
|
8458
|
+
readonly status: "ACTIVE" | "ARCHIVED";
|
|
8459
|
+
readonly memo: string | null;
|
|
8460
|
+
readonly _local?: {
|
|
8461
|
+
readonly isOptimistic: boolean;
|
|
8462
|
+
} | undefined;
|
|
8463
|
+
} | null;
|
|
8464
|
+
readonly invoiceNumber: string | null;
|
|
8465
|
+
readonly recipientName: string | null;
|
|
8466
|
+
readonly businessId: string;
|
|
8467
|
+
readonly lineItems: readonly {
|
|
8468
|
+
readonly id: string;
|
|
8469
|
+
readonly externalId: string | null;
|
|
8470
|
+
readonly memo: string | null;
|
|
8471
|
+
readonly description: string | null;
|
|
8472
|
+
readonly invoiceId: string;
|
|
8473
|
+
readonly product: string | null;
|
|
8474
|
+
readonly subtotal: number;
|
|
8475
|
+
readonly quantity: import("effect/BigDecimal").BigDecimal;
|
|
8476
|
+
readonly unitPrice: number;
|
|
8477
|
+
readonly discountAmount: number;
|
|
8478
|
+
readonly salesTaxTotal: number;
|
|
8479
|
+
readonly totalAmount: number;
|
|
8480
|
+
}[];
|
|
8481
|
+
readonly updatedAt: Date | null;
|
|
8482
|
+
readonly subtotal: number;
|
|
8483
|
+
readonly paidAt: Date | null;
|
|
8484
|
+
readonly totalAmount: number;
|
|
8485
|
+
readonly sentAt: Date | null;
|
|
8486
|
+
readonly dueAt: Date | null;
|
|
8487
|
+
readonly voidedAt: Date | null;
|
|
8488
|
+
readonly additionalDiscount: number;
|
|
8489
|
+
readonly additionalSalesTaxesTotal: number;
|
|
8490
|
+
readonly outstandingBalance: number;
|
|
8491
|
+
readonly importedAt: Date;
|
|
8492
|
+
};
|
|
8493
|
+
}, unknown, Key, never>;
|
|
8494
|
+
get isMutating(): boolean;
|
|
8495
|
+
get isError(): boolean;
|
|
8496
|
+
}
|
|
8497
|
+
type UseVoidInvoiceProps = {
|
|
8498
|
+
invoiceId: string;
|
|
8499
|
+
};
|
|
8500
|
+
export const useVoidInvoice: ({ invoiceId }: UseVoidInvoiceProps) => VoidInvoiceSWRResponse;
|
|
8501
|
+
export {};
|
|
8502
|
+
|
|
8503
|
+
}
|
|
8504
|
+
declare module '@layerfi/components/features/invoices/api/useWriteoffInvoice' {
|
|
8505
|
+
import { Schema } from 'effect';
|
|
8506
|
+
import type { Key } from 'swr';
|
|
8507
|
+
import { type SWRMutationResponse } from 'swr/mutation';
|
|
8508
|
+
import { type Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
8509
|
+
import { type CreateInvoiceWriteoff } from '@layerfi/components/features/invoices/invoiceWriteoffSchemas';
|
|
8510
|
+
const WriteoffInvoiceReturnSchema: Schema.Struct<{
|
|
8511
|
+
data: Schema.Struct<{
|
|
8512
|
+
invoiceId: Schema.PropertySignature<":", string, "invoice_id", ":", string, false, never>;
|
|
8513
|
+
externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
|
|
8514
|
+
amount: typeof Schema.Number;
|
|
8515
|
+
writeOffMode: Schema.PropertySignature<":", import("@layerfi/components/features/invoices/invoiceWriteoffSchemas").InvoiceWriteoffMode, "write_off_mode", ":", string, false, never>;
|
|
8516
|
+
writeOffAt: Schema.PropertySignature<":", Date, "write_off_at", ":", string, false, never>;
|
|
8517
|
+
referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
|
|
8518
|
+
memo: Schema.NullOr<typeof Schema.String>;
|
|
8519
|
+
}>;
|
|
8520
|
+
}>;
|
|
8521
|
+
type WriteoffInvoiceReturn = typeof WriteoffInvoiceReturnSchema.Type;
|
|
8522
|
+
type WriteoffInvoiceSWRMutationResponse = SWRMutationResponse<WriteoffInvoiceReturn, unknown, Key, CreateInvoiceWriteoff>;
|
|
8523
|
+
class WriteoffInvoiceSWRResponse {
|
|
8524
|
+
private swrResponse;
|
|
8525
|
+
constructor(swrResponse: WriteoffInvoiceSWRMutationResponse);
|
|
8526
|
+
get data(): {
|
|
8527
|
+
readonly data: {
|
|
8528
|
+
readonly externalId: string | null;
|
|
8529
|
+
readonly memo: string | null;
|
|
8530
|
+
readonly amount: number;
|
|
8531
|
+
readonly referenceNumber: string | null;
|
|
8532
|
+
readonly invoiceId: string;
|
|
8533
|
+
readonly writeOffMode: import("@layerfi/components/features/invoices/invoiceWriteoffSchemas").InvoiceWriteoffMode;
|
|
8534
|
+
readonly writeOffAt: Date;
|
|
8535
|
+
};
|
|
8536
|
+
} | undefined;
|
|
8537
|
+
get trigger(): import("swr/mutation").TriggerWithArgs<{
|
|
8538
|
+
readonly data: {
|
|
8539
|
+
readonly externalId: string | null;
|
|
8540
|
+
readonly memo: string | null;
|
|
8541
|
+
readonly amount: number;
|
|
8542
|
+
readonly referenceNumber: string | null;
|
|
8543
|
+
readonly invoiceId: string;
|
|
8544
|
+
readonly writeOffMode: import("@layerfi/components/features/invoices/invoiceWriteoffSchemas").InvoiceWriteoffMode;
|
|
8545
|
+
readonly writeOffAt: Date;
|
|
8546
|
+
};
|
|
8547
|
+
}, unknown, Key, {
|
|
8548
|
+
readonly externalId?: string | undefined;
|
|
8549
|
+
readonly memo?: string | undefined;
|
|
8550
|
+
readonly amount: number;
|
|
8551
|
+
readonly referenceNumber?: string | undefined;
|
|
8552
|
+
readonly writeOffMode?: import("@layerfi/components/features/invoices/invoiceWriteoffSchemas").InvoiceWriteoffMode | undefined;
|
|
8553
|
+
readonly writeOffAt: Date;
|
|
8554
|
+
}>;
|
|
8555
|
+
get isMutating(): boolean;
|
|
8556
|
+
get isError(): boolean;
|
|
8557
|
+
}
|
|
8558
|
+
export const updateInvoiceWithWriteoff: (invoice: Invoice) => Invoice;
|
|
8559
|
+
type UseWriteoffInvoiceProps = {
|
|
8560
|
+
invoiceId: string;
|
|
8561
|
+
};
|
|
8562
|
+
export const useWriteoffInvoice: ({ invoiceId }: UseWriteoffInvoiceProps) => WriteoffInvoiceSWRResponse;
|
|
8563
|
+
export {};
|
|
8564
|
+
|
|
8565
|
+
}
|
|
8566
|
+
declare module '@layerfi/components/features/invoices/customerRefundSchemas' {
|
|
8567
|
+
import { Schema } from 'effect';
|
|
8568
|
+
export enum CustomerRefundStatus {
|
|
8569
|
+
Paid = "PAID",
|
|
8570
|
+
PartiallyPaid = "PARTIALLY_PAID",
|
|
8571
|
+
Sent = "SENT"
|
|
8572
|
+
}
|
|
8573
|
+
export const TransformedCustomerRefundStatusSchema: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<CustomerRefundStatus, CustomerRefundStatus, never>>;
|
|
8574
|
+
export const CreateCustomerRefundSchema: Schema.Struct<{
|
|
8575
|
+
externalId: Schema.PropertySignature<"?:", string | undefined, "external_id", "?:", string | undefined, false, never>;
|
|
8576
|
+
refundedAmount: Schema.PropertySignature<"?:", number | undefined, "refunded_amount", "?:", number | undefined, false, never>;
|
|
8577
|
+
completedAt: Schema.PropertySignature<":", Date, "completed_at", ":", string, false, never>;
|
|
8578
|
+
method: Schema.Enums<typeof import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod>;
|
|
8579
|
+
referenceNumber: Schema.PropertySignature<"?:", string | undefined, "reference_number", "?:", string | undefined, false, never>;
|
|
8580
|
+
memo: Schema.optional<typeof Schema.String>;
|
|
8581
|
+
}>;
|
|
8582
|
+
export type CreateCustomerRefund = typeof CreateCustomerRefundSchema.Type;
|
|
8583
|
+
export const CustomerRefundSchema: Schema.Struct<{
|
|
8584
|
+
externalId: Schema.PropertySignature<":", string | undefined, "external_id", ":", string | undefined, false, never>;
|
|
8585
|
+
refundedAmount: Schema.PropertySignature<":", number, "refunded_amount", ":", number, false, never>;
|
|
8586
|
+
status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<CustomerRefundStatus, CustomerRefundStatus, never>>;
|
|
8587
|
+
completedAt: Schema.PropertySignature<":", Date, "completed_at", ":", string, false, never>;
|
|
8588
|
+
isDedicated: Schema.PropertySignature<":", boolean, "is_dedicated", ":", boolean, false, never>;
|
|
8589
|
+
referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
|
|
8590
|
+
memo: Schema.NullOr<typeof Schema.String>;
|
|
8591
|
+
}>;
|
|
8592
|
+
export type CustomerRefund = typeof CustomerRefundSchema.Type;
|
|
8593
|
+
|
|
8098
8594
|
}
|
|
8099
8595
|
declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
8100
8596
|
import { Schema } from 'effect';
|
|
@@ -8105,7 +8601,8 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8105
8601
|
WrittenOff = "WRITTEN_OFF",
|
|
8106
8602
|
PartiallyWrittenOff = "PARTIALLY_WRITTEN_OFF",
|
|
8107
8603
|
PartiallyPaid = "PARTIALLY_PAID",
|
|
8108
|
-
Sent = "SENT"
|
|
8604
|
+
Sent = "SENT",
|
|
8605
|
+
Refunded = "REFUNDED"
|
|
8109
8606
|
}
|
|
8110
8607
|
export const TransformedInvoiceStatusSchema: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<InvoiceStatus, InvoiceStatus, never>>;
|
|
8111
8608
|
export const InvoiceLineItemSchema: Schema.Struct<{
|
|
@@ -8194,9 +8691,9 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8194
8691
|
product: typeof Schema.String;
|
|
8195
8692
|
unitPrice: Schema.PropertySignature<":", number, "unit_price", ":", number, false, never>;
|
|
8196
8693
|
quantity: typeof Schema.BigDecimal;
|
|
8197
|
-
salesTaxes: Schema.PropertySignature<"
|
|
8694
|
+
salesTaxes: Schema.PropertySignature<"?:", readonly {
|
|
8198
8695
|
readonly amount: number;
|
|
8199
|
-
}[] | undefined, "sales_taxes", "
|
|
8696
|
+
}[] | undefined, "sales_taxes", "?:", readonly {
|
|
8200
8697
|
readonly amount: number;
|
|
8201
8698
|
}[] | undefined, false, never>;
|
|
8202
8699
|
}>;
|
|
@@ -8204,15 +8701,15 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8204
8701
|
export const UpsertInvoiceSchema: Schema.Struct<{
|
|
8205
8702
|
sentAt: Schema.PropertySignature<":", Date, "sent_at", ":", string, false, never>;
|
|
8206
8703
|
dueAt: Schema.PropertySignature<":", Date, "due_at", ":", string, false, never>;
|
|
8207
|
-
invoiceNumber: Schema.PropertySignature<"
|
|
8704
|
+
invoiceNumber: Schema.PropertySignature<"?:", string | undefined, "invoice_number", "?:", string | undefined, false, never>;
|
|
8208
8705
|
customerId: Schema.PropertySignature<":", string, "customer_id", ":", string, false, never>;
|
|
8209
|
-
memo: Schema.
|
|
8706
|
+
memo: Schema.optional<typeof Schema.String>;
|
|
8210
8707
|
lineItems: Schema.PropertySignature<":", readonly {
|
|
8211
8708
|
readonly description: string;
|
|
8212
8709
|
readonly product: string;
|
|
8213
8710
|
readonly quantity: import("effect/BigDecimal").BigDecimal;
|
|
8214
8711
|
readonly unitPrice: number;
|
|
8215
|
-
readonly salesTaxes
|
|
8712
|
+
readonly salesTaxes?: readonly {
|
|
8216
8713
|
readonly amount: number;
|
|
8217
8714
|
}[] | undefined;
|
|
8218
8715
|
}[], "line_items", ":", readonly {
|
|
@@ -8220,11 +8717,11 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8220
8717
|
readonly product: string;
|
|
8221
8718
|
readonly quantity: string;
|
|
8222
8719
|
readonly unit_price: number;
|
|
8223
|
-
readonly sales_taxes
|
|
8720
|
+
readonly sales_taxes?: readonly {
|
|
8224
8721
|
readonly amount: number;
|
|
8225
8722
|
}[] | undefined;
|
|
8226
8723
|
}[], false, never>;
|
|
8227
|
-
additionalDiscount: Schema.PropertySignature<"
|
|
8724
|
+
additionalDiscount: Schema.PropertySignature<"?:", number | undefined, "additional_discount", "?:", number | undefined, false, never>;
|
|
8228
8725
|
}>;
|
|
8229
8726
|
export type UpsertInvoice = typeof UpsertInvoiceSchema.Type;
|
|
8230
8727
|
export const InvoiceFormLineItemSchema: Schema.Struct<{
|
|
@@ -8298,7 +8795,7 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8298
8795
|
export const UpsertDedicatedInvoicePaymentSchema: Schema.Struct<{
|
|
8299
8796
|
amount: typeof Schema.Number;
|
|
8300
8797
|
method: Schema.Enums<typeof import("@layerfi/components/components/PaymentMethod/schemas").PaymentMethod>;
|
|
8301
|
-
paidAt: Schema.PropertySignature<"
|
|
8798
|
+
paidAt: Schema.PropertySignature<":", Date, "paid_at", ":", string, false, never>;
|
|
8302
8799
|
referenceNumber: Schema.PropertySignature<"?:", string | undefined, "reference_number", "?:", string | undefined, false, never>;
|
|
8303
8800
|
memo: Schema.optional<typeof Schema.String>;
|
|
8304
8801
|
}>;
|
|
@@ -8306,7 +8803,7 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8306
8803
|
export const DedicatedInvoicePaymentFormSchema: Schema.Struct<{
|
|
8307
8804
|
amount: typeof Schema.BigDecimal;
|
|
8308
8805
|
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
|
|
8806
|
+
paidAt: Schema.NullOr<Schema.declare<import("@internationalized/date").ZonedDateTime, import("@internationalized/date").ZonedDateTime, readonly [], never>>;
|
|
8310
8807
|
referenceNumber: typeof Schema.String;
|
|
8311
8808
|
memo: typeof Schema.String;
|
|
8312
8809
|
}>;
|
|
@@ -8320,6 +8817,34 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8320
8817
|
}>;
|
|
8321
8818
|
export type InvoicePayment = typeof InvoicePaymentSchema.Type;
|
|
8322
8819
|
|
|
8820
|
+
}
|
|
8821
|
+
declare module '@layerfi/components/features/invoices/invoiceWriteoffSchemas' {
|
|
8822
|
+
import { Schema } from 'effect';
|
|
8823
|
+
export enum InvoiceWriteoffMode {
|
|
8824
|
+
Expense = "EXPENSE",
|
|
8825
|
+
RevenueReversal = "REVENUE_REVERSAL"
|
|
8826
|
+
}
|
|
8827
|
+
export const TransformedInvoiceWriteoffModeSchema: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<InvoiceWriteoffMode, InvoiceWriteoffMode, never>>;
|
|
8828
|
+
export const CreateInvoiceWriteoffSchema: Schema.Struct<{
|
|
8829
|
+
externalId: Schema.PropertySignature<"?:", string | undefined, "external_id", "?:", string | undefined, false, never>;
|
|
8830
|
+
amount: typeof Schema.Number;
|
|
8831
|
+
writeOffMode: Schema.PropertySignature<"?:", InvoiceWriteoffMode | undefined, "write_off_mode", "?:", InvoiceWriteoffMode | undefined, false, never>;
|
|
8832
|
+
writeOffAt: Schema.PropertySignature<":", Date, "write_off_at", ":", string, false, never>;
|
|
8833
|
+
referenceNumber: Schema.PropertySignature<"?:", string | undefined, "reference_number", "?:", string | undefined, false, never>;
|
|
8834
|
+
memo: Schema.optional<typeof Schema.String>;
|
|
8835
|
+
}>;
|
|
8836
|
+
export type CreateInvoiceWriteoff = typeof CreateInvoiceWriteoffSchema.Type;
|
|
8837
|
+
export const InvoiceWriteoffSchema: Schema.Struct<{
|
|
8838
|
+
invoiceId: Schema.PropertySignature<":", string, "invoice_id", ":", string, false, never>;
|
|
8839
|
+
externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
|
|
8840
|
+
amount: typeof Schema.Number;
|
|
8841
|
+
writeOffMode: Schema.PropertySignature<":", InvoiceWriteoffMode, "write_off_mode", ":", string, false, never>;
|
|
8842
|
+
writeOffAt: Schema.PropertySignature<":", Date, "write_off_at", ":", string, false, never>;
|
|
8843
|
+
referenceNumber: Schema.PropertySignature<":", string | null, "reference_number", ":", string | null, false, never>;
|
|
8844
|
+
memo: Schema.NullOr<typeof Schema.String>;
|
|
8845
|
+
}>;
|
|
8846
|
+
export type InvoiceWriteoff = typeof InvoiceWriteoffSchema.Type;
|
|
8847
|
+
|
|
8323
8848
|
}
|
|
8324
8849
|
declare module '@layerfi/components/features/ledger/accounts/[ledgerAccountId]/api/useDeleteLedgerAccount' {
|
|
8325
8850
|
export function useDeleteAccountFromLedger(): import("swr/mutation").SWRMutationResponse<Record<string, never>, any, () => {
|