@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
|
@@ -4,28 +4,51 @@ export const schema = gql `
|
|
|
4
4
|
Subgraph definition for Invoice (powerhouse/invoice)
|
|
5
5
|
"""
|
|
6
6
|
type InvoiceState {
|
|
7
|
-
invoiceNo: String!
|
|
8
|
-
dateIssued: String!
|
|
9
|
-
dateDue: String!
|
|
10
|
-
dateDelivered: String
|
|
11
7
|
status: Status!
|
|
12
|
-
|
|
8
|
+
invoiceNo: String!
|
|
9
|
+
dateIssued: Date!
|
|
10
|
+
dateDue: Date!
|
|
11
|
+
dateDelivered: Date
|
|
13
12
|
issuer: LegalEntity!
|
|
14
13
|
payer: LegalEntity!
|
|
15
14
|
currency: String!
|
|
16
15
|
lineItems: [InvoiceLineItem!]!
|
|
17
16
|
totalPriceTaxExcl: Float!
|
|
18
17
|
totalPriceTaxIncl: Float!
|
|
19
|
-
invoiceTags: [InvoiceTag!]! # e.g. {'xero-payment-account', '090', 'PowerhouseUSD'}
|
|
20
18
|
notes: String
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
rejections: [Rejection!]!
|
|
20
|
+
payments: [Payment!]!
|
|
21
|
+
payAfter: DateTime
|
|
22
|
+
invoiceTags: [InvoiceTag!]! # e.g. {'xero-payment-account', '090', 'PowerhouseUSD'}
|
|
23
|
+
exported: ExportedData
|
|
24
|
+
closureReason: ClosureReason
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
enum ClosureReason {
|
|
28
|
+
UNDERPAID
|
|
29
|
+
OVERPAID
|
|
30
|
+
CANCELLED
|
|
24
31
|
}
|
|
25
32
|
|
|
26
|
-
type
|
|
33
|
+
type Rejection {
|
|
27
34
|
id: OID!
|
|
28
|
-
|
|
35
|
+
reason: String!
|
|
36
|
+
final: Boolean!
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type ExportedData {
|
|
40
|
+
timestamp: DateTime! # ISO 8601 timestamp of the export
|
|
41
|
+
exportedLineItems: [[String!]!]! # CSV Format
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
type Payment {
|
|
45
|
+
id: OID!
|
|
46
|
+
processorRef: String
|
|
47
|
+
paymentDate: DateTime
|
|
48
|
+
txnRef: String
|
|
49
|
+
confirmed: Boolean!
|
|
50
|
+
issue: String
|
|
51
|
+
amount: Float
|
|
29
52
|
}
|
|
30
53
|
|
|
31
54
|
type Token {
|
|
@@ -131,11 +154,11 @@ export const schema = gql `
|
|
|
131
154
|
CANCELLED
|
|
132
155
|
ACCEPTED
|
|
133
156
|
REJECTED
|
|
134
|
-
AWAITINGPAYMENT
|
|
135
157
|
PAYMENTSCHEDULED
|
|
136
158
|
PAYMENTSENT
|
|
137
159
|
PAYMENTISSUE
|
|
138
160
|
PAYMENTRECEIVED
|
|
161
|
+
PAYMENTCLOSED
|
|
139
162
|
}
|
|
140
163
|
|
|
141
164
|
enum InvoiceAccountType {
|
|
@@ -180,30 +203,20 @@ export const schema = gql `
|
|
|
180
203
|
docId: PHID
|
|
181
204
|
input: Invoice_EditStatusInput
|
|
182
205
|
): Int
|
|
183
|
-
|
|
184
|
-
driveId: String
|
|
185
|
-
docId: PHID
|
|
186
|
-
input: Invoice_AddRefInput
|
|
187
|
-
): Int
|
|
188
|
-
Invoice_editRef(
|
|
189
|
-
driveId: String
|
|
190
|
-
docId: PHID
|
|
191
|
-
input: Invoice_EditRefInput
|
|
192
|
-
): Int
|
|
193
|
-
Invoice_deleteRef(
|
|
206
|
+
Invoice_editPaymentData(
|
|
194
207
|
driveId: String
|
|
195
208
|
docId: PHID
|
|
196
|
-
input:
|
|
209
|
+
input: Invoice_EditPaymentDataInput
|
|
197
210
|
): Int
|
|
198
|
-
|
|
211
|
+
Invoice_setExportedData(
|
|
199
212
|
driveId: String
|
|
200
213
|
docId: PHID
|
|
201
|
-
input:
|
|
214
|
+
input: Invoice_SetExportedDataInput
|
|
202
215
|
): Int
|
|
203
|
-
|
|
216
|
+
Invoice_addPayment(
|
|
204
217
|
driveId: String
|
|
205
218
|
docId: PHID
|
|
206
|
-
input:
|
|
219
|
+
input: Invoice_AddPaymentInput
|
|
207
220
|
): Int
|
|
208
221
|
Invoice_editIssuer(
|
|
209
222
|
driveId: String
|
|
@@ -260,45 +273,97 @@ export const schema = gql `
|
|
|
260
273
|
docId: PHID
|
|
261
274
|
input: Invoice_SetInvoiceTagInput
|
|
262
275
|
): Int
|
|
276
|
+
Invoice_cancel(
|
|
277
|
+
driveId: String
|
|
278
|
+
docId: PHID
|
|
279
|
+
input: Invoice_CancelInput
|
|
280
|
+
): Int
|
|
281
|
+
Invoice_issue(driveId: String, docId: PHID, input: Invoice_IssueInput): Int
|
|
282
|
+
Invoice_reset(driveId: String, docId: PHID, input: Invoice_ResetInput): Int
|
|
283
|
+
Invoice_reject(
|
|
284
|
+
driveId: String
|
|
285
|
+
docId: PHID
|
|
286
|
+
input: Invoice_RejectInput
|
|
287
|
+
): Int
|
|
288
|
+
Invoice_accept(
|
|
289
|
+
driveId: String
|
|
290
|
+
docId: PHID
|
|
291
|
+
input: Invoice_AcceptInput
|
|
292
|
+
): Int
|
|
293
|
+
Invoice_reinstate(
|
|
294
|
+
driveId: String
|
|
295
|
+
docId: PHID
|
|
296
|
+
input: Invoice_ReinstateInput
|
|
297
|
+
): Int
|
|
298
|
+
Invoice_schedulePayment(
|
|
299
|
+
driveId: String
|
|
300
|
+
docId: PHID
|
|
301
|
+
input: Invoice_SchedulePaymentInput
|
|
302
|
+
): Int
|
|
303
|
+
Invoice_reapprovePayment(
|
|
304
|
+
driveId: String
|
|
305
|
+
docId: PHID
|
|
306
|
+
input: Invoice_ReapprovePaymentInput
|
|
307
|
+
): Int
|
|
308
|
+
Invoice_registerPaymentTx(
|
|
309
|
+
driveId: String
|
|
310
|
+
docId: PHID
|
|
311
|
+
input: Invoice_RegisterPaymentTxInput
|
|
312
|
+
): Int
|
|
313
|
+
Invoice_reportPaymentIssue(
|
|
314
|
+
driveId: String
|
|
315
|
+
docId: PHID
|
|
316
|
+
input: Invoice_ReportPaymentIssueInput
|
|
317
|
+
): Int
|
|
318
|
+
Invoice_confirmPayment(
|
|
319
|
+
driveId: String
|
|
320
|
+
docId: PHID
|
|
321
|
+
input: Invoice_ConfirmPaymentInput
|
|
322
|
+
): Int
|
|
323
|
+
Invoice_closePayment(
|
|
324
|
+
driveId: String
|
|
325
|
+
docId: PHID
|
|
326
|
+
input: Invoice_ClosePaymentInput
|
|
327
|
+
): Int
|
|
328
|
+
Invoice_processGnosisPayment(
|
|
329
|
+
chainName: String!
|
|
330
|
+
paymentDetails: JSON!
|
|
331
|
+
invoiceNo: String!
|
|
332
|
+
): ProcessGnosisPaymentOutput
|
|
333
|
+
Invoice_createRequestFinancePayment(
|
|
334
|
+
paymentData: JSON!
|
|
335
|
+
): CreateRequestFinancePaymentOutput
|
|
263
336
|
Invoice_uploadInvoicePdfChunk(
|
|
264
337
|
chunk: String!
|
|
265
338
|
chunkIndex: Int!
|
|
266
339
|
totalChunks: Int!
|
|
267
340
|
fileName: String!
|
|
268
341
|
sessionId: String!
|
|
269
|
-
):
|
|
270
|
-
Invoice_createRequestFinancePayment(
|
|
271
|
-
paymentData: JSON!
|
|
272
|
-
): CreateRequestFinancePaymentResult!
|
|
273
|
-
Invoice_processGnosisPayment(
|
|
274
|
-
chainName: String!
|
|
275
|
-
paymentDetails: JSON!
|
|
276
|
-
invoiceNo: String!
|
|
277
|
-
): ProcessGnosisPaymentResult
|
|
342
|
+
): UploadInvoicePdfChunkOutput
|
|
278
343
|
}
|
|
279
344
|
|
|
280
345
|
"""
|
|
281
|
-
|
|
346
|
+
Output type for PDF chunk upload
|
|
282
347
|
"""
|
|
283
|
-
type
|
|
348
|
+
type UploadInvoicePdfChunkOutput {
|
|
284
349
|
success: Boolean!
|
|
285
350
|
data: JSON
|
|
286
351
|
error: String
|
|
287
352
|
}
|
|
288
353
|
|
|
289
354
|
"""
|
|
290
|
-
|
|
355
|
+
Output type for request finance payment
|
|
291
356
|
"""
|
|
292
|
-
type
|
|
357
|
+
type CreateRequestFinancePaymentOutput {
|
|
293
358
|
success: Boolean!
|
|
294
359
|
data: JSON
|
|
295
360
|
error: String
|
|
296
361
|
}
|
|
297
362
|
|
|
298
363
|
"""
|
|
299
|
-
|
|
364
|
+
Output type for process gnosis payment
|
|
300
365
|
"""
|
|
301
|
-
type
|
|
366
|
+
type ProcessGnosisPaymentOutput {
|
|
302
367
|
success: Boolean!
|
|
303
368
|
data: JSON
|
|
304
369
|
error: String
|
|
@@ -313,30 +378,31 @@ export const schema = gql `
|
|
|
313
378
|
invoiceNo: String
|
|
314
379
|
dateIssued: String
|
|
315
380
|
dateDue: String
|
|
316
|
-
dateDelivered: String
|
|
317
381
|
currency: String
|
|
318
382
|
notes: String
|
|
319
383
|
}
|
|
320
384
|
input Invoice_EditStatusInput {
|
|
321
385
|
status: Status!
|
|
322
386
|
}
|
|
323
|
-
input
|
|
387
|
+
input Invoice_EditPaymentDataInput {
|
|
324
388
|
id: OID!
|
|
325
|
-
|
|
389
|
+
processorRef: String
|
|
390
|
+
paymentDate: DateTime
|
|
391
|
+
txnRef: String
|
|
392
|
+
confirmed: Boolean!
|
|
393
|
+
issue: String
|
|
326
394
|
}
|
|
327
|
-
input
|
|
328
|
-
|
|
329
|
-
|
|
395
|
+
input Invoice_SetExportedDataInput {
|
|
396
|
+
timestamp: DateTime!
|
|
397
|
+
exportedLineItems: [[String!]!]!
|
|
330
398
|
}
|
|
331
|
-
input
|
|
399
|
+
input Invoice_AddPaymentInput {
|
|
332
400
|
id: OID!
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
input Invoice_SetExportedInput {
|
|
339
|
-
exported: Boolean
|
|
401
|
+
processorRef: String
|
|
402
|
+
paymentDate: DateTime
|
|
403
|
+
txnRef: String
|
|
404
|
+
confirmed: Boolean!
|
|
405
|
+
issue: String
|
|
340
406
|
}
|
|
341
407
|
|
|
342
408
|
"""
|
|
@@ -481,4 +547,62 @@ export const schema = gql `
|
|
|
481
547
|
value: String!
|
|
482
548
|
label: String
|
|
483
549
|
}
|
|
550
|
+
|
|
551
|
+
"""
|
|
552
|
+
Module: Transitions
|
|
553
|
+
"""
|
|
554
|
+
input Invoice_CancelInput {
|
|
555
|
+
"Add your inputs here"
|
|
556
|
+
_placeholder: String
|
|
557
|
+
}
|
|
558
|
+
input Invoice_IssueInput {
|
|
559
|
+
invoiceNo: String!
|
|
560
|
+
dateIssued: String!
|
|
561
|
+
}
|
|
562
|
+
input Invoice_ResetInput {
|
|
563
|
+
"Add your inputs here"
|
|
564
|
+
_placeholder: String
|
|
565
|
+
}
|
|
566
|
+
input Invoice_RejectInput {
|
|
567
|
+
id: OID! # New Rejection ID
|
|
568
|
+
reason: String!
|
|
569
|
+
final: Boolean!
|
|
570
|
+
}
|
|
571
|
+
input Invoice_AcceptInput {
|
|
572
|
+
payAfter: DateTime
|
|
573
|
+
}
|
|
574
|
+
input Invoice_ReinstateInput {
|
|
575
|
+
"Add your inputs here"
|
|
576
|
+
_placeholder: String
|
|
577
|
+
}
|
|
578
|
+
input Invoice_SchedulePaymentInput {
|
|
579
|
+
id: OID! # New Payment ID
|
|
580
|
+
processorRef: String!
|
|
581
|
+
}
|
|
582
|
+
input Invoice_ReapprovePaymentInput {
|
|
583
|
+
"Add your inputs here"
|
|
584
|
+
_placeholder: String
|
|
585
|
+
}
|
|
586
|
+
input Invoice_RegisterPaymentTxInput {
|
|
587
|
+
id: OID! # Payment ID
|
|
588
|
+
timestamp: DateTime!
|
|
589
|
+
txRef: String!
|
|
590
|
+
}
|
|
591
|
+
input Invoice_ReportPaymentIssueInput {
|
|
592
|
+
id: OID! # Payment ID
|
|
593
|
+
issue: String!
|
|
594
|
+
}
|
|
595
|
+
input Invoice_ConfirmPaymentInput {
|
|
596
|
+
id: OID! # Payment ID
|
|
597
|
+
amount: Float!
|
|
598
|
+
}
|
|
599
|
+
input Invoice_ClosePaymentInput {
|
|
600
|
+
closureReason: ClosureReasonInput
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
enum ClosureReasonInput {
|
|
604
|
+
UNDERPAID
|
|
605
|
+
OVERPAID
|
|
606
|
+
CANCELLED
|
|
607
|
+
}
|
|
484
608
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/contributor-billing",
|
|
3
3
|
"description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.34",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|