@powerhousedao/contributor-billing 0.0.33 → 0.0.34
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/document-models/invoice/gen/actions.d.ts +3 -1
- package/dist/document-models/invoice/gen/actions.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/actions.js +1 -0
- package/dist/document-models/invoice/gen/creators.d.ts +1 -0
- package/dist/document-models/invoice/gen/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/creators.js +1 -0
- package/dist/document-models/invoice/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/document-model.js +167 -50
- package/dist/document-models/invoice/gen/general/actions.d.ts +4 -6
- package/dist/document-models/invoice/gen/general/actions.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/general/creators.d.ts +4 -6
- package/dist/document-models/invoice/gen/general/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/general/creators.js +2 -4
- package/dist/document-models/invoice/gen/general/object.d.ts +3 -5
- package/dist/document-models/invoice/gen/general/object.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/general/object.js +6 -12
- package/dist/document-models/invoice/gen/general/operations.d.ts +3 -5
- package/dist/document-models/invoice/gen/general/operations.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/object.d.ts +3 -1
- package/dist/document-models/invoice/gen/object.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/object.js +8 -1
- package/dist/document-models/invoice/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/reducer.js +56 -15
- package/dist/document-models/invoice/gen/schema/types.d.ts +89 -23
- package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/zod.d.ts +21 -7
- package/dist/document-models/invoice/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/zod.js +124 -28
- package/dist/document-models/invoice/gen/transitions/actions.d.ts +16 -0
- package/dist/document-models/invoice/gen/transitions/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/transitions/actions.js +1 -0
- package/dist/document-models/invoice/gen/transitions/creators.d.ts +15 -0
- package/dist/document-models/invoice/gen/transitions/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/transitions/creators.js +14 -0
- package/dist/document-models/invoice/gen/transitions/error.d.ts +2 -0
- package/dist/document-models/invoice/gen/transitions/error.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/transitions/error.js +1 -0
- package/dist/document-models/invoice/gen/transitions/object.d.ts +18 -0
- package/dist/document-models/invoice/gen/transitions/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/transitions/object.js +40 -0
- package/dist/document-models/invoice/gen/transitions/operations.d.ts +18 -0
- package/dist/document-models/invoice/gen/transitions/operations.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/transitions/operations.js +1 -0
- package/dist/document-models/invoice/gen/utils.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/utils.js +10 -6
- package/dist/document-models/invoice/index.d.ts +14 -4
- package/dist/document-models/invoice/index.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.js +26 -42
- package/dist/document-models/invoice/src/reducers/transitions.d.ts +8 -0
- package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -0
- package/dist/document-models/invoice/src/reducers/transitions.js +162 -0
- package/dist/document-models/invoice/src/tests/general.test.js +10 -31
- package/dist/document-models/invoice/src/tests/transitions.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/transitions.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/transitions.test.js +506 -0
- package/dist/document-models/invoice/utils/statusTransitions.d.ts +13 -0
- package/dist/document-models/invoice/utils/statusTransitions.d.ts.map +1 -0
- package/dist/document-models/invoice/utils/statusTransitions.js +13 -0
- package/dist/editors/billing-statement/lineItemTags/tagMapping.js +64 -64
- package/dist/editors/contributor-billing/components/DriveExplorer.js +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts +3 -2
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.js +26 -3
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.js +11 -3
- package/dist/editors/invoice/components/confirmationModal.d.ts +14 -0
- package/dist/editors/invoice/components/confirmationModal.d.ts.map +1 -0
- package/dist/editors/invoice/components/confirmationModal.js +7 -0
- package/dist/editors/invoice/components/selectField.d.ts.map +1 -1
- package/dist/editors/invoice/components/selectField.js +109 -112
- package/dist/editors/invoice/components/statusModalComponents.d.ts +52 -0
- package/dist/editors/invoice/components/statusModalComponents.d.ts.map +1 -0
- package/dist/editors/invoice/components/statusModalComponents.js +78 -0
- package/dist/editors/invoice/editor.d.ts +1 -1
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +153 -158
- package/dist/editors/invoice/ingestUBL.d.ts.map +1 -1
- package/dist/editors/invoice/ingestUBL.js +0 -3
- package/dist/editors/invoice/invoiceToGnosis.d.ts.map +1 -1
- package/dist/editors/invoice/invoiceToGnosis.js +4 -3
- package/dist/editors/invoice/lineItemTags/tagMapping.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/tagMapping.js +65 -64
- package/dist/editors/invoice/validation/validationHandler.d.ts +4 -0
- package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -0
- package/dist/editors/invoice/validation/validationHandler.js +117 -0
- package/dist/scripts/contributor-billing/createXeroCsv.d.ts +8 -0
- package/dist/scripts/contributor-billing/createXeroCsv.d.ts.map +1 -0
- package/dist/scripts/contributor-billing/createXeroCsv.js +206 -0
- package/dist/style.css +181 -18
- package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/invoice/resolvers.js +92 -22
- package/dist/subgraphs/invoice/schema.d.ts.map +1 -1
- package/dist/subgraphs/invoice/schema.js +181 -57
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { InvoiceGeneralAction } from "./general/actions.js";
|
|
2
2
|
import type { InvoicePartiesAction } from "./parties/actions.js";
|
|
3
3
|
import type { InvoiceItemsAction } from "./items/actions.js";
|
|
4
|
+
import type { InvoiceTransitionsAction } from "./transitions/actions.js";
|
|
4
5
|
export * from "./general/actions.js";
|
|
5
6
|
export * from "./parties/actions.js";
|
|
6
7
|
export * from "./items/actions.js";
|
|
7
|
-
export
|
|
8
|
+
export * from "./transitions/actions.js";
|
|
9
|
+
export type InvoiceAction = InvoiceGeneralAction | InvoicePartiesAction | InvoiceItemsAction | InvoiceTransitionsAction;
|
|
8
10
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AAEzC,MAAM,MAAM,aAAa,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,kBAAkB,GAClB,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,kBA0Y3B,CAAC"}
|
|
@@ -1,28 +1,15 @@
|
|
|
1
1
|
export const documentModel = {
|
|
2
|
-
id: "powerhouse/invoice",
|
|
3
|
-
name: "Invoice",
|
|
4
|
-
extension: ".phdm",
|
|
5
|
-
description: "The Invoice document model that allows a contributor to request compensation based on their contributions",
|
|
6
2
|
author: {
|
|
7
3
|
name: "Powerhouse",
|
|
8
4
|
website: "https://powerhouse.inc",
|
|
9
5
|
},
|
|
6
|
+
description: "The Invoice document model that allows a contributor to request compensation based on their contributions",
|
|
7
|
+
extension: ".phdm",
|
|
8
|
+
id: "powerhouse/invoice",
|
|
9
|
+
name: "Invoice",
|
|
10
10
|
specifications: [
|
|
11
11
|
{
|
|
12
|
-
version: 1,
|
|
13
12
|
changeLog: [],
|
|
14
|
-
state: {
|
|
15
|
-
global: {
|
|
16
|
-
schema: 'type InvoiceState {\n invoiceNo: String!\n dateIssued: String!\n dateDue: String!\n dateDelivered: String\n status: Status!\n refs: [Ref!]!\n issuer: LegalEntity!\n payer: LegalEntity!\n currency: String!\n lineItems: [InvoiceLineItem!]!\n totalPriceTaxExcl: Float!\n totalPriceTaxIncl: Float!\n invoiceTags: [InvoiceTag!]! # e.g. {\'xero-payment-account\', \'090\', \'PowerhouseUSD\'}\n notes: String\n paymentDate: String\n txnHash: String\n exported: Boolean\n}\n\ntype Ref {\n id: OID!\n value: String!\n}\n\ntype Token {\n evmAddress: String\n symbol: String\n chainName: String\n chainId: String\n rpc: String\n}\n\ntype LegalEntity {\n id: LegalEntityId\n name: String\n address: Address\n contactInfo: ContactInfo\n country: String\n paymentRouting: PaymentRouting\n}\n\ntype Address {\n streetAddress: String\n extendedAddress: String\n city: String\n postalCode: String\n country: String\n stateProvince: String\n}\n\ntype ContactInfo {\n tel: String\n email: String\n}\n\ntype PaymentRouting {\n bank: Bank\n wallet: InvoiceWallet\n}\n\ntype Bank {\n name: String!\n address: Address!\n ABA: String\n BIC: String\n SWIFT: String\n accountNum: String!\n accountType: InvoiceAccountType\n beneficiary: String\n intermediaryBank: IntermediaryBank\n memo: String\n}\n\ntype IntermediaryBank {\n name: String!\n address: Address!\n ABA: String\n BIC: String\n SWIFT: String\n accountNum: String!\n accountType: InvoiceAccountType\n beneficiary: String\n memo: String\n}\n\ntype InvoiceWallet {\n rpc: String\n chainName: String\n chainId: String\n address: String\n}\n\ntype InvoiceLineItem {\n id: OID!\n description: String!\n taxPercent: Float!\n quantity: Float!\n currency: String!\n unitPriceTaxExcl: Float!\n unitPriceTaxIncl: Float!\n totalPriceTaxExcl: Float!\n totalPriceTaxIncl: Float!\n lineItemTag: [InvoiceTag!]\n}\n\ntype InvoiceTag {\n dimension: String! # "xero-expense-account", "xero-payment-account", "accounting-period", ...\n value: String! # "627", ..., "090", ..., "2025/05", "2025/Q1", ...\n label: String # "Marketing", ..., "Business Bank", ..., "May 2025"\n}\n\nunion LegalEntityId = LegalEntityTaxId | LegalEntityCorporateRegistrationId\n\ntype LegalEntityTaxId {\n taxId: String!\n}\n\ntype LegalEntityCorporateRegistrationId {\n corpRegId: String!\n}\n\nenum Status {\n DRAFT\n ISSUED\n CANCELLED\n ACCEPTED\n REJECTED\n AWAITINGPAYMENT\n PAYMENTSCHEDULED\n PAYMENTSENT\n PAYMENTISSUE\n PAYMENTRECEIVED\n}\n\nenum InvoiceAccountType {\n CHECKING\n SAVINGS\n TRUST\n WALLET\n}\n\nenum InvoiceAccountTypeInput {\n CHECKING\n SAVINGS\n TRUST\n WALLET\n}',
|
|
17
|
-
initialValue: '"{\\n \\"invoiceNo\\": \\"\\",\\n \\"dateIssued\\": \\"\\",\\n \\"dateDue\\": \\"\\",\\n \\"dateDelivered\\": \\"\\",\\n \\"status\\": \\"DRAFT\\",\\n \\"refs\\": [],\\n \\"issuer\\": {\\n \\"id\\": null,\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"contactInfo\\": {\\n \\"tel\\": \\"\\",\\n \\"email\\": \\"\\"\\n },\\n \\"country\\": \\"\\",\\n \\"paymentRouting\\": {\\n \\"bank\\": {\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"ABA\\": \\"\\",\\n \\"BIC\\": \\"\\",\\n \\"SWIFT\\": \\"\\",\\n \\"accountNum\\": \\"\\",\\n \\"accountType\\": \\"CHECKING\\",\\n \\"beneficiary\\": \\"\\",\\n \\"intermediaryBank\\": {\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"ABA\\": \\"\\",\\n \\"BIC\\": \\"\\",\\n \\"SWIFT\\": \\"\\",\\n \\"accountNum\\": \\"\\",\\n \\"accountType\\": \\"CHECKING\\",\\n \\"beneficiary\\": \\"\\",\\n \\"memo\\": \\"\\"\\n },\\n \\"memo\\": \\"\\"\\n },\\n \\"wallet\\": {\\n \\"rpc\\": \\"\\",\\n \\"chainName\\": \\"\\",\\n \\"chainId\\": \\"\\",\\n \\"address\\": \\"\\"\\n }\\n }\\n },\\n \\"payer\\": {\\n \\"id\\": null,\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"contactInfo\\": {\\n \\"tel\\": \\"\\",\\n \\"email\\": \\"\\"\\n },\\n \\"country\\": \\"\\",\\n \\"paymentRouting\\": {\\n \\"bank\\": {\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"ABA\\": \\"\\",\\n \\"BIC\\": \\"\\",\\n \\"SWIFT\\": \\"\\",\\n \\"accountNum\\": \\"\\",\\n \\"accountType\\": \\"CHECKING\\",\\n \\"beneficiary\\": \\"\\",\\n \\"intermediaryBank\\": {\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"ABA\\": \\"\\",\\n \\"BIC\\": \\"\\",\\n \\"SWIFT\\": \\"\\",\\n \\"accountNum\\": \\"\\",\\n \\"accountType\\": \\"CHECKING\\",\\n \\"beneficiary\\": \\"\\",\\n \\"memo\\": \\"\\"\\n },\\n \\"memo\\": \\"\\"\\n },\\n \\"wallet\\": {\\n \\"rpc\\": \\"\\",\\n \\"chainName\\": \\"\\",\\n \\"chainId\\": \\"\\",\\n \\"address\\": \\"\\"\\n }\\n }\\n },\\n \\"currency\\": \\"\\",\\n \\"lineItems\\": [],\\n \\"totalPriceTaxExcl\\": 0,\\n \\"totalPriceTaxIncl\\": 0,\\n \\"invoiceTags\\": []\\n}"',
|
|
18
|
-
examples: [],
|
|
19
|
-
},
|
|
20
|
-
local: {
|
|
21
|
-
schema: "",
|
|
22
|
-
initialValue: '""',
|
|
23
|
-
examples: [],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
13
|
modules: [
|
|
27
14
|
{
|
|
28
15
|
id: "WDJ7NWCy8TEDk1TWvr0F+VXvIqc=",
|
|
@@ -33,7 +20,7 @@ export const documentModel = {
|
|
|
33
20
|
id: "8Ld7B60Upub1CNmVrx3TMzmyl54=",
|
|
34
21
|
name: "EDIT_INVOICE",
|
|
35
22
|
description: "",
|
|
36
|
-
schema: "input EditInvoiceInput {\n invoiceNo: String\n dateIssued: String\n dateDue: String\n
|
|
23
|
+
schema: "input EditInvoiceInput {\n invoiceNo: String\n dateIssued: String\n dateDue: String\n currency: String\n notes: String\n}",
|
|
37
24
|
template: "",
|
|
38
25
|
reducer: "",
|
|
39
26
|
errors: [],
|
|
@@ -52,21 +39,10 @@ export const documentModel = {
|
|
|
52
39
|
scope: "global",
|
|
53
40
|
},
|
|
54
41
|
{
|
|
55
|
-
id: "
|
|
56
|
-
name: "
|
|
57
|
-
description: "",
|
|
58
|
-
schema: "input AddRefInput {\n id: OID!\n value: String!\n}",
|
|
59
|
-
template: "",
|
|
60
|
-
reducer: "",
|
|
61
|
-
errors: [],
|
|
62
|
-
examples: [],
|
|
63
|
-
scope: "global",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: "581o1DMt70KKGjJ2r71DvorNcXA=",
|
|
67
|
-
name: "EDIT_REF",
|
|
42
|
+
id: "a++9qKPt5DBpAB/T6dHeJLFLUnA=",
|
|
43
|
+
name: "EDIT_PAYMENT_DATA",
|
|
68
44
|
description: "",
|
|
69
|
-
schema: "input
|
|
45
|
+
schema: "input EditPaymentDataInput {\n id: OID!\n processorRef: String\n paymentDate: DateTime\n txnRef: String\n confirmed: Boolean!\n issue: String\n}",
|
|
70
46
|
template: "",
|
|
71
47
|
reducer: "",
|
|
72
48
|
errors: [],
|
|
@@ -74,10 +50,10 @@ export const documentModel = {
|
|
|
74
50
|
scope: "global",
|
|
75
51
|
},
|
|
76
52
|
{
|
|
77
|
-
id: "
|
|
78
|
-
name: "
|
|
79
|
-
description: "",
|
|
80
|
-
schema: "input
|
|
53
|
+
id: "GcKc8GFnD3w7M1fdwxBXrGBwCRM=",
|
|
54
|
+
name: "SET_EXPORTED_DATA",
|
|
55
|
+
description: "Set exported line items in CSV format with timestamp to track exports",
|
|
56
|
+
schema: "input SetExportedDataInput {\n timestamp: DateTime!\n exportedLineItems: [[String!]!]! \n}",
|
|
81
57
|
template: "",
|
|
82
58
|
reducer: "",
|
|
83
59
|
errors: [],
|
|
@@ -85,21 +61,10 @@ export const documentModel = {
|
|
|
85
61
|
scope: "global",
|
|
86
62
|
},
|
|
87
63
|
{
|
|
88
|
-
id: "
|
|
89
|
-
name: "
|
|
64
|
+
id: "1bd3e06e-2be9-4655-88cb-81f02547f9bf",
|
|
65
|
+
name: "ADD_PAYMENT",
|
|
90
66
|
description: "",
|
|
91
|
-
schema: "input
|
|
92
|
-
template: "",
|
|
93
|
-
reducer: "",
|
|
94
|
-
errors: [],
|
|
95
|
-
examples: [],
|
|
96
|
-
scope: "global",
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
id: "GcKc8GFnD3w7M1fdwxBXrGBwCRM=",
|
|
100
|
-
name: "SET_EXPORTED",
|
|
101
|
-
description: "Set to true once payment data has been exported through a csv export",
|
|
102
|
-
schema: "input SetExportedInput {\n exported: Boolean\n}",
|
|
67
|
+
schema: "input AddPaymentInput {\n id: OID!\n processorRef: String\n paymentDate: DateTime\n txnRef: String\n confirmed: Boolean!\n issue: String\n}",
|
|
103
68
|
template: "",
|
|
104
69
|
reducer: "",
|
|
105
70
|
errors: [],
|
|
@@ -243,7 +208,159 @@ export const documentModel = {
|
|
|
243
208
|
},
|
|
244
209
|
],
|
|
245
210
|
},
|
|
211
|
+
{
|
|
212
|
+
id: "0af3e43f-8233-4d95-862f-70f1d54fe1dd",
|
|
213
|
+
name: "transitions",
|
|
214
|
+
description: "",
|
|
215
|
+
operations: [
|
|
216
|
+
{
|
|
217
|
+
id: "f516b9e3-4b47-4b49-955c-6e907778e186",
|
|
218
|
+
name: "CANCEL",
|
|
219
|
+
description: "",
|
|
220
|
+
schema: 'input CancelInput {\n "Add your inputs here"\n _placeholder: String\n}',
|
|
221
|
+
template: "",
|
|
222
|
+
reducer: "",
|
|
223
|
+
errors: [],
|
|
224
|
+
examples: [],
|
|
225
|
+
scope: "global",
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
id: "261d8f6d-6d70-4c99-99aa-7717d22d08c3",
|
|
229
|
+
name: "ISSUE",
|
|
230
|
+
description: "",
|
|
231
|
+
schema: "input IssueInput {\n invoiceNo: String!\n dateIssued: String!\n}",
|
|
232
|
+
template: "",
|
|
233
|
+
reducer: "",
|
|
234
|
+
errors: [],
|
|
235
|
+
examples: [],
|
|
236
|
+
scope: "global",
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: "05bf4cc9-7772-481a-8d0f-1471ffaa4287",
|
|
240
|
+
name: "RESET",
|
|
241
|
+
description: "",
|
|
242
|
+
schema: 'input ResetInput {\n "Add your inputs here"\n _placeholder: String\n}',
|
|
243
|
+
template: "",
|
|
244
|
+
reducer: "",
|
|
245
|
+
errors: [],
|
|
246
|
+
examples: [],
|
|
247
|
+
scope: "global",
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
id: "0ae43a1e-e4a8-4a2e-aedc-e5e10a426de5",
|
|
251
|
+
name: "REJECT",
|
|
252
|
+
description: "",
|
|
253
|
+
schema: "input RejectInput {\n id: OID! # New Rejection ID\n reason: String!\n final: Boolean!\n}",
|
|
254
|
+
template: "",
|
|
255
|
+
reducer: "",
|
|
256
|
+
errors: [],
|
|
257
|
+
examples: [],
|
|
258
|
+
scope: "global",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
id: "54a3fd38-abac-48d7-9cd1-2def01a15f93",
|
|
262
|
+
name: "ACCEPT",
|
|
263
|
+
description: "",
|
|
264
|
+
schema: "input AcceptInput {\n payAfter: DateTime\n}",
|
|
265
|
+
template: "",
|
|
266
|
+
reducer: "",
|
|
267
|
+
errors: [],
|
|
268
|
+
examples: [],
|
|
269
|
+
scope: "global",
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: "14566620-08db-4f56-84e7-96c30049dd33",
|
|
273
|
+
name: "REINSTATE",
|
|
274
|
+
description: "",
|
|
275
|
+
schema: 'input ReinstateInput {\n "Add your inputs here"\n _placeholder: String\n}',
|
|
276
|
+
template: "",
|
|
277
|
+
reducer: "",
|
|
278
|
+
errors: [],
|
|
279
|
+
examples: [],
|
|
280
|
+
scope: "global",
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
id: "e5df6e79-1398-4e9b-baeb-11957882f47d",
|
|
284
|
+
name: "SCHEDULE_PAYMENT",
|
|
285
|
+
description: "",
|
|
286
|
+
schema: "input SchedulePaymentInput {\n id: OID! # New Payment ID\n processorRef: String!\n}",
|
|
287
|
+
template: "",
|
|
288
|
+
reducer: "",
|
|
289
|
+
errors: [],
|
|
290
|
+
examples: [],
|
|
291
|
+
scope: "global",
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
id: "96849e73-c8ed-4726-b523-29e03cd3fd29",
|
|
295
|
+
name: "REAPPROVE_PAYMENT",
|
|
296
|
+
description: "",
|
|
297
|
+
schema: 'input ReapprovePaymentInput {\n "Add your inputs here"\n _placeholder: String\n}',
|
|
298
|
+
template: "",
|
|
299
|
+
reducer: "",
|
|
300
|
+
errors: [],
|
|
301
|
+
examples: [],
|
|
302
|
+
scope: "global",
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: "f5dabccc-4055-4c0a-b650-c5b2e7f37ac5",
|
|
306
|
+
name: "REGISTER_PAYMENT_TX",
|
|
307
|
+
description: "",
|
|
308
|
+
schema: "input RegisterPaymentTxInput {\n id: OID! # Payment ID\n timestamp: DateTime!\n txRef: String!\n}",
|
|
309
|
+
template: "",
|
|
310
|
+
reducer: "",
|
|
311
|
+
errors: [],
|
|
312
|
+
examples: [],
|
|
313
|
+
scope: "global",
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
id: "562df495-9d22-4293-be78-e5258713d620",
|
|
317
|
+
name: "REPORT_PAYMENT_ISSUE",
|
|
318
|
+
description: "",
|
|
319
|
+
schema: "input ReportPaymentIssueInput {\n id: OID! # Payment ID\n issue: String!\n}",
|
|
320
|
+
template: "",
|
|
321
|
+
reducer: "",
|
|
322
|
+
errors: [],
|
|
323
|
+
examples: [],
|
|
324
|
+
scope: "global",
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
id: "8f374198-3588-487d-8833-b29790caeab0",
|
|
328
|
+
name: "CONFIRM_PAYMENT",
|
|
329
|
+
description: "",
|
|
330
|
+
schema: "input ConfirmPaymentInput {\n id: OID! # Payment ID\n amount: Float!\n}",
|
|
331
|
+
template: "",
|
|
332
|
+
reducer: "",
|
|
333
|
+
errors: [],
|
|
334
|
+
examples: [],
|
|
335
|
+
scope: "global",
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
id: "13d337eb-8a4f-44e4-b5f5-83c5287e7360",
|
|
339
|
+
name: "CLOSE_PAYMENT",
|
|
340
|
+
description: "",
|
|
341
|
+
schema: "input ClosePaymentInput {\n closureReason: ClosureReasonInput\n}\n\nenum ClosureReasonInput {\n UNDERPAID\n OVERPAID\n CANCELLED\n}",
|
|
342
|
+
template: "",
|
|
343
|
+
reducer: "",
|
|
344
|
+
errors: [],
|
|
345
|
+
examples: [],
|
|
346
|
+
scope: "global",
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
},
|
|
246
350
|
],
|
|
351
|
+
state: {
|
|
352
|
+
global: {
|
|
353
|
+
examples: [],
|
|
354
|
+
initialValue: '"{\\n \\"invoiceNo\\": \\"\\",\\n \\"dateIssued\\": \\"\\",\\n \\"dateDue\\": \\"\\",\\n \\"dateDelivered\\": null,\\n \\"payAfter\\": null,\\n \\"status\\": \\"DRAFT\\",\\n \\"issuer\\": {\\n \\"id\\": null,\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"contactInfo\\": {\\n \\"tel\\": \\"\\",\\n \\"email\\": \\"\\"\\n },\\n \\"country\\": \\"\\",\\n \\"paymentRouting\\": {\\n \\"bank\\": {\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"ABA\\": \\"\\",\\n \\"BIC\\": \\"\\",\\n \\"SWIFT\\": \\"\\",\\n \\"accountNum\\": \\"\\",\\n \\"accountType\\": \\"CHECKING\\",\\n \\"beneficiary\\": \\"\\",\\n \\"intermediaryBank\\": {\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"ABA\\": \\"\\",\\n \\"BIC\\": \\"\\",\\n \\"SWIFT\\": \\"\\",\\n \\"accountNum\\": \\"\\",\\n \\"accountType\\": \\"CHECKING\\",\\n \\"beneficiary\\": \\"\\",\\n \\"memo\\": \\"\\"\\n },\\n \\"memo\\": \\"\\"\\n },\\n \\"wallet\\": {\\n \\"rpc\\": \\"\\",\\n \\"chainName\\": \\"\\",\\n \\"chainId\\": \\"\\",\\n \\"address\\": \\"\\"\\n }\\n }\\n },\\n \\"payer\\": {\\n \\"id\\": null,\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"contactInfo\\": {\\n \\"tel\\": \\"\\",\\n \\"email\\": \\"\\"\\n },\\n \\"country\\": \\"\\",\\n \\"paymentRouting\\": {\\n \\"bank\\": {\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"ABA\\": \\"\\",\\n \\"BIC\\": \\"\\",\\n \\"SWIFT\\": \\"\\",\\n \\"accountNum\\": \\"\\",\\n \\"accountType\\": \\"CHECKING\\",\\n \\"beneficiary\\": \\"\\",\\n \\"intermediaryBank\\": {\\n \\"name\\": \\"\\",\\n \\"address\\": {\\n \\"streetAddress\\": \\"\\",\\n \\"extendedAddress\\": \\"\\",\\n \\"city\\": \\"\\",\\n \\"postalCode\\": \\"\\",\\n \\"country\\": \\"\\",\\n \\"stateProvince\\": \\"\\"\\n },\\n \\"ABA\\": \\"\\",\\n \\"BIC\\": \\"\\",\\n \\"SWIFT\\": \\"\\",\\n \\"accountNum\\": \\"\\",\\n \\"accountType\\": \\"CHECKING\\",\\n \\"beneficiary\\": \\"\\",\\n \\"memo\\": \\"\\"\\n },\\n \\"memo\\": \\"\\"\\n },\\n \\"wallet\\": {\\n \\"rpc\\": \\"\\",\\n \\"chainName\\": \\"\\",\\n \\"chainId\\": \\"\\",\\n \\"address\\": \\"\\"\\n }\\n }\\n },\\n \\"currency\\": \\"\\",\\n \\"lineItems\\": [],\\n \\"totalPriceTaxExcl\\": 0,\\n \\"totalPriceTaxIncl\\": 0,\\n \\"notes\\": null,\\n \\"invoiceTags\\": [],\\n \\"rejections\\": [],\\n \\"payments\\": [],\\n \\"exported\\": []\\n}"',
|
|
355
|
+
schema: 'type InvoiceState {\n status: Status!\n invoiceNo: String!\n dateIssued: Date!\n dateDue: Date!\n dateDelivered: Date\n issuer: LegalEntity!\n payer: LegalEntity!\n currency: String!\n lineItems: [InvoiceLineItem!]!\n totalPriceTaxExcl: Float!\n totalPriceTaxIncl: Float!\n notes: String\n rejections: [Rejection!]!\n payments: [Payment!]!\n payAfter: DateTime\n invoiceTags: [InvoiceTag!]! # e.g. {\'xero-payment-account\', \'090\', \'PowerhouseUSD\'}\n exported: ExportedData\n closureReason: ClosureReason\n}\n\nenum ClosureReason {\n UNDERPAID\n OVERPAID\n CANCELLED\n}\n\ntype Rejection {\n id: OID!\n reason: String!\n final: Boolean!\n}\n\ntype ExportedData {\n timestamp: DateTime! # ISO 8601 timestamp of the export\n exportedLineItems: [[String!]!]! # CSV Format\n}\n\ntype Payment {\n id: OID!\n processorRef: String\n paymentDate: DateTime\n txnRef: String\n confirmed: Boolean!\n issue: String\n amount: Float\n}\n\ntype Token {\n evmAddress: String\n symbol: String\n chainName: String\n chainId: String\n rpc: String\n}\n\ntype LegalEntity {\n id: LegalEntityId\n name: String\n address: Address\n contactInfo: ContactInfo\n country: String\n paymentRouting: PaymentRouting\n}\n\ntype Address {\n streetAddress: String\n extendedAddress: String\n city: String\n postalCode: String\n country: String\n stateProvince: String\n}\n\ntype ContactInfo {\n tel: String\n email: String\n}\n\ntype PaymentRouting {\n bank: Bank\n wallet: InvoiceWallet\n}\n\ntype Bank {\n name: String!\n address: Address!\n ABA: String\n BIC: String\n SWIFT: String\n accountNum: String!\n accountType: InvoiceAccountType\n beneficiary: String\n intermediaryBank: IntermediaryBank\n memo: String\n}\n\ntype IntermediaryBank {\n name: String!\n address: Address!\n ABA: String\n BIC: String\n SWIFT: String\n accountNum: String!\n accountType: InvoiceAccountType\n beneficiary: String\n memo: String\n}\n\ntype InvoiceWallet {\n rpc: String\n chainName: String\n chainId: String\n address: String\n}\n\ntype InvoiceLineItem {\n id: OID!\n description: String!\n taxPercent: Float!\n quantity: Float!\n currency: String!\n unitPriceTaxExcl: Float!\n unitPriceTaxIncl: Float!\n totalPriceTaxExcl: Float!\n totalPriceTaxIncl: Float!\n lineItemTag: [InvoiceTag!]\n}\n\ntype InvoiceTag {\n dimension: String! # "xero-expense-account", "xero-payment-account", "accounting-period", ...\n value: String! # "627", ..., "090", ..., "2025/05", "2025/Q1", ...\n label: String # "Marketing", ..., "Business Bank", ..., "May 2025"\n}\n\nunion LegalEntityId = LegalEntityTaxId | LegalEntityCorporateRegistrationId\n\ntype LegalEntityTaxId {\n taxId: String!\n}\n\ntype LegalEntityCorporateRegistrationId {\n corpRegId: String!\n}\n\nenum Status {\n DRAFT\n ISSUED\n CANCELLED\n ACCEPTED\n REJECTED\n PAYMENTSCHEDULED\n PAYMENTSENT\n PAYMENTISSUE\n PAYMENTRECEIVED\n PAYMENTCLOSED\n}\n\nenum InvoiceAccountType {\n CHECKING\n SAVINGS\n TRUST\n WALLET\n}\n\nenum InvoiceAccountTypeInput {\n CHECKING\n SAVINGS\n TRUST\n WALLET\n}',
|
|
356
|
+
},
|
|
357
|
+
local: {
|
|
358
|
+
examples: [],
|
|
359
|
+
initialValue: '""',
|
|
360
|
+
schema: "",
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
version: 1,
|
|
247
364
|
},
|
|
248
365
|
],
|
|
249
366
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type BaseAction } from "document-model";
|
|
2
|
-
import type { EditInvoiceInput, EditStatusInput,
|
|
2
|
+
import type { EditInvoiceInput, EditStatusInput, EditPaymentDataInput, SetExportedDataInput, AddPaymentInput } from "../types.js";
|
|
3
3
|
export type EditInvoiceAction = BaseAction<"EDIT_INVOICE", EditInvoiceInput, "global">;
|
|
4
4
|
export type EditStatusAction = BaseAction<"EDIT_STATUS", EditStatusInput, "global">;
|
|
5
|
-
export type AddRefAction = BaseAction<"ADD_REF", AddRefInput, "global">;
|
|
6
|
-
export type EditRefAction = BaseAction<"EDIT_REF", EditRefInput, "global">;
|
|
7
|
-
export type DeleteRefAction = BaseAction<"DELETE_REF", DeleteRefInput, "global">;
|
|
8
5
|
export type EditPaymentDataAction = BaseAction<"EDIT_PAYMENT_DATA", EditPaymentDataInput, "global">;
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
6
|
+
export type SetExportedDataAction = BaseAction<"SET_EXPORTED_DATA", SetExportedDataInput, "global">;
|
|
7
|
+
export type AddPaymentAction = BaseAction<"ADD_PAYMENT", AddPaymentInput, "global">;
|
|
8
|
+
export type InvoiceGeneralAction = EditInvoiceAction | EditStatusAction | EditPaymentDataAction | SetExportedDataAction | AddPaymentAction;
|
|
11
9
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/general/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/general/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,iBAAiB,GAAG,UAAU,CACxC,cAAc,EACd,gBAAgB,EAChB,QAAQ,CACT,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,UAAU,CACvC,aAAa,EACb,eAAe,EACf,QAAQ,CACT,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAC5C,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,CACT,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAC5C,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,CACT,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,UAAU,CACvC,aAAa,EACb,eAAe,EACf,QAAQ,CACT,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,iBAAiB,GACjB,gBAAgB,GAChB,qBAAqB,GACrB,qBAAqB,GACrB,gBAAgB,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { type EditInvoiceInput, type EditStatusInput, type
|
|
2
|
-
import { type EditInvoiceAction, type EditStatusAction, type
|
|
1
|
+
import { type EditInvoiceInput, type EditStatusInput, type EditPaymentDataInput, type SetExportedDataInput, type AddPaymentInput } from "../types.js";
|
|
2
|
+
import { type EditInvoiceAction, type EditStatusAction, type EditPaymentDataAction, type SetExportedDataAction, type AddPaymentAction } from "./actions.js";
|
|
3
3
|
export declare const editInvoice: (input: EditInvoiceInput) => EditInvoiceAction;
|
|
4
4
|
export declare const editStatus: (input: EditStatusInput) => EditStatusAction;
|
|
5
|
-
export declare const addRef: (input: AddRefInput) => AddRefAction;
|
|
6
|
-
export declare const editRef: (input: EditRefInput) => EditRefAction;
|
|
7
|
-
export declare const deleteRef: (input: DeleteRefInput) => DeleteRefAction;
|
|
8
5
|
export declare const editPaymentData: (input: EditPaymentDataInput) => EditPaymentDataAction;
|
|
9
|
-
export declare const
|
|
6
|
+
export declare const setExportedData: (input: SetExportedDataInput) => SetExportedDataAction;
|
|
7
|
+
export declare const addPayment: (input: AddPaymentInput) => AddPaymentAction;
|
|
10
8
|
//# sourceMappingURL=creators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/general/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/general/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,sBAOhD,CAAC;AAEJ,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,qBAO9C,CAAC;AAEJ,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,0BAOxD,CAAC;AAEJ,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,0BAOxD,CAAC;AAEJ,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,qBAO9C,CAAC"}
|
|
@@ -2,8 +2,6 @@ import { createAction } from "document-model";
|
|
|
2
2
|
import { z, } from "../types.js";
|
|
3
3
|
export const editInvoice = (input) => createAction("EDIT_INVOICE", { ...input }, undefined, z.EditInvoiceInputSchema, "global");
|
|
4
4
|
export const editStatus = (input) => createAction("EDIT_STATUS", { ...input }, undefined, z.EditStatusInputSchema, "global");
|
|
5
|
-
export const addRef = (input) => createAction("ADD_REF", { ...input }, undefined, z.AddRefInputSchema, "global");
|
|
6
|
-
export const editRef = (input) => createAction("EDIT_REF", { ...input }, undefined, z.EditRefInputSchema, "global");
|
|
7
|
-
export const deleteRef = (input) => createAction("DELETE_REF", { ...input }, undefined, z.DeleteRefInputSchema, "global");
|
|
8
5
|
export const editPaymentData = (input) => createAction("EDIT_PAYMENT_DATA", { ...input }, undefined, z.EditPaymentDataInputSchema, "global");
|
|
9
|
-
export const
|
|
6
|
+
export const setExportedData = (input) => createAction("SET_EXPORTED_DATA", { ...input }, undefined, z.SetExportedDataInputSchema, "global");
|
|
7
|
+
export const addPayment = (input) => createAction("ADD_PAYMENT", { ...input }, undefined, z.AddPaymentInputSchema, "global");
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { BaseDocumentClass } from "document-model";
|
|
2
|
-
import { type EditInvoiceInput, type EditStatusInput, type
|
|
2
|
+
import { type EditInvoiceInput, type EditStatusInput, type EditPaymentDataInput, type SetExportedDataInput, type AddPaymentInput, type InvoiceState, type InvoiceLocalState } from "../types.js";
|
|
3
3
|
import { type InvoiceAction } from "../actions.js";
|
|
4
4
|
export default class Invoice_General extends BaseDocumentClass<InvoiceState, InvoiceLocalState, InvoiceAction> {
|
|
5
5
|
editInvoice(input: EditInvoiceInput): this;
|
|
6
6
|
editStatus(input: EditStatusInput): this;
|
|
7
|
-
addRef(input: AddRefInput): this;
|
|
8
|
-
editRef(input: EditRefInput): this;
|
|
9
|
-
deleteRef(input: DeleteRefInput): this;
|
|
10
7
|
editPaymentData(input: EditPaymentDataInput): this;
|
|
11
|
-
|
|
8
|
+
setExportedData(input: SetExportedDataInput): this;
|
|
9
|
+
addPayment(input: AddPaymentInput): this;
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=object.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/general/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/general/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,aAAa,CAAC;AAQrB,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,iBAAiB,CAC5D,YAAY,EACZ,iBAAiB,EACjB,aAAa,CACd;IACQ,WAAW,CAAC,KAAK,EAAE,gBAAgB;IAInC,UAAU,CAAC,KAAK,EAAE,eAAe;IAIjC,eAAe,CAAC,KAAK,EAAE,oBAAoB;IAI3C,eAAe,CAAC,KAAK,EAAE,oBAAoB;IAI3C,UAAU,CAAC,KAAK,EAAE,eAAe;CAGzC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseDocumentClass } from "document-model";
|
|
2
|
-
import { editInvoice, editStatus,
|
|
2
|
+
import { editInvoice, editStatus, editPaymentData, setExportedData, addPayment, } from "./creators.js";
|
|
3
3
|
export default class Invoice_General extends BaseDocumentClass {
|
|
4
4
|
editInvoice(input) {
|
|
5
5
|
return this.dispatch(editInvoice(input));
|
|
@@ -7,19 +7,13 @@ export default class Invoice_General extends BaseDocumentClass {
|
|
|
7
7
|
editStatus(input) {
|
|
8
8
|
return this.dispatch(editStatus(input));
|
|
9
9
|
}
|
|
10
|
-
addRef(input) {
|
|
11
|
-
return this.dispatch(addRef(input));
|
|
12
|
-
}
|
|
13
|
-
editRef(input) {
|
|
14
|
-
return this.dispatch(editRef(input));
|
|
15
|
-
}
|
|
16
|
-
deleteRef(input) {
|
|
17
|
-
return this.dispatch(deleteRef(input));
|
|
18
|
-
}
|
|
19
10
|
editPaymentData(input) {
|
|
20
11
|
return this.dispatch(editPaymentData(input));
|
|
21
12
|
}
|
|
22
|
-
|
|
23
|
-
return this.dispatch(
|
|
13
|
+
setExportedData(input) {
|
|
14
|
+
return this.dispatch(setExportedData(input));
|
|
15
|
+
}
|
|
16
|
+
addPayment(input) {
|
|
17
|
+
return this.dispatch(addPayment(input));
|
|
24
18
|
}
|
|
25
19
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type SignalDispatch } from "document-model";
|
|
2
|
-
import { type EditInvoiceAction, type EditStatusAction, type
|
|
2
|
+
import { type EditInvoiceAction, type EditStatusAction, type EditPaymentDataAction, type SetExportedDataAction, type AddPaymentAction } from "./actions.js";
|
|
3
3
|
import { type InvoiceState } from "../types.js";
|
|
4
4
|
export interface InvoiceGeneralOperations {
|
|
5
5
|
editInvoiceOperation: (state: InvoiceState, action: EditInvoiceAction, dispatch?: SignalDispatch) => void;
|
|
6
6
|
editStatusOperation: (state: InvoiceState, action: EditStatusAction, dispatch?: SignalDispatch) => void;
|
|
7
|
-
addRefOperation: (state: InvoiceState, action: AddRefAction, dispatch?: SignalDispatch) => void;
|
|
8
|
-
editRefOperation: (state: InvoiceState, action: EditRefAction, dispatch?: SignalDispatch) => void;
|
|
9
|
-
deleteRefOperation: (state: InvoiceState, action: DeleteRefAction, dispatch?: SignalDispatch) => void;
|
|
10
7
|
editPaymentDataOperation: (state: InvoiceState, action: EditPaymentDataAction, dispatch?: SignalDispatch) => void;
|
|
11
|
-
|
|
8
|
+
setExportedDataOperation: (state: InvoiceState, action: SetExportedDataAction, dispatch?: SignalDispatch) => void;
|
|
9
|
+
addPaymentOperation: (state: InvoiceState, action: AddPaymentAction, dispatch?: SignalDispatch) => void;
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/general/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/general/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,wBAAwB;IACvC,oBAAoB,EAAE,CACpB,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,iBAAiB,EACzB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,mBAAmB,EAAE,CACnB,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,gBAAgB,EACxB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,wBAAwB,EAAE,CACxB,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,wBAAwB,EAAE,CACxB,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,mBAAmB,EAAE,CACnB,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,gBAAgB,EACxB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;CACX"}
|
|
@@ -4,10 +4,12 @@ import { type InvoiceAction } from "./actions.js";
|
|
|
4
4
|
import Invoice_General from "./general/object.js";
|
|
5
5
|
import Invoice_Parties from "./parties/object.js";
|
|
6
6
|
import Invoice_Items from "./items/object.js";
|
|
7
|
+
import Invoice_Transitions from "./transitions/object.js";
|
|
7
8
|
export * from "./general/object.js";
|
|
8
9
|
export * from "./parties/object.js";
|
|
9
10
|
export * from "./items/object.js";
|
|
10
|
-
|
|
11
|
+
export * from "./transitions/object.js";
|
|
12
|
+
interface Invoice extends Invoice_General, Invoice_Parties, Invoice_Items, Invoice_Transitions {
|
|
11
13
|
}
|
|
12
14
|
declare class Invoice extends BaseDocumentClass<InvoiceState, InvoiceLocalState, InvoiceAction> {
|
|
13
15
|
static fileExtension: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/object.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,aAAa,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/object.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAE1D,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AAGxC,UAAU,OACR,SAAQ,eAAe,EACrB,eAAe,EACf,aAAa,EACb,mBAAmB;CAAG;AAG1B,cAAM,OAAQ,SAAQ,iBAAiB,CACrC,YAAY,EACZ,iBAAiB,EACjB,aAAa,CACd;IACC,MAAM,CAAC,aAAa,SAAW;gBAG7B,YAAY,CAAC,EAAE,OAAO,CACpB,aAAa,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAC3E,EACD,QAAQ,CAAC,EAAE,cAAc;IAKpB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAItC,YAAY,CAAC,IAAI,EAAE,MAAM;WAInB,QAAQ,CAAC,IAAI,EAAE,MAAM;CAKnC;AASD,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -4,9 +4,11 @@ import utils from "./utils.js";
|
|
|
4
4
|
import Invoice_General from "./general/object.js";
|
|
5
5
|
import Invoice_Parties from "./parties/object.js";
|
|
6
6
|
import Invoice_Items from "./items/object.js";
|
|
7
|
+
import Invoice_Transitions from "./transitions/object.js";
|
|
7
8
|
export * from "./general/object.js";
|
|
8
9
|
export * from "./parties/object.js";
|
|
9
10
|
export * from "./items/object.js";
|
|
11
|
+
export * from "./transitions/object.js";
|
|
10
12
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
|
11
13
|
class Invoice extends BaseDocumentClass {
|
|
12
14
|
static fileExtension = ".phdm";
|
|
@@ -25,5 +27,10 @@ class Invoice extends BaseDocumentClass {
|
|
|
25
27
|
return document;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
|
-
applyMixins(Invoice, [
|
|
30
|
+
applyMixins(Invoice, [
|
|
31
|
+
Invoice_General,
|
|
32
|
+
Invoice_Parties,
|
|
33
|
+
Invoice_Items,
|
|
34
|
+
Invoice_Transitions,
|
|
35
|
+
]);
|
|
29
36
|
export { Invoice };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/reducer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,eAAe,EAAK,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/gen/reducer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,eAAe,EAAK,MAAM,YAAY,CAAC;AAsOrD,eAAO,MAAM,OAAO,mDAA+C,CAAC"}
|