@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,460 @@
|
|
|
1
|
+
import { gql } from "graphql-tag";
|
|
2
|
+
export const schema = gql `
|
|
3
|
+
"""
|
|
4
|
+
Subgraph definition for Invoice (powerhouse/invoice)
|
|
5
|
+
"""
|
|
6
|
+
type InvoiceState {
|
|
7
|
+
invoiceNo: String!
|
|
8
|
+
dateIssued: String!
|
|
9
|
+
dateDue: String!
|
|
10
|
+
dateDelivered: String
|
|
11
|
+
status: Status!
|
|
12
|
+
refs: [Ref!]!
|
|
13
|
+
issuer: LegalEntity!
|
|
14
|
+
payer: LegalEntity!
|
|
15
|
+
currency: String!
|
|
16
|
+
lineItems: [InvoiceLineItem!]!
|
|
17
|
+
totalPriceTaxExcl: Float!
|
|
18
|
+
totalPriceTaxIncl: Float!
|
|
19
|
+
paymentAccount: String
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type Ref {
|
|
23
|
+
id: OID!
|
|
24
|
+
value: String!
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type Token {
|
|
28
|
+
evmAddress: String
|
|
29
|
+
symbol: String
|
|
30
|
+
chainName: String
|
|
31
|
+
chainId: String
|
|
32
|
+
rpc: String
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type LegalEntity {
|
|
36
|
+
id: LegalEntityId
|
|
37
|
+
name: String
|
|
38
|
+
address: Address
|
|
39
|
+
contactInfo: ContactInfo
|
|
40
|
+
country: String
|
|
41
|
+
paymentRouting: PaymentRouting
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
type Address {
|
|
45
|
+
streetAddress: String
|
|
46
|
+
extendedAddress: String
|
|
47
|
+
city: String
|
|
48
|
+
postalCode: String
|
|
49
|
+
country: String
|
|
50
|
+
stateProvince: String
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type ContactInfo {
|
|
54
|
+
tel: String
|
|
55
|
+
email: String
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
type PaymentRouting {
|
|
59
|
+
bank: Bank
|
|
60
|
+
wallet: InvoiceWallet
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
type Bank {
|
|
64
|
+
name: String!
|
|
65
|
+
address: Address!
|
|
66
|
+
ABA: String
|
|
67
|
+
BIC: String
|
|
68
|
+
SWIFT: String
|
|
69
|
+
accountNum: String!
|
|
70
|
+
accountType: InvoiceAccountType
|
|
71
|
+
beneficiary: String
|
|
72
|
+
intermediaryBank: IntermediaryBank
|
|
73
|
+
memo: String
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type IntermediaryBank {
|
|
77
|
+
name: String!
|
|
78
|
+
address: Address!
|
|
79
|
+
ABA: String
|
|
80
|
+
BIC: String
|
|
81
|
+
SWIFT: String
|
|
82
|
+
accountNum: String!
|
|
83
|
+
accountType: InvoiceAccountType
|
|
84
|
+
beneficiary: String
|
|
85
|
+
memo: String
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
type InvoiceWallet {
|
|
89
|
+
rpc: String
|
|
90
|
+
chainName: String
|
|
91
|
+
chainId: String
|
|
92
|
+
address: String
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
type InvoiceLineItem {
|
|
96
|
+
id: OID!
|
|
97
|
+
description: String!
|
|
98
|
+
taxPercent: Float!
|
|
99
|
+
quantity: Float!
|
|
100
|
+
currency: String!
|
|
101
|
+
unitPriceTaxExcl: Float!
|
|
102
|
+
unitPriceTaxIncl: Float!
|
|
103
|
+
totalPriceTaxExcl: Float!
|
|
104
|
+
totalPriceTaxIncl: Float!
|
|
105
|
+
lineItemTag: [InvoiceLineItemTag!]!
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
type InvoiceLineItemTag {
|
|
109
|
+
dimension: String!
|
|
110
|
+
value: String!
|
|
111
|
+
label: String
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
union LegalEntityId = LegalEntityTaxId | LegalEntityCorporateRegistrationId
|
|
115
|
+
|
|
116
|
+
type LegalEntityTaxId {
|
|
117
|
+
taxId: String!
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
type LegalEntityCorporateRegistrationId {
|
|
121
|
+
corpRegId: String!
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
enum Status {
|
|
125
|
+
DRAFT
|
|
126
|
+
ISSUED
|
|
127
|
+
CANCELLED
|
|
128
|
+
ACCEPTED
|
|
129
|
+
REJECTED
|
|
130
|
+
AWAITINGPAYMENT
|
|
131
|
+
PAYMENTSCHEDULED
|
|
132
|
+
PAYMENTSENT
|
|
133
|
+
PAYMENTISSUE
|
|
134
|
+
PAYMENTRECEIVED
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
enum InvoiceAccountType {
|
|
138
|
+
CHECKING
|
|
139
|
+
SAVINGS
|
|
140
|
+
TRUST
|
|
141
|
+
WALLET
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
enum InvoiceAccountTypeInput {
|
|
145
|
+
CHECKING
|
|
146
|
+
SAVINGS
|
|
147
|
+
TRUST
|
|
148
|
+
WALLET
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
"""
|
|
152
|
+
Queries: Invoice
|
|
153
|
+
"""
|
|
154
|
+
type InvoiceQueries {
|
|
155
|
+
getDocument(driveId: String, docId: PHID): Invoice
|
|
156
|
+
getDocuments: [Invoice!]
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
type Query {
|
|
160
|
+
Invoice: InvoiceQueries
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
"""
|
|
164
|
+
Mutations: Invoice
|
|
165
|
+
"""
|
|
166
|
+
type Mutation {
|
|
167
|
+
Invoice_createDocument(driveId: String, name: String): String
|
|
168
|
+
|
|
169
|
+
Invoice_editInvoice(
|
|
170
|
+
driveId: String
|
|
171
|
+
docId: PHID
|
|
172
|
+
input: Invoice_EditInvoiceInput
|
|
173
|
+
): Int
|
|
174
|
+
Invoice_editStatus(
|
|
175
|
+
driveId: String
|
|
176
|
+
docId: PHID
|
|
177
|
+
input: Invoice_EditStatusInput
|
|
178
|
+
): Int
|
|
179
|
+
Invoice_addRef(
|
|
180
|
+
driveId: String
|
|
181
|
+
docId: PHID
|
|
182
|
+
input: Invoice_AddRefInput
|
|
183
|
+
): Int
|
|
184
|
+
Invoice_editRef(
|
|
185
|
+
driveId: String
|
|
186
|
+
docId: PHID
|
|
187
|
+
input: Invoice_EditRefInput
|
|
188
|
+
): Int
|
|
189
|
+
Invoice_deleteRef(
|
|
190
|
+
driveId: String
|
|
191
|
+
docId: PHID
|
|
192
|
+
input: Invoice_DeleteRefInput
|
|
193
|
+
): Int
|
|
194
|
+
Invoice_setPaymentAccount(
|
|
195
|
+
driveId: String
|
|
196
|
+
docId: PHID
|
|
197
|
+
input: Invoice_SetPaymentAccountInput
|
|
198
|
+
): Int
|
|
199
|
+
Invoice_editIssuer(
|
|
200
|
+
driveId: String
|
|
201
|
+
docId: PHID
|
|
202
|
+
input: Invoice_EditIssuerInput
|
|
203
|
+
): Int
|
|
204
|
+
Invoice_editIssuerBank(
|
|
205
|
+
driveId: String
|
|
206
|
+
docId: PHID
|
|
207
|
+
input: Invoice_EditIssuerBankInput
|
|
208
|
+
): Int
|
|
209
|
+
Invoice_editIssuerWallet(
|
|
210
|
+
driveId: String
|
|
211
|
+
docId: PHID
|
|
212
|
+
input: Invoice_EditIssuerWalletInput
|
|
213
|
+
): Int
|
|
214
|
+
Invoice_editPayer(
|
|
215
|
+
driveId: String
|
|
216
|
+
docId: PHID
|
|
217
|
+
input: Invoice_EditPayerInput
|
|
218
|
+
): Int
|
|
219
|
+
Invoice_editPayerBank(
|
|
220
|
+
driveId: String
|
|
221
|
+
docId: PHID
|
|
222
|
+
input: Invoice_EditPayerBankInput
|
|
223
|
+
): Int
|
|
224
|
+
Invoice_editPayerWallet(
|
|
225
|
+
driveId: String
|
|
226
|
+
docId: PHID
|
|
227
|
+
input: Invoice_EditPayerWalletInput
|
|
228
|
+
): Int
|
|
229
|
+
Invoice_addLineItem(
|
|
230
|
+
driveId: String
|
|
231
|
+
docId: PHID
|
|
232
|
+
input: Invoice_AddLineItemInput
|
|
233
|
+
): Int
|
|
234
|
+
Invoice_editLineItem(
|
|
235
|
+
driveId: String
|
|
236
|
+
docId: PHID
|
|
237
|
+
input: Invoice_EditLineItemInput
|
|
238
|
+
): Int
|
|
239
|
+
Invoice_deleteLineItem(
|
|
240
|
+
driveId: String
|
|
241
|
+
docId: PHID
|
|
242
|
+
input: Invoice_DeleteLineItemInput
|
|
243
|
+
): Int
|
|
244
|
+
Invoice_setLineItemTag(
|
|
245
|
+
driveId: String
|
|
246
|
+
docId: PHID
|
|
247
|
+
input: Invoice_SetLineItemTagInput
|
|
248
|
+
): Int
|
|
249
|
+
Invoice_uploadInvoicePdfChunk(
|
|
250
|
+
chunk: String!
|
|
251
|
+
chunkIndex: Int!
|
|
252
|
+
totalChunks: Int!
|
|
253
|
+
fileName: String!
|
|
254
|
+
sessionId: String!
|
|
255
|
+
): UploadInvoicePdfChunkResult!
|
|
256
|
+
Invoice_createRequestFinancePayment(
|
|
257
|
+
paymentData: JSON!
|
|
258
|
+
): CreateRequestFinancePaymentResult!
|
|
259
|
+
Invoice_processGnosisPayment(
|
|
260
|
+
payerWallet: JSON!
|
|
261
|
+
paymentDetails: JSON!
|
|
262
|
+
invoiceNo: String!
|
|
263
|
+
): ProcessGnosisPaymentResult
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
"""
|
|
267
|
+
Result type for PDF chunk upload
|
|
268
|
+
"""
|
|
269
|
+
type UploadInvoicePdfChunkResult {
|
|
270
|
+
success: Boolean!
|
|
271
|
+
data: JSON
|
|
272
|
+
error: String
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
"""
|
|
276
|
+
Result type for request finance payment request
|
|
277
|
+
"""
|
|
278
|
+
type CreateRequestFinancePaymentResult {
|
|
279
|
+
success: Boolean!
|
|
280
|
+
data: JSON
|
|
281
|
+
error: String
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
"""
|
|
285
|
+
Result type for process gnosis payment
|
|
286
|
+
"""
|
|
287
|
+
type ProcessGnosisPaymentResult {
|
|
288
|
+
success: Boolean!
|
|
289
|
+
data: JSON
|
|
290
|
+
error: String
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
scalar JSON
|
|
294
|
+
|
|
295
|
+
"""
|
|
296
|
+
Module: General
|
|
297
|
+
"""
|
|
298
|
+
input Invoice_EditInvoiceInput {
|
|
299
|
+
invoiceNo: String
|
|
300
|
+
dateIssued: String
|
|
301
|
+
dateDue: String
|
|
302
|
+
dateDelivered: String
|
|
303
|
+
currency: String
|
|
304
|
+
}
|
|
305
|
+
input Invoice_EditStatusInput {
|
|
306
|
+
status: Status!
|
|
307
|
+
}
|
|
308
|
+
input Invoice_AddRefInput {
|
|
309
|
+
id: OID!
|
|
310
|
+
value: String!
|
|
311
|
+
}
|
|
312
|
+
input Invoice_EditRefInput {
|
|
313
|
+
id: OID!
|
|
314
|
+
value: String!
|
|
315
|
+
}
|
|
316
|
+
input Invoice_DeleteRefInput {
|
|
317
|
+
id: OID!
|
|
318
|
+
}
|
|
319
|
+
input Invoice_SetPaymentAccountInput {
|
|
320
|
+
paymentAccount: String!
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
"""
|
|
324
|
+
Module: Parties
|
|
325
|
+
"""
|
|
326
|
+
input Invoice_EditIssuerInput {
|
|
327
|
+
id: String
|
|
328
|
+
name: String
|
|
329
|
+
streetAddress: String
|
|
330
|
+
extendedAddress: String
|
|
331
|
+
city: String
|
|
332
|
+
postalCode: String
|
|
333
|
+
country: String
|
|
334
|
+
stateProvince: String
|
|
335
|
+
tel: String
|
|
336
|
+
email: String
|
|
337
|
+
}
|
|
338
|
+
input Invoice_EditIssuerBankInput {
|
|
339
|
+
name: String
|
|
340
|
+
streetAddress: String
|
|
341
|
+
extendedAddress: String
|
|
342
|
+
city: String
|
|
343
|
+
postalCode: String
|
|
344
|
+
country: String
|
|
345
|
+
stateProvince: String
|
|
346
|
+
ABA: String
|
|
347
|
+
BIC: String
|
|
348
|
+
SWIFT: String
|
|
349
|
+
accountNum: String
|
|
350
|
+
accountType: InvoiceAccountTypeInput
|
|
351
|
+
beneficiary: String
|
|
352
|
+
memo: String
|
|
353
|
+
# intermediaryBank
|
|
354
|
+
nameIntermediary: String
|
|
355
|
+
streetAddressIntermediary: String
|
|
356
|
+
extendedAddressIntermediary: String
|
|
357
|
+
cityIntermediary: String
|
|
358
|
+
postalCodeIntermediary: String
|
|
359
|
+
countryIntermediary: String
|
|
360
|
+
stateProvinceIntermediary: String
|
|
361
|
+
ABAIntermediary: String
|
|
362
|
+
BICIntermediary: String
|
|
363
|
+
SWIFTIntermediary: String
|
|
364
|
+
accountNumIntermediary: String
|
|
365
|
+
accountTypeIntermediary: InvoiceAccountTypeInput
|
|
366
|
+
beneficiaryIntermediary: String
|
|
367
|
+
memoIntermediary: String
|
|
368
|
+
}
|
|
369
|
+
input Invoice_EditIssuerWalletInput {
|
|
370
|
+
rpc: String
|
|
371
|
+
chainName: String
|
|
372
|
+
chainId: String
|
|
373
|
+
address: String
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
input Invoice_EditPayerInput {
|
|
377
|
+
id: String
|
|
378
|
+
name: String
|
|
379
|
+
streetAddress: String
|
|
380
|
+
extendedAddress: String
|
|
381
|
+
city: String
|
|
382
|
+
postalCode: String
|
|
383
|
+
country: String
|
|
384
|
+
stateProvince: String
|
|
385
|
+
tel: String
|
|
386
|
+
email: String
|
|
387
|
+
}
|
|
388
|
+
input Invoice_EditPayerBankInput {
|
|
389
|
+
name: String
|
|
390
|
+
streetAddress: String
|
|
391
|
+
extendedAddress: String
|
|
392
|
+
city: String
|
|
393
|
+
postalCode: String
|
|
394
|
+
country: String
|
|
395
|
+
stateProvince: String
|
|
396
|
+
ABA: String
|
|
397
|
+
BIC: String
|
|
398
|
+
SWIFT: String
|
|
399
|
+
accountNum: String
|
|
400
|
+
accountType: InvoiceAccountTypeInput
|
|
401
|
+
beneficiary: String
|
|
402
|
+
memo: String
|
|
403
|
+
# intermediaryBank
|
|
404
|
+
nameIntermediary: String
|
|
405
|
+
streetAddressIntermediary: String
|
|
406
|
+
extendedAddressIntermediary: String
|
|
407
|
+
cityIntermediary: String
|
|
408
|
+
postalCodeIntermediary: String
|
|
409
|
+
countryIntermediary: String
|
|
410
|
+
stateProvinceIntermediary: String
|
|
411
|
+
ABAIntermediary: String
|
|
412
|
+
BICIntermediary: String
|
|
413
|
+
SWIFTIntermediary: String
|
|
414
|
+
accountNumIntermediary: String
|
|
415
|
+
accountTypeIntermediary: InvoiceAccountTypeInput
|
|
416
|
+
beneficiaryIntermediary: String
|
|
417
|
+
memoIntermediary: String
|
|
418
|
+
}
|
|
419
|
+
input Invoice_EditPayerWalletInput {
|
|
420
|
+
rpc: String
|
|
421
|
+
chainName: String
|
|
422
|
+
chainId: String
|
|
423
|
+
address: String
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
"""
|
|
427
|
+
Module: Items
|
|
428
|
+
"""
|
|
429
|
+
input Invoice_AddLineItemInput {
|
|
430
|
+
id: OID!
|
|
431
|
+
description: String!
|
|
432
|
+
taxPercent: Float!
|
|
433
|
+
quantity: Float!
|
|
434
|
+
currency: String! # Default can be USD
|
|
435
|
+
unitPriceTaxExcl: Float!
|
|
436
|
+
unitPriceTaxIncl: Float!
|
|
437
|
+
totalPriceTaxExcl: Float!
|
|
438
|
+
totalPriceTaxIncl: Float!
|
|
439
|
+
}
|
|
440
|
+
input Invoice_EditLineItemInput {
|
|
441
|
+
id: OID!
|
|
442
|
+
description: String
|
|
443
|
+
taxPercent: Float
|
|
444
|
+
quantity: Float
|
|
445
|
+
currency: String
|
|
446
|
+
unitPriceTaxExcl: Float
|
|
447
|
+
unitPriceTaxIncl: Float
|
|
448
|
+
totalPriceTaxExcl: Float
|
|
449
|
+
totalPriceTaxIncl: Float
|
|
450
|
+
}
|
|
451
|
+
input Invoice_DeleteLineItemInput {
|
|
452
|
+
id: OID!
|
|
453
|
+
}
|
|
454
|
+
input Invoice_SetLineItemTagInput {
|
|
455
|
+
id: OID!
|
|
456
|
+
dimension: String!
|
|
457
|
+
value: String!
|
|
458
|
+
label: String
|
|
459
|
+
}
|
|
460
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailwind.config.d.ts","sourceRoot":"","sources":["../tailwind.config.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";AAGA,wBAKG"}
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@powerhousedao/contributor-billing",
|
|
3
|
+
"description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist",
|
|
9
|
+
"/editors/invoice/assets"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./document-models": {
|
|
20
|
+
"types": "./dist/document-models/index.d.ts",
|
|
21
|
+
"default": "./dist/document-models/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./editors": {
|
|
24
|
+
"types": "./dist/editors/index.d.ts",
|
|
25
|
+
"default": "./dist/editors/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./subgraphs": {
|
|
28
|
+
"types": "./dist/subgraphs/index.d.ts",
|
|
29
|
+
"default": "./dist/subgraphs/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./processors": {
|
|
32
|
+
"types": "./dist/processors/index.d.ts",
|
|
33
|
+
"default": "./dist/processors/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./manifest": {
|
|
36
|
+
"types": "./dist/manifest.d.ts",
|
|
37
|
+
"default": "./dist/manifest.js"
|
|
38
|
+
},
|
|
39
|
+
"./style.css": "./dist/style.css"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"lint": "eslint .",
|
|
43
|
+
"build:tsc": "tsc",
|
|
44
|
+
"build:tsc:watch": "tsc --watch",
|
|
45
|
+
"build:css": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
|
|
46
|
+
"build:css:watch": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css --watch",
|
|
47
|
+
"build": "npm run build:tsc && npm run build:css && cp -r editors/invoice/assets dist/editors/invoice/",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"test:watch": "vitest",
|
|
50
|
+
"prepublishOnly": "npm run build",
|
|
51
|
+
"generate": "ph-cli generate",
|
|
52
|
+
"connect": "ph-cli connect",
|
|
53
|
+
"reactor": "ph-cli reactor",
|
|
54
|
+
"service": "ph-cli service",
|
|
55
|
+
"service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
|
|
56
|
+
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@google-cloud/documentai": "^8.12.0",
|
|
60
|
+
"@powerhousedao/builder-tools": "^0.10.2",
|
|
61
|
+
"@powerhousedao/common": "^1.11.2",
|
|
62
|
+
"@powerhousedao/design-system": "^1.40.2",
|
|
63
|
+
"@powerhousedao/document-engineering": "^1.6.0",
|
|
64
|
+
"@react-pdf/renderer": "^4.3.0",
|
|
65
|
+
"@safe-global/api-kit": "^3.0.1",
|
|
66
|
+
"@safe-global/protocol-kit": "^6.0.3",
|
|
67
|
+
"@safe-global/sdk-starter-kit": "^2.0.2",
|
|
68
|
+
"@safe-global/types-kit": "^2.0.1",
|
|
69
|
+
"@types/cors": "^2.8.17",
|
|
70
|
+
"axios": "^1.9.0",
|
|
71
|
+
"cors": "^2.8.5",
|
|
72
|
+
"document-model": "^3.0.2",
|
|
73
|
+
"dotenv": "^16.5.0",
|
|
74
|
+
"error": "^10.4.0",
|
|
75
|
+
"ethers": "^6.14.0",
|
|
76
|
+
"google-auth-library": "^9.15.1",
|
|
77
|
+
"graphql": "^16.10.0",
|
|
78
|
+
"graphql-tag": "^2.12.6",
|
|
79
|
+
"lucide-react": "^0.511.0",
|
|
80
|
+
"world-countries": "^5.1.0",
|
|
81
|
+
"zod": "^3.24.2"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"@eslint/js": "^9.25.0",
|
|
85
|
+
"@powerhousedao/analytics-engine-core": "^0.4.0",
|
|
86
|
+
"@powerhousedao/codegen": "^0.50.2",
|
|
87
|
+
"@powerhousedao/ph-cli": "^0.41.3",
|
|
88
|
+
"@powerhousedao/reactor-api": "^1.31.2",
|
|
89
|
+
"@powerhousedao/reactor-browser": "^1.23.2",
|
|
90
|
+
"@powerhousedao/reactor-local": "^1.28.3",
|
|
91
|
+
"@powerhousedao/scalars": "^2.0.1",
|
|
92
|
+
"@tailwindcss/cli": "^4.1.4",
|
|
93
|
+
"@types/node": "^22.15.17",
|
|
94
|
+
"@types/react": "^19.1.4",
|
|
95
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
96
|
+
"bun-types": "^1.2.11",
|
|
97
|
+
"document-drive": "^1.30.2",
|
|
98
|
+
"eslint": "^9.25.0",
|
|
99
|
+
"eslint-plugin-react": "^7.37.5",
|
|
100
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
101
|
+
"globals": "^16.0.0",
|
|
102
|
+
"package-manager-detector": "^0.2.8",
|
|
103
|
+
"pm2": "^5.4.3",
|
|
104
|
+
"react": "^19.1.0",
|
|
105
|
+
"react-dom": "^19.1.0",
|
|
106
|
+
"tailwindcss": "^4.1.4",
|
|
107
|
+
"ts-node": "^10.9.2",
|
|
108
|
+
"typescript": "^5.8.3",
|
|
109
|
+
"typescript-eslint": "^8.30.1",
|
|
110
|
+
"vite": "^6.2.3",
|
|
111
|
+
"vitest": "^3.0.9"
|
|
112
|
+
},
|
|
113
|
+
"peerDependencies": {
|
|
114
|
+
"react": "^18.3.1",
|
|
115
|
+
"react-dom": "^18.3.1"
|
|
116
|
+
}
|
|
117
|
+
}
|