@happyvertical/smrt-reports 0.37.2 → 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/aggregate.js +1 -5
- package/dist/compiler.js +138 -185
- package/dist/compiler.js.map +1 -1
- package/dist/decorators.js +53 -68
- package/dist/decorators.js.map +1 -1
- package/dist/index.js +80 -152
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +2 -2
- package/dist/refresh.js +423 -667
- package/dist/refresh.js.map +1 -1
- package/dist/scheduler.js +330 -395
- package/dist/scheduler.js.map +1 -1
- package/dist/smrt-knowledge.json +7 -7
- package/dist/state.js +305 -305
- package/dist/state.js.map +1 -1
- package/dist/types.js +0 -2
- package/package.json +9 -9
- package/dist/aggregate.js.map +0 -1
- package/dist/types.js.map +0 -1
package/dist/state.js
CHANGED
|
@@ -1,320 +1,320 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
24
|
+
return tenantId2 ? `tenant:${tenantId2}` : "global";
|
|
29
25
|
}
|
|
30
26
|
async function assertReportTablesReady(db, tables = REPORT_RUNTIME_TABLES) {
|
|
31
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
], SmrtReportRun.prototype, "reportClass", 2);
|
|
75
|
-
__decorateClass([
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
], SmrtReportRun.prototype, "
|
|
87
|
-
__decorateClass([
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
], SmrtReportRun.prototype, "
|
|
99
|
-
__decorateClass([
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
], SmrtReportRun.prototype, "
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
],
|
|
185
|
-
__decorateClass([
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
],
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
__decorateClass([
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
],
|
|
248
|
-
__decorateClass([
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
],
|
|
260
|
-
__decorateClass([
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
],
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
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
|
-
//#
|
|
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
|