@happyvertical/smrt-reports 0.37.1 → 0.37.3

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/state.js CHANGED
@@ -1,320 +1,320 @@
1
- import { field, smrt, SmrtObject, SmrtCollection } from "@happyvertical/smrt-core";
2
- import { tenantId, TenantScoped } from "@happyvertical/smrt-tenancy";
1
+ import { SmrtCollection, SmrtObject, field, smrt } from "@happyvertical/smrt-core";
2
+ import { TenantScoped, tenantId } from "@happyvertical/smrt-tenancy";
3
+ //#region src/state.ts
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __decorateClass = (decorators, target, key, kind) => {
6
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
7
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
8
- if (decorator = decorators[i])
9
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10
- if (kind && result) __defProp(target, key, result);
11
- return result;
7
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
8
+ for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9
+ if (kind && result) __defProp(target, key, result);
10
+ return result;
12
11
  };
13
- const REPORT_RUNS_TABLE = "_smrt_report_runs";
14
- const REPORT_WATERMARKS_TABLE = "_smrt_report_watermarks";
15
- const REPORT_LOCKS_TABLE = "_smrt_report_locks";
16
- const REPORT_SCHEDULES_TABLE = "_smrt_report_schedules";
17
- const REPORT_REFRESH_TASKS_TABLE = "_smrt_report_refresh_tasks";
18
- const REPORT_RUNTIME_TABLES = [
19
- REPORT_RUNS_TABLE,
20
- REPORT_WATERMARKS_TABLE,
21
- REPORT_LOCKS_TABLE
22
- ];
23
- const REPORT_SCHEDULER_TABLES = [
24
- REPORT_SCHEDULES_TABLE,
25
- REPORT_REFRESH_TASKS_TABLE
12
+ var REPORT_RUNS_TABLE = "_smrt_report_runs";
13
+ var REPORT_WATERMARKS_TABLE = "_smrt_report_watermarks";
14
+ var REPORT_LOCKS_TABLE = "_smrt_report_locks";
15
+ var REPORT_SCHEDULES_TABLE = "_smrt_report_schedules";
16
+ var REPORT_REFRESH_TASKS_TABLE = "_smrt_report_refresh_tasks";
17
+ var REPORT_RUNTIME_TABLES = [
18
+ REPORT_RUNS_TABLE,
19
+ REPORT_WATERMARKS_TABLE,
20
+ REPORT_LOCKS_TABLE
26
21
  ];
22
+ var REPORT_SCHEDULER_TABLES = [REPORT_SCHEDULES_TABLE, REPORT_REFRESH_TASKS_TABLE];
27
23
  function scopeKeyForTenant(tenantId2) {
28
- return tenantId2 ? `tenant:${tenantId2}` : "global";
24
+ return tenantId2 ? `tenant:${tenantId2}` : "global";
29
25
  }
30
26
  async function assertReportTablesReady(db, tables = REPORT_RUNTIME_TABLES) {
31
- for (const table of tables) {
32
- const ready = await db.tableExists(table);
33
- if (!ready) {
34
- throw new Error(
35
- `Report runtime table '${table}' does not exist. Run smrt db:migrate before refreshing reports.`
36
- );
37
- }
38
- }
27
+ for (const table of tables) if (!await db.tableExists(table)) throw new Error(`Report runtime table '${table}' does not exist. Run smrt db:migrate before refreshing reports.`);
39
28
  }
40
- const INTERNAL_SURFACE = {
41
- api: false,
42
- cli: {
43
- include: ["list", "get"],
44
- skipApiCheck: true,
45
- http: false
46
- },
47
- mcp: false
29
+ var INTERNAL_SURFACE = {
30
+ api: false,
31
+ cli: {
32
+ include: ["list", "get"],
33
+ skipApiCheck: true,
34
+ http: false
35
+ },
36
+ mcp: false
48
37
  };
49
- let SmrtReportRun = class extends SmrtObject {
50
- tenantId = null;
51
- scopeKey = "global";
52
- reportClass = "";
53
- sourceClass = "";
54
- mode = "rebuild";
55
- trigger = "manual";
56
- status = "running";
57
- startedAt = /* @__PURE__ */ new Date();
58
- completedAt = null;
59
- rowCount = 0;
60
- changedGroupCount = 0;
61
- watermarkBefore = null;
62
- watermarkAfter = null;
63
- error = null;
64
- metadata = {};
38
+ var SmrtReportRun = class extends SmrtObject {
39
+ tenantId = null;
40
+ scopeKey = "global";
41
+ reportClass = "";
42
+ sourceClass = "";
43
+ mode = "rebuild";
44
+ trigger = "manual";
45
+ status = "running";
46
+ startedAt = /* @__PURE__ */ new Date();
47
+ completedAt = null;
48
+ rowCount = 0;
49
+ changedGroupCount = 0;
50
+ watermarkBefore = null;
51
+ watermarkAfter = null;
52
+ error = null;
53
+ metadata = {};
65
54
  };
66
- __decorateClass([
67
- tenantId({ nullable: true })
68
- ], SmrtReportRun.prototype, "tenantId", 2);
69
- __decorateClass([
70
- field({ type: "text", required: true })
71
- ], SmrtReportRun.prototype, "scopeKey", 2);
72
- __decorateClass([
73
- field({ type: "text", required: true })
74
- ], SmrtReportRun.prototype, "reportClass", 2);
75
- __decorateClass([
76
- field({ type: "text", required: true })
77
- ], SmrtReportRun.prototype, "sourceClass", 2);
78
- __decorateClass([
79
- field({ type: "text", required: true })
80
- ], SmrtReportRun.prototype, "mode", 2);
81
- __decorateClass([
82
- field({ type: "text", required: true })
83
- ], SmrtReportRun.prototype, "trigger", 2);
84
- __decorateClass([
85
- field({ type: "text", required: true })
86
- ], SmrtReportRun.prototype, "status", 2);
87
- __decorateClass([
88
- field({ type: "datetime", required: true })
89
- ], SmrtReportRun.prototype, "startedAt", 2);
90
- __decorateClass([
91
- field({ type: "datetime", nullable: true })
92
- ], SmrtReportRun.prototype, "completedAt", 2);
93
- __decorateClass([
94
- field({ type: "integer", required: true })
95
- ], SmrtReportRun.prototype, "rowCount", 2);
96
- __decorateClass([
97
- field({ type: "integer", required: true })
98
- ], SmrtReportRun.prototype, "changedGroupCount", 2);
99
- __decorateClass([
100
- field({ type: "text", nullable: true })
101
- ], SmrtReportRun.prototype, "watermarkBefore", 2);
102
- __decorateClass([
103
- field({ type: "text", nullable: true })
104
- ], SmrtReportRun.prototype, "watermarkAfter", 2);
105
- __decorateClass([
106
- field({ type: "text", nullable: true })
107
- ], SmrtReportRun.prototype, "error", 2);
108
- __decorateClass([
109
- field({ type: "json" })
110
- ], SmrtReportRun.prototype, "metadata", 2);
111
- SmrtReportRun = __decorateClass([
112
- TenantScoped({ mode: "optional" }),
113
- smrt({
114
- tableName: "_smrt_report_runs",
115
- ...INTERNAL_SURFACE
116
- })
117
- ], SmrtReportRun);
118
- class SmrtReportRunCollection extends SmrtCollection {
119
- static _itemClass = SmrtReportRun;
120
- }
121
- let SmrtReportWatermark = class extends SmrtObject {
122
- tenantId = null;
123
- scopeKey = "global";
124
- reportClass = "";
125
- sourceClass = "";
126
- watermarkColumn = "";
127
- watermarkValue = null;
128
- lastRunId = null;
55
+ __decorateClass([tenantId({ nullable: true })], SmrtReportRun.prototype, "tenantId", 2);
56
+ __decorateClass([field({
57
+ type: "text",
58
+ required: true
59
+ })], SmrtReportRun.prototype, "scopeKey", 2);
60
+ __decorateClass([field({
61
+ type: "text",
62
+ required: true
63
+ })], SmrtReportRun.prototype, "reportClass", 2);
64
+ __decorateClass([field({
65
+ type: "text",
66
+ required: true
67
+ })], SmrtReportRun.prototype, "sourceClass", 2);
68
+ __decorateClass([field({
69
+ type: "text",
70
+ required: true
71
+ })], SmrtReportRun.prototype, "mode", 2);
72
+ __decorateClass([field({
73
+ type: "text",
74
+ required: true
75
+ })], SmrtReportRun.prototype, "trigger", 2);
76
+ __decorateClass([field({
77
+ type: "text",
78
+ required: true
79
+ })], SmrtReportRun.prototype, "status", 2);
80
+ __decorateClass([field({
81
+ type: "datetime",
82
+ required: true
83
+ })], SmrtReportRun.prototype, "startedAt", 2);
84
+ __decorateClass([field({
85
+ type: "datetime",
86
+ nullable: true
87
+ })], SmrtReportRun.prototype, "completedAt", 2);
88
+ __decorateClass([field({
89
+ type: "integer",
90
+ required: true
91
+ })], SmrtReportRun.prototype, "rowCount", 2);
92
+ __decorateClass([field({
93
+ type: "integer",
94
+ required: true
95
+ })], SmrtReportRun.prototype, "changedGroupCount", 2);
96
+ __decorateClass([field({
97
+ type: "text",
98
+ nullable: true
99
+ })], SmrtReportRun.prototype, "watermarkBefore", 2);
100
+ __decorateClass([field({
101
+ type: "text",
102
+ nullable: true
103
+ })], SmrtReportRun.prototype, "watermarkAfter", 2);
104
+ __decorateClass([field({
105
+ type: "text",
106
+ nullable: true
107
+ })], SmrtReportRun.prototype, "error", 2);
108
+ __decorateClass([field({ type: "json" })], SmrtReportRun.prototype, "metadata", 2);
109
+ SmrtReportRun = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
110
+ tableName: "_smrt_report_runs",
111
+ ...INTERNAL_SURFACE
112
+ })], SmrtReportRun);
113
+ var SmrtReportRunCollection = class extends SmrtCollection {
114
+ static _itemClass = SmrtReportRun;
129
115
  };
