dao-treasury 0.0.32__cp312-cp312-win32.whl → 0.0.33__cp312-cp312-win32.whl

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.
Files changed (28) hide show
  1. bf2b4fe1f86ad2ea158b__mypyc.cp312-win32.pyd +0 -0
  2. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +31 -5
  3. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +5 -10
  4. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +13 -13
  5. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +834 -0
  6. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +25 -428
  7. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +491 -0
  8. dao_treasury/_docker.cp312-win32.pyd +0 -0
  9. dao_treasury/_nicknames.cp312-win32.pyd +0 -0
  10. dao_treasury/_wallet.cp312-win32.pyd +0 -0
  11. dao_treasury/constants.cp312-win32.pyd +0 -0
  12. dao_treasury/db.py +58 -31
  13. dao_treasury/sorting/__init__.cp312-win32.pyd +0 -0
  14. dao_treasury/sorting/__init__.py +109 -6
  15. dao_treasury/sorting/_matchers.cp312-win32.pyd +0 -0
  16. dao_treasury/sorting/_rules.cp312-win32.pyd +0 -0
  17. dao_treasury/sorting/factory.cp312-win32.pyd +0 -0
  18. dao_treasury/sorting/rule.cp312-win32.pyd +0 -0
  19. dao_treasury/sorting/rules/__init__.cp312-win32.pyd +0 -0
  20. dao_treasury/sorting/rules/ignore/__init__.cp312-win32.pyd +0 -0
  21. dao_treasury/sorting/rules/ignore/llamapay.cp312-win32.pyd +0 -0
  22. dao_treasury/streams/__init__.cp312-win32.pyd +0 -0
  23. dao_treasury/streams/llamapay.cp312-win32.pyd +0 -0
  24. dao_treasury/types.cp312-win32.pyd +0 -0
  25. {dao_treasury-0.0.32.dist-info → dao_treasury-0.0.33.dist-info}/METADATA +2 -2
  26. {dao_treasury-0.0.32.dist-info → dao_treasury-0.0.33.dist-info}/RECORD +28 -26
  27. {dao_treasury-0.0.32.dist-info → dao_treasury-0.0.33.dist-info}/WHEEL +0 -0
  28. {dao_treasury-0.0.32.dist-info → dao_treasury-0.0.33.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,834 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": {
7
+ "type": "grafana",
8
+ "uid": "-- Grafana --"
9
+ },
10
+ "enable": true,
11
+ "hide": true,
12
+ "iconColor": "rgba(0, 211, 255, 1)",
13
+ "name": "Annotations & Alerts",
14
+ "type": "dashboard"
15
+ }
16
+ ]
17
+ },
18
+ "editable": true,
19
+ "fiscalYearStartMonth": 0,
20
+ "graphTooltip": 1,
21
+ "links": [],
22
+ "liveNow": false,
23
+ "panels": [
24
+ {
25
+ "datasource": "SQLite",
26
+ "fieldConfig": {
27
+ "defaults": {
28
+ "color": {
29
+ "mode": "thresholds"
30
+ },
31
+ "mappings": [],
32
+ "thresholds": {
33
+ "mode": "absolute",
34
+ "steps": [
35
+ {
36
+ "color": "green",
37
+ "value": null
38
+ },
39
+ {
40
+ "color": "red",
41
+ "value": 80
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ "overrides": []
47
+ },
48
+ "gridPos": {
49
+ "h": 4,
50
+ "w": 4,
51
+ "x": 0,
52
+ "y": 0
53
+ },
54
+ "id": 1,
55
+ "options": {
56
+ "colorMode": "value",
57
+ "graphMode": "area",
58
+ "justifyMode": "auto",
59
+ "orientation": "auto",
60
+ "reduceOptions": {
61
+ "calcs": [
62
+ "lastNotNull"
63
+ ],
64
+ "fields": "",
65
+ "values": false
66
+ },
67
+ "textMode": "auto"
68
+ },
69
+ "pluginVersion": "10.2.0",
70
+ "targets": [
71
+ {
72
+ "datasource": "SQLite",
73
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
74
+ "queryType": "table",
75
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
76
+ "refId": "A",
77
+ "timeColumns": [
78
+ "time",
79
+ "ts"
80
+ ]
81
+ }
82
+ ],
83
+ "title": "Revenue",
84
+ "type": "stat"
85
+ },
86
+ {
87
+ "datasource": "SQLite",
88
+ "fieldConfig": {
89
+ "defaults": {
90
+ "color": {
91
+ "mode": "thresholds"
92
+ },
93
+ "mappings": [],
94
+ "thresholds": {
95
+ "mode": "absolute",
96
+ "steps": [
97
+ {
98
+ "color": "green",
99
+ "value": null
100
+ },
101
+ {
102
+ "color": "red",
103
+ "value": 80
104
+ }
105
+ ]
106
+ }
107
+ },
108
+ "overrides": []
109
+ },
110
+ "gridPos": {
111
+ "h": 4,
112
+ "w": 4,
113
+ "x": 4,
114
+ "y": 0
115
+ },
116
+ "id": 2,
117
+ "options": {
118
+ "colorMode": "value",
119
+ "graphMode": "area",
120
+ "justifyMode": "auto",
121
+ "orientation": "auto",
122
+ "reduceOptions": {
123
+ "calcs": [
124
+ "lastNotNull"
125
+ ],
126
+ "fields": "",
127
+ "values": false
128
+ },
129
+ "textMode": "auto"
130
+ },
131
+ "pluginVersion": "10.2.0",
132
+ "targets": [
133
+ {
134
+ "datasource": "SQLite",
135
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
136
+ "queryType": "table",
137
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
138
+ "refId": "A",
139
+ "timeColumns": [
140
+ "time",
141
+ "ts"
142
+ ]
143
+ }
144
+ ],
145
+ "title": "Expenses",
146
+ "type": "stat"
147
+ },
148
+ {
149
+ "datasource": "SQLite",
150
+ "fieldConfig": {
151
+ "defaults": {
152
+ "color": {
153
+ "mode": "thresholds"
154
+ },
155
+ "mappings": [],
156
+ "thresholds": {
157
+ "mode": "absolute",
158
+ "steps": [
159
+ {
160
+ "color": "green",
161
+ "value": null
162
+ },
163
+ {
164
+ "color": "red",
165
+ "value": 80
166
+ }
167
+ ]
168
+ }
169
+ },
170
+ "overrides": []
171
+ },
172
+ "gridPos": {
173
+ "h": 4,
174
+ "w": 4,
175
+ "x": 8,
176
+ "y": 0
177
+ },
178
+ "id": 3,
179
+ "options": {
180
+ "colorMode": "value",
181
+ "graphMode": "area",
182
+ "justifyMode": "auto",
183
+ "orientation": "auto",
184
+ "reduceOptions": {
185
+ "calcs": [
186
+ "lastNotNull"
187
+ ],
188
+ "fields": "",
189
+ "values": false
190
+ },
191
+ "textMode": "auto"
192
+ },
193
+ "pluginVersion": "10.2.0",
194
+ "targets": [
195
+ {
196
+ "datasource": "SQLite",
197
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
198
+ "queryType": "table",
199
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
200
+ "refId": "A",
201
+ "timeColumns": [
202
+ "time",
203
+ "ts"
204
+ ]
205
+ }
206
+ ],
207
+ "title": "Cost of Revenue",
208
+ "type": "stat"
209
+ },
210
+ {
211
+ "datasource": "SQLite",
212
+ "fieldConfig": {
213
+ "defaults": {
214
+ "color": {
215
+ "mode": "thresholds"
216
+ },
217
+ "mappings": [],
218
+ "thresholds": {
219
+ "mode": "absolute",
220
+ "steps": [
221
+ {
222
+ "color": "green",
223
+ "value": null
224
+ },
225
+ {
226
+ "color": "red",
227
+ "value": 80
228
+ }
229
+ ]
230
+ }
231
+ },
232
+ "overrides": []
233
+ },
234
+ "gridPos": {
235
+ "h": 4,
236
+ "w": 4,
237
+ "x": 12,
238
+ "y": 0
239
+ },
240
+ "id": 4,
241
+ "options": {
242
+ "colorMode": "value",
243
+ "graphMode": "area",
244
+ "justifyMode": "auto",
245
+ "orientation": "auto",
246
+ "reduceOptions": {
247
+ "calcs": [
248
+ "lastNotNull"
249
+ ],
250
+ "fields": "",
251
+ "values": false
252
+ },
253
+ "textMode": "auto"
254
+ },
255
+ "pluginVersion": "10.2.0",
256
+ "targets": [
257
+ {
258
+ "datasource": "SQLite",
259
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
260
+ "queryType": "table",
261
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
262
+ "refId": "A",
263
+ "timeColumns": [
264
+ "time",
265
+ "ts"
266
+ ]
267
+ }
268
+ ],
269
+ "title": "Other Income",
270
+ "type": "stat"
271
+ },
272
+ {
273
+ "datasource": "SQLite",
274
+ "fieldConfig": {
275
+ "defaults": {
276
+ "color": {
277
+ "mode": "thresholds"
278
+ },
279
+ "mappings": [],
280
+ "thresholds": {
281
+ "mode": "absolute",
282
+ "steps": [
283
+ {
284
+ "color": "green",
285
+ "value": null
286
+ },
287
+ {
288
+ "color": "red",
289
+ "value": 80
290
+ }
291
+ ]
292
+ }
293
+ },
294
+ "overrides": []
295
+ },
296
+ "gridPos": {
297
+ "h": 4,
298
+ "w": 4,
299
+ "x": 16,
300
+ "y": 0
301
+ },
302
+ "id": 5,
303
+ "options": {
304
+ "colorMode": "value",
305
+ "graphMode": "area",
306
+ "justifyMode": "auto",
307
+ "orientation": "auto",
308
+ "reduceOptions": {
309
+ "calcs": [
310
+ "lastNotNull"
311
+ ],
312
+ "fields": "",
313
+ "values": false
314
+ },
315
+ "textMode": "auto"
316
+ },
317
+ "pluginVersion": "10.2.0",
318
+ "targets": [
319
+ {
320
+ "datasource": "SQLite",
321
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
322
+ "queryType": "table",
323
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
324
+ "refId": "A",
325
+ "timeColumns": [
326
+ "time",
327
+ "ts"
328
+ ]
329
+ }
330
+ ],
331
+ "title": "Other Expenses",
332
+ "type": "stat"
333
+ },
334
+ {
335
+ "datasource": "SQLite",
336
+ "description": "",
337
+ "fieldConfig": {
338
+ "defaults": {
339
+ "color": {
340
+ "mode": "thresholds"
341
+ },
342
+ "mappings": [],
343
+ "thresholds": {
344
+ "mode": "absolute",
345
+ "steps": [
346
+ {
347
+ "color": "green",
348
+ "value": null
349
+ },
350
+ {
351
+ "color": "red",
352
+ "value": 80
353
+ }
354
+ ]
355
+ }
356
+ },
357
+ "overrides": []
358
+ },
359
+ "gridPos": {
360
+ "h": 4,
361
+ "w": 4,
362
+ "x": 20,
363
+ "y": 0
364
+ },
365
+ "id": 10,
366
+ "options": {
367
+ "colorMode": "value",
368
+ "graphMode": "area",
369
+ "justifyMode": "auto",
370
+ "orientation": "auto",
371
+ "reduceOptions": {
372
+ "calcs": [
373
+ "lastNotNull"
374
+ ],
375
+ "fields": "",
376
+ "values": false
377
+ },
378
+ "textMode": "auto"
379
+ },
380
+ "pluginVersion": "10.2.0",
381
+ "targets": [
382
+ {
383
+ "datasource": "SQLite",
384
+ "queryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
385
+ "queryType": "table",
386
+ "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
387
+ "refId": "A",
388
+ "timeColumns": [
389
+ "time",
390
+ "ts"
391
+ ]
392
+ }
393
+ ],
394
+ "title": "Sorted Total",
395
+ "type": "stat"
396
+ },
397
+ {
398
+ "datasource": "SQLite",
399
+ "description": "",
400
+ "fieldConfig": {
401
+ "defaults": {
402
+ "color": {
403
+ "mode": "palette-classic"
404
+ },
405
+ "custom": {
406
+ "axisBorderShow": false,
407
+ "axisCenteredZero": false,
408
+ "axisColorMode": "text",
409
+ "axisLabel": "",
410
+ "axisPlacement": "auto",
411
+ "barAlignment": 0,
412
+ "drawStyle": "bars",
413
+ "fillOpacity": 70,
414
+ "gradientMode": "none",
415
+ "hideFrom": {
416
+ "legend": false,
417
+ "tooltip": false,
418
+ "viz": false
419
+ },
420
+ "insertNulls": false,
421
+ "lineInterpolation": "linear",
422
+ "lineWidth": 1,
423
+ "pointSize": 5,
424
+ "scaleDistribution": {
425
+ "type": "linear"
426
+ },
427
+ "showPoints": "auto",
428
+ "spanNulls": false,
429
+ "stacking": {
430
+ "group": "A",
431
+ "mode": "normal"
432
+ },
433
+ "thresholdsStyle": {
434
+ "mode": "off"
435
+ }
436
+ },
437
+ "mappings": [],
438
+ "thresholds": {
439
+ "mode": "absolute",
440
+ "steps": [
441
+ {
442
+ "color": "green",
443
+ "value": null
444
+ },
445
+ {
446
+ "color": "red",
447
+ "value": 80
448
+ }
449
+ ]
450
+ }
451
+ },
452
+ "overrides": [
453
+ {
454
+ "matcher": {
455
+ "id": "byName",
456
+ "options": "Net (sum)"
457
+ },
458
+ "properties": [
459
+ {
460
+ "id": "custom.drawStyle",
461
+ "value": "line"
462
+ },
463
+ {
464
+ "id": "custom.stacking",
465
+ "value": {
466
+ "group": "A",
467
+ "mode": "none"
468
+ }
469
+ },
470
+ {
471
+ "id": "custom.fillOpacity",
472
+ "value": 19
473
+ }
474
+ ]
475
+ }
476
+ ]
477
+ },
478
+ "gridPos": {
479
+ "h": 12,
480
+ "w": 20,
481
+ "x": 0,
482
+ "y": 4
483
+ },
484
+ "id": 11,
485
+ "options": {
486
+ "legend": {
487
+ "calcs": [],
488
+ "displayMode": "list",
489
+ "placement": "bottom",
490
+ "showLegend": true
491
+ },
492
+ "tooltip": {
493
+ "mode": "single",
494
+ "sort": "none"
495
+ }
496
+ },
497
+ "targets": [
498
+ {
499
+ "datasource": "SQLite",
500
+ "queryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) AS \"Total Received\", SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Sent\", SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) AS \"Net\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
501
+ "queryType": "table",
502
+ "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) AS \"Total Received\", SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Sent\", SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) AS \"Net\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
503
+ "refId": "A",
504
+ "timeColumns": [
505
+ "timestamp"
506
+ ]
507
+ }
508
+ ],
509
+ "title": "Weekly Cashflow",
510
+ "transformations": [
511
+ {
512
+ "id": "formatTime",
513
+ "options": {
514
+ "outputFormat": "YYYY-WW",
515
+ "timeField": "timestamp",
516
+ "timezone": "browser",
517
+ "useTimezone": true
518
+ }
519
+ },
520
+ {
521
+ "id": "convertFieldType",
522
+ "options": {
523
+ "conversions": [
524
+ {
525
+ "destinationType": "time",
526
+ "targetField": "timestamp"
527
+ }
528
+ ],
529
+ "fields": {}
530
+ }
531
+ },
532
+ {
533
+ "id": "groupBy",
534
+ "options": {
535
+ "fields": {
536
+ "Cost of Revenue": {
537
+ "aggregations": [
538
+ "sum"
539
+ ],
540
+ "operation": "aggregate"
541
+ },
542
+ "Expenses": {
543
+ "aggregations": [
544
+ "sum"
545
+ ],
546
+ "operation": "aggregate"
547
+ },
548
+ "Net": {
549
+ "aggregations": [
550
+ "sum"
551
+ ],
552
+ "operation": "aggregate"
553
+ },
554
+ "Net (Including Unsorted)": {
555
+ "aggregations": [
556
+ "sum"
557
+ ],
558
+ "operation": "aggregate"
559
+ },
560
+ "Other Expenses": {
561
+ "aggregations": [
562
+ "sum"
563
+ ],
564
+ "operation": "aggregate"
565
+ },
566
+ "Other Income": {
567
+ "aggregations": [
568
+ "sum"
569
+ ],
570
+ "operation": "aggregate"
571
+ },
572
+ "Revenue": {
573
+ "aggregations": [
574
+ "sum"
575
+ ],
576
+ "operation": "aggregate"
577
+ },
578
+ "Timestamp": {
579
+ "aggregations": [],
580
+ "operation": "groupby"
581
+ },
582
+ "Total Expenses": {
583
+ "aggregations": [
584
+ "sum"
585
+ ],
586
+ "operation": "aggregate"
587
+ },
588
+ "Total Expenses (Including Unsorted)": {
589
+ "aggregations": [
590
+ "sum"
591
+ ],
592
+ "operation": "aggregate"
593
+ },
594
+ "Total Received": {
595
+ "aggregations": [
596
+ "sum"
597
+ ],
598
+ "operation": "aggregate"
599
+ },
600
+ "Total Revenue": {
601
+ "aggregations": [
602
+ "sum"
603
+ ],
604
+ "operation": "aggregate"
605
+ },
606
+ "Total Revenue (Including Unsorted)": {
607
+ "aggregations": [
608
+ "sum"
609
+ ],
610
+ "operation": "aggregate"
611
+ },
612
+ "Total Sent": {
613
+ "aggregations": [
614
+ "sum"
615
+ ],
616
+ "operation": "aggregate"
617
+ },
618
+ "timestamp": {
619
+ "aggregations": [],
620
+ "operation": "groupby"
621
+ }
622
+ }
623
+ }
624
+ }
625
+ ],
626
+ "type": "timeseries"
627
+ },
628
+ {
629
+ "datasource": "SQLite",
630
+ "description": "",
631
+ "fieldConfig": {
632
+ "defaults": {
633
+ "color": {
634
+ "mode": "thresholds"
635
+ },
636
+ "mappings": [],
637
+ "thresholds": {
638
+ "mode": "absolute",
639
+ "steps": [
640
+ {
641
+ "color": "green",
642
+ "value": null
643
+ },
644
+ {
645
+ "color": "red",
646
+ "value": 80
647
+ }
648
+ ]
649
+ }
650
+ },
651
+ "overrides": []
652
+ },
653
+ "gridPos": {
654
+ "h": 4,
655
+ "w": 4,
656
+ "x": 20,
657
+ "y": 4
658
+ },
659
+ "id": 8,
660
+ "options": {
661
+ "colorMode": "value",
662
+ "graphMode": "area",
663
+ "justifyMode": "auto",
664
+ "orientation": "auto",
665
+ "reduceOptions": {
666
+ "calcs": [
667
+ "lastNotNull"
668
+ ],
669
+ "fields": "",
670
+ "values": false
671
+ },
672
+ "textMode": "auto"
673
+ },
674
+ "pluginVersion": "10.2.0",
675
+ "targets": [
676
+ {
677
+ "datasource": "SQLite",
678
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Inbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
679
+ "queryType": "table",
680
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Inbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
681
+ "refId": "A",
682
+ "timeColumns": [
683
+ "time",
684
+ "ts"
685
+ ]
686
+ }
687
+ ],
688
+ "title": "Unsorted (Inbound)",
689
+ "type": "stat"
690
+ },
691
+ {
692
+ "datasource": "SQLite",
693
+ "description": "",
694
+ "fieldConfig": {
695
+ "defaults": {
696
+ "color": {
697
+ "mode": "thresholds"
698
+ },
699
+ "mappings": [],
700
+ "thresholds": {
701
+ "mode": "absolute",
702
+ "steps": [
703
+ {
704
+ "color": "green",
705
+ "value": null
706
+ },
707
+ {
708
+ "color": "red",
709
+ "value": 80
710
+ }
711
+ ]
712
+ }
713
+ },
714
+ "overrides": []
715
+ },
716
+ "gridPos": {
717
+ "h": 4,
718
+ "w": 4,
719
+ "x": 20,
720
+ "y": 8
721
+ },
722
+ "id": 9,
723
+ "options": {
724
+ "colorMode": "value",
725
+ "graphMode": "area",
726
+ "justifyMode": "auto",
727
+ "orientation": "auto",
728
+ "reduceOptions": {
729
+ "calcs": [
730
+ "lastNotNull"
731
+ ],
732
+ "fields": "",
733
+ "values": false
734
+ },
735
+ "textMode": "auto"
736
+ },
737
+ "pluginVersion": "10.2.0",
738
+ "targets": [
739
+ {
740
+ "datasource": "SQLite",
741
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Outbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
742
+ "queryType": "table",
743
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Outbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
744
+ "refId": "A",
745
+ "timeColumns": [
746
+ "time",
747
+ "ts"
748
+ ]
749
+ }
750
+ ],
751
+ "title": "Unsorted (Outbound)",
752
+ "type": "stat"
753
+ },
754
+ {
755
+ "datasource": "SQLite",
756
+ "description": "",
757
+ "fieldConfig": {
758
+ "defaults": {
759
+ "color": {
760
+ "mode": "thresholds"
761
+ },
762
+ "mappings": [],
763
+ "thresholds": {
764
+ "mode": "absolute",
765
+ "steps": [
766
+ {
767
+ "color": "green",
768
+ "value": null
769
+ },
770
+ {
771
+ "color": "red",
772
+ "value": 80
773
+ }
774
+ ]
775
+ }
776
+ },
777
+ "overrides": []
778
+ },
779
+ "gridPos": {
780
+ "h": 4,
781
+ "w": 4,
782
+ "x": 20,
783
+ "y": 12
784
+ },
785
+ "id": 6,
786
+ "options": {
787
+ "colorMode": "value",
788
+ "graphMode": "area",
789
+ "justifyMode": "auto",
790
+ "orientation": "auto",
791
+ "reduceOptions": {
792
+ "calcs": [
793
+ "lastNotNull"
794
+ ],
795
+ "fields": "",
796
+ "values": false
797
+ },
798
+ "textMode": "auto"
799
+ },
800
+ "pluginVersion": "10.2.0",
801
+ "targets": [
802
+ {
803
+ "datasource": "SQLite",
804
+ "queryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Sort Me (Inbound)' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Sort Me (Outbound)' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
805
+ "queryType": "table",
806
+ "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Sort Me (Inbound)' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Sort Me (Outbound)' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
807
+ "refId": "A",
808
+ "timeColumns": [
809
+ "time",
810
+ "ts"
811
+ ]
812
+ }
813
+ ],
814
+ "title": "Total",
815
+ "type": "stat"
816
+ }
817
+ ],
818
+ "refresh": "",
819
+ "schemaVersion": 38,
820
+ "tags": [],
821
+ "templating": {
822
+ "list": []
823
+ },
824
+ "time": {
825
+ "from": "now-6M",
826
+ "to": "now"
827
+ },
828
+ "timepicker": {},
829
+ "timezone": "",
830
+ "title": "Total Cashflow Summary (Including Unsorted)",
831
+ "uid": "2b6e7c1d-8f4a-4e3b-9b2a-1c7d8e9f0a2b",
832
+ "version": 1,
833
+ "weekStart": ""
834
+ }