@arcforgelabs/flow 0.0.0-stage → 2026.10.18

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.
@@ -0,0 +1,642 @@
1
+ {
2
+ "id": "93116c9a-d944-486f-957e-ffa168760f73",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.contacts": {
8
+ "name": "contacts",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "organisation_id": {
19
+ "name": "organisation_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "kind": {
25
+ "name": "kind",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "name": {
31
+ "name": "name",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "email": {
37
+ "name": "email",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": false
41
+ },
42
+ "created_at": {
43
+ "name": "created_at",
44
+ "type": "timestamp with time zone",
45
+ "primaryKey": false,
46
+ "notNull": true,
47
+ "default": "now()"
48
+ }
49
+ },
50
+ "indexes": {},
51
+ "foreignKeys": {
52
+ "contacts_organisation_id_organisations_id_fk": {
53
+ "name": "contacts_organisation_id_organisations_id_fk",
54
+ "tableFrom": "contacts",
55
+ "tableTo": "organisations",
56
+ "columnsFrom": [
57
+ "organisation_id"
58
+ ],
59
+ "columnsTo": [
60
+ "id"
61
+ ],
62
+ "onDelete": "no action",
63
+ "onUpdate": "no action"
64
+ }
65
+ },
66
+ "compositePrimaryKeys": {},
67
+ "uniqueConstraints": {
68
+ "contacts_org_id": {
69
+ "name": "contacts_org_id",
70
+ "nullsNotDistinct": false,
71
+ "columns": [
72
+ "organisation_id",
73
+ "id"
74
+ ]
75
+ },
76
+ "contacts_org_kind_name": {
77
+ "name": "contacts_org_kind_name",
78
+ "nullsNotDistinct": false,
79
+ "columns": [
80
+ "organisation_id",
81
+ "kind",
82
+ "name"
83
+ ]
84
+ }
85
+ },
86
+ "policies": {},
87
+ "checkConstraints": {
88
+ "contacts_kind_valid": {
89
+ "name": "contacts_kind_valid",
90
+ "value": "\"contacts\".\"kind\" in ('customer', 'supplier')"
91
+ }
92
+ },
93
+ "isRLSEnabled": false
94
+ },
95
+ "public.invoice_lines": {
96
+ "name": "invoice_lines",
97
+ "schema": "",
98
+ "columns": {
99
+ "id": {
100
+ "name": "id",
101
+ "type": "uuid",
102
+ "primaryKey": true,
103
+ "notNull": true,
104
+ "default": "gen_random_uuid()"
105
+ },
106
+ "organisation_id": {
107
+ "name": "organisation_id",
108
+ "type": "uuid",
109
+ "primaryKey": false,
110
+ "notNull": true
111
+ },
112
+ "invoice_id": {
113
+ "name": "invoice_id",
114
+ "type": "uuid",
115
+ "primaryKey": false,
116
+ "notNull": true
117
+ },
118
+ "position": {
119
+ "name": "position",
120
+ "type": "integer",
121
+ "primaryKey": false,
122
+ "notNull": true
123
+ },
124
+ "price_item_id": {
125
+ "name": "price_item_id",
126
+ "type": "uuid",
127
+ "primaryKey": false,
128
+ "notNull": false
129
+ },
130
+ "description": {
131
+ "name": "description",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true
135
+ },
136
+ "quantity": {
137
+ "name": "quantity",
138
+ "type": "integer",
139
+ "primaryKey": false,
140
+ "notNull": true
141
+ },
142
+ "unit_amount_cents": {
143
+ "name": "unit_amount_cents",
144
+ "type": "integer",
145
+ "primaryKey": false,
146
+ "notNull": true
147
+ },
148
+ "tax_code": {
149
+ "name": "tax_code",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": true
153
+ },
154
+ "line_amount_cents": {
155
+ "name": "line_amount_cents",
156
+ "type": "integer",
157
+ "primaryKey": false,
158
+ "notNull": true
159
+ },
160
+ "tax_cents": {
161
+ "name": "tax_cents",
162
+ "type": "integer",
163
+ "primaryKey": false,
164
+ "notNull": true
165
+ }
166
+ },
167
+ "indexes": {},
168
+ "foreignKeys": {
169
+ "invoice_lines_invoice_same_org": {
170
+ "name": "invoice_lines_invoice_same_org",
171
+ "tableFrom": "invoice_lines",
172
+ "tableTo": "invoices",
173
+ "columnsFrom": [
174
+ "organisation_id",
175
+ "invoice_id"
176
+ ],
177
+ "columnsTo": [
178
+ "organisation_id",
179
+ "id"
180
+ ],
181
+ "onDelete": "cascade",
182
+ "onUpdate": "no action"
183
+ },
184
+ "invoice_lines_price_item_same_org": {
185
+ "name": "invoice_lines_price_item_same_org",
186
+ "tableFrom": "invoice_lines",
187
+ "tableTo": "price_items",
188
+ "columnsFrom": [
189
+ "organisation_id",
190
+ "price_item_id"
191
+ ],
192
+ "columnsTo": [
193
+ "organisation_id",
194
+ "id"
195
+ ],
196
+ "onDelete": "no action",
197
+ "onUpdate": "no action"
198
+ }
199
+ },
200
+ "compositePrimaryKeys": {},
201
+ "uniqueConstraints": {
202
+ "invoice_lines_invoice_position": {
203
+ "name": "invoice_lines_invoice_position",
204
+ "nullsNotDistinct": false,
205
+ "columns": [
206
+ "invoice_id",
207
+ "position"
208
+ ]
209
+ }
210
+ },
211
+ "policies": {},
212
+ "checkConstraints": {
213
+ "invoice_lines_quantity_positive": {
214
+ "name": "invoice_lines_quantity_positive",
215
+ "value": "\"invoice_lines\".\"quantity\" > 0"
216
+ },
217
+ "invoice_lines_tax_code_valid": {
218
+ "name": "invoice_lines_tax_code_valid",
219
+ "value": "\"invoice_lines\".\"tax_code\" in ('GST', 'GST_FREE')"
220
+ }
221
+ },
222
+ "isRLSEnabled": false
223
+ },
224
+ "public.invoice_versions": {
225
+ "name": "invoice_versions",
226
+ "schema": "",
227
+ "columns": {
228
+ "id": {
229
+ "name": "id",
230
+ "type": "uuid",
231
+ "primaryKey": true,
232
+ "notNull": true,
233
+ "default": "gen_random_uuid()"
234
+ },
235
+ "organisation_id": {
236
+ "name": "organisation_id",
237
+ "type": "uuid",
238
+ "primaryKey": false,
239
+ "notNull": true
240
+ },
241
+ "invoice_id": {
242
+ "name": "invoice_id",
243
+ "type": "uuid",
244
+ "primaryKey": false,
245
+ "notNull": true
246
+ },
247
+ "version": {
248
+ "name": "version",
249
+ "type": "integer",
250
+ "primaryKey": false,
251
+ "notNull": true
252
+ },
253
+ "issued_at": {
254
+ "name": "issued_at",
255
+ "type": "timestamp with time zone",
256
+ "primaryKey": false,
257
+ "notNull": true,
258
+ "default": "now()"
259
+ },
260
+ "issued_by": {
261
+ "name": "issued_by",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "document": {
267
+ "name": "document",
268
+ "type": "jsonb",
269
+ "primaryKey": false,
270
+ "notNull": true
271
+ }
272
+ },
273
+ "indexes": {},
274
+ "foreignKeys": {
275
+ "invoice_versions_invoice_same_org": {
276
+ "name": "invoice_versions_invoice_same_org",
277
+ "tableFrom": "invoice_versions",
278
+ "tableTo": "invoices",
279
+ "columnsFrom": [
280
+ "organisation_id",
281
+ "invoice_id"
282
+ ],
283
+ "columnsTo": [
284
+ "organisation_id",
285
+ "id"
286
+ ],
287
+ "onDelete": "no action",
288
+ "onUpdate": "no action"
289
+ }
290
+ },
291
+ "compositePrimaryKeys": {},
292
+ "uniqueConstraints": {
293
+ "invoice_versions_invoice_version": {
294
+ "name": "invoice_versions_invoice_version",
295
+ "nullsNotDistinct": false,
296
+ "columns": [
297
+ "invoice_id",
298
+ "version"
299
+ ]
300
+ }
301
+ },
302
+ "policies": {},
303
+ "checkConstraints": {
304
+ "invoice_versions_version_positive": {
305
+ "name": "invoice_versions_version_positive",
306
+ "value": "\"invoice_versions\".\"version\" > 0"
307
+ }
308
+ },
309
+ "isRLSEnabled": false
310
+ },
311
+ "public.invoices": {
312
+ "name": "invoices",
313
+ "schema": "",
314
+ "columns": {
315
+ "id": {
316
+ "name": "id",
317
+ "type": "uuid",
318
+ "primaryKey": true,
319
+ "notNull": true,
320
+ "default": "gen_random_uuid()"
321
+ },
322
+ "organisation_id": {
323
+ "name": "organisation_id",
324
+ "type": "uuid",
325
+ "primaryKey": false,
326
+ "notNull": true
327
+ },
328
+ "contact_id": {
329
+ "name": "contact_id",
330
+ "type": "uuid",
331
+ "primaryKey": false,
332
+ "notNull": true
333
+ },
334
+ "number": {
335
+ "name": "number",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": false
339
+ },
340
+ "status": {
341
+ "name": "status",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": true,
345
+ "default": "'draft'"
346
+ },
347
+ "issued_version": {
348
+ "name": "issued_version",
349
+ "type": "integer",
350
+ "primaryKey": false,
351
+ "notNull": true,
352
+ "default": 0
353
+ },
354
+ "reference": {
355
+ "name": "reference",
356
+ "type": "text",
357
+ "primaryKey": false,
358
+ "notNull": false
359
+ },
360
+ "currency": {
361
+ "name": "currency",
362
+ "type": "text",
363
+ "primaryKey": false,
364
+ "notNull": true,
365
+ "default": "'AUD'"
366
+ },
367
+ "issue_date": {
368
+ "name": "issue_date",
369
+ "type": "date",
370
+ "primaryKey": false,
371
+ "notNull": false
372
+ },
373
+ "due_date": {
374
+ "name": "due_date",
375
+ "type": "date",
376
+ "primaryKey": false,
377
+ "notNull": false
378
+ },
379
+ "subtotal_cents": {
380
+ "name": "subtotal_cents",
381
+ "type": "integer",
382
+ "primaryKey": false,
383
+ "notNull": true,
384
+ "default": 0
385
+ },
386
+ "tax_cents": {
387
+ "name": "tax_cents",
388
+ "type": "integer",
389
+ "primaryKey": false,
390
+ "notNull": true,
391
+ "default": 0
392
+ },
393
+ "total_cents": {
394
+ "name": "total_cents",
395
+ "type": "integer",
396
+ "primaryKey": false,
397
+ "notNull": true,
398
+ "default": 0
399
+ },
400
+ "created_at": {
401
+ "name": "created_at",
402
+ "type": "timestamp with time zone",
403
+ "primaryKey": false,
404
+ "notNull": true,
405
+ "default": "now()"
406
+ },
407
+ "updated_at": {
408
+ "name": "updated_at",
409
+ "type": "timestamp with time zone",
410
+ "primaryKey": false,
411
+ "notNull": true,
412
+ "default": "now()"
413
+ }
414
+ },
415
+ "indexes": {},
416
+ "foreignKeys": {
417
+ "invoices_organisation_id_organisations_id_fk": {
418
+ "name": "invoices_organisation_id_organisations_id_fk",
419
+ "tableFrom": "invoices",
420
+ "tableTo": "organisations",
421
+ "columnsFrom": [
422
+ "organisation_id"
423
+ ],
424
+ "columnsTo": [
425
+ "id"
426
+ ],
427
+ "onDelete": "no action",
428
+ "onUpdate": "no action"
429
+ },
430
+ "invoices_contact_same_org": {
431
+ "name": "invoices_contact_same_org",
432
+ "tableFrom": "invoices",
433
+ "tableTo": "contacts",
434
+ "columnsFrom": [
435
+ "organisation_id",
436
+ "contact_id"
437
+ ],
438
+ "columnsTo": [
439
+ "organisation_id",
440
+ "id"
441
+ ],
442
+ "onDelete": "no action",
443
+ "onUpdate": "no action"
444
+ }
445
+ },
446
+ "compositePrimaryKeys": {},
447
+ "uniqueConstraints": {
448
+ "invoices_org_id": {
449
+ "name": "invoices_org_id",
450
+ "nullsNotDistinct": false,
451
+ "columns": [
452
+ "organisation_id",
453
+ "id"
454
+ ]
455
+ },
456
+ "invoices_org_number": {
457
+ "name": "invoices_org_number",
458
+ "nullsNotDistinct": false,
459
+ "columns": [
460
+ "organisation_id",
461
+ "number"
462
+ ]
463
+ }
464
+ },
465
+ "policies": {},
466
+ "checkConstraints": {
467
+ "invoices_status_valid": {
468
+ "name": "invoices_status_valid",
469
+ "value": "\"invoices\".\"status\" in ('draft', 'issued', 'void')"
470
+ },
471
+ "invoices_issued_has_number": {
472
+ "name": "invoices_issued_has_number",
473
+ "value": "\"invoices\".\"status\" = 'draft' or \"invoices\".\"number\" is not null"
474
+ }
475
+ },
476
+ "isRLSEnabled": false
477
+ },
478
+ "public.organisations": {
479
+ "name": "organisations",
480
+ "schema": "",
481
+ "columns": {
482
+ "id": {
483
+ "name": "id",
484
+ "type": "uuid",
485
+ "primaryKey": true,
486
+ "notNull": true,
487
+ "default": "gen_random_uuid()"
488
+ },
489
+ "name": {
490
+ "name": "name",
491
+ "type": "text",
492
+ "primaryKey": false,
493
+ "notNull": true
494
+ },
495
+ "invoice_prefix": {
496
+ "name": "invoice_prefix",
497
+ "type": "text",
498
+ "primaryKey": false,
499
+ "notNull": true,
500
+ "default": "'INV-'"
501
+ },
502
+ "next_invoice_number": {
503
+ "name": "next_invoice_number",
504
+ "type": "integer",
505
+ "primaryKey": false,
506
+ "notNull": true,
507
+ "default": 1
508
+ },
509
+ "created_at": {
510
+ "name": "created_at",
511
+ "type": "timestamp with time zone",
512
+ "primaryKey": false,
513
+ "notNull": true,
514
+ "default": "now()"
515
+ }
516
+ },
517
+ "indexes": {},
518
+ "foreignKeys": {},
519
+ "compositePrimaryKeys": {},
520
+ "uniqueConstraints": {},
521
+ "policies": {},
522
+ "checkConstraints": {
523
+ "organisations_next_invoice_number_positive": {
524
+ "name": "organisations_next_invoice_number_positive",
525
+ "value": "\"organisations\".\"next_invoice_number\" > 0"
526
+ }
527
+ },
528
+ "isRLSEnabled": false
529
+ },
530
+ "public.price_items": {
531
+ "name": "price_items",
532
+ "schema": "",
533
+ "columns": {
534
+ "id": {
535
+ "name": "id",
536
+ "type": "uuid",
537
+ "primaryKey": true,
538
+ "notNull": true,
539
+ "default": "gen_random_uuid()"
540
+ },
541
+ "organisation_id": {
542
+ "name": "organisation_id",
543
+ "type": "uuid",
544
+ "primaryKey": false,
545
+ "notNull": true
546
+ },
547
+ "code": {
548
+ "name": "code",
549
+ "type": "text",
550
+ "primaryKey": false,
551
+ "notNull": true
552
+ },
553
+ "name": {
554
+ "name": "name",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true
558
+ },
559
+ "unit_amount_cents": {
560
+ "name": "unit_amount_cents",
561
+ "type": "integer",
562
+ "primaryKey": false,
563
+ "notNull": true
564
+ },
565
+ "tax_code": {
566
+ "name": "tax_code",
567
+ "type": "text",
568
+ "primaryKey": false,
569
+ "notNull": true,
570
+ "default": "'GST'"
571
+ },
572
+ "archived_at": {
573
+ "name": "archived_at",
574
+ "type": "timestamp with time zone",
575
+ "primaryKey": false,
576
+ "notNull": false
577
+ },
578
+ "created_at": {
579
+ "name": "created_at",
580
+ "type": "timestamp with time zone",
581
+ "primaryKey": false,
582
+ "notNull": true,
583
+ "default": "now()"
584
+ }
585
+ },
586
+ "indexes": {},
587
+ "foreignKeys": {
588
+ "price_items_organisation_id_organisations_id_fk": {
589
+ "name": "price_items_organisation_id_organisations_id_fk",
590
+ "tableFrom": "price_items",
591
+ "tableTo": "organisations",
592
+ "columnsFrom": [
593
+ "organisation_id"
594
+ ],
595
+ "columnsTo": [
596
+ "id"
597
+ ],
598
+ "onDelete": "no action",
599
+ "onUpdate": "no action"
600
+ }
601
+ },
602
+ "compositePrimaryKeys": {},
603
+ "uniqueConstraints": {
604
+ "price_items_org_id": {
605
+ "name": "price_items_org_id",
606
+ "nullsNotDistinct": false,
607
+ "columns": [
608
+ "organisation_id",
609
+ "id"
610
+ ]
611
+ },
612
+ "price_items_org_code": {
613
+ "name": "price_items_org_code",
614
+ "nullsNotDistinct": false,
615
+ "columns": [
616
+ "organisation_id",
617
+ "code"
618
+ ]
619
+ }
620
+ },
621
+ "policies": {},
622
+ "checkConstraints": {
623
+ "price_items_tax_code_valid": {
624
+ "name": "price_items_tax_code_valid",
625
+ "value": "\"price_items\".\"tax_code\" in ('GST', 'GST_FREE')"
626
+ }
627
+ },
628
+ "isRLSEnabled": false
629
+ }
630
+ },
631
+ "enums": {},
632
+ "schemas": {},
633
+ "sequences": {},
634
+ "roles": {},
635
+ "policies": {},
636
+ "views": {},
637
+ "_meta": {
638
+ "columns": {},
639
+ "schemas": {},
640
+ "tables": {}
641
+ }
642
+ }