130
- __decorateClass([
131
- tenantId({ nullable: true })
132
- ], SmrtReportWatermark.prototype, "tenantId", 2);
133
- __decorateClass([
134
- field({ type: "text", required: true })
135
- ], SmrtReportWatermark.prototype, "scopeKey", 2);
136
- __decorateClass([
137
- field({ type: "text", required: true })
138
- ], SmrtReportWatermark.prototype, "reportClass", 2);
139
- __decorateClass([
140
- field({ type: "text", required: true })
141
- ], SmrtReportWatermark.prototype, "sourceClass", 2);
142
- __decorateClass([
143
- field({ type: "text", required: true })
144
- ], SmrtReportWatermark.prototype, "watermarkColumn", 2);
145
- __decorateClass([
146
- field({ type: "text", nullable: true })
147
- ], SmrtReportWatermark.prototype, "watermarkValue", 2);
148
- __decorateClass([
149
- field({ type: "text", nullable: true })
150
- ], SmrtReportWatermark.prototype, "lastRunId", 2);
151
- SmrtReportWatermark = __decorateClass([
152
- TenantScoped({ mode: "optional" }),
153
- smrt({
154
- tableName: "_smrt_report_watermarks",
155
- conflictColumns: [
156
- "report_class",
157
- "scope_key",
158
- "source_class",
159
- "watermark_column"
160
- ],
161
- ...INTERNAL_SURFACE
162
- })
163
- ], SmrtReportWatermark);
164
- class SmrtReportWatermarkCollection extends SmrtCollection {
165
- static _itemClass = SmrtReportWatermark;
166
- }
167
- let SmrtReportLock = class extends SmrtObject {
168
- tenantId = null;
169
- scopeKey = "global";
170
- reportClass = "";
171
- ownerId = null;
172
- acquiredAt = null;
173
- heartbeatAt = null;
174
- expiresAt = null;
116
+ var SmrtReportWatermark = class extends SmrtObject {
117
+ tenantId = null;
118
+ scopeKey = "global";
119
+ reportClass = "";
120
+ sourceClass = "";
121
+ watermarkColumn = "";
122
+ watermarkValue = null;
123
+ lastRunId = null;
175
124
  };
176
- __decorateClass([
177
- tenantId({ nullable: true })
178
- ], SmrtReportLock.prototype, "tenantId", 2);
179
- __decorateClass([
180
- field({ type: "text", required: true })
181
- ], SmrtReportLock.prototype, "scopeKey", 2);
182
- __decorateClass([
183
- field({ type: "text", required: true })
184
- ], SmrtReportLock.prototype, "reportClass", 2);
185
- __decorateClass([
186
- field({ type: "text", nullable: true })
187
- ], SmrtReportLock.prototype, "ownerId", 2);
188
- __decorateClass([
189
- field({ type: "datetime", nullable: true })
190
- ], SmrtReportLock.prototype, "acquiredAt", 2);
191
- __decorateClass([
192
- field({ type: "datetime", nullable: true })
193
- ], SmrtReportLock.prototype, "heartbeatAt", 2);
194
- __decorateClass([
195
- field({ type: "datetime", nullable: true })
196
- ], SmrtReportLock.prototype, "expiresAt", 2);
197
- SmrtReportLock = __decorateClass([
198
- TenantScoped({ mode: "optional" }),
199
- smrt({
200
- tableName: "_smrt_report_locks",
201
- conflictColumns: ["report_class", "scope_key"],
202
- ...INTERNAL_SURFACE
203
- })
204
- ], SmrtReportLock);
205
- class SmrtReportLockCollection extends SmrtCollection {
206
- static _itemClass = SmrtReportLock;
207
- }
208
- let SmrtReportSchedule = class extends SmrtObject {
209
- tenantId = null;
210
- scopeKey = "global";
211
- reportClass = "";
212
- cron = "";
213
- trigger = "schedule";
214
- mode = "incremental";
215
- enabled = true;
216
- status = "active";
217
- nextRun = null;
218
- lastRun = null;
219
- lastStatus = null;
220
- lastError = null;
221
- runCount = 0;
222
- successCount = 0;
223
- failureCount = 0;
224
- runningCount = 0;
225
- maxConcurrent = 1;
226
- queue = "reports";
227
- priority = 70;
228
- timeout = 36e5;
125
+ __decorateClass([tenantId({ nullable: true })], SmrtReportWatermark.prototype, "tenantId", 2);
126
+ __decorateClass([field({
127
+ type: "text",
128
+ required: true
129
+ })], SmrtReportWatermark.prototype, "scopeKey", 2);
130
+ __decorateClass([field({
131
+ type: "text",
132
+ required: true
133
+ })], SmrtReportWatermark.prototype, "reportClass", 2);
134
+ __decorateClass([field({
135
+ type: "text",
136
+ required: true
137
+ })], SmrtReportWatermark.prototype, "sourceClass", 2);
138
+ __decorateClass([field({
139
+ type: "text",
140
+ required: true
141
+ })], SmrtReportWatermark.prototype, "watermarkColumn", 2);
142
+ __decorateClass([field({
143
+ type: "text",
144
+ nullable: true
145
+ })], SmrtReportWatermark.prototype, "watermarkValue", 2);
146
+ __decorateClass([field({
147
+ type: "text",
148
+ nullable: true
149
+ })], SmrtReportWatermark.prototype, "lastRunId", 2);
150
+ SmrtReportWatermark = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
151
+ tableName: "_smrt_report_watermarks",
152
+ conflictColumns: [
153
+ "report_class",
154
+ "scope_key",
155
+ "source_class",
156
+ "watermark_column"
157
+ ],
158
+ ...INTERNAL_SURFACE
159
+ })], SmrtReportWatermark);
160
+ var SmrtReportWatermarkCollection = class extends SmrtCollection {
161
+ static _itemClass = SmrtReportWatermark;
229
162
  };
