@happyvertical/smrt-reports 0.36.5

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,1639 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782485442945,
4
+ "packageName": "@happyvertical/smrt-reports",
5
+ "packageVersion": "0.36.5",
6
+ "objects": {
7
+ "@happyvertical/smrt-reports:SmrtReport": {
8
+ "name": "smrtreport",
9
+ "className": "SmrtReport",
10
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReport",
11
+ "collection": "smrtreports",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/report.ts",
13
+ "packageName": "@happyvertical/smrt-reports",
14
+ "fields": {
15
+ "refreshedAt": {
16
+ "type": "datetime",
17
+ "required": false
18
+ }
19
+ },
20
+ "methods": {
21
+ "isStale": {
22
+ "name": "isStale",
23
+ "async": false,
24
+ "parameters": [
25
+ {
26
+ "name": "ttlMs",
27
+ "type": "number",
28
+ "optional": true
29
+ }
30
+ ],
31
+ "returnType": "boolean",
32
+ "isStatic": false,
33
+ "isPublic": true
34
+ },
35
+ "refresh": {
36
+ "name": "refresh",
37
+ "async": true,
38
+ "parameters": [
39
+ {
40
+ "name": "options",
41
+ "type": "Omit<ReportRefreshOptions, 'db'>",
42
+ "optional": true
43
+ }
44
+ ],
45
+ "returnType": "Promise<ReportRefreshResult>",
46
+ "isStatic": false,
47
+ "isPublic": true
48
+ }
49
+ },
50
+ "decoratorConfig": {},
51
+ "extends": "SmrtObject",
52
+ "exportName": "SmrtReport",
53
+ "collectionExportName": "SmrtReportCollection"
54
+ },
55
+ "@happyvertical/smrt-reports:SmrtReportCollection": {
56
+ "name": "smrtreportcollection",
57
+ "className": "SmrtReportCollection",
58
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportCollection",
59
+ "collection": "smrtreports",
60
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/report.ts",
61
+ "packageName": "@happyvertical/smrt-reports",
62
+ "fields": {},
63
+ "methods": {
64
+ "refresh": {
65
+ "name": "refresh",
66
+ "async": true,
67
+ "parameters": [
68
+ {
69
+ "name": "options",
70
+ "type": "Omit<ReportRefreshOptions, 'db'>",
71
+ "optional": true
72
+ }
73
+ ],
74
+ "returnType": "Promise<ReportRefreshResult>",
75
+ "isStatic": false,
76
+ "isPublic": true
77
+ },
78
+ "list": {
79
+ "name": "list",
80
+ "async": true,
81
+ "parameters": [
82
+ {
83
+ "name": "options",
84
+ "type": "any",
85
+ "optional": true
86
+ }
87
+ ],
88
+ "returnType": "Promise<ModelType[]>",
89
+ "isStatic": false,
90
+ "isPublic": true
91
+ },
92
+ "get": {
93
+ "name": "get",
94
+ "async": true,
95
+ "parameters": [
96
+ {
97
+ "name": "filter",
98
+ "type": "any",
99
+ "optional": false
100
+ },
101
+ {
102
+ "name": "options",
103
+ "type": "any",
104
+ "optional": true
105
+ }
106
+ ],
107
+ "returnType": "Promise<ModelType | null>",
108
+ "isStatic": false,
109
+ "isPublic": true
110
+ }
111
+ },
112
+ "decoratorConfig": {},
113
+ "extends": "SmrtCollection",
114
+ "extendsTypeArg": "ModelType",
115
+ "exportName": "SmrtReportCollection",
116
+ "collectionExportName": "SmrtReportCollectionCollection"
117
+ },
118
+ "@happyvertical/smrt-reports:SmrtReportRefreshTask": {
119
+ "name": "smrtreportrefreshtask",
120
+ "className": "SmrtReportRefreshTask",
121
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportRefreshTask",
122
+ "collection": "smrtreportrefreshtasks",
123
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/scheduler.ts",
124
+ "packageName": "@happyvertical/smrt-reports",
125
+ "fields": {
126
+ "tenantId": {
127
+ "type": "text",
128
+ "required": false,
129
+ "_meta": {
130
+ "sqlType": "UUID",
131
+ "nullable": true,
132
+ "__tenancy": {
133
+ "isTenantIdField": true,
134
+ "autoFilter": true,
135
+ "required": false,
136
+ "autoPopulate": true,
137
+ "nullable": true,
138
+ "mode": "optional",
139
+ "field": "tenantId",
140
+ "allowSuperAdminBypass": false
141
+ }
142
+ }
143
+ },
144
+ "reportClass": {
145
+ "type": "text",
146
+ "required": true,
147
+ "_meta": {
148
+ "required": true
149
+ }
150
+ },
151
+ "mode": {
152
+ "type": "text",
153
+ "required": true,
154
+ "_meta": {
155
+ "required": true
156
+ }
157
+ },
158
+ "trigger": {
159
+ "type": "text",
160
+ "required": true,
161
+ "_meta": {
162
+ "required": true
163
+ }
164
+ },
165
+ "args": {
166
+ "type": "json",
167
+ "required": false,
168
+ "_meta": {}
169
+ }
170
+ },
171
+ "methods": {
172
+ "run": {
173
+ "name": "run",
174
+ "async": true,
175
+ "parameters": [
176
+ {
177
+ "name": "args",
178
+ "type": "ReportRefreshJobArgs",
179
+ "optional": true
180
+ }
181
+ ],
182
+ "returnType": "Promise",
183
+ "isStatic": false,
184
+ "isPublic": true
185
+ }
186
+ },
187
+ "decoratorConfig": {
188
+ "tableName": "_smrt_report_refresh_tasks",
189
+ "tenantScoped": {
190
+ "mode": "optional"
191
+ }
192
+ },
193
+ "extends": "SmrtObject",
194
+ "exportName": "SmrtReportRefreshTask",
195
+ "collectionExportName": "SmrtReportRefreshTaskCollection",
196
+ "validationRules": [
197
+ {
198
+ "field": "reportClass",
199
+ "rule": "required",
200
+ "fieldType": "text"
201
+ },
202
+ {
203
+ "field": "mode",
204
+ "rule": "required",
205
+ "fieldType": "text"
206
+ },
207
+ {
208
+ "field": "trigger",
209
+ "rule": "required",
210
+ "fieldType": "text"
211
+ }
212
+ ],
213
+ "schema": {
214
+ "tableName": "_smrt_report_refresh_tasks",
215
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_refresh_tasks\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"report_class\" TEXT NOT NULL,\n \"mode\" TEXT NOT NULL,\n \"trigger\" TEXT NOT NULL,\n \"args\" JSON\n);",
216
+ "columns": {
217
+ "id": {
218
+ "type": "UUID",
219
+ "primaryKey": true,
220
+ "referenceKind": "id",
221
+ "notNull": true
222
+ },
223
+ "slug": {
224
+ "type": "TEXT",
225
+ "notNull": true
226
+ },
227
+ "context": {
228
+ "type": "TEXT",
229
+ "notNull": true,
230
+ "default": ""
231
+ },
232
+ "created_at": {
233
+ "type": "TIMESTAMP",
234
+ "notNull": true,
235
+ "default": "current_timestamp"
236
+ },
237
+ "updated_at": {
238
+ "type": "TIMESTAMP",
239
+ "notNull": true,
240
+ "default": "current_timestamp"
241
+ },
242
+ "tenant_id": {
243
+ "type": "UUID",
244
+ "referenceKind": "tenantId",
245
+ "notNull": false,
246
+ "unique": false
247
+ },
248
+ "report_class": {
249
+ "type": "TEXT",
250
+ "notNull": true,
251
+ "unique": false
252
+ },
253
+ "mode": {
254
+ "type": "TEXT",
255
+ "notNull": true,
256
+ "unique": false
257
+ },
258
+ "trigger": {
259
+ "type": "TEXT",
260
+ "notNull": true,
261
+ "unique": false
262
+ },
263
+ "args": {
264
+ "type": "JSON",
265
+ "notNull": false,
266
+ "unique": false
267
+ }
268
+ },
269
+ "indexes": [
270
+ {
271
+ "name": "_smrt_report_refresh_tasks_id_idx",
272
+ "columns": [
273
+ "id"
274
+ ]
275
+ },
276
+ {
277
+ "name": "_smrt_report_refresh_tasks_slug_context_idx",
278
+ "columns": [
279
+ "slug",
280
+ "context"
281
+ ],
282
+ "unique": true
283
+ }
284
+ ],
285
+ "version": "c9142042"
286
+ }
287
+ },
288
+ "@happyvertical/smrt-reports:SmrtReportRun": {
289
+ "name": "smrtreportrun",
290
+ "className": "SmrtReportRun",
291
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportRun",
292
+ "collection": "smrtreportruns",
293
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/state.ts",
294
+ "packageName": "@happyvertical/smrt-reports",
295
+ "fields": {
296
+ "tenantId": {
297
+ "type": "text",
298
+ "required": false,
299
+ "_meta": {
300
+ "sqlType": "UUID",
301
+ "nullable": true,
302
+ "__tenancy": {
303
+ "isTenantIdField": true,
304
+ "autoFilter": true,
305
+ "required": false,
306
+ "autoPopulate": true,
307
+ "nullable": true,
308
+ "mode": "optional",
309
+ "field": "tenantId",
310
+ "allowSuperAdminBypass": false
311
+ }
312
+ }
313
+ },
314
+ "scopeKey": {
315
+ "type": "text",
316
+ "required": true,
317
+ "_meta": {
318
+ "required": true
319
+ }
320
+ },
321
+ "reportClass": {
322
+ "type": "text",
323
+ "required": true,
324
+ "_meta": {
325
+ "required": true
326
+ }
327
+ },
328
+ "sourceClass": {
329
+ "type": "text",
330
+ "required": true,
331
+ "_meta": {
332
+ "required": true
333
+ }
334
+ },
335
+ "mode": {
336
+ "type": "text",
337
+ "required": true,
338
+ "_meta": {
339
+ "required": true
340
+ }
341
+ },
342
+ "trigger": {
343
+ "type": "text",
344
+ "required": true,
345
+ "_meta": {
346
+ "required": true
347
+ }
348
+ },
349
+ "status": {
350
+ "type": "text",
351
+ "required": true,
352
+ "_meta": {
353
+ "required": true
354
+ }
355
+ },
356
+ "startedAt": {
357
+ "type": "datetime",
358
+ "required": true,
359
+ "_meta": {
360
+ "required": true
361
+ }
362
+ },
363
+ "completedAt": {
364
+ "type": "datetime",
365
+ "required": false,
366
+ "_meta": {
367
+ "nullable": true
368
+ }
369
+ },
370
+ "rowCount": {
371
+ "type": "integer",
372
+ "required": true,
373
+ "_meta": {
374
+ "required": true
375
+ }
376
+ },
377
+ "changedGroupCount": {
378
+ "type": "integer",
379
+ "required": true,
380
+ "_meta": {
381
+ "required": true
382
+ }
383
+ },
384
+ "watermarkBefore": {
385
+ "type": "text",
386
+ "required": false,
387
+ "_meta": {
388
+ "nullable": true
389
+ }
390
+ },
391
+ "watermarkAfter": {
392
+ "type": "text",
393
+ "required": false,
394
+ "_meta": {
395
+ "nullable": true
396
+ }
397
+ },
398
+ "error": {
399
+ "type": "text",
400
+ "required": false,
401
+ "_meta": {
402
+ "nullable": true
403
+ }
404
+ },
405
+ "metadata": {
406
+ "type": "json",
407
+ "required": false,
408
+ "_meta": {}
409
+ }
410
+ },
411
+ "methods": {},
412
+ "decoratorConfig": {
413
+ "tableName": "_smrt_report_runs",
414
+ "tenantScoped": {
415
+ "mode": "optional"
416
+ }
417
+ },
418
+ "extends": "SmrtObject",
419
+ "exportName": "SmrtReportRun",
420
+ "collectionExportName": "SmrtReportRunCollection",
421
+ "validationRules": [
422
+ {
423
+ "field": "scopeKey",
424
+ "rule": "required",
425
+ "fieldType": "text"
426
+ },
427
+ {
428
+ "field": "reportClass",
429
+ "rule": "required",
430
+ "fieldType": "text"
431
+ },
432
+ {
433
+ "field": "sourceClass",
434
+ "rule": "required",
435
+ "fieldType": "text"
436
+ },
437
+ {
438
+ "field": "mode",
439
+ "rule": "required",
440
+ "fieldType": "text"
441
+ },
442
+ {
443
+ "field": "trigger",
444
+ "rule": "required",
445
+ "fieldType": "text"
446
+ },
447
+ {
448
+ "field": "status",
449
+ "rule": "required",
450
+ "fieldType": "text"
451
+ },
452
+ {
453
+ "field": "startedAt",
454
+ "rule": "required",
455
+ "fieldType": "datetime"
456
+ },
457
+ {
458
+ "field": "rowCount",
459
+ "rule": "required",
460
+ "fieldType": "integer"
461
+ },
462
+ {
463
+ "field": "changedGroupCount",
464
+ "rule": "required",
465
+ "fieldType": "integer"
466
+ }
467
+ ],
468
+ "schema": {
469
+ "tableName": "_smrt_report_runs",
470
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_runs\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"scope_key\" TEXT NOT NULL,\n \"report_class\" TEXT NOT NULL,\n \"source_class\" TEXT NOT NULL,\n \"mode\" TEXT NOT NULL,\n \"trigger\" TEXT NOT NULL,\n \"status\" TEXT NOT NULL,\n \"started_at\" TIMESTAMP NOT NULL,\n \"completed_at\" TIMESTAMP,\n \"row_count\" INTEGER NOT NULL,\n \"changed_group_count\" INTEGER NOT NULL,\n \"watermark_before\" TEXT,\n \"watermark_after\" TEXT,\n \"error\" TEXT,\n \"metadata\" JSON\n);",
471
+ "columns": {
472
+ "id": {
473
+ "type": "UUID",
474
+ "primaryKey": true,
475
+ "referenceKind": "id",
476
+ "notNull": true
477
+ },
478
+ "slug": {
479
+ "type": "TEXT",
480
+ "notNull": true
481
+ },
482
+ "context": {
483
+ "type": "TEXT",
484
+ "notNull": true,
485
+ "default": ""
486
+ },
487
+ "created_at": {
488
+ "type": "TIMESTAMP",
489
+ "notNull": true,
490
+ "default": "current_timestamp"
491
+ },
492
+ "updated_at": {
493
+ "type": "TIMESTAMP",
494
+ "notNull": true,
495
+ "default": "current_timestamp"
496
+ },
497
+ "tenant_id": {
498
+ "type": "UUID",
499
+ "referenceKind": "tenantId",
500
+ "notNull": false,
501
+ "unique": false
502
+ },
503
+ "scope_key": {
504
+ "type": "TEXT",
505
+ "notNull": true,
506
+ "unique": false
507
+ },
508
+ "report_class": {
509
+ "type": "TEXT",
510
+ "notNull": true,
511
+ "unique": false
512
+ },
513
+ "source_class": {
514
+ "type": "TEXT",
515
+ "notNull": true,
516
+ "unique": false
517
+ },
518
+ "mode": {
519
+ "type": "TEXT",
520
+ "notNull": true,
521
+ "unique": false
522
+ },
523
+ "trigger": {
524
+ "type": "TEXT",
525
+ "notNull": true,
526
+ "unique": false
527
+ },
528
+ "status": {
529
+ "type": "TEXT",
530
+ "notNull": true,
531
+ "unique": false
532
+ },
533
+ "started_at": {
534
+ "type": "TIMESTAMP",
535
+ "notNull": true,
536
+ "unique": false
537
+ },
538
+ "completed_at": {
539
+ "type": "TIMESTAMP",
540
+ "notNull": false,
541
+ "unique": false
542
+ },
543
+ "row_count": {
544
+ "type": "INTEGER",
545
+ "notNull": true,
546
+ "unique": false
547
+ },
548
+ "changed_group_count": {
549
+ "type": "INTEGER",
550
+ "notNull": true,
551
+ "unique": false
552
+ },
553
+ "watermark_before": {
554
+ "type": "TEXT",
555
+ "notNull": false,
556
+ "unique": false
557
+ },
558
+ "watermark_after": {
559
+ "type": "TEXT",
560
+ "notNull": false,
561
+ "unique": false
562
+ },
563
+ "error": {
564
+ "type": "TEXT",
565
+ "notNull": false,
566
+ "unique": false
567
+ },
568
+ "metadata": {
569
+ "type": "JSON",
570
+ "notNull": false,
571
+ "unique": false
572
+ }
573
+ },
574
+ "indexes": [
575
+ {
576
+ "name": "_smrt_report_runs_id_idx",
577
+ "columns": [
578
+ "id"
579
+ ]
580
+ },
581
+ {
582
+ "name": "_smrt_report_runs_slug_context_idx",
583
+ "columns": [
584
+ "slug",
585
+ "context"
586
+ ],
587
+ "unique": true
588
+ }
589
+ ],
590
+ "version": "54ff5048"
591
+ }
592
+ },
593
+ "@happyvertical/smrt-reports:SmrtReportRunCollection": {
594
+ "name": "smrtreportruncollection",
595
+ "className": "SmrtReportRunCollection",
596
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportRunCollection",
597
+ "collection": "smrtreportruns",
598
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/state.ts",
599
+ "packageName": "@happyvertical/smrt-reports",
600
+ "fields": {},
601
+ "methods": {},
602
+ "decoratorConfig": {
603
+ "tableName": "_smrt_report_runs"
604
+ },
605
+ "extends": "SmrtCollection",
606
+ "extendsTypeArg": "SmrtReportRun",
607
+ "exportName": "SmrtReportRunCollection",
608
+ "collectionExportName": "SmrtReportRunCollectionCollection",
609
+ "schema": {
610
+ "tableName": "_smrt_report_runs",
611
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_runs\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
612
+ "columns": {
613
+ "id": {
614
+ "type": "UUID",
615
+ "primaryKey": true,
616
+ "referenceKind": "id",
617
+ "notNull": true
618
+ },
619
+ "slug": {
620
+ "type": "TEXT",
621
+ "notNull": true
622
+ },
623
+ "context": {
624
+ "type": "TEXT",
625
+ "notNull": true,
626
+ "default": ""
627
+ },
628
+ "created_at": {
629
+ "type": "TIMESTAMP",
630
+ "notNull": true,
631
+ "default": "current_timestamp"
632
+ },
633
+ "updated_at": {
634
+ "type": "TIMESTAMP",
635
+ "notNull": true,
636
+ "default": "current_timestamp"
637
+ }
638
+ },
639
+ "indexes": [
640
+ {
641
+ "name": "_smrt_report_runs_id_idx",
642
+ "columns": [
643
+ "id"
644
+ ]
645
+ },
646
+ {
647
+ "name": "_smrt_report_runs_slug_context_idx",
648
+ "columns": [
649
+ "slug",
650
+ "context"
651
+ ],
652
+ "unique": true
653
+ }
654
+ ],
655
+ "version": "f7804285"
656
+ }
657
+ },
658
+ "@happyvertical/smrt-reports:SmrtReportWatermark": {
659
+ "name": "smrtreportwatermark",
660
+ "className": "SmrtReportWatermark",
661
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportWatermark",
662
+ "collection": "smrtreportwatermarks",
663
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/state.ts",
664
+ "packageName": "@happyvertical/smrt-reports",
665
+ "fields": {
666
+ "tenantId": {
667
+ "type": "text",
668
+ "required": false,
669
+ "_meta": {
670
+ "sqlType": "UUID",
671
+ "nullable": true,
672
+ "__tenancy": {
673
+ "isTenantIdField": true,
674
+ "autoFilter": true,
675
+ "required": false,
676
+ "autoPopulate": true,
677
+ "nullable": true,
678
+ "mode": "optional",
679
+ "field": "tenantId",
680
+ "allowSuperAdminBypass": false
681
+ }
682
+ }
683
+ },
684
+ "scopeKey": {
685
+ "type": "text",
686
+ "required": true,
687
+ "_meta": {
688
+ "required": true
689
+ }
690
+ },
691
+ "reportClass": {
692
+ "type": "text",
693
+ "required": true,
694
+ "_meta": {
695
+ "required": true
696
+ }
697
+ },
698
+ "sourceClass": {
699
+ "type": "text",
700
+ "required": true,
701
+ "_meta": {
702
+ "required": true
703
+ }
704
+ },
705
+ "watermarkColumn": {
706
+ "type": "text",
707
+ "required": true,
708
+ "_meta": {
709
+ "required": true
710
+ }
711
+ },
712
+ "watermarkValue": {
713
+ "type": "text",
714
+ "required": false,
715
+ "_meta": {
716
+ "nullable": true
717
+ }
718
+ },
719
+ "lastRunId": {
720
+ "type": "text",
721
+ "required": false,
722
+ "_meta": {
723
+ "nullable": true
724
+ }
725
+ }
726
+ },
727
+ "methods": {},
728
+ "decoratorConfig": {
729
+ "tableName": "_smrt_report_watermarks",
730
+ "conflictColumns": [
731
+ "report_class",
732
+ "scope_key",
733
+ "source_class",
734
+ "watermark_column"
735
+ ],
736
+ "tenantScoped": {
737
+ "mode": "optional"
738
+ }
739
+ },
740
+ "extends": "SmrtObject",
741
+ "exportName": "SmrtReportWatermark",
742
+ "collectionExportName": "SmrtReportWatermarkCollection",
743
+ "validationRules": [
744
+ {
745
+ "field": "scopeKey",
746
+ "rule": "required",
747
+ "fieldType": "text"
748
+ },
749
+ {
750
+ "field": "reportClass",
751
+ "rule": "required",
752
+ "fieldType": "text"
753
+ },
754
+ {
755
+ "field": "sourceClass",
756
+ "rule": "required",
757
+ "fieldType": "text"
758
+ },
759
+ {
760
+ "field": "watermarkColumn",
761
+ "rule": "required",
762
+ "fieldType": "text"
763
+ }
764
+ ],
765
+ "schema": {
766
+ "tableName": "_smrt_report_watermarks",
767
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_watermarks\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"scope_key\" TEXT NOT NULL,\n \"report_class\" TEXT NOT NULL,\n \"source_class\" TEXT NOT NULL,\n \"watermark_column\" TEXT NOT NULL,\n \"watermark_value\" TEXT,\n \"last_run_id\" TEXT\n);",
768
+ "columns": {
769
+ "id": {
770
+ "type": "UUID",
771
+ "primaryKey": true,
772
+ "referenceKind": "id",
773
+ "notNull": true
774
+ },
775
+ "slug": {
776
+ "type": "TEXT",
777
+ "notNull": true
778
+ },
779
+ "context": {
780
+ "type": "TEXT",
781
+ "notNull": true,
782
+ "default": ""
783
+ },
784
+ "created_at": {
785
+ "type": "TIMESTAMP",
786
+ "notNull": true,
787
+ "default": "current_timestamp"
788
+ },
789
+ "updated_at": {
790
+ "type": "TIMESTAMP",
791
+ "notNull": true,
792
+ "default": "current_timestamp"
793
+ },
794
+ "tenant_id": {
795
+ "type": "UUID",
796
+ "referenceKind": "tenantId",
797
+ "notNull": false,
798
+ "unique": false
799
+ },
800
+ "scope_key": {
801
+ "type": "TEXT",
802
+ "notNull": true,
803
+ "unique": false
804
+ },
805
+ "report_class": {
806
+ "type": "TEXT",
807
+ "notNull": true,
808
+ "unique": false
809
+ },
810
+ "source_class": {
811
+ "type": "TEXT",
812
+ "notNull": true,
813
+ "unique": false
814
+ },
815
+ "watermark_column": {
816
+ "type": "TEXT",
817
+ "notNull": true,
818
+ "unique": false
819
+ },
820
+ "watermark_value": {
821
+ "type": "TEXT",
822
+ "notNull": false,
823
+ "unique": false
824
+ },
825
+ "last_run_id": {
826
+ "type": "TEXT",
827
+ "notNull": false,
828
+ "unique": false
829
+ }
830
+ },
831
+ "indexes": [
832
+ {
833
+ "name": "_smrt_report_watermarks_id_idx",
834
+ "columns": [
835
+ "id"
836
+ ]
837
+ },
838
+ {
839
+ "name": "_smrt_report_watermarks_report_class_scope_key_idx",
840
+ "columns": [
841
+ "report_class",
842
+ "scope_key",
843
+ "source_class",
844
+ "watermark_column"
845
+ ],
846
+ "unique": true
847
+ }
848
+ ],
849
+ "version": "dac9d57a"
850
+ }
851
+ },
852
+ "@happyvertical/smrt-reports:SmrtReportWatermarkCollection": {
853
+ "name": "smrtreportwatermarkcollection",
854
+ "className": "SmrtReportWatermarkCollection",
855
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportWatermarkCollection",
856
+ "collection": "smrtreportwatermarks",
857
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/state.ts",
858
+ "packageName": "@happyvertical/smrt-reports",
859
+ "fields": {},
860
+ "methods": {},
861
+ "decoratorConfig": {
862
+ "tableName": "_smrt_report_watermarks"
863
+ },
864
+ "extends": "SmrtCollection",
865
+ "extendsTypeArg": "SmrtReportWatermark",
866
+ "exportName": "SmrtReportWatermarkCollection",
867
+ "collectionExportName": "SmrtReportWatermarkCollectionCollection",
868
+ "schema": {
869
+ "tableName": "_smrt_report_watermarks",
870
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_watermarks\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
871
+ "columns": {
872
+ "id": {
873
+ "type": "UUID",
874
+ "primaryKey": true,
875
+ "referenceKind": "id",
876
+ "notNull": true
877
+ },
878
+ "slug": {
879
+ "type": "TEXT",
880
+ "notNull": true
881
+ },
882
+ "context": {
883
+ "type": "TEXT",
884
+ "notNull": true,
885
+ "default": ""
886
+ },
887
+ "created_at": {
888
+ "type": "TIMESTAMP",
889
+ "notNull": true,
890
+ "default": "current_timestamp"
891
+ },
892
+ "updated_at": {
893
+ "type": "TIMESTAMP",
894
+ "notNull": true,
895
+ "default": "current_timestamp"
896
+ }
897
+ },
898
+ "indexes": [
899
+ {
900
+ "name": "_smrt_report_watermarks_id_idx",
901
+ "columns": [
902
+ "id"
903
+ ]
904
+ },
905
+ {
906
+ "name": "_smrt_report_watermarks_slug_context_idx",
907
+ "columns": [
908
+ "slug",
909
+ "context"
910
+ ],
911
+ "unique": true
912
+ }
913
+ ],
914
+ "version": "f334c521"
915
+ }
916
+ },
917
+ "@happyvertical/smrt-reports:SmrtReportLock": {
918
+ "name": "smrtreportlock",
919
+ "className": "SmrtReportLock",
920
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportLock",
921
+ "collection": "smrtreportlocks",
922
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/state.ts",
923
+ "packageName": "@happyvertical/smrt-reports",
924
+ "fields": {
925
+ "tenantId": {
926
+ "type": "text",
927
+ "required": false,
928
+ "_meta": {
929
+ "sqlType": "UUID",
930
+ "nullable": true,
931
+ "__tenancy": {
932
+ "isTenantIdField": true,
933
+ "autoFilter": true,
934
+ "required": false,
935
+ "autoPopulate": true,
936
+ "nullable": true,
937
+ "mode": "optional",
938
+ "field": "tenantId",
939
+ "allowSuperAdminBypass": false
940
+ }
941
+ }
942
+ },
943
+ "scopeKey": {
944
+ "type": "text",
945
+ "required": true,
946
+ "_meta": {
947
+ "required": true
948
+ }
949
+ },
950
+ "reportClass": {
951
+ "type": "text",
952
+ "required": true,
953
+ "_meta": {
954
+ "required": true
955
+ }
956
+ },
957
+ "ownerId": {
958
+ "type": "text",
959
+ "required": false,
960
+ "_meta": {
961
+ "nullable": true
962
+ }
963
+ },
964
+ "acquiredAt": {
965
+ "type": "datetime",
966
+ "required": false,
967
+ "_meta": {
968
+ "nullable": true
969
+ }
970
+ },
971
+ "heartbeatAt": {
972
+ "type": "datetime",
973
+ "required": false,
974
+ "_meta": {
975
+ "nullable": true
976
+ }
977
+ },
978
+ "expiresAt": {
979
+ "type": "datetime",
980
+ "required": false,
981
+ "_meta": {
982
+ "nullable": true
983
+ }
984
+ }
985
+ },
986
+ "methods": {},
987
+ "decoratorConfig": {
988
+ "tableName": "_smrt_report_locks",
989
+ "conflictColumns": [
990
+ "report_class",
991
+ "scope_key"
992
+ ],
993
+ "tenantScoped": {
994
+ "mode": "optional"
995
+ }
996
+ },
997
+ "extends": "SmrtObject",
998
+ "exportName": "SmrtReportLock",
999
+ "collectionExportName": "SmrtReportLockCollection",
1000
+ "validationRules": [
1001
+ {
1002
+ "field": "scopeKey",
1003
+ "rule": "required",
1004
+ "fieldType": "text"
1005
+ },
1006
+ {
1007
+ "field": "reportClass",
1008
+ "rule": "required",
1009
+ "fieldType": "text"
1010
+ }
1011
+ ],
1012
+ "schema": {
1013
+ "tableName": "_smrt_report_locks",
1014
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_locks\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"scope_key\" TEXT NOT NULL,\n \"report_class\" TEXT NOT NULL,\n \"owner_id\" TEXT,\n \"acquired_at\" TIMESTAMP,\n \"heartbeat_at\" TIMESTAMP,\n \"expires_at\" TIMESTAMP\n);",
1015
+ "columns": {
1016
+ "id": {
1017
+ "type": "UUID",
1018
+ "primaryKey": true,
1019
+ "referenceKind": "id",
1020
+ "notNull": true
1021
+ },
1022
+ "slug": {
1023
+ "type": "TEXT",
1024
+ "notNull": true
1025
+ },
1026
+ "context": {
1027
+ "type": "TEXT",
1028
+ "notNull": true,
1029
+ "default": ""
1030
+ },
1031
+ "created_at": {
1032
+ "type": "TIMESTAMP",
1033
+ "notNull": true,
1034
+ "default": "current_timestamp"
1035
+ },
1036
+ "updated_at": {
1037
+ "type": "TIMESTAMP",
1038
+ "notNull": true,
1039
+ "default": "current_timestamp"
1040
+ },
1041
+ "tenant_id": {
1042
+ "type": "UUID",
1043
+ "referenceKind": "tenantId",
1044
+ "notNull": false,
1045
+ "unique": false
1046
+ },
1047
+ "scope_key": {
1048
+ "type": "TEXT",
1049
+ "notNull": true,
1050
+ "unique": false
1051
+ },
1052
+ "report_class": {
1053
+ "type": "TEXT",
1054
+ "notNull": true,
1055
+ "unique": false
1056
+ },
1057
+ "owner_id": {
1058
+ "type": "TEXT",
1059
+ "notNull": false,
1060
+ "unique": false
1061
+ },
1062
+ "acquired_at": {
1063
+ "type": "TIMESTAMP",
1064
+ "notNull": false,
1065
+ "unique": false
1066
+ },
1067
+ "heartbeat_at": {
1068
+ "type": "TIMESTAMP",
1069
+ "notNull": false,
1070
+ "unique": false
1071
+ },
1072
+ "expires_at": {
1073
+ "type": "TIMESTAMP",
1074
+ "notNull": false,
1075
+ "unique": false
1076
+ }
1077
+ },
1078
+ "indexes": [
1079
+ {
1080
+ "name": "_smrt_report_locks_id_idx",
1081
+ "columns": [
1082
+ "id"
1083
+ ]
1084
+ },
1085
+ {
1086
+ "name": "_smrt_report_locks_report_class_scope_key_idx",
1087
+ "columns": [
1088
+ "report_class",
1089
+ "scope_key"
1090
+ ],
1091
+ "unique": true
1092
+ }
1093
+ ],
1094
+ "version": "4a2043f9"
1095
+ }
1096
+ },
1097
+ "@happyvertical/smrt-reports:SmrtReportLockCollection": {
1098
+ "name": "smrtreportlockcollection",
1099
+ "className": "SmrtReportLockCollection",
1100
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportLockCollection",
1101
+ "collection": "smrtreportlocks",
1102
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/state.ts",
1103
+ "packageName": "@happyvertical/smrt-reports",
1104
+ "fields": {},
1105
+ "methods": {},
1106
+ "decoratorConfig": {
1107
+ "tableName": "_smrt_report_locks"
1108
+ },
1109
+ "extends": "SmrtCollection",
1110
+ "extendsTypeArg": "SmrtReportLock",
1111
+ "exportName": "SmrtReportLockCollection",
1112
+ "collectionExportName": "SmrtReportLockCollectionCollection",
1113
+ "schema": {
1114
+ "tableName": "_smrt_report_locks",
1115
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_locks\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
1116
+ "columns": {
1117
+ "id": {
1118
+ "type": "UUID",
1119
+ "primaryKey": true,
1120
+ "referenceKind": "id",
1121
+ "notNull": true
1122
+ },
1123
+ "slug": {
1124
+ "type": "TEXT",
1125
+ "notNull": true
1126
+ },
1127
+ "context": {
1128
+ "type": "TEXT",
1129
+ "notNull": true,
1130
+ "default": ""
1131
+ },
1132
+ "created_at": {
1133
+ "type": "TIMESTAMP",
1134
+ "notNull": true,
1135
+ "default": "current_timestamp"
1136
+ },
1137
+ "updated_at": {
1138
+ "type": "TIMESTAMP",
1139
+ "notNull": true,
1140
+ "default": "current_timestamp"
1141
+ }
1142
+ },
1143
+ "indexes": [
1144
+ {
1145
+ "name": "_smrt_report_locks_id_idx",
1146
+ "columns": [
1147
+ "id"
1148
+ ]
1149
+ },
1150
+ {
1151
+ "name": "_smrt_report_locks_slug_context_idx",
1152
+ "columns": [
1153
+ "slug",
1154
+ "context"
1155
+ ],
1156
+ "unique": true
1157
+ }
1158
+ ],
1159
+ "version": "31c32d3d"
1160
+ }
1161
+ },
1162
+ "@happyvertical/smrt-reports:SmrtReportSchedule": {
1163
+ "name": "smrtreportschedule",
1164
+ "className": "SmrtReportSchedule",
1165
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportSchedule",
1166
+ "collection": "smrtreportschedules",
1167
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/state.ts",
1168
+ "packageName": "@happyvertical/smrt-reports",
1169
+ "fields": {
1170
+ "tenantId": {
1171
+ "type": "text",
1172
+ "required": false,
1173
+ "_meta": {
1174
+ "sqlType": "UUID",
1175
+ "nullable": true,
1176
+ "__tenancy": {
1177
+ "isTenantIdField": true,
1178
+ "autoFilter": true,
1179
+ "required": false,
1180
+ "autoPopulate": true,
1181
+ "nullable": true,
1182
+ "mode": "optional",
1183
+ "field": "tenantId",
1184
+ "allowSuperAdminBypass": false
1185
+ }
1186
+ }
1187
+ },
1188
+ "scopeKey": {
1189
+ "type": "text",
1190
+ "required": true,
1191
+ "_meta": {
1192
+ "required": true
1193
+ }
1194
+ },
1195
+ "reportClass": {
1196
+ "type": "text",
1197
+ "required": true,
1198
+ "_meta": {
1199
+ "required": true
1200
+ }
1201
+ },
1202
+ "cron": {
1203
+ "type": "text",
1204
+ "required": true,
1205
+ "_meta": {
1206
+ "required": true
1207
+ }
1208
+ },
1209
+ "trigger": {
1210
+ "type": "text",
1211
+ "required": true,
1212
+ "_meta": {
1213
+ "required": true
1214
+ }
1215
+ },
1216
+ "mode": {
1217
+ "type": "text",
1218
+ "required": true,
1219
+ "_meta": {
1220
+ "required": true
1221
+ }
1222
+ },
1223
+ "enabled": {
1224
+ "type": "boolean",
1225
+ "required": true,
1226
+ "_meta": {
1227
+ "required": true
1228
+ }
1229
+ },
1230
+ "status": {
1231
+ "type": "text",
1232
+ "required": true,
1233
+ "_meta": {
1234
+ "required": true
1235
+ }
1236
+ },
1237
+ "nextRun": {
1238
+ "type": "datetime",
1239
+ "required": false,
1240
+ "_meta": {
1241
+ "nullable": true
1242
+ }
1243
+ },
1244
+ "lastRun": {
1245
+ "type": "datetime",
1246
+ "required": false,
1247
+ "_meta": {
1248
+ "nullable": true
1249
+ }
1250
+ },
1251
+ "lastStatus": {
1252
+ "type": "text",
1253
+ "required": false,
1254
+ "_meta": {
1255
+ "nullable": true
1256
+ }
1257
+ },
1258
+ "lastError": {
1259
+ "type": "text",
1260
+ "required": false,
1261
+ "_meta": {
1262
+ "nullable": true
1263
+ }
1264
+ },
1265
+ "runCount": {
1266
+ "type": "integer",
1267
+ "required": true,
1268
+ "_meta": {
1269
+ "required": true
1270
+ }
1271
+ },
1272
+ "successCount": {
1273
+ "type": "integer",
1274
+ "required": true,
1275
+ "_meta": {
1276
+ "required": true
1277
+ }
1278
+ },
1279
+ "failureCount": {
1280
+ "type": "integer",
1281
+ "required": true,
1282
+ "_meta": {
1283
+ "required": true
1284
+ }
1285
+ },
1286
+ "runningCount": {
1287
+ "type": "integer",
1288
+ "required": true,
1289
+ "_meta": {
1290
+ "required": true
1291
+ }
1292
+ },
1293
+ "maxConcurrent": {
1294
+ "type": "integer",
1295
+ "required": true,
1296
+ "_meta": {
1297
+ "required": true
1298
+ }
1299
+ },
1300
+ "queue": {
1301
+ "type": "text",
1302
+ "required": true,
1303
+ "_meta": {
1304
+ "required": true
1305
+ }
1306
+ },
1307
+ "priority": {
1308
+ "type": "integer",
1309
+ "required": true,
1310
+ "_meta": {
1311
+ "required": true
1312
+ }
1313
+ },
1314
+ "timeout": {
1315
+ "type": "integer",
1316
+ "required": true,
1317
+ "_meta": {
1318
+ "required": true
1319
+ }
1320
+ }
1321
+ },
1322
+ "methods": {},
1323
+ "decoratorConfig": {
1324
+ "tableName": "_smrt_report_schedules",
1325
+ "conflictColumns": [
1326
+ "report_class",
1327
+ "scope_key",
1328
+ "cron",
1329
+ "mode"
1330
+ ],
1331
+ "tenantScoped": {
1332
+ "mode": "optional"
1333
+ }
1334
+ },
1335
+ "extends": "SmrtObject",
1336
+ "exportName": "SmrtReportSchedule",
1337
+ "collectionExportName": "SmrtReportScheduleCollection",
1338
+ "validationRules": [
1339
+ {
1340
+ "field": "scopeKey",
1341
+ "rule": "required",
1342
+ "fieldType": "text"
1343
+ },
1344
+ {
1345
+ "field": "reportClass",
1346
+ "rule": "required",
1347
+ "fieldType": "text"
1348
+ },
1349
+ {
1350
+ "field": "cron",
1351
+ "rule": "required",
1352
+ "fieldType": "text"
1353
+ },
1354
+ {
1355
+ "field": "trigger",
1356
+ "rule": "required",
1357
+ "fieldType": "text"
1358
+ },
1359
+ {
1360
+ "field": "mode",
1361
+ "rule": "required",
1362
+ "fieldType": "text"
1363
+ },
1364
+ {
1365
+ "field": "enabled",
1366
+ "rule": "required",
1367
+ "fieldType": "boolean"
1368
+ },
1369
+ {
1370
+ "field": "status",
1371
+ "rule": "required",
1372
+ "fieldType": "text"
1373
+ },
1374
+ {
1375
+ "field": "runCount",
1376
+ "rule": "required",
1377
+ "fieldType": "integer"
1378
+ },
1379
+ {
1380
+ "field": "successCount",
1381
+ "rule": "required",
1382
+ "fieldType": "integer"
1383
+ },
1384
+ {
1385
+ "field": "failureCount",
1386
+ "rule": "required",
1387
+ "fieldType": "integer"
1388
+ },
1389
+ {
1390
+ "field": "runningCount",
1391
+ "rule": "required",
1392
+ "fieldType": "integer"
1393
+ },
1394
+ {
1395
+ "field": "maxConcurrent",
1396
+ "rule": "required",
1397
+ "fieldType": "integer"
1398
+ },
1399
+ {
1400
+ "field": "queue",
1401
+ "rule": "required",
1402
+ "fieldType": "text"
1403
+ },
1404
+ {
1405
+ "field": "priority",
1406
+ "rule": "required",
1407
+ "fieldType": "integer"
1408
+ },
1409
+ {
1410
+ "field": "timeout",
1411
+ "rule": "required",
1412
+ "fieldType": "integer"
1413
+ }
1414
+ ],
1415
+ "schema": {
1416
+ "tableName": "_smrt_report_schedules",
1417
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_schedules\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"scope_key\" TEXT NOT NULL,\n \"report_class\" TEXT NOT NULL,\n \"cron\" TEXT NOT NULL,\n \"trigger\" TEXT NOT NULL,\n \"mode\" TEXT NOT NULL,\n \"enabled\" BOOLEAN NOT NULL,\n \"status\" TEXT NOT NULL,\n \"next_run\" TIMESTAMP,\n \"last_run\" TIMESTAMP,\n \"last_status\" TEXT,\n \"last_error\" TEXT,\n \"run_count\" INTEGER NOT NULL,\n \"success_count\" INTEGER NOT NULL,\n \"failure_count\" INTEGER NOT NULL,\n \"running_count\" INTEGER NOT NULL,\n \"max_concurrent\" INTEGER NOT NULL,\n \"queue\" TEXT NOT NULL,\n \"priority\" INTEGER NOT NULL,\n \"timeout\" INTEGER NOT NULL\n);",
1418
+ "columns": {
1419
+ "id": {
1420
+ "type": "UUID",
1421
+ "primaryKey": true,
1422
+ "referenceKind": "id",
1423
+ "notNull": true
1424
+ },
1425
+ "slug": {
1426
+ "type": "TEXT",
1427
+ "notNull": true
1428
+ },
1429
+ "context": {
1430
+ "type": "TEXT",
1431
+ "notNull": true,
1432
+ "default": ""
1433
+ },
1434
+ "created_at": {
1435
+ "type": "TIMESTAMP",
1436
+ "notNull": true,
1437
+ "default": "current_timestamp"
1438
+ },
1439
+ "updated_at": {
1440
+ "type": "TIMESTAMP",
1441
+ "notNull": true,
1442
+ "default": "current_timestamp"
1443
+ },
1444
+ "tenant_id": {
1445
+ "type": "UUID",
1446
+ "referenceKind": "tenantId",
1447
+ "notNull": false,
1448
+ "unique": false
1449
+ },
1450
+ "scope_key": {
1451
+ "type": "TEXT",
1452
+ "notNull": true,
1453
+ "unique": false
1454
+ },
1455
+ "report_class": {
1456
+ "type": "TEXT",
1457
+ "notNull": true,
1458
+ "unique": false
1459
+ },
1460
+ "cron": {
1461
+ "type": "TEXT",
1462
+ "notNull": true,
1463
+ "unique": false
1464
+ },
1465
+ "trigger": {
1466
+ "type": "TEXT",
1467
+ "notNull": true,
1468
+ "unique": false
1469
+ },
1470
+ "mode": {
1471
+ "type": "TEXT",
1472
+ "notNull": true,
1473
+ "unique": false
1474
+ },
1475
+ "enabled": {
1476
+ "type": "BOOLEAN",
1477
+ "notNull": true,
1478
+ "unique": false
1479
+ },
1480
+ "status": {
1481
+ "type": "TEXT",
1482
+ "notNull": true,
1483
+ "unique": false
1484
+ },
1485
+ "next_run": {
1486
+ "type": "TIMESTAMP",
1487
+ "notNull": false,
1488
+ "unique": false
1489
+ },
1490
+ "last_run": {
1491
+ "type": "TIMESTAMP",
1492
+ "notNull": false,
1493
+ "unique": false
1494
+ },
1495
+ "last_status": {
1496
+ "type": "TEXT",
1497
+ "notNull": false,
1498
+ "unique": false
1499
+ },
1500
+ "last_error": {
1501
+ "type": "TEXT",
1502
+ "notNull": false,
1503
+ "unique": false
1504
+ },
1505
+ "run_count": {
1506
+ "type": "INTEGER",
1507
+ "notNull": true,
1508
+ "unique": false
1509
+ },
1510
+ "success_count": {
1511
+ "type": "INTEGER",
1512
+ "notNull": true,
1513
+ "unique": false
1514
+ },
1515
+ "failure_count": {
1516
+ "type": "INTEGER",
1517
+ "notNull": true,
1518
+ "unique": false
1519
+ },
1520
+ "running_count": {
1521
+ "type": "INTEGER",
1522
+ "notNull": true,
1523
+ "unique": false
1524
+ },
1525
+ "max_concurrent": {
1526
+ "type": "INTEGER",
1527
+ "notNull": true,
1528
+ "unique": false
1529
+ },
1530
+ "queue": {
1531
+ "type": "TEXT",
1532
+ "notNull": true,
1533
+ "unique": false
1534
+ },
1535
+ "priority": {
1536
+ "type": "INTEGER",
1537
+ "notNull": true,
1538
+ "unique": false
1539
+ },
1540
+ "timeout": {
1541
+ "type": "INTEGER",
1542
+ "notNull": true,
1543
+ "unique": false
1544
+ }
1545
+ },
1546
+ "indexes": [
1547
+ {
1548
+ "name": "_smrt_report_schedules_id_idx",
1549
+ "columns": [
1550
+ "id"
1551
+ ]
1552
+ },
1553
+ {
1554
+ "name": "_smrt_report_schedules_report_class_scope_key_idx",
1555
+ "columns": [
1556
+ "report_class",
1557
+ "scope_key",
1558
+ "cron",
1559
+ "mode"
1560
+ ],
1561
+ "unique": true
1562
+ }
1563
+ ],
1564
+ "version": "4b9f0e69"
1565
+ }
1566
+ },
1567
+ "@happyvertical/smrt-reports:SmrtReportScheduleCollection": {
1568
+ "name": "smrtreportschedulecollection",
1569
+ "className": "SmrtReportScheduleCollection",
1570
+ "qualifiedName": "@happyvertical/smrt-reports:SmrtReportScheduleCollection",
1571
+ "collection": "smrtreportschedules",
1572
+ "filePath": "/home/runner/_work/smrt/smrt/packages/reports/src/state.ts",
1573
+ "packageName": "@happyvertical/smrt-reports",
1574
+ "fields": {},
1575
+ "methods": {},
1576
+ "decoratorConfig": {
1577
+ "tableName": "_smrt_report_schedules"
1578
+ },
1579
+ "extends": "SmrtCollection",
1580
+ "extendsTypeArg": "SmrtReportSchedule",
1581
+ "exportName": "SmrtReportScheduleCollection",
1582
+ "collectionExportName": "SmrtReportScheduleCollectionCollection",
1583
+ "schema": {
1584
+ "tableName": "_smrt_report_schedules",
1585
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_report_schedules\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
1586
+ "columns": {
1587
+ "id": {
1588
+ "type": "UUID",
1589
+ "primaryKey": true,
1590
+ "referenceKind": "id",
1591
+ "notNull": true
1592
+ },
1593
+ "slug": {
1594
+ "type": "TEXT",
1595
+ "notNull": true
1596
+ },
1597
+ "context": {
1598
+ "type": "TEXT",
1599
+ "notNull": true,
1600
+ "default": ""
1601
+ },
1602
+ "created_at": {
1603
+ "type": "TIMESTAMP",
1604
+ "notNull": true,
1605
+ "default": "current_timestamp"
1606
+ },
1607
+ "updated_at": {
1608
+ "type": "TIMESTAMP",
1609
+ "notNull": true,
1610
+ "default": "current_timestamp"
1611
+ }
1612
+ },
1613
+ "indexes": [
1614
+ {
1615
+ "name": "_smrt_report_schedules_id_idx",
1616
+ "columns": [
1617
+ "id"
1618
+ ]
1619
+ },
1620
+ {
1621
+ "name": "_smrt_report_schedules_slug_context_idx",
1622
+ "columns": [
1623
+ "slug",
1624
+ "context"
1625
+ ],
1626
+ "unique": true
1627
+ }
1628
+ ],
1629
+ "version": "437fad71"
1630
+ }
1631
+ }
1632
+ },
1633
+ "moduleType": "smrt",
1634
+ "smrtDependencies": [
1635
+ "@happyvertical/smrt-core",
1636
+ "@happyvertical/smrt-jobs",
1637
+ "@happyvertical/smrt-tenancy"
1638
+ ]
1639
+ }