@powerhousedao/contributor-billing 0.0.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/LICENSE +661 -0
- package/README.md +22 -0
- package/dist/document-models/index.d.ts +2 -0
- package/dist/document-models/index.d.ts.map +1 -0
- package/dist/document-models/index.js +1 -0
- package/dist/document-models/invoice/gen/actions.d.ts +8 -0
- package/dist/document-models/invoice/gen/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/actions.js +3 -0
- package/dist/document-models/invoice/gen/creators.d.ts +4 -0
- package/dist/document-models/invoice/gen/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/creators.js +3 -0
- package/dist/document-models/invoice/gen/document-model.d.ts +3 -0
- package/dist/document-models/invoice/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/document-model.js +227 -0
- package/dist/document-models/invoice/gen/general/actions.d.ts +10 -0
- package/dist/document-models/invoice/gen/general/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/actions.js +1 -0
- package/dist/document-models/invoice/gen/general/creators.d.ts +9 -0
- package/dist/document-models/invoice/gen/general/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/creators.js +8 -0
- package/dist/document-models/invoice/gen/general/error.d.ts +2 -0
- package/dist/document-models/invoice/gen/general/error.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/error.js +1 -0
- package/dist/document-models/invoice/gen/general/object.d.ts +12 -0
- package/dist/document-models/invoice/gen/general/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/object.js +22 -0
- package/dist/document-models/invoice/gen/general/operations.d.ts +12 -0
- package/dist/document-models/invoice/gen/general/operations.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/operations.js +1 -0
- package/dist/document-models/invoice/gen/index.d.ts +6 -0
- package/dist/document-models/invoice/gen/index.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/index.js +5 -0
- package/dist/document-models/invoice/gen/items/actions.d.ts +8 -0
- package/dist/document-models/invoice/gen/items/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/actions.js +1 -0
- package/dist/document-models/invoice/gen/items/creators.d.ts +7 -0
- package/dist/document-models/invoice/gen/items/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/creators.js +6 -0
- package/dist/document-models/invoice/gen/items/error.d.ts +2 -0
- package/dist/document-models/invoice/gen/items/error.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/error.js +1 -0
- package/dist/document-models/invoice/gen/items/object.d.ts +10 -0
- package/dist/document-models/invoice/gen/items/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/object.js +16 -0
- package/dist/document-models/invoice/gen/items/operations.d.ts +10 -0
- package/dist/document-models/invoice/gen/items/operations.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/operations.js +1 -0
- package/dist/document-models/invoice/gen/object.d.ts +20 -0
- package/dist/document-models/invoice/gen/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/object.js +29 -0
- package/dist/document-models/invoice/gen/parties/actions.d.ts +10 -0
- package/dist/document-models/invoice/gen/parties/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/actions.js +1 -0
- package/dist/document-models/invoice/gen/parties/creators.d.ts +9 -0
- package/dist/document-models/invoice/gen/parties/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/creators.js +8 -0
- package/dist/document-models/invoice/gen/parties/error.d.ts +2 -0
- package/dist/document-models/invoice/gen/parties/error.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/error.js +1 -0
- package/dist/document-models/invoice/gen/parties/object.d.ts +12 -0
- package/dist/document-models/invoice/gen/parties/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/object.js +22 -0
- package/dist/document-models/invoice/gen/parties/operations.d.ts +12 -0
- package/dist/document-models/invoice/gen/parties/operations.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/operations.js +1 -0
- package/dist/document-models/invoice/gen/reducer.d.ts +3 -0
- package/dist/document-models/invoice/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/reducer.js +79 -0
- package/dist/document-models/invoice/gen/schema/index.d.ts +3 -0
- package/dist/document-models/invoice/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/schema/index.js +2 -0
- package/dist/document-models/invoice/gen/schema/types.d.ts +390 -0
- package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/schema/types.js +1 -0
- package/dist/document-models/invoice/gen/schema/zod.d.ts +56 -0
- package/dist/document-models/invoice/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/schema/zod.js +362 -0
- package/dist/document-models/invoice/gen/types.d.ts +10 -0
- package/dist/document-models/invoice/gen/types.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/types.js +1 -0
- package/dist/document-models/invoice/gen/utils.d.ts +7 -0
- package/dist/document-models/invoice/gen/utils.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/utils.js +166 -0
- package/dist/document-models/invoice/index.d.ts +41 -0
- package/dist/document-models/invoice/index.d.ts.map +1 -0
- package/dist/document-models/invoice/index.js +21 -0
- package/dist/document-models/invoice/src/reducers/general.d.ts +8 -0
- package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -0
- package/dist/document-models/invoice/src/reducers/general.js +79 -0
- package/dist/document-models/invoice/src/reducers/items.d.ts +8 -0
- package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -0
- package/dist/document-models/invoice/src/reducers/items.js +108 -0
- package/dist/document-models/invoice/src/reducers/parties.d.ts +8 -0
- package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -0
- package/dist/document-models/invoice/src/reducers/parties.js +266 -0
- package/dist/document-models/invoice/src/tests/document-model.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/document-model.test.js +17 -0
- package/dist/document-models/invoice/src/tests/general.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/general.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/general.test.js +75 -0
- package/dist/document-models/invoice/src/tests/items.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/items.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/items.test.js +45 -0
- package/dist/document-models/invoice/src/tests/parties.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/parties.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/parties.test.js +75 -0
- package/dist/document-models/invoice/src/utils.d.ts +2 -0
- package/dist/document-models/invoice/src/utils.d.ts.map +1 -0
- package/dist/document-models/invoice/src/utils.js +1 -0
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts +8 -0
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/CreateDocument.js +14 -0
- package/dist/editors/contributor-billing/components/DocumentDispatch.d.ts +12 -0
- package/dist/editors/contributor-billing/components/DocumentDispatch.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/DocumentDispatch.js +20 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts +17 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.js +112 -0
- package/dist/editors/contributor-billing/components/EditorContainer.d.ts +14 -0
- package/dist/editors/contributor-billing/components/EditorContainer.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/EditorContainer.js +28 -0
- package/dist/editors/contributor-billing/components/FileItemsGrid.d.ts +12 -0
- package/dist/editors/contributor-billing/components/FileItemsGrid.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/FileItemsGrid.js +7 -0
- package/dist/editors/contributor-billing/components/FolderItemsGrid.d.ts +17 -0
- package/dist/editors/contributor-billing/components/FolderItemsGrid.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/FolderItemsGrid.js +14 -0
- package/dist/editors/contributor-billing/components/FolderTree.d.ts +9 -0
- package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/FolderTree.js +31 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts +16 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.js +16 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts +21 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.js +45 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts +12 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.js +12 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts +7 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.js +7 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.d.ts +8 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.js +2 -0
- package/dist/editors/contributor-billing/editor.d.ts +6 -0
- package/dist/editors/contributor-billing/editor.d.ts.map +1 -0
- package/dist/editors/contributor-billing/editor.js +48 -0
- package/dist/editors/contributor-billing/hooks/useDispatchMap.d.ts +9 -0
- package/dist/editors/contributor-billing/hooks/useDispatchMap.d.ts.map +1 -0
- package/dist/editors/contributor-billing/hooks/useDispatchMap.js +21 -0
- package/dist/editors/contributor-billing/hooks/useDrop.d.ts +22 -0
- package/dist/editors/contributor-billing/hooks/useDrop.d.ts.map +1 -0
- package/dist/editors/contributor-billing/hooks/useDrop.js +57 -0
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.d.ts +8 -0
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.d.ts.map +1 -0
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.js +19 -0
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts +4 -0
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts.map +1 -0
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.js +32 -0
- package/dist/editors/contributor-billing/index.d.ts +5 -0
- package/dist/editors/contributor-billing/index.d.ts.map +1 -0
- package/dist/editors/contributor-billing/index.js +12 -0
- package/dist/editors/index.d.ts +3 -0
- package/dist/editors/index.d.ts.map +1 -0
- package/dist/editors/index.js +2 -0
- package/dist/editors/invoice/InvoicePDF.d.ts +8 -0
- package/dist/editors/invoice/InvoicePDF.d.ts.map +1 -0
- package/dist/editors/invoice/InvoicePDF.js +359 -0
- package/dist/editors/invoice/assets/custom.d.ts +4 -0
- package/dist/editors/invoice/assets/powerhouseLogo.png +0 -0
- package/dist/editors/invoice/components/countryForm.d.ts +12 -0
- package/dist/editors/invoice/components/countryForm.d.ts.map +1 -0
- package/dist/editors/invoice/components/countryForm.js +28 -0
- package/dist/editors/invoice/components/currencyForm.d.ts +13 -0
- package/dist/editors/invoice/components/currencyForm.d.ts.map +1 -0
- package/dist/editors/invoice/components/currencyForm.js +26 -0
- package/dist/editors/invoice/components/datePicker.d.ts +11 -0
- package/dist/editors/invoice/components/datePicker.d.ts.map +1 -0
- package/dist/editors/invoice/components/datePicker.js +8 -0
- package/dist/editors/invoice/components/inputField.d.ts +14 -0
- package/dist/editors/invoice/components/inputField.d.ts.map +1 -0
- package/dist/editors/invoice/components/inputField.js +25 -0
- package/dist/editors/invoice/components/numberForm.d.ts +11 -0
- package/dist/editors/invoice/components/numberForm.d.ts.map +1 -0
- package/dist/editors/invoice/components/numberForm.js +7 -0
- package/dist/editors/invoice/components/selectField.d.ts +8 -0
- package/dist/editors/invoice/components/selectField.d.ts.map +1 -0
- package/dist/editors/invoice/components/selectField.js +323 -0
- package/dist/editors/invoice/editor.d.ts +5 -0
- package/dist/editors/invoice/editor.d.ts.map +1 -0
- package/dist/editors/invoice/editor.js +377 -0
- package/dist/editors/invoice/exportUBL.d.ts +85 -0
- package/dist/editors/invoice/exportUBL.d.ts.map +1 -0
- package/dist/editors/invoice/exportUBL.js +382 -0
- package/dist/editors/invoice/index.d.ts +5 -0
- package/dist/editors/invoice/index.d.ts.map +1 -0
- package/dist/editors/invoice/index.js +12 -0
- package/dist/editors/invoice/ingestPDF.d.ts +12 -0
- package/dist/editors/invoice/ingestPDF.d.ts.map +1 -0
- package/dist/editors/invoice/ingestPDF.js +193 -0
- package/dist/editors/invoice/ingestUBL.d.ts +21 -0
- package/dist/editors/invoice/ingestUBL.d.ts.map +1 -0
- package/dist/editors/invoice/ingestUBL.js +169 -0
- package/dist/editors/invoice/invoiceToGnosis.d.ts +7 -0
- package/dist/editors/invoice/invoiceToGnosis.d.ts.map +1 -0
- package/dist/editors/invoice/invoiceToGnosis.js +139 -0
- package/dist/editors/invoice/legalEntity/bankSection.d.ts +14 -0
- package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -0
- package/dist/editors/invoice/legalEntity/bankSection.js +156 -0
- package/dist/editors/invoice/legalEntity/common.d.ts +6 -0
- package/dist/editors/invoice/legalEntity/common.d.ts.map +1 -0
- package/dist/editors/invoice/legalEntity/common.js +6 -0
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts +40 -0
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -0
- package/dist/editors/invoice/legalEntity/legalEntity.js +63 -0
- package/dist/editors/invoice/legalEntity/walletSection.d.ts +13 -0
- package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -0
- package/dist/editors/invoice/legalEntity/walletSection.js +55 -0
- package/dist/editors/invoice/lineItems.d.ts +23 -0
- package/dist/editors/invoice/lineItems.d.ts.map +1 -0
- package/dist/editors/invoice/lineItems.js +157 -0
- package/dist/editors/invoice/requestFinance.d.ts +7 -0
- package/dist/editors/invoice/requestFinance.d.ts.map +1 -0
- package/dist/editors/invoice/requestFinance.js +155 -0
- package/dist/editors/invoice/uploadPdfChunked.d.ts +10 -0
- package/dist/editors/invoice/uploadPdfChunked.d.ts.map +1 -0
- package/dist/editors/invoice/uploadPdfChunked.js +79 -0
- package/dist/editors/invoice/utils/utils.d.ts +2 -0
- package/dist/editors/invoice/utils/utils.d.ts.map +1 -0
- package/dist/editors/invoice/utils/utils.js +54 -0
- package/dist/editors/invoice/validation/validationManager.d.ts +28 -0
- package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -0
- package/dist/editors/invoice/validation/validationManager.js +65 -0
- package/dist/editors/invoice/validation/validationRules.d.ts +14 -0
- package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -0
- package/dist/editors/invoice/validation/validationRules.js +334 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/powerhouse.manifest.json +31 -0
- package/dist/processors/index.d.ts +2 -0
- package/dist/processors/index.d.ts.map +1 -0
- package/dist/processors/index.js +1 -0
- package/dist/scripts/invoice/exampleBatchTxn.d.ts +2 -0
- package/dist/scripts/invoice/exampleBatchTxn.d.ts.map +1 -0
- package/dist/scripts/invoice/exampleBatchTxn.js +44 -0
- package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts +28 -0
- package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts.map +1 -0
- package/dist/scripts/invoice/gnosisTransactionBuilder.js +74 -0
- package/dist/scripts/invoice/pdfToDocumentAi.d.ts +5 -0
- package/dist/scripts/invoice/pdfToDocumentAi.d.ts.map +1 -0
- package/dist/scripts/invoice/pdfToDocumentAi.js +659 -0
- package/dist/scripts/invoice/requestFinance.d.ts +2 -0
- package/dist/scripts/invoice/requestFinance.d.ts.map +1 -0
- package/dist/scripts/invoice/requestFinance.js +38 -0
- package/dist/style.css +6463 -0
- package/dist/subgraphs/index.d.ts +2 -0
- package/dist/subgraphs/index.d.ts.map +1 -0
- package/dist/subgraphs/index.js +1 -0
- package/dist/subgraphs/invoice/customResolvers.d.ts +50 -0
- package/dist/subgraphs/invoice/customResolvers.d.ts.map +1 -0
- package/dist/subgraphs/invoice/customResolvers.js +327 -0
- package/dist/subgraphs/invoice/index.d.ts +10 -0
- package/dist/subgraphs/invoice/index.d.ts.map +1 -0
- package/dist/subgraphs/invoice/index.js +30 -0
- package/dist/subgraphs/invoice/resolvers.d.ts +3 -0
- package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/invoice/resolvers.js +184 -0
- package/dist/subgraphs/invoice/schema.d.ts +3 -0
- package/dist/subgraphs/invoice/schema.d.ts.map +1 -0
- package/dist/subgraphs/invoice/schema.js +460 -0
- package/dist/tailwind.config.d.ts +13 -0
- package/dist/tailwind.config.d.ts.map +1 -0
- package/dist/tailwind.config.js +15 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +8 -0
- package/editors/invoice/assets/custom.d.ts +4 -0
- package/editors/invoice/assets/powerhouseLogo.png +0 -0
- package/package.json +117 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AddLineItemInput, AddRefInput, Address, Bank, ContactInfo, DeleteLineItemInput, DeleteRefInput, EditInvoiceInput, EditIssuerBankInput, EditIssuerInput, EditIssuerWalletInput, EditLineItemInput, EditPayerBankInput, EditPayerInput, EditPayerWalletInput, EditRefInput, EditStatusInput, IntermediaryBank, InvoiceLineItem, InvoiceLineItemTag, InvoiceState, InvoiceWallet, LegalEntity, LegalEntityCorporateRegistrationId, LegalEntityTaxId, PaymentRouting, Ref, SetLineItemTagInput, SetPaymentAccountInput, Token } from "./types.js";
|
|
3
|
+
type Properties<T> = Required<{
|
|
4
|
+
[K in keyof T]: z.ZodType<T[K], any, T[K]>;
|
|
5
|
+
}>;
|
|
6
|
+
type definedNonNullAny = {};
|
|
7
|
+
export declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
|
|
8
|
+
export declare const definedNonNullAnySchema: z.ZodEffects<z.ZodAny, definedNonNullAny, any>;
|
|
9
|
+
export declare const InvoiceAccountTypeSchema: z.ZodEnum<["CHECKING", "SAVINGS", "TRUST", "WALLET"]>;
|
|
10
|
+
export declare const InvoiceAccountTypeInputSchema: z.ZodEnum<["CHECKING", "SAVINGS", "TRUST", "WALLET"]>;
|
|
11
|
+
export declare const StatusSchema: z.ZodEnum<["ACCEPTED", "AWAITINGPAYMENT", "CANCELLED", "DRAFT", "ISSUED", "PAYMENTISSUE", "PAYMENTRECEIVED", "PAYMENTSCHEDULED", "PAYMENTSENT", "REJECTED"]>;
|
|
12
|
+
export declare function AddLineItemInputSchema(): z.ZodObject<Properties<AddLineItemInput>>;
|
|
13
|
+
export declare function AddRefInputSchema(): z.ZodObject<Properties<AddRefInput>>;
|
|
14
|
+
export declare function AddressSchema(): z.ZodObject<Properties<Address>>;
|
|
15
|
+
export declare function BankSchema(): z.ZodObject<Properties<Bank>>;
|
|
16
|
+
export declare function ContactInfoSchema(): z.ZodObject<Properties<ContactInfo>>;
|
|
17
|
+
export declare function DeleteLineItemInputSchema(): z.ZodObject<Properties<DeleteLineItemInput>>;
|
|
18
|
+
export declare function DeleteRefInputSchema(): z.ZodObject<Properties<DeleteRefInput>>;
|
|
19
|
+
export declare function EditInvoiceInputSchema(): z.ZodObject<Properties<EditInvoiceInput>>;
|
|
20
|
+
export declare function EditIssuerBankInputSchema(): z.ZodObject<Properties<EditIssuerBankInput>>;
|
|
21
|
+
export declare function EditIssuerInputSchema(): z.ZodObject<Properties<EditIssuerInput>>;
|
|
22
|
+
export declare function EditIssuerWalletInputSchema(): z.ZodObject<Properties<EditIssuerWalletInput>>;
|
|
23
|
+
export declare function EditLineItemInputSchema(): z.ZodObject<Properties<EditLineItemInput>>;
|
|
24
|
+
export declare function EditPayerBankInputSchema(): z.ZodObject<Properties<EditPayerBankInput>>;
|
|
25
|
+
export declare function EditPayerInputSchema(): z.ZodObject<Properties<EditPayerInput>>;
|
|
26
|
+
export declare function EditPayerWalletInputSchema(): z.ZodObject<Properties<EditPayerWalletInput>>;
|
|
27
|
+
export declare function EditRefInputSchema(): z.ZodObject<Properties<EditRefInput>>;
|
|
28
|
+
export declare function EditStatusInputSchema(): z.ZodObject<Properties<EditStatusInput>>;
|
|
29
|
+
export declare function IntermediaryBankSchema(): z.ZodObject<Properties<IntermediaryBank>>;
|
|
30
|
+
export declare function InvoiceLineItemSchema(): z.ZodObject<Properties<InvoiceLineItem>>;
|
|
31
|
+
export declare function InvoiceLineItemTagSchema(): z.ZodObject<Properties<InvoiceLineItemTag>>;
|
|
32
|
+
export declare function InvoiceStateSchema(): z.ZodObject<Properties<InvoiceState>>;
|
|
33
|
+
export declare function InvoiceWalletSchema(): z.ZodObject<Properties<InvoiceWallet>>;
|
|
34
|
+
export declare function LegalEntitySchema(): z.ZodObject<Properties<LegalEntity>>;
|
|
35
|
+
export declare function LegalEntityCorporateRegistrationIdSchema(): z.ZodObject<Properties<LegalEntityCorporateRegistrationId>>;
|
|
36
|
+
export declare function LegalEntityIdSchema(): z.ZodUnion<[z.ZodObject<Required<{
|
|
37
|
+
corpRegId: z.ZodType<string, any, string>;
|
|
38
|
+
}>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
39
|
+
corpRegId: import("./types.js").Scalars["String"]["output"];
|
|
40
|
+
}, {
|
|
41
|
+
corpRegId: import("./types.js").Scalars["String"]["output"];
|
|
42
|
+
}>, z.ZodObject<Required<{
|
|
43
|
+
taxId: z.ZodType<string, any, string>;
|
|
44
|
+
}>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
45
|
+
taxId: import("./types.js").Scalars["String"]["output"];
|
|
46
|
+
}, {
|
|
47
|
+
taxId: import("./types.js").Scalars["String"]["output"];
|
|
48
|
+
}>]>;
|
|
49
|
+
export declare function LegalEntityTaxIdSchema(): z.ZodObject<Properties<LegalEntityTaxId>>;
|
|
50
|
+
export declare function PaymentRoutingSchema(): z.ZodObject<Properties<PaymentRouting>>;
|
|
51
|
+
export declare function RefSchema(): z.ZodObject<Properties<Ref>>;
|
|
52
|
+
export declare function SetLineItemTagInputSchema(): z.ZodObject<Properties<SetLineItemTagInput>>;
|
|
53
|
+
export declare function SetPaymentAccountInputSchema(): z.ZodObject<Properties<SetPaymentAccountInput>>;
|
|
54
|
+
export declare function TokenSchema(): z.ZodObject<Properties<Token>>;
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/schema/zod.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
|
|
3
|
+
export const definedNonNullAnySchema = z
|
|
4
|
+
.any()
|
|
5
|
+
.refine((v) => isDefinedNonNullAny(v));
|
|
6
|
+
export const InvoiceAccountTypeSchema = z.enum([
|
|
7
|
+
"CHECKING",
|
|
8
|
+
"SAVINGS",
|
|
9
|
+
"TRUST",
|
|
10
|
+
"WALLET",
|
|
11
|
+
]);
|
|
12
|
+
export const InvoiceAccountTypeInputSchema = z.enum([
|
|
13
|
+
"CHECKING",
|
|
14
|
+
"SAVINGS",
|
|
15
|
+
"TRUST",
|
|
16
|
+
"WALLET",
|
|
17
|
+
]);
|
|
18
|
+
export const StatusSchema = z.enum([
|
|
19
|
+
"ACCEPTED",
|
|
20
|
+
"AWAITINGPAYMENT",
|
|
21
|
+
"CANCELLED",
|
|
22
|
+
"DRAFT",
|
|
23
|
+
"ISSUED",
|
|
24
|
+
"PAYMENTISSUE",
|
|
25
|
+
"PAYMENTRECEIVED",
|
|
26
|
+
"PAYMENTSCHEDULED",
|
|
27
|
+
"PAYMENTSENT",
|
|
28
|
+
"REJECTED",
|
|
29
|
+
]);
|
|
30
|
+
export function AddLineItemInputSchema() {
|
|
31
|
+
return z.object({
|
|
32
|
+
currency: z.string(),
|
|
33
|
+
description: z.string(),
|
|
34
|
+
id: z.string(),
|
|
35
|
+
quantity: z.number(),
|
|
36
|
+
taxPercent: z.number(),
|
|
37
|
+
totalPriceTaxExcl: z.number(),
|
|
38
|
+
totalPriceTaxIncl: z.number(),
|
|
39
|
+
unitPriceTaxExcl: z.number(),
|
|
40
|
+
unitPriceTaxIncl: z.number(),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export function AddRefInputSchema() {
|
|
44
|
+
return z.object({
|
|
45
|
+
id: z.string(),
|
|
46
|
+
value: z.string(),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
export function AddressSchema() {
|
|
50
|
+
return z.object({
|
|
51
|
+
__typename: z.literal("Address").optional(),
|
|
52
|
+
city: z.string().nullable(),
|
|
53
|
+
country: z.string().nullable(),
|
|
54
|
+
extendedAddress: z.string().nullable(),
|
|
55
|
+
postalCode: z.string().nullable(),
|
|
56
|
+
stateProvince: z.string().nullable(),
|
|
57
|
+
streetAddress: z.string().nullable(),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export function BankSchema() {
|
|
61
|
+
return z.object({
|
|
62
|
+
__typename: z.literal("Bank").optional(),
|
|
63
|
+
ABA: z.string().nullable(),
|
|
64
|
+
BIC: z.string().nullable(),
|
|
65
|
+
SWIFT: z.string().nullable(),
|
|
66
|
+
accountNum: z.string(),
|
|
67
|
+
accountType: InvoiceAccountTypeSchema.nullable(),
|
|
68
|
+
address: AddressSchema(),
|
|
69
|
+
beneficiary: z.string().nullable(),
|
|
70
|
+
intermediaryBank: IntermediaryBankSchema().nullable(),
|
|
71
|
+
memo: z.string().nullable(),
|
|
72
|
+
name: z.string(),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export function ContactInfoSchema() {
|
|
76
|
+
return z.object({
|
|
77
|
+
__typename: z.literal("ContactInfo").optional(),
|
|
78
|
+
email: z.string().nullable(),
|
|
79
|
+
tel: z.string().nullable(),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export function DeleteLineItemInputSchema() {
|
|
83
|
+
return z.object({
|
|
84
|
+
id: z.string(),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
export function DeleteRefInputSchema() {
|
|
88
|
+
return z.object({
|
|
89
|
+
id: z.string(),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
export function EditInvoiceInputSchema() {
|
|
93
|
+
return z.object({
|
|
94
|
+
currency: z.string().nullish(),
|
|
95
|
+
dateDelivered: z.string().nullish(),
|
|
96
|
+
dateDue: z.string().nullish(),
|
|
97
|
+
dateIssued: z.string().nullish(),
|
|
98
|
+
invoiceNo: z.string().nullish(),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
export function EditIssuerBankInputSchema() {
|
|
102
|
+
return z.object({
|
|
103
|
+
ABA: z.string().nullish(),
|
|
104
|
+
ABAIntermediary: z.string().nullish(),
|
|
105
|
+
BIC: z.string().nullish(),
|
|
106
|
+
BICIntermediary: z.string().nullish(),
|
|
107
|
+
SWIFT: z.string().nullish(),
|
|
108
|
+
SWIFTIntermediary: z.string().nullish(),
|
|
109
|
+
accountNum: z.string().nullish(),
|
|
110
|
+
accountNumIntermediary: z.string().nullish(),
|
|
111
|
+
accountType: z.lazy(() => InvoiceAccountTypeInputSchema.nullish()),
|
|
112
|
+
accountTypeIntermediary: z.lazy(() => InvoiceAccountTypeInputSchema.nullish()),
|
|
113
|
+
beneficiary: z.string().nullish(),
|
|
114
|
+
beneficiaryIntermediary: z.string().nullish(),
|
|
115
|
+
city: z.string().nullish(),
|
|
116
|
+
cityIntermediary: z.string().nullish(),
|
|
117
|
+
country: z.string().nullish(),
|
|
118
|
+
countryIntermediary: z.string().nullish(),
|
|
119
|
+
extendedAddress: z.string().nullish(),
|
|
120
|
+
extendedAddressIntermediary: z.string().nullish(),
|
|
121
|
+
memo: z.string().nullish(),
|
|
122
|
+
memoIntermediary: z.string().nullish(),
|
|
123
|
+
name: z.string().nullish(),
|
|
124
|
+
nameIntermediary: z.string().nullish(),
|
|
125
|
+
postalCode: z.string().nullish(),
|
|
126
|
+
postalCodeIntermediary: z.string().nullish(),
|
|
127
|
+
stateProvince: z.string().nullish(),
|
|
128
|
+
stateProvinceIntermediary: z.string().nullish(),
|
|
129
|
+
streetAddress: z.string().nullish(),
|
|
130
|
+
streetAddressIntermediary: z.string().nullish(),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
export function EditIssuerInputSchema() {
|
|
134
|
+
return z.object({
|
|
135
|
+
city: z.string().nullish(),
|
|
136
|
+
country: z.string().nullish(),
|
|
137
|
+
email: z.string().nullish(),
|
|
138
|
+
extendedAddress: z.string().nullish(),
|
|
139
|
+
id: z.string().nullish(),
|
|
140
|
+
name: z.string().nullish(),
|
|
141
|
+
postalCode: z.string().nullish(),
|
|
142
|
+
stateProvince: z.string().nullish(),
|
|
143
|
+
streetAddress: z.string().nullish(),
|
|
144
|
+
tel: z.string().nullish(),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
export function EditIssuerWalletInputSchema() {
|
|
148
|
+
return z.object({
|
|
149
|
+
address: z.string().nullish(),
|
|
150
|
+
chainId: z.string().nullish(),
|
|
151
|
+
chainName: z.string().nullish(),
|
|
152
|
+
rpc: z.string().nullish(),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
export function EditLineItemInputSchema() {
|
|
156
|
+
return z.object({
|
|
157
|
+
currency: z.string().nullish(),
|
|
158
|
+
description: z.string().nullish(),
|
|
159
|
+
id: z.string(),
|
|
160
|
+
quantity: z.number().nullish(),
|
|
161
|
+
taxPercent: z.number().nullish(),
|
|
162
|
+
totalPriceTaxExcl: z.number().nullish(),
|
|
163
|
+
totalPriceTaxIncl: z.number().nullish(),
|
|
164
|
+
unitPriceTaxExcl: z.number().nullish(),
|
|
165
|
+
unitPriceTaxIncl: z.number().nullish(),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
export function EditPayerBankInputSchema() {
|
|
169
|
+
return z.object({
|
|
170
|
+
ABA: z.string().nullish(),
|
|
171
|
+
ABAIntermediary: z.string().nullish(),
|
|
172
|
+
BIC: z.string().nullish(),
|
|
173
|
+
BICIntermediary: z.string().nullish(),
|
|
174
|
+
SWIFT: z.string().nullish(),
|
|
175
|
+
SWIFTIntermediary: z.string().nullish(),
|
|
176
|
+
accountNum: z.string().nullish(),
|
|
177
|
+
accountNumIntermediary: z.string().nullish(),
|
|
178
|
+
accountType: z.lazy(() => InvoiceAccountTypeInputSchema.nullish()),
|
|
179
|
+
accountTypeIntermediary: z.lazy(() => InvoiceAccountTypeInputSchema.nullish()),
|
|
180
|
+
beneficiary: z.string().nullish(),
|
|
181
|
+
beneficiaryIntermediary: z.string().nullish(),
|
|
182
|
+
city: z.string().nullish(),
|
|
183
|
+
cityIntermediary: z.string().nullish(),
|
|
184
|
+
country: z.string().nullish(),
|
|
185
|
+
countryIntermediary: z.string().nullish(),
|
|
186
|
+
extendedAddress: z.string().nullish(),
|
|
187
|
+
extendedAddressIntermediary: z.string().nullish(),
|
|
188
|
+
memo: z.string().nullish(),
|
|
189
|
+
memoIntermediary: z.string().nullish(),
|
|
190
|
+
name: z.string().nullish(),
|
|
191
|
+
nameIntermediary: z.string().nullish(),
|
|
192
|
+
postalCode: z.string().nullish(),
|
|
193
|
+
postalCodeIntermediary: z.string().nullish(),
|
|
194
|
+
stateProvince: z.string().nullish(),
|
|
195
|
+
stateProvinceIntermediary: z.string().nullish(),
|
|
196
|
+
streetAddress: z.string().nullish(),
|
|
197
|
+
streetAddressIntermediary: z.string().nullish(),
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
export function EditPayerInputSchema() {
|
|
201
|
+
return z.object({
|
|
202
|
+
city: z.string().nullish(),
|
|
203
|
+
country: z.string().nullish(),
|
|
204
|
+
email: z.string().nullish(),
|
|
205
|
+
extendedAddress: z.string().nullish(),
|
|
206
|
+
id: z.string().nullish(),
|
|
207
|
+
name: z.string().nullish(),
|
|
208
|
+
postalCode: z.string().nullish(),
|
|
209
|
+
stateProvince: z.string().nullish(),
|
|
210
|
+
streetAddress: z.string().nullish(),
|
|
211
|
+
tel: z.string().nullish(),
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
export function EditPayerWalletInputSchema() {
|
|
215
|
+
return z.object({
|
|
216
|
+
address: z.string().nullish(),
|
|
217
|
+
chainId: z.string().nullish(),
|
|
218
|
+
chainName: z.string().nullish(),
|
|
219
|
+
rpc: z.string().nullish(),
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
export function EditRefInputSchema() {
|
|
223
|
+
return z.object({
|
|
224
|
+
id: z.string(),
|
|
225
|
+
value: z.string(),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
export function EditStatusInputSchema() {
|
|
229
|
+
return z.object({
|
|
230
|
+
status: StatusSchema,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
export function IntermediaryBankSchema() {
|
|
234
|
+
return z.object({
|
|
235
|
+
__typename: z.literal("IntermediaryBank").optional(),
|
|
236
|
+
ABA: z.string().nullable(),
|
|
237
|
+
BIC: z.string().nullable(),
|
|
238
|
+
SWIFT: z.string().nullable(),
|
|
239
|
+
accountNum: z.string(),
|
|
240
|
+
accountType: InvoiceAccountTypeSchema.nullable(),
|
|
241
|
+
address: AddressSchema(),
|
|
242
|
+
beneficiary: z.string().nullable(),
|
|
243
|
+
memo: z.string().nullable(),
|
|
244
|
+
name: z.string(),
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
export function InvoiceLineItemSchema() {
|
|
248
|
+
return z.object({
|
|
249
|
+
__typename: z.literal("InvoiceLineItem").optional(),
|
|
250
|
+
currency: z.string(),
|
|
251
|
+
description: z.string(),
|
|
252
|
+
id: z.string(),
|
|
253
|
+
lineItemTag: z.array(InvoiceLineItemTagSchema()),
|
|
254
|
+
quantity: z.number(),
|
|
255
|
+
taxPercent: z.number(),
|
|
256
|
+
totalPriceTaxExcl: z.number(),
|
|
257
|
+
totalPriceTaxIncl: z.number(),
|
|
258
|
+
unitPriceTaxExcl: z.number(),
|
|
259
|
+
unitPriceTaxIncl: z.number(),
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
export function InvoiceLineItemTagSchema() {
|
|
263
|
+
return z.object({
|
|
264
|
+
__typename: z.literal("InvoiceLineItemTag").optional(),
|
|
265
|
+
dimension: z.string(),
|
|
266
|
+
label: z.string().nullable(),
|
|
267
|
+
value: z.string(),
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
export function InvoiceStateSchema() {
|
|
271
|
+
return z.object({
|
|
272
|
+
__typename: z.literal("InvoiceState").optional(),
|
|
273
|
+
currency: z.string(),
|
|
274
|
+
dateDelivered: z.string().nullable(),
|
|
275
|
+
dateDue: z.string(),
|
|
276
|
+
dateIssued: z.string(),
|
|
277
|
+
invoiceNo: z.string(),
|
|
278
|
+
issuer: LegalEntitySchema(),
|
|
279
|
+
lineItems: z.array(InvoiceLineItemSchema()),
|
|
280
|
+
payer: LegalEntitySchema(),
|
|
281
|
+
paymentAccount: z.string().nullable(),
|
|
282
|
+
refs: z.array(RefSchema()),
|
|
283
|
+
status: StatusSchema,
|
|
284
|
+
totalPriceTaxExcl: z.number(),
|
|
285
|
+
totalPriceTaxIncl: z.number(),
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
export function InvoiceWalletSchema() {
|
|
289
|
+
return z.object({
|
|
290
|
+
__typename: z.literal("InvoiceWallet").optional(),
|
|
291
|
+
address: z.string().nullable(),
|
|
292
|
+
chainId: z.string().nullable(),
|
|
293
|
+
chainName: z.string().nullable(),
|
|
294
|
+
rpc: z.string().nullable(),
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
export function LegalEntitySchema() {
|
|
298
|
+
return z.object({
|
|
299
|
+
__typename: z.literal("LegalEntity").optional(),
|
|
300
|
+
address: AddressSchema().nullable(),
|
|
301
|
+
contactInfo: ContactInfoSchema().nullable(),
|
|
302
|
+
country: z.string().nullable(),
|
|
303
|
+
id: LegalEntityIdSchema().nullable(),
|
|
304
|
+
name: z.string().nullable(),
|
|
305
|
+
paymentRouting: PaymentRoutingSchema().nullable(),
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
export function LegalEntityCorporateRegistrationIdSchema() {
|
|
309
|
+
return z.object({
|
|
310
|
+
__typename: z.literal("LegalEntityCorporateRegistrationId").optional(),
|
|
311
|
+
corpRegId: z.string(),
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
export function LegalEntityIdSchema() {
|
|
315
|
+
return z.union([
|
|
316
|
+
LegalEntityCorporateRegistrationIdSchema(),
|
|
317
|
+
LegalEntityTaxIdSchema(),
|
|
318
|
+
]);
|
|
319
|
+
}
|
|
320
|
+
export function LegalEntityTaxIdSchema() {
|
|
321
|
+
return z.object({
|
|
322
|
+
__typename: z.literal("LegalEntityTaxId").optional(),
|
|
323
|
+
taxId: z.string(),
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
export function PaymentRoutingSchema() {
|
|
327
|
+
return z.object({
|
|
328
|
+
__typename: z.literal("PaymentRouting").optional(),
|
|
329
|
+
bank: BankSchema().nullable(),
|
|
330
|
+
wallet: InvoiceWalletSchema().nullable(),
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
export function RefSchema() {
|
|
334
|
+
return z.object({
|
|
335
|
+
__typename: z.literal("Ref").optional(),
|
|
336
|
+
id: z.string(),
|
|
337
|
+
value: z.string(),
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
export function SetLineItemTagInputSchema() {
|
|
341
|
+
return z.object({
|
|
342
|
+
dimension: z.string(),
|
|
343
|
+
id: z.string(),
|
|
344
|
+
label: z.string().nullish(),
|
|
345
|
+
value: z.string(),
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
export function SetPaymentAccountInputSchema() {
|
|
349
|
+
return z.object({
|
|
350
|
+
paymentAccount: z.string(),
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
export function TokenSchema() {
|
|
354
|
+
return z.object({
|
|
355
|
+
__typename: z.literal("Token").optional(),
|
|
356
|
+
chainId: z.string().nullable(),
|
|
357
|
+
chainName: z.string().nullable(),
|
|
358
|
+
evmAddress: z.string().nullable(),
|
|
359
|
+
rpc: z.string().nullable(),
|
|
360
|
+
symbol: z.string().nullable(),
|
|
361
|
+
});
|
|
362
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PHDocument, ExtendedState } from "document-model";
|
|
2
|
+
import type { InvoiceState } from "./schema/types.js";
|
|
3
|
+
import type { InvoiceAction } from "./actions.js";
|
|
4
|
+
export { z } from "./schema/index.js";
|
|
5
|
+
export type * from "./schema/types.js";
|
|
6
|
+
type InvoiceLocalState = Record<PropertyKey, never>;
|
|
7
|
+
export type ExtendedInvoiceState = ExtendedState<InvoiceState, InvoiceLocalState>;
|
|
8
|
+
export type InvoiceDocument = PHDocument<InvoiceState, InvoiceLocalState, InvoiceAction>;
|
|
9
|
+
export type { InvoiceState, InvoiceLocalState, InvoiceAction };
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,mBAAmB,mBAAmB,CAAC;AACvC,KAAK,iBAAiB,GAAG,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACpD,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAC9C,YAAY,EACZ,iBAAiB,CAClB,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,UAAU,CACtC,YAAY,EACZ,iBAAiB,EACjB,aAAa,CACd,CAAC;AACF,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { z } from "./schema/index.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type DocumentModelUtils } from "document-model";
|
|
2
|
+
import { type InvoiceDocument, type InvoiceState, type InvoiceLocalState } from "./types.js";
|
|
3
|
+
export declare const initialGlobalState: InvoiceState;
|
|
4
|
+
export declare const initialLocalState: InvoiceLocalState;
|
|
5
|
+
declare const utils: DocumentModelUtils<InvoiceDocument>;
|
|
6
|
+
export default utils;
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAOxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,kBAAkB,EAAE,YAsIhC,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,iBAAsB,CAAC;AAEvD,QAAA,MAAM,KAAK,EAAE,kBAAkB,CAAC,eAAe,CAgC9C,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { baseCreateDocument, baseCreateExtendedState, baseSaveToFile, baseSaveToFileHandle, baseLoadFromFile, baseLoadFromInput, } from "document-model";
|
|
2
|
+
import { reducer } from "./reducer.js";
|
|
3
|
+
export const initialGlobalState = {
|
|
4
|
+
invoiceNo: "",
|
|
5
|
+
dateIssued: "",
|
|
6
|
+
dateDue: "",
|
|
7
|
+
dateDelivered: "",
|
|
8
|
+
status: "DRAFT",
|
|
9
|
+
refs: [],
|
|
10
|
+
issuer: {
|
|
11
|
+
id: null,
|
|
12
|
+
name: "",
|
|
13
|
+
address: {
|
|
14
|
+
streetAddress: "",
|
|
15
|
+
extendedAddress: "",
|
|
16
|
+
city: "",
|
|
17
|
+
postalCode: "",
|
|
18
|
+
country: "",
|
|
19
|
+
stateProvince: "",
|
|
20
|
+
},
|
|
21
|
+
contactInfo: {
|
|
22
|
+
tel: "",
|
|
23
|
+
email: "",
|
|
24
|
+
},
|
|
25
|
+
country: "",
|
|
26
|
+
paymentRouting: {
|
|
27
|
+
bank: {
|
|
28
|
+
name: "",
|
|
29
|
+
address: {
|
|
30
|
+
streetAddress: "",
|
|
31
|
+
extendedAddress: "",
|
|
32
|
+
city: "",
|
|
33
|
+
postalCode: "",
|
|
34
|
+
country: "",
|
|
35
|
+
stateProvince: "",
|
|
36
|
+
},
|
|
37
|
+
ABA: "",
|
|
38
|
+
BIC: "",
|
|
39
|
+
SWIFT: "",
|
|
40
|
+
accountNum: "",
|
|
41
|
+
accountType: "CHECKING",
|
|
42
|
+
beneficiary: "",
|
|
43
|
+
intermediaryBank: {
|
|
44
|
+
name: "",
|
|
45
|
+
address: {
|
|
46
|
+
streetAddress: "",
|
|
47
|
+
extendedAddress: "",
|
|
48
|
+
city: "",
|
|
49
|
+
postalCode: "",
|
|
50
|
+
country: "",
|
|
51
|
+
stateProvince: "",
|
|
52
|
+
},
|
|
53
|
+
ABA: "",
|
|
54
|
+
BIC: "",
|
|
55
|
+
SWIFT: "",
|
|
56
|
+
accountNum: "",
|
|
57
|
+
accountType: "CHECKING",
|
|
58
|
+
beneficiary: "",
|
|
59
|
+
memo: "",
|
|
60
|
+
},
|
|
61
|
+
memo: "",
|
|
62
|
+
},
|
|
63
|
+
wallet: {
|
|
64
|
+
rpc: "",
|
|
65
|
+
chainName: "",
|
|
66
|
+
chainId: "",
|
|
67
|
+
address: "",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
payer: {
|
|
72
|
+
id: null,
|
|
73
|
+
name: "",
|
|
74
|
+
address: {
|
|
75
|
+
streetAddress: "",
|
|
76
|
+
extendedAddress: "",
|
|
77
|
+
city: "",
|
|
78
|
+
postalCode: "",
|
|
79
|
+
country: "",
|
|
80
|
+
stateProvince: "",
|
|
81
|
+
},
|
|
82
|
+
contactInfo: {
|
|
83
|
+
tel: "",
|
|
84
|
+
email: "",
|
|
85
|
+
},
|
|
86
|
+
country: "",
|
|
87
|
+
paymentRouting: {
|
|
88
|
+
bank: {
|
|
89
|
+
name: "",
|
|
90
|
+
address: {
|
|
91
|
+
streetAddress: "",
|
|
92
|
+
extendedAddress: "",
|
|
93
|
+
city: "",
|
|
94
|
+
postalCode: "",
|
|
95
|
+
country: "",
|
|
96
|
+
stateProvince: "",
|
|
97
|
+
},
|
|
98
|
+
ABA: "",
|
|
99
|
+
BIC: "",
|
|
100
|
+
SWIFT: "",
|
|
101
|
+
accountNum: "",
|
|
102
|
+
accountType: "CHECKING",
|
|
103
|
+
beneficiary: "",
|
|
104
|
+
intermediaryBank: {
|
|
105
|
+
name: "",
|
|
106
|
+
address: {
|
|
107
|
+
streetAddress: "",
|
|
108
|
+
extendedAddress: "",
|
|
109
|
+
city: "",
|
|
110
|
+
postalCode: "",
|
|
111
|
+
country: "",
|
|
112
|
+
stateProvince: "",
|
|
113
|
+
},
|
|
114
|
+
ABA: "",
|
|
115
|
+
BIC: "",
|
|
116
|
+
SWIFT: "",
|
|
117
|
+
accountNum: "",
|
|
118
|
+
accountType: "CHECKING",
|
|
119
|
+
beneficiary: "",
|
|
120
|
+
memo: "",
|
|
121
|
+
},
|
|
122
|
+
memo: "",
|
|
123
|
+
},
|
|
124
|
+
wallet: {
|
|
125
|
+
rpc: "",
|
|
126
|
+
chainName: "",
|
|
127
|
+
chainId: "",
|
|
128
|
+
address: "",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
currency: "",
|
|
133
|
+
lineItems: [],
|
|
134
|
+
totalPriceTaxExcl: 0,
|
|
135
|
+
totalPriceTaxIncl: 0,
|
|
136
|
+
paymentAccount: "",
|
|
137
|
+
};
|
|
138
|
+
export const initialLocalState = {};
|
|
139
|
+
const utils = {
|
|
140
|
+
fileExtension: ".phdm",
|
|
141
|
+
createState(state) {
|
|
142
|
+
return {
|
|
143
|
+
global: { ...initialGlobalState, ...state?.global },
|
|
144
|
+
local: { ...initialLocalState, ...state?.local },
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
createExtendedState(extendedState) {
|
|
148
|
+
return baseCreateExtendedState({ ...extendedState, documentType: "powerhouse/invoice" }, utils.createState);
|
|
149
|
+
},
|
|
150
|
+
createDocument(state) {
|
|
151
|
+
return baseCreateDocument(utils.createExtendedState(state), utils.createState);
|
|
152
|
+
},
|
|
153
|
+
saveToFile(document, path, name) {
|
|
154
|
+
return baseSaveToFile(document, path, ".phdm", name);
|
|
155
|
+
},
|
|
156
|
+
saveToFileHandle(document, input) {
|
|
157
|
+
return baseSaveToFileHandle(document, input);
|
|
158
|
+
},
|
|
159
|
+
loadFromFile(path) {
|
|
160
|
+
return baseLoadFromFile(path, reducer);
|
|
161
|
+
},
|
|
162
|
+
loadFromInput(input) {
|
|
163
|
+
return baseLoadFromInput(input, reducer);
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
export default utils;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a scaffold file meant for customization.
|
|
3
|
+
* Delete the file and run the code generator again to have it reset
|
|
4
|
+
*/
|
|
5
|
+
import { type DocumentModelModule } from "document-model";
|
|
6
|
+
import { reducer } from "./gen/reducer.js";
|
|
7
|
+
import { documentModel } from "./gen/document-model.js";
|
|
8
|
+
import { type InvoiceDocument } from "./gen/types.js";
|
|
9
|
+
declare const utils: {
|
|
10
|
+
fileExtension: string;
|
|
11
|
+
createState: import("document-model").CreateState<InvoiceDocument>;
|
|
12
|
+
createExtendedState: import("document-model").CreateExtendedState<InvoiceDocument>;
|
|
13
|
+
createDocument: import("document-model").CreateDocument<InvoiceDocument>;
|
|
14
|
+
loadFromFile: import("document-model").LoadFromFile<InvoiceDocument>;
|
|
15
|
+
loadFromInput: import("document-model").LoadFromInput<InvoiceDocument>;
|
|
16
|
+
saveToFile: import("document-model").SaveToFile;
|
|
17
|
+
saveToFileHandle: import("document-model").SaveToFileHandle;
|
|
18
|
+
};
|
|
19
|
+
declare const actions: {
|
|
20
|
+
editInvoice: (input: import("./gen/index.js").EditInvoiceInput) => import("./gen/index.js").EditInvoiceAction;
|
|
21
|
+
editStatus: (input: import("./gen/index.js").EditStatusInput) => import("./gen/index.js").EditStatusAction;
|
|
22
|
+
addRef: (input: import("./gen/index.js").AddRefInput) => import("./gen/index.js").AddRefAction;
|
|
23
|
+
editRef: (input: import("./gen/index.js").EditRefInput) => import("./gen/index.js").EditRefAction;
|
|
24
|
+
deleteRef: (input: import("./gen/index.js").DeleteRefInput) => import("./gen/index.js").DeleteRefAction;
|
|
25
|
+
setPaymentAccount: (input: import("./gen/index.js").SetPaymentAccountInput) => import("./gen/index.js").SetPaymentAccountAction;
|
|
26
|
+
editIssuer: (input: import("./gen/index.js").EditIssuerInput) => import("./gen/index.js").EditIssuerAction;
|
|
27
|
+
editIssuerBank: (input: import("./gen/index.js").EditIssuerBankInput) => import("./gen/index.js").EditIssuerBankAction;
|
|
28
|
+
editIssuerWallet: (input: import("./gen/index.js").EditIssuerWalletInput) => import("./gen/index.js").EditIssuerWalletAction;
|
|
29
|
+
editPayer: (input: import("./gen/index.js").EditPayerInput) => import("./gen/index.js").EditPayerAction;
|
|
30
|
+
editPayerBank: (input: import("./gen/index.js").EditPayerBankInput) => import("./gen/index.js").EditPayerBankAction;
|
|
31
|
+
editPayerWallet: (input: import("./gen/index.js").EditPayerWalletInput) => import("./gen/index.js").EditPayerWalletAction;
|
|
32
|
+
addLineItem: (input: import("./gen/index.js").AddLineItemInput) => import("./gen/index.js").AddLineItemAction;
|
|
33
|
+
editLineItem: (input: import("./gen/index.js").EditLineItemInput) => import("./gen/index.js").EditLineItemAction;
|
|
34
|
+
deleteLineItem: (input: import("./gen/index.js").DeleteLineItemInput) => import("./gen/index.js").DeleteLineItemAction;
|
|
35
|
+
setLineItemTag: (input: import("./gen/index.js").SetLineItemTagInput) => import("./gen/index.js").SetLineItemTagAction;
|
|
36
|
+
};
|
|
37
|
+
export declare const module: DocumentModelModule<InvoiceDocument>;
|
|
38
|
+
export { reducer, actions, utils, documentModel };
|
|
39
|
+
export * from "./gen/types.js";
|
|
40
|
+
export * from "./src/utils.js";
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../document-models/invoice/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,QAAA,MAAM,KAAK;;;;;;;;;CAAkC,CAAC;AAC9C,QAAA,MAAM,OAAO;kBAJO,gDAAuB;iBAMpC,+CAAsB;aASH,2CACd;cACwH,4CAAmB;gBAA6J,8CAAqB;wBAA2K,sDAA6B;iBAhB1gB,+CAAqB;qBAKY,mDACpC;uBAUkB,qDAA4B;gBAAyL,8CAAqB;oBAAuK,kDAAyB;sBAAsL,oDAA2B;kBAnBzmB,gDAClC;mBAI+B,iDACvB;qBASQ,mDAA0B;qBAIoE,mDAA0B;CAbzF,CAAC;AAEtD,eAAO,MAAM,MAAM,EAAE,mBAAmB,CAAC,eAAe,CAKvD,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AAElD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|