230
- __decorateClass([
231
- tenantId({ nullable: true })
232
- ], SmrtReportSchedule.prototype, "tenantId", 2);
233
- __decorateClass([
234
- field({ type: "text", required: true })
235
- ], SmrtReportSchedule.prototype, "scopeKey", 2);
236
- __decorateClass([
237
- field({ type: "text", required: true })
238
- ], SmrtReportSchedule.prototype, "reportClass", 2);
239
- __decorateClass([
240
- field({ type: "text", required: true })
241
- ], SmrtReportSchedule.prototype, "cron", 2);
242
- __decorateClass([
243
- field({ type: "text", required: true })
244
- ], SmrtReportSchedule.prototype, "trigger", 2);
245
- __decorateClass([
246
- field({ type: "text", required: true })
247
- ], SmrtReportSchedule.prototype, "mode", 2);
248
- __decorateClass([
249
- field({ type: "boolean", required: true })
250
- ], SmrtReportSchedule.prototype, "enabled", 2);
251
- __decorateClass([
252
- field({ type: "text", required: true })
253
- ], SmrtReportSchedule.prototype, "status", 2);
254
- __decorateClass([
255
- field({ type: "datetime", nullable: true })
256
- ], SmrtReportSchedule.prototype, "nextRun", 2);
257
- __decorateClass([
258
- field({ type: "datetime", nullable: true })
259
- ], SmrtReportSchedule.prototype, "lastRun", 2);
260
- __decorateClass([
261
- field({ type: "text", nullable: true })
262
- ], SmrtReportSchedule.prototype, "lastStatus", 2);
263
- __decorateClass([
264
- field({ type: "text", nullable: true })
265
- ], SmrtReportSchedule.prototype, "lastError", 2);
266
- __decorateClass([
267
- field({ type: "integer", required: true })
268
- ], SmrtReportSchedule.prototype, "runCount", 2);
269
- __decorateClass([
270
- field({ type: "integer", required: true })
271
- ], SmrtReportSchedule.prototype, "successCount", 2);
272
- __decorateClass([
273
- field({ type: "integer", required: true })
274
- ], SmrtReportSchedule.prototype, "failureCount", 2);
275
- __decorateClass([
276
- field({ type: "integer", required: true })
277
- ], SmrtReportSchedule.prototype, "runningCount", 2);
278
- __decorateClass([
279
- field({ type: "integer", required: true })
280
- ], SmrtReportSchedule.prototype, "maxConcurrent", 2);
281
- __decorateClass([
282
- field({ type: "text", required: true })
283
- ], SmrtReportSchedule.prototype, "queue", 2);
284
- __decorateClass([
285
- field({ type: "integer", required: true })
286
- ], SmrtReportSchedule.prototype, "priority", 2);
287
- __decorateClass([
288
- field({ type: "integer", required: true })
289
- ], SmrtReportSchedule.prototype, "timeout", 2);
290
- SmrtReportSchedule = __decorateClass([
291
- TenantScoped({ mode: "optional" }),
292
- smrt({
293
- tableName: "_smrt_report_schedules",
294
- conflictColumns: ["report_class", "scope_key", "cron", "mode"],
295
- ...INTERNAL_SURFACE
296
- })
297
- ], SmrtReportSchedule);
298
- class SmrtReportScheduleCollection extends SmrtCollection {
299
- static _itemClass = SmrtReportSchedule;
300
- }
301
- export {
302
- REPORT_LOCKS_TABLE,
303
- REPORT_REFRESH_TASKS_TABLE,
304
- REPORT_RUNS_TABLE,
305
- REPORT_RUNTIME_TABLES,
306
- REPORT_SCHEDULER_TABLES,
307
- REPORT_SCHEDULES_TABLE,
308
- REPORT_WATERMARKS_TABLE,
309
- SmrtReportLock,
310
- SmrtReportLockCollection,
311
- SmrtReportRun,
312
- SmrtReportRunCollection,
313
- SmrtReportSchedule,
314
- SmrtReportScheduleCollection,
315
- SmrtReportWatermark,
316
- SmrtReportWatermarkCollection,
317
- assertReportTablesReady,
318
- scopeKeyForTenant
163
+ var SmrtReportLock = class extends SmrtObject {
164
+ tenantId = null;
165
+ scopeKey = "global";
166
+ reportClass = "";
167
+ ownerId = null;
168
+ acquiredAt = null;
169
+ heartbeatAt = null;
170
+ expiresAt = null;
171
+ };
172
+ __decorateClass([tenantId({ nullable: true })], SmrtReportLock.prototype, "tenantId", 2);
173
+ __decorateClass([field({
174
+ type: "text",
175
+ required: true
176
+ })], SmrtReportLock.prototype, "scopeKey", 2);
177
+ __decorateClass([field({
178
+ type: "text",
179
+ required: true
180
+ })], SmrtReportLock.prototype, "reportClass", 2);
181
+ __decorateClass([field({
182
+ type: "text",
183
+ nullable: true
184
+ })], SmrtReportLock.prototype, "ownerId", 2);
185
+ __decorateClass([field({
186
+ type: "datetime",
187
+ nullable: true
188
+ })], SmrtReportLock.prototype, "acquiredAt", 2);
189
+ __decorateClass([field({
190
+ type: "datetime",
191
+ nullable: true
192
+ })], SmrtReportLock.prototype, "heartbeatAt", 2);
193
+ __decorateClass([field({
194
+ type: "datetime",
195
+ nullable: true
196
+ })], SmrtReportLock.prototype, "expiresAt", 2);
197
+ SmrtReportLock = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
198
+ tableName: "_smrt_report_locks",
199
+ conflictColumns: ["report_class", "scope_key"],
200
+ ...INTERNAL_SURFACE
201
+ })], SmrtReportLock);
202
+ var SmrtReportLockCollection = class extends SmrtCollection {
203
+ static _itemClass = SmrtReportLock;
204
+ };
205
+ var SmrtReportSchedule = class extends SmrtObject {
206
+ tenantId = null;
207
+ scopeKey = "global";
208
+ reportClass = "";
209
+ cron = "";
210
+ trigger = "schedule";
211
+ mode = "incremental";
212
+ enabled = true;
213
+ status = "active";
214
+ nextRun = null;
215
+ lastRun = null;
216
+ lastStatus = null;
217
+ lastError = null;
218
+ runCount = 0;
219
+ successCount = 0;
220
+ failureCount = 0;
221
+ runningCount = 0;
222
+ maxConcurrent = 1;
223
+ queue = "reports";
224
+ priority = 70;
225
+ timeout = 36e5;
226
+ };
227
+ __decorateClass([tenantId({ nullable: true })], SmrtReportSchedule.prototype, "tenantId", 2);
228
+ __decorateClass([field({
229
+ type: "text",
230
+ required: true
231
+ })], SmrtReportSchedule.prototype, "scopeKey", 2);
232
+ __decorateClass([field({
233
+ type: "text",
234
+ required: true
235
+ })], SmrtReportSchedule.prototype, "reportClass", 2);
236
+ __decorateClass([field({
237
+ type: "text",
238
+ required: true
239
+ })], SmrtReportSchedule.prototype, "cron", 2);
240
+ __decorateClass([field({
241
+ type: "text",
242
+ required: true
243
+ })], SmrtReportSchedule.prototype, "trigger", 2);
244
+ __decorateClass([field({
245
+ type: "text",
246
+ required: true
247
+ })], SmrtReportSchedule.prototype, "mode", 2);
248
+ __decorateClass([field({
249
+ type: "boolean",
250
+ required: true
251
+ })], SmrtReportSchedule.prototype, "enabled", 2);
252
+ __decorateClass([field({
253
+ type: "text",
254
+ required: true
255
+ })], SmrtReportSchedule.prototype, "status", 2);
256
+ __decorateClass([field({
257
+ type: "datetime",
258
+ nullable: true
259
+ })], SmrtReportSchedule.prototype, "nextRun", 2);
260
+ __decorateClass([field({
261
+ type: "datetime",
262
+ nullable: true
263
+ })], SmrtReportSchedule.prototype, "lastRun", 2);
264
+ __decorateClass([field({
265
+ type: "text",
266
+ nullable: true
267
+ })], SmrtReportSchedule.prototype, "lastStatus", 2);
268
+ __decorateClass([field({
269
+ type: "text",
270
+ nullable: true
271
+ })], SmrtReportSchedule.prototype, "lastError", 2);
272
+ __decorateClass([field({
273
+ type: "integer",
274
+ required: true
275
+ })], SmrtReportSchedule.prototype, "runCount", 2);
276
+ __decorateClass([field({
277
+ type: "integer",
278
+ required: true
279
+ })], SmrtReportSchedule.prototype, "successCount", 2);
280
+ __decorateClass([field({
281
+ type: "integer",
282
+ required: true
283
+ })], SmrtReportSchedule.prototype, "failureCount", 2);
284
+ __decorateClass([field({
285
+ type: "integer",
286
+ required: true
287
+ })], SmrtReportSchedule.prototype, "runningCount", 2);
288
+ __decorateClass([field({
289
+ type: "integer",
290
+ required: true
291
+ })], SmrtReportSchedule.prototype, "maxConcurrent", 2);
292
+ __decorateClass([field({
293
+ type: "text",
294
+ required: true
295
+ })], SmrtReportSchedule.prototype, "queue", 2);
296
+ __decorateClass([field({
297
+ type: "integer",
298
+ required: true
299
+ })], SmrtReportSchedule.prototype, "priority", 2);
300
+ __decorateClass([field({
301
+ type: "integer",
302
+ required: true
303
+ })], SmrtReportSchedule.prototype, "timeout", 2);
304
+ SmrtReportSchedule = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
305
+ tableName: "_smrt_report_schedules",
306
+ conflictColumns: [
307
+ "report_class",
308
+ "scope_key",
309
+ "cron",
310
+ "mode"
311
+ ],
312
+ ...INTERNAL_SURFACE
313
+ })], SmrtReportSchedule);
314
+ var SmrtReportScheduleCollection = class extends SmrtCollection {
315
+ static _itemClass = SmrtReportSchedule;
319
316
  };
320
- //# sourceMappingURL=state.js.map
317
+ //#endregion
318
+ export { REPORT_LOCKS_TABLE, REPORT_REFRESH_TASKS_TABLE, REPORT_RUNS_TABLE, REPORT_RUNTIME_TABLES, REPORT_SCHEDULER_TABLES, REPORT_SCHEDULES_TABLE, REPORT_WATERMARKS_TABLE, SmrtReportLock, SmrtReportLockCollection, SmrtReportRun, SmrtReportRunCollection, SmrtReportSchedule, SmrtReportScheduleCollection, SmrtReportWatermark, SmrtReportWatermarkCollection, assertReportTablesReady, scopeKeyForTenant };
319
+
320
+ //# sourceMappingURL=state.js.map