@surveilr/bootstrap-sql 0.0.1
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/README.md +42 -0
- package/dist/chunk-HZLAQ5XF.js +1315 -0
- package/dist/chunk-QTY32BJY.js +844 -0
- package/dist/index.cjs +2896 -0
- package/dist/index.d.cts +278 -0
- package/dist/index.d.ts +278 -0
- package/dist/index.js +808 -0
- package/dist/models.cjs +1394 -0
- package/dist/models.d.cts +16708 -0
- package/dist/models.d.ts +16708 -0
- package/dist/models.js +140 -0
- package/dist/views.cjs +2120 -0
- package/dist/views.d.cts +2462 -0
- package/dist/views.d.ts +2462 -0
- package/dist/views.js +87 -0
- package/package.json +51 -0
package/dist/models.cjs
ADDED
|
@@ -0,0 +1,1394 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// models.ts
|
|
21
|
+
var models_exports = {};
|
|
22
|
+
__export(models_exports, {
|
|
23
|
+
assuranceSchema: () => assuranceSchema,
|
|
24
|
+
behavior: () => behavior,
|
|
25
|
+
checkJSON: () => checkJSON,
|
|
26
|
+
codeNotebookCell: () => codeNotebookCell,
|
|
27
|
+
codeNotebookKernel: () => codeNotebookKernel,
|
|
28
|
+
codeNotebookState: () => codeNotebookState,
|
|
29
|
+
device: () => device,
|
|
30
|
+
devicePartyRelationship: () => devicePartyRelationship,
|
|
31
|
+
genderType: () => genderType,
|
|
32
|
+
housekeeping: () => housekeeping,
|
|
33
|
+
orchestrationNature: () => orchestrationNature,
|
|
34
|
+
orchestrationSession: () => orchestrationSession,
|
|
35
|
+
orchestrationSessionEntry: () => orchestrationSessionEntry,
|
|
36
|
+
orchestrationSessionExec: () => orchestrationSessionExec,
|
|
37
|
+
orchestrationSessionIssue: () => orchestrationSessionIssue,
|
|
38
|
+
orchestrationSessionIssueRelation: () => orchestrationSessionIssueRelation,
|
|
39
|
+
orchestrationSessionLog: () => orchestrationSessionLog,
|
|
40
|
+
orchestrationSessionState: () => orchestrationSessionState,
|
|
41
|
+
organization: () => organization,
|
|
42
|
+
organizationRole: () => organizationRole,
|
|
43
|
+
organizationRoleType: () => organizationRoleType,
|
|
44
|
+
osqueryPolicy: () => osqueryPolicy,
|
|
45
|
+
party: () => party,
|
|
46
|
+
partyRelation: () => partyRelation,
|
|
47
|
+
partyRelationType: () => partyRelationType,
|
|
48
|
+
partyType: () => partyType,
|
|
49
|
+
person: () => person,
|
|
50
|
+
personType: () => personType,
|
|
51
|
+
sexType: () => sexType,
|
|
52
|
+
sqleanDefine: () => sqleanDefine,
|
|
53
|
+
sqlpageAideNavigation: () => sqlpageAideNavigation,
|
|
54
|
+
sqlpageFiles: () => sqlpageFiles,
|
|
55
|
+
surveilrFunctionDoc: () => surveilrFunctionDoc,
|
|
56
|
+
surveilrOsqueryMsCarve: () => surveilrOsqueryMsCarve,
|
|
57
|
+
surveilrOsqueryMsCarvedExtractedFile: () => surveilrOsqueryMsCarvedExtractedFile,
|
|
58
|
+
surveilrOsqueryMsDistributedQuery: () => surveilrOsqueryMsDistributedQuery,
|
|
59
|
+
surveilrOsqueryMsDistributedResult: () => surveilrOsqueryMsDistributedResult,
|
|
60
|
+
surveilrOsqueryMsNode: () => surveilrOsqueryMsNode,
|
|
61
|
+
surveilrSnmpCollection: () => surveilrSnmpCollection,
|
|
62
|
+
surveilrSnmpDevice: () => surveilrSnmpDevice,
|
|
63
|
+
surveilrTableSize: () => surveilrTableSize,
|
|
64
|
+
uniformResource: () => uniformResource,
|
|
65
|
+
uniformResourceEdge: () => uniformResourceEdge,
|
|
66
|
+
uniformResourceGraph: () => uniformResourceGraph,
|
|
67
|
+
uniformResourceTransform: () => uniformResourceTransform,
|
|
68
|
+
urIngestResourcePathMatchRule: () => urIngestResourcePathMatchRule,
|
|
69
|
+
urIngestResourcePathRewriteRule: () => urIngestResourcePathRewriteRule,
|
|
70
|
+
urIngestSession: () => urIngestSession,
|
|
71
|
+
urIngestSessionAttachment: () => urIngestSessionAttachment,
|
|
72
|
+
urIngestSessionFsPath: () => urIngestSessionFsPath,
|
|
73
|
+
urIngestSessionFsPathEntry: () => urIngestSessionFsPathEntry,
|
|
74
|
+
urIngestSessionImapAccount: () => urIngestSessionImapAccount,
|
|
75
|
+
urIngestSessionImapAcctFolder: () => urIngestSessionImapAcctFolder,
|
|
76
|
+
urIngestSessionImapAcctFolderMessage: () => urIngestSessionImapAcctFolderMessage,
|
|
77
|
+
urIngestSessionOsqueryMsLog: () => urIngestSessionOsqueryMsLog,
|
|
78
|
+
urIngestSessionPlmAccount: () => urIngestSessionPlmAccount,
|
|
79
|
+
urIngestSessionPlmAcctLabel: () => urIngestSessionPlmAcctLabel,
|
|
80
|
+
urIngestSessionPlmAcctProject: () => urIngestSessionPlmAcctProject,
|
|
81
|
+
urIngestSessionPlmAcctProjectIssue: () => urIngestSessionPlmAcctProjectIssue,
|
|
82
|
+
urIngestSessionPlmAcctRelationship: () => urIngestSessionPlmAcctRelationship,
|
|
83
|
+
urIngestSessionPlmComment: () => urIngestSessionPlmComment,
|
|
84
|
+
urIngestSessionPlmIssueReaction: () => urIngestSessionPlmIssueReaction,
|
|
85
|
+
urIngestSessionPlmIssueType: () => urIngestSessionPlmIssueType,
|
|
86
|
+
urIngestSessionPlmMilestone: () => urIngestSessionPlmMilestone,
|
|
87
|
+
urIngestSessionPlmReaction: () => urIngestSessionPlmReaction,
|
|
88
|
+
urIngestSessionPlmUser: () => urIngestSessionPlmUser,
|
|
89
|
+
urIngestSessionTask: () => urIngestSessionTask,
|
|
90
|
+
urIngestSessionUdiPgpSql: () => urIngestSessionUdiPgpSql
|
|
91
|
+
});
|
|
92
|
+
module.exports = __toCommonJS(models_exports);
|
|
93
|
+
var import_sqlite_core = require("drizzle-orm/sqlite-core");
|
|
94
|
+
var import_drizzle_orm = require("drizzle-orm");
|
|
95
|
+
var timestamptz = (0, import_sqlite_core.customType)({
|
|
96
|
+
dataType() {
|
|
97
|
+
return "TIMESTAMPTZ";
|
|
98
|
+
},
|
|
99
|
+
fromDriver(value) {
|
|
100
|
+
return value;
|
|
101
|
+
},
|
|
102
|
+
toDriver(value) {
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
var date = (0, import_sqlite_core.customType)({
|
|
107
|
+
dataType() {
|
|
108
|
+
return "DATE";
|
|
109
|
+
},
|
|
110
|
+
fromDriver(value) {
|
|
111
|
+
return value;
|
|
112
|
+
},
|
|
113
|
+
toDriver(value) {
|
|
114
|
+
return value;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
var ulid = (0, import_sqlite_core.customType)({
|
|
118
|
+
dataType() {
|
|
119
|
+
return "ULID";
|
|
120
|
+
},
|
|
121
|
+
fromDriver(value) {
|
|
122
|
+
return value;
|
|
123
|
+
},
|
|
124
|
+
toDriver(value) {
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
var varchar = (0, import_sqlite_core.customType)({
|
|
129
|
+
dataType() {
|
|
130
|
+
return "VARCHAR";
|
|
131
|
+
},
|
|
132
|
+
fromDriver(value) {
|
|
133
|
+
return value;
|
|
134
|
+
},
|
|
135
|
+
toDriver(value) {
|
|
136
|
+
return value;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
var textArray = (0, import_sqlite_core.customType)({
|
|
140
|
+
dataType() {
|
|
141
|
+
return "TEXT[]";
|
|
142
|
+
},
|
|
143
|
+
fromDriver(value) {
|
|
144
|
+
return JSON.parse(value);
|
|
145
|
+
},
|
|
146
|
+
toDriver(value) {
|
|
147
|
+
return JSON.stringify(value);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
var housekeeping = {
|
|
151
|
+
createdAt: timestamptz("created_at").default(import_drizzle_orm.sql`CURRENT_TIMESTAMP`),
|
|
152
|
+
createdBy: (0, import_sqlite_core.text)("created_by").default("UNKNOWN"),
|
|
153
|
+
updatedAt: timestamptz("updated_at"),
|
|
154
|
+
updatedBy: (0, import_sqlite_core.text)("updated_by"),
|
|
155
|
+
deletedAt: timestamptz("deleted_at"),
|
|
156
|
+
deletedBy: (0, import_sqlite_core.text)("deleted_by"),
|
|
157
|
+
activityLog: (0, import_sqlite_core.text)("activity_log")
|
|
158
|
+
};
|
|
159
|
+
var sqleanDefine = (0, import_sqlite_core.sqliteTable)("sqlean_define", {
|
|
160
|
+
name: (0, import_sqlite_core.text)().primaryKey(),
|
|
161
|
+
type: (0, import_sqlite_core.text)(),
|
|
162
|
+
body: (0, import_sqlite_core.text)()
|
|
163
|
+
}, (table2) => []);
|
|
164
|
+
var checkJSON = (c) => (0, import_sqlite_core.check)(`${c.name}_check_valid_json`, import_drizzle_orm.sql`json_valid(${c}) OR ${c} IS NULL`);
|
|
165
|
+
var assuranceSchema = (0, import_sqlite_core.sqliteTable)("assurance_schema", {
|
|
166
|
+
assuranceSchemaId: varchar("assurance_schema_id").primaryKey().notNull(),
|
|
167
|
+
assuranceType: (0, import_sqlite_core.text)("assurance_type").notNull(),
|
|
168
|
+
code: (0, import_sqlite_core.text)().notNull(),
|
|
169
|
+
codeJson: (0, import_sqlite_core.text)("code_json", { mode: "json" }),
|
|
170
|
+
governance: (0, import_sqlite_core.text)(),
|
|
171
|
+
...housekeeping
|
|
172
|
+
}, (table2) => [
|
|
173
|
+
checkJSON(table2.codeJson),
|
|
174
|
+
checkJSON(table2.governance)
|
|
175
|
+
]);
|
|
176
|
+
var device = (0, import_sqlite_core.sqliteTable)("device", {
|
|
177
|
+
deviceId: varchar("device_id").primaryKey().notNull(),
|
|
178
|
+
name: (0, import_sqlite_core.text)().notNull(),
|
|
179
|
+
state: (0, import_sqlite_core.text)().notNull(),
|
|
180
|
+
boundary: (0, import_sqlite_core.text)().notNull(),
|
|
181
|
+
segmentation: (0, import_sqlite_core.text)(),
|
|
182
|
+
stateSysinfo: (0, import_sqlite_core.text)("state_sysinfo"),
|
|
183
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
184
|
+
...housekeeping
|
|
185
|
+
}, (table2) => [
|
|
186
|
+
(0, import_sqlite_core.index)("idx_device__name__state").on(table2.name, table2.state),
|
|
187
|
+
(0, import_sqlite_core.unique)().on(table2.name, table2.state, table2.boundary),
|
|
188
|
+
checkJSON(table2.state),
|
|
189
|
+
checkJSON(table2.segmentation),
|
|
190
|
+
checkJSON(table2.stateSysinfo),
|
|
191
|
+
checkJSON(table2.elaboration)
|
|
192
|
+
]);
|
|
193
|
+
var codeNotebookKernel = (0, import_sqlite_core.sqliteTable)("code_notebook_kernel", {
|
|
194
|
+
codeNotebookKernelId: varchar("code_notebook_kernel_id").primaryKey().notNull(),
|
|
195
|
+
kernelName: (0, import_sqlite_core.text)("kernel_name").notNull(),
|
|
196
|
+
description: (0, import_sqlite_core.text)(),
|
|
197
|
+
mimeType: (0, import_sqlite_core.text)("mime_type"),
|
|
198
|
+
fileExtn: (0, import_sqlite_core.text)("file_extn"),
|
|
199
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
200
|
+
governance: (0, import_sqlite_core.text)(),
|
|
201
|
+
...housekeeping
|
|
202
|
+
}, (table2) => [
|
|
203
|
+
(0, import_sqlite_core.unique)().on(table2.kernelName),
|
|
204
|
+
checkJSON(table2.elaboration),
|
|
205
|
+
checkJSON(table2.governance)
|
|
206
|
+
]);
|
|
207
|
+
var codeNotebookCell = (0, import_sqlite_core.sqliteTable)("code_notebook_cell", {
|
|
208
|
+
codeNotebookCellId: varchar("code_notebook_cell_id").primaryKey().notNull(),
|
|
209
|
+
notebookKernelId: varchar("notebook_kernel_id").notNull().references(
|
|
210
|
+
() => codeNotebookKernel.codeNotebookKernelId
|
|
211
|
+
),
|
|
212
|
+
notebookName: (0, import_sqlite_core.text)("notebook_name").notNull(),
|
|
213
|
+
cellName: (0, import_sqlite_core.text)("cell_name").notNull(),
|
|
214
|
+
cellGovernance: (0, import_sqlite_core.text)("cell_governance"),
|
|
215
|
+
interpretableCode: (0, import_sqlite_core.text)("interpretable_code").notNull(),
|
|
216
|
+
interpretableCodeHash: (0, import_sqlite_core.text)("interpretable_code_hash").notNull(),
|
|
217
|
+
description: (0, import_sqlite_core.text)(),
|
|
218
|
+
arguments: (0, import_sqlite_core.text)(),
|
|
219
|
+
...housekeeping
|
|
220
|
+
}, (table2) => [
|
|
221
|
+
(0, import_sqlite_core.unique)().on(table2.notebookName, table2.cellName, table2.interpretableCodeHash),
|
|
222
|
+
checkJSON(table2.cellGovernance),
|
|
223
|
+
checkJSON(table2.arguments)
|
|
224
|
+
]);
|
|
225
|
+
var codeNotebookState = (0, import_sqlite_core.sqliteTable)("code_notebook_state", {
|
|
226
|
+
codeNotebookStateId: varchar("code_notebook_state_id").primaryKey().notNull(),
|
|
227
|
+
codeNotebookCellId: varchar("code_notebook_cell_id").notNull().references(
|
|
228
|
+
() => codeNotebookCell.codeNotebookCellId
|
|
229
|
+
),
|
|
230
|
+
fromState: (0, import_sqlite_core.text)("from_state").notNull(),
|
|
231
|
+
toState: (0, import_sqlite_core.text)("to_state").notNull(),
|
|
232
|
+
transitionResult: (0, import_sqlite_core.text)("transition_result"),
|
|
233
|
+
transitionReason: (0, import_sqlite_core.text)("transition_reason"),
|
|
234
|
+
transitionedAt: timestamptz("transitioned_at"),
|
|
235
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
236
|
+
...housekeeping
|
|
237
|
+
}, (table2) => [
|
|
238
|
+
(0, import_sqlite_core.unique)().on(table2.codeNotebookCellId, table2.fromState, table2.toState),
|
|
239
|
+
checkJSON(table2.transitionResult),
|
|
240
|
+
checkJSON(table2.elaboration)
|
|
241
|
+
]);
|
|
242
|
+
var sqlpageFiles = (0, import_sqlite_core.sqliteTable)("sqlpage_files", {
|
|
243
|
+
path: (0, import_sqlite_core.text)().primaryKey().notNull(),
|
|
244
|
+
contents: (0, import_sqlite_core.text)().notNull(),
|
|
245
|
+
lastModified: (0, import_sqlite_core.numeric)("last_modified").default(import_drizzle_orm.sql`(CURRENT_TIMESTAMP)`)
|
|
246
|
+
}, (table2) => []);
|
|
247
|
+
var surveilrTableSize = (0, import_sqlite_core.sqliteTable)("surveilr_table_size", {
|
|
248
|
+
tableName: (0, import_sqlite_core.text)("table_name").primaryKey(),
|
|
249
|
+
tableSizeMb: (0, import_sqlite_core.real)("table_size_mb")
|
|
250
|
+
}, (table2) => []);
|
|
251
|
+
var sqlpageAideNavigation = (0, import_sqlite_core.sqliteTable)("sqlpage_aide_navigation", {
|
|
252
|
+
path: (0, import_sqlite_core.text)().notNull(),
|
|
253
|
+
caption: (0, import_sqlite_core.text)().notNull(),
|
|
254
|
+
namespace: (0, import_sqlite_core.text)().notNull(),
|
|
255
|
+
parentPath: (0, import_sqlite_core.text)("parent_path"),
|
|
256
|
+
siblingOrder: (0, import_sqlite_core.integer)("sibling_order"),
|
|
257
|
+
url: (0, import_sqlite_core.text)(),
|
|
258
|
+
title: (0, import_sqlite_core.text)(),
|
|
259
|
+
abbreviatedCaption: (0, import_sqlite_core.text)("abbreviated_caption"),
|
|
260
|
+
description: (0, import_sqlite_core.text)(),
|
|
261
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
262
|
+
}, (table2) => [
|
|
263
|
+
(0, import_sqlite_core.unique)("unq_ns_path").on(table2.namespace, table2.parentPath, table2.path)
|
|
264
|
+
]);
|
|
265
|
+
var partyType = (0, import_sqlite_core.sqliteTable)("party_type", {
|
|
266
|
+
partyTypeId: ulid("party_type_id").primaryKey().notNull(),
|
|
267
|
+
code: (0, import_sqlite_core.text)().notNull(),
|
|
268
|
+
value: (0, import_sqlite_core.text)().notNull(),
|
|
269
|
+
...housekeeping
|
|
270
|
+
}, (table2) => [
|
|
271
|
+
(0, import_sqlite_core.unique)("unq_party_type_code").on(table2.code)
|
|
272
|
+
]);
|
|
273
|
+
var party = (0, import_sqlite_core.sqliteTable)("party", {
|
|
274
|
+
partyId: varchar("party_id").primaryKey().notNull(),
|
|
275
|
+
partyTypeId: ulid("party_type_id").notNull().references(
|
|
276
|
+
() => partyType.partyTypeId
|
|
277
|
+
).$type(),
|
|
278
|
+
// ULID
|
|
279
|
+
partyName: (0, import_sqlite_core.text)("party_name").notNull(),
|
|
280
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
281
|
+
...housekeeping
|
|
282
|
+
}, (table2) => [
|
|
283
|
+
(0, import_sqlite_core.index)("idx_party__party_type_id__party_name").on(
|
|
284
|
+
table2.partyTypeId,
|
|
285
|
+
table2.partyName
|
|
286
|
+
)
|
|
287
|
+
]);
|
|
288
|
+
var partyRelationType = (0, import_sqlite_core.sqliteTable)("party_relation_type", {
|
|
289
|
+
partyRelationTypeId: (0, import_sqlite_core.text)("party_relation_type_id").primaryKey().notNull().$type(),
|
|
290
|
+
// ULID
|
|
291
|
+
code: (0, import_sqlite_core.text)().notNull(),
|
|
292
|
+
value: (0, import_sqlite_core.text)().notNull(),
|
|
293
|
+
...housekeeping
|
|
294
|
+
}, (table2) => [
|
|
295
|
+
(0, import_sqlite_core.unique)().on(table2.code)
|
|
296
|
+
]);
|
|
297
|
+
var partyRelation = (0, import_sqlite_core.sqliteTable)("party_relation", {
|
|
298
|
+
partyRelationId: varchar("party_relation_id").primaryKey().notNull(),
|
|
299
|
+
partyId: (0, import_sqlite_core.text)("party_id").notNull().references(() => party.partyId),
|
|
300
|
+
relatedPartyId: (0, import_sqlite_core.text)("related_party_id").notNull().references(
|
|
301
|
+
() => party.partyId
|
|
302
|
+
),
|
|
303
|
+
relationTypeId: (0, import_sqlite_core.text)("relation_type_id").notNull().references(
|
|
304
|
+
() => partyRelationType.partyRelationTypeId
|
|
305
|
+
).$type(),
|
|
306
|
+
// ULID
|
|
307
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
308
|
+
...housekeeping
|
|
309
|
+
}, (table2) => [
|
|
310
|
+
(0, import_sqlite_core.index)("idx_party_relation__party_id__related_party_id__relation_type_id").on(
|
|
311
|
+
table2.partyId,
|
|
312
|
+
table2.relatedPartyId,
|
|
313
|
+
table2.relationTypeId
|
|
314
|
+
),
|
|
315
|
+
(0, import_sqlite_core.unique)().on(table2.partyId, table2.relatedPartyId, table2.relationTypeId),
|
|
316
|
+
checkJSON(table2.elaboration)
|
|
317
|
+
]);
|
|
318
|
+
var genderType = (0, import_sqlite_core.sqliteTable)("gender_type", {
|
|
319
|
+
genderTypeId: ulid("gender_type_id").primaryKey().notNull(),
|
|
320
|
+
code: (0, import_sqlite_core.text)().notNull(),
|
|
321
|
+
value: (0, import_sqlite_core.text)().notNull(),
|
|
322
|
+
...housekeeping
|
|
323
|
+
}, (table2) => [
|
|
324
|
+
(0, import_sqlite_core.unique)().on(table2.code)
|
|
325
|
+
]);
|
|
326
|
+
var sexType = (0, import_sqlite_core.sqliteTable)("sex_type", {
|
|
327
|
+
sexTypeId: ulid("sex_type_id").primaryKey().notNull(),
|
|
328
|
+
code: (0, import_sqlite_core.text)().notNull(),
|
|
329
|
+
value: (0, import_sqlite_core.text)().notNull(),
|
|
330
|
+
...housekeeping
|
|
331
|
+
}, (table2) => [
|
|
332
|
+
(0, import_sqlite_core.unique)().on(table2.code)
|
|
333
|
+
]);
|
|
334
|
+
var personType = (0, import_sqlite_core.sqliteTable)("person_type", {
|
|
335
|
+
personTypeId: ulid("person_type_id").primaryKey().notNull(),
|
|
336
|
+
code: (0, import_sqlite_core.text)().notNull(),
|
|
337
|
+
value: (0, import_sqlite_core.text)().notNull(),
|
|
338
|
+
...housekeeping
|
|
339
|
+
}, (table2) => [
|
|
340
|
+
(0, import_sqlite_core.unique)().on(table2.code)
|
|
341
|
+
]);
|
|
342
|
+
var person = (0, import_sqlite_core.sqliteTable)("person", {
|
|
343
|
+
personId: ulid("person_id").primaryKey().notNull(),
|
|
344
|
+
partyId: (0, import_sqlite_core.text)("party_id").notNull().references(() => party.partyId),
|
|
345
|
+
personTypeId: ulid("person_type_id").notNull().references(
|
|
346
|
+
() => personType.personTypeId
|
|
347
|
+
),
|
|
348
|
+
personFirstName: (0, import_sqlite_core.text)("person_first_name").notNull(),
|
|
349
|
+
personMiddleName: (0, import_sqlite_core.text)("person_middle_name"),
|
|
350
|
+
personLastName: (0, import_sqlite_core.text)("person_last_name").notNull(),
|
|
351
|
+
previousName: (0, import_sqlite_core.text)("previous_name"),
|
|
352
|
+
honorificPrefix: (0, import_sqlite_core.text)("honorific_prefix"),
|
|
353
|
+
honorificSuffix: (0, import_sqlite_core.text)("honorific_suffix"),
|
|
354
|
+
genderId: ulid("gender_id").notNull().references(
|
|
355
|
+
() => genderType.genderTypeId
|
|
356
|
+
),
|
|
357
|
+
sexId: ulid("sex_id").notNull().references(() => sexType.sexTypeId),
|
|
358
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
359
|
+
...housekeeping
|
|
360
|
+
}, (table2) => [
|
|
361
|
+
checkJSON(table2.elaboration)
|
|
362
|
+
]);
|
|
363
|
+
var organization = (0, import_sqlite_core.sqliteTable)("organization", {
|
|
364
|
+
organizationId: ulid("organization_id").primaryKey().notNull(),
|
|
365
|
+
partyId: (0, import_sqlite_core.text)("party_id").notNull().references(() => party.partyId),
|
|
366
|
+
name: (0, import_sqlite_core.text)().notNull(),
|
|
367
|
+
alias: (0, import_sqlite_core.text)(),
|
|
368
|
+
description: (0, import_sqlite_core.text)(),
|
|
369
|
+
license: (0, import_sqlite_core.text)().notNull(),
|
|
370
|
+
federalTaxIdNum: (0, import_sqlite_core.text)("federal_tax_id_num"),
|
|
371
|
+
registrationDate: date("registration_date").notNull(),
|
|
372
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
373
|
+
...housekeeping
|
|
374
|
+
}, (table2) => [
|
|
375
|
+
checkJSON(table2.elaboration)
|
|
376
|
+
]);
|
|
377
|
+
var organizationRoleType = (0, import_sqlite_core.sqliteTable)("organization_role_type", {
|
|
378
|
+
organizationRoleTypeId: ulid("organization_role_type_id").primaryKey().notNull(),
|
|
379
|
+
code: (0, import_sqlite_core.text)().notNull(),
|
|
380
|
+
value: (0, import_sqlite_core.text)().notNull(),
|
|
381
|
+
...housekeeping
|
|
382
|
+
}, (table2) => [
|
|
383
|
+
(0, import_sqlite_core.unique)().on(table2.code)
|
|
384
|
+
]);
|
|
385
|
+
var organizationRole = (0, import_sqlite_core.sqliteTable)("organization_role", {
|
|
386
|
+
organizationRoleId: (0, import_sqlite_core.text)("organization_role_id").primaryKey().notNull(),
|
|
387
|
+
personId: (0, import_sqlite_core.text)("person_id").notNull().references(() => party.partyId),
|
|
388
|
+
organizationId: (0, import_sqlite_core.text)("organization_id").notNull().references(
|
|
389
|
+
() => party.partyId
|
|
390
|
+
),
|
|
391
|
+
organizationRoleTypeId: ulid("organization_role_type_id").notNull().references(() => organizationRoleType.organizationRoleTypeId),
|
|
392
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
393
|
+
...housekeeping
|
|
394
|
+
}, (table2) => [
|
|
395
|
+
(0, import_sqlite_core.index)(
|
|
396
|
+
"idx_organization_role__person_id__organization_id__organization_role_type_id"
|
|
397
|
+
).on(table2.personId, table2.organizationId, table2.organizationRoleTypeId),
|
|
398
|
+
(0, import_sqlite_core.unique)().on(table2.personId, table2.organizationId, table2.organizationRoleTypeId),
|
|
399
|
+
checkJSON(table2.elaboration)
|
|
400
|
+
]);
|
|
401
|
+
var devicePartyRelationship = (0, import_sqlite_core.sqliteTable)("device_party_relationship", {
|
|
402
|
+
devicePartyRelationshipId: (0, import_sqlite_core.text)("device_party_relationship_id").primaryKey().notNull(),
|
|
403
|
+
deviceId: (0, import_sqlite_core.text)("device_id").notNull().references(() => device.deviceId),
|
|
404
|
+
partyId: (0, import_sqlite_core.text)("party_id").notNull().references(() => party.partyId),
|
|
405
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
406
|
+
...housekeeping
|
|
407
|
+
}, (table2) => [
|
|
408
|
+
(0, import_sqlite_core.index)("idx_device_party_relationship__device_id__party_id").on(
|
|
409
|
+
table2.deviceId,
|
|
410
|
+
table2.partyId
|
|
411
|
+
),
|
|
412
|
+
(0, import_sqlite_core.unique)().on(table2.deviceId, table2.partyId),
|
|
413
|
+
checkJSON(table2.elaboration)
|
|
414
|
+
]);
|
|
415
|
+
var behavior = (0, import_sqlite_core.sqliteTable)("behavior", {
|
|
416
|
+
behaviorId: varchar("behavior_id").primaryKey().notNull(),
|
|
417
|
+
deviceId: (0, import_sqlite_core.text)("device_id").notNull(),
|
|
418
|
+
behaviorName: (0, import_sqlite_core.text)("behavior_name").notNull(),
|
|
419
|
+
behaviorConfJson: (0, import_sqlite_core.text)("behavior_conf_json").notNull(),
|
|
420
|
+
assuranceSchemaId: (0, import_sqlite_core.text)("assurance_schema_id"),
|
|
421
|
+
governance: (0, import_sqlite_core.text)(),
|
|
422
|
+
...housekeeping
|
|
423
|
+
}, (table2) => [
|
|
424
|
+
(0, import_sqlite_core.unique)().on(table2.deviceId, table2.behaviorName),
|
|
425
|
+
checkJSON(table2.behaviorConfJson),
|
|
426
|
+
checkJSON(table2.governance)
|
|
427
|
+
]);
|
|
428
|
+
var urIngestResourcePathMatchRule = (0, import_sqlite_core.sqliteTable)(
|
|
429
|
+
"ur_ingest_resource_path_match_rule",
|
|
430
|
+
{
|
|
431
|
+
urIngestResourcePathMatchRuleId: (0, import_sqlite_core.text)(
|
|
432
|
+
"ur_ingest_resource_path_match_rule_id"
|
|
433
|
+
).primaryKey().notNull(),
|
|
434
|
+
namespace: (0, import_sqlite_core.text)().notNull(),
|
|
435
|
+
regex: (0, import_sqlite_core.text)().notNull(),
|
|
436
|
+
flags: (0, import_sqlite_core.text)().notNull(),
|
|
437
|
+
nature: (0, import_sqlite_core.text)(),
|
|
438
|
+
priority: (0, import_sqlite_core.text)(),
|
|
439
|
+
description: (0, import_sqlite_core.text)(),
|
|
440
|
+
includeGlobPatterns: textArray("include_glob_patterns"),
|
|
441
|
+
excludeGlobPatterns: textArray("exclude_glob_patterns"),
|
|
442
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
443
|
+
...housekeeping
|
|
444
|
+
},
|
|
445
|
+
(table2) => [
|
|
446
|
+
checkJSON(table2.elaboration),
|
|
447
|
+
(0, import_sqlite_core.unique)("unq_path_match_regex").on(table2.namespace, table2.regex)
|
|
448
|
+
]
|
|
449
|
+
);
|
|
450
|
+
var urIngestResourcePathRewriteRule = (0, import_sqlite_core.sqliteTable)(
|
|
451
|
+
"ur_ingest_resource_path_rewrite_rule",
|
|
452
|
+
{
|
|
453
|
+
urIngestResourcePathRewriteRuleId: (0, import_sqlite_core.text)(
|
|
454
|
+
"ur_ingest_resource_path_rewrite_rule_id"
|
|
455
|
+
).primaryKey().notNull(),
|
|
456
|
+
namespace: (0, import_sqlite_core.text)().notNull(),
|
|
457
|
+
regex: (0, import_sqlite_core.text)().notNull(),
|
|
458
|
+
replace: (0, import_sqlite_core.text)().notNull(),
|
|
459
|
+
priority: (0, import_sqlite_core.text)(),
|
|
460
|
+
description: (0, import_sqlite_core.text)(),
|
|
461
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
462
|
+
...housekeeping
|
|
463
|
+
},
|
|
464
|
+
(table2) => [
|
|
465
|
+
(0, import_sqlite_core.unique)().on(table2.namespace, table2.regex, table2.replace),
|
|
466
|
+
checkJSON(table2.elaboration)
|
|
467
|
+
]
|
|
468
|
+
);
|
|
469
|
+
var urIngestSession = (0, import_sqlite_core.sqliteTable)("ur_ingest_session", {
|
|
470
|
+
urIngestSessionId: (0, import_sqlite_core.text)("ur_ingest_session_id").primaryKey().notNull(),
|
|
471
|
+
deviceId: (0, import_sqlite_core.text)("device_id").notNull().references(() => device.deviceId),
|
|
472
|
+
behaviorId: (0, import_sqlite_core.text)("behavior_id").references(() => behavior.behaviorId),
|
|
473
|
+
behaviorJson: (0, import_sqlite_core.text)("behavior_json"),
|
|
474
|
+
ingestStartedAt: timestamptz("ingest_started_at").notNull(),
|
|
475
|
+
ingestFinishedAt: timestamptz("ingest_finished_at"),
|
|
476
|
+
sessionAgent: (0, import_sqlite_core.text)("session_agent").notNull(),
|
|
477
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
478
|
+
...housekeeping
|
|
479
|
+
}, (table2) => [
|
|
480
|
+
(0, import_sqlite_core.unique)().on(table2.deviceId, table2.createdAt),
|
|
481
|
+
checkJSON(table2.behaviorJson),
|
|
482
|
+
checkJSON(table2.sessionAgent),
|
|
483
|
+
checkJSON(table2.elaboration)
|
|
484
|
+
]);
|
|
485
|
+
var urIngestSessionFsPath = (0, import_sqlite_core.sqliteTable)("ur_ingest_session_fs_path", {
|
|
486
|
+
urIngestSessionFsPathId: (0, import_sqlite_core.text)("ur_ingest_session_fs_path_id").primaryKey().notNull(),
|
|
487
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
488
|
+
() => urIngestSession.urIngestSessionId
|
|
489
|
+
),
|
|
490
|
+
rootPath: (0, import_sqlite_core.text)("root_path").notNull(),
|
|
491
|
+
includeGlobPatterns: textArray("include_glob_patterns"),
|
|
492
|
+
excludeGlobPatterns: textArray("exclude_glob_patterns"),
|
|
493
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
494
|
+
...housekeeping
|
|
495
|
+
}, (table2) => [
|
|
496
|
+
(0, import_sqlite_core.index)("idx_ur_ingest_session_fs_path__ingest_session_id__root_path").on(
|
|
497
|
+
table2.ingestSessionId,
|
|
498
|
+
table2.rootPath
|
|
499
|
+
),
|
|
500
|
+
(0, import_sqlite_core.unique)().on(table2.ingestSessionId, table2.rootPath, table2.createdAt),
|
|
501
|
+
checkJSON(table2.elaboration)
|
|
502
|
+
]);
|
|
503
|
+
var uniformResource = (0, import_sqlite_core.sqliteTable)("uniform_resource", {
|
|
504
|
+
uniformResourceId: (0, import_sqlite_core.text)("uniform_resource_id").primaryKey().notNull(),
|
|
505
|
+
deviceId: (0, import_sqlite_core.text)("device_id").notNull().references(() => device.deviceId),
|
|
506
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
507
|
+
() => urIngestSession.urIngestSessionId
|
|
508
|
+
),
|
|
509
|
+
ingestFsPathId: (0, import_sqlite_core.text)("ingest_fs_path_id").references(
|
|
510
|
+
() => urIngestSessionFsPath.urIngestSessionFsPathId
|
|
511
|
+
),
|
|
512
|
+
ingestSessionImapAcctFolderMessage: (0, import_sqlite_core.text)(
|
|
513
|
+
"ingest_session_imap_acct_folder_message"
|
|
514
|
+
).references(
|
|
515
|
+
() => urIngestSessionImapAcctFolderMessage.urIngestSessionImapAcctFolderMessageId
|
|
516
|
+
),
|
|
517
|
+
ingestIssueAcctProjectId: (0, import_sqlite_core.text)("ingest_issue_acct_project_id").references(
|
|
518
|
+
() => urIngestSessionPlmAcctProject.urIngestSessionPlmAcctProjectId
|
|
519
|
+
),
|
|
520
|
+
uri: (0, import_sqlite_core.text)().notNull(),
|
|
521
|
+
contentDigest: (0, import_sqlite_core.text)("content_digest").notNull(),
|
|
522
|
+
content: (0, import_sqlite_core.blob)(),
|
|
523
|
+
nature: (0, import_sqlite_core.text)(),
|
|
524
|
+
sizeBytes: (0, import_sqlite_core.integer)("size_bytes"),
|
|
525
|
+
lastModifiedAt: timestamptz("last_modified_at"),
|
|
526
|
+
contentFmBodyAttrs: (0, import_sqlite_core.text)("content_fm_body_attrs"),
|
|
527
|
+
frontmatter: (0, import_sqlite_core.text)(),
|
|
528
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
529
|
+
...housekeeping
|
|
530
|
+
}, (table2) => [
|
|
531
|
+
(0, import_sqlite_core.index)("idx_uniform_resource__device_id__uri").on(table2.deviceId, table2.uri),
|
|
532
|
+
(0, import_sqlite_core.unique)().on(table2.deviceId, table2.contentDigest, table2.uri, table2.sizeBytes),
|
|
533
|
+
checkJSON(table2.contentFmBodyAttrs),
|
|
534
|
+
checkJSON(table2.frontmatter),
|
|
535
|
+
checkJSON(table2.elaboration)
|
|
536
|
+
]);
|
|
537
|
+
var uniformResourceTransform = (0, import_sqlite_core.sqliteTable)("uniform_resource_transform", {
|
|
538
|
+
uniformResourceTransformId: (0, import_sqlite_core.text)("uniform_resource_transform_id").primaryKey().notNull(),
|
|
539
|
+
uniformResourceId: (0, import_sqlite_core.text)("uniform_resource_id").notNull().references(
|
|
540
|
+
() => uniformResource.uniformResourceId
|
|
541
|
+
),
|
|
542
|
+
uri: (0, import_sqlite_core.text)().notNull(),
|
|
543
|
+
contentDigest: (0, import_sqlite_core.text)("content_digest").notNull(),
|
|
544
|
+
content: (0, import_sqlite_core.text)(),
|
|
545
|
+
nature: (0, import_sqlite_core.text)(),
|
|
546
|
+
sizeBytes: (0, import_sqlite_core.integer)("size_bytes"),
|
|
547
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
548
|
+
...housekeeping
|
|
549
|
+
}, (table2) => [
|
|
550
|
+
(0, import_sqlite_core.index)("idx_uniform_resource_transform__uniform_resource_id__content_digest").on(table2.uniformResourceId, table2.contentDigest),
|
|
551
|
+
(0, import_sqlite_core.unique)().on(table2.uniformResourceId, table2.contentDigest, table2.nature, table2.sizeBytes),
|
|
552
|
+
checkJSON(table2.elaboration)
|
|
553
|
+
]);
|
|
554
|
+
var urIngestSessionFsPathEntry = (0, import_sqlite_core.sqliteTable)(
|
|
555
|
+
"ur_ingest_session_fs_path_entry",
|
|
556
|
+
{
|
|
557
|
+
urIngestSessionFsPathEntryId: (0, import_sqlite_core.text)("ur_ingest_session_fs_path_entry_id").primaryKey().notNull(),
|
|
558
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
559
|
+
() => urIngestSession.urIngestSessionId
|
|
560
|
+
),
|
|
561
|
+
ingestFsPathId: (0, import_sqlite_core.text)("ingest_fs_path_id").notNull().references(
|
|
562
|
+
() => urIngestSessionFsPath.urIngestSessionFsPathId
|
|
563
|
+
),
|
|
564
|
+
uniformResourceId: (0, import_sqlite_core.text)("uniform_resource_id").references(
|
|
565
|
+
() => uniformResource.uniformResourceId
|
|
566
|
+
),
|
|
567
|
+
filePathAbs: (0, import_sqlite_core.text)("file_path_abs").notNull(),
|
|
568
|
+
filePathRelParent: (0, import_sqlite_core.text)("file_path_rel_parent").notNull(),
|
|
569
|
+
filePathRel: (0, import_sqlite_core.text)("file_path_rel").notNull(),
|
|
570
|
+
fileBasename: (0, import_sqlite_core.text)("file_basename").notNull(),
|
|
571
|
+
fileExtn: (0, import_sqlite_core.text)("file_extn"),
|
|
572
|
+
capturedExecutable: (0, import_sqlite_core.text)("captured_executable"),
|
|
573
|
+
urStatus: (0, import_sqlite_core.text)("ur_status"),
|
|
574
|
+
urDiagnostics: (0, import_sqlite_core.text)("ur_diagnostics"),
|
|
575
|
+
urTransformations: (0, import_sqlite_core.text)("ur_transformations"),
|
|
576
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
577
|
+
...housekeeping
|
|
578
|
+
},
|
|
579
|
+
(table2) => [
|
|
580
|
+
(0, import_sqlite_core.index)(
|
|
581
|
+
"idx_ur_ingest_session_fs_path_entry__ingest_session_id__file_path_abs"
|
|
582
|
+
).on(table2.ingestSessionId, table2.filePathAbs),
|
|
583
|
+
(0, import_sqlite_core.unique)(
|
|
584
|
+
"uq_ur_ingest_session_fs_path_entry__ingest_session_id__ingest_fs_path_id__file_path_abs"
|
|
585
|
+
).on(table2.ingestSessionId, table2.ingestFsPathId, table2.filePathAbs),
|
|
586
|
+
checkJSON(table2.capturedExecutable),
|
|
587
|
+
checkJSON(table2.urDiagnostics),
|
|
588
|
+
checkJSON(table2.urTransformations),
|
|
589
|
+
checkJSON(table2.elaboration)
|
|
590
|
+
]
|
|
591
|
+
);
|
|
592
|
+
var urIngestSessionTask = (0, import_sqlite_core.sqliteTable)("ur_ingest_session_task", {
|
|
593
|
+
urIngestSessionTaskId: (0, import_sqlite_core.text)("ur_ingest_session_task_id").primaryKey().notNull(),
|
|
594
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
595
|
+
() => urIngestSession.urIngestSessionId
|
|
596
|
+
),
|
|
597
|
+
uniformResourceId: (0, import_sqlite_core.text)("uniform_resource_id").references(
|
|
598
|
+
() => uniformResource.uniformResourceId
|
|
599
|
+
),
|
|
600
|
+
capturedExecutable: (0, import_sqlite_core.text)("captured_executable").notNull(),
|
|
601
|
+
urStatus: (0, import_sqlite_core.text)("ur_status"),
|
|
602
|
+
urDiagnostics: (0, import_sqlite_core.text)("ur_diagnostics"),
|
|
603
|
+
urTransformations: (0, import_sqlite_core.text)("ur_transformations"),
|
|
604
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
605
|
+
...housekeeping
|
|
606
|
+
}, (table2) => [
|
|
607
|
+
(0, import_sqlite_core.index)("idx_ur_ingest_session_task__ingest_session_id").on(
|
|
608
|
+
table2.ingestSessionId
|
|
609
|
+
),
|
|
610
|
+
checkJSON(table2.capturedExecutable),
|
|
611
|
+
checkJSON(table2.urDiagnostics),
|
|
612
|
+
checkJSON(table2.urTransformations),
|
|
613
|
+
checkJSON(table2.elaboration)
|
|
614
|
+
]);
|
|
615
|
+
var urIngestSessionImapAccount = (0, import_sqlite_core.sqliteTable)(
|
|
616
|
+
"ur_ingest_session_imap_account",
|
|
617
|
+
{
|
|
618
|
+
urIngestSessionImapAccountId: (0, import_sqlite_core.text)("ur_ingest_session_imap_account_id").primaryKey().notNull(),
|
|
619
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
620
|
+
() => urIngestSession.urIngestSessionId
|
|
621
|
+
),
|
|
622
|
+
email: (0, import_sqlite_core.text)(),
|
|
623
|
+
password: (0, import_sqlite_core.text)(),
|
|
624
|
+
host: (0, import_sqlite_core.text)(),
|
|
625
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
626
|
+
...housekeeping
|
|
627
|
+
},
|
|
628
|
+
(table2) => [
|
|
629
|
+
(0, import_sqlite_core.index)("idx_ur_ingest_session_imap_account__ingest_session_id__email").on(
|
|
630
|
+
table2.ingestSessionId,
|
|
631
|
+
table2.email
|
|
632
|
+
),
|
|
633
|
+
(0, import_sqlite_core.unique)().on(table2.ingestSessionId, table2.email)
|
|
634
|
+
]
|
|
635
|
+
);
|
|
636
|
+
var urIngestSessionImapAcctFolder = (0, import_sqlite_core.sqliteTable)(
|
|
637
|
+
"ur_ingest_session_imap_acct_folder",
|
|
638
|
+
{
|
|
639
|
+
urIngestSessionImapAcctFolderId: (0, import_sqlite_core.text)(
|
|
640
|
+
"ur_ingest_session_imap_acct_folder_id"
|
|
641
|
+
).primaryKey().notNull(),
|
|
642
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
643
|
+
() => urIngestSession.urIngestSessionId
|
|
644
|
+
),
|
|
645
|
+
ingestAccountId: (0, import_sqlite_core.text)("ingest_account_id").notNull().references(
|
|
646
|
+
() => urIngestSessionImapAccount.urIngestSessionImapAccountId
|
|
647
|
+
),
|
|
648
|
+
folderName: (0, import_sqlite_core.text)("folder_name").notNull(),
|
|
649
|
+
includeSenders: textArray("include_senders"),
|
|
650
|
+
excludeSenders: textArray("exclude_senders"),
|
|
651
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
652
|
+
...housekeeping
|
|
653
|
+
},
|
|
654
|
+
(table2) => [
|
|
655
|
+
(0, import_sqlite_core.index)(
|
|
656
|
+
"idx_ur_ingest_session_imap_acct_folder__ingest_session_id__folder_name"
|
|
657
|
+
).on(table2.ingestSessionId, table2.folderName),
|
|
658
|
+
(0, import_sqlite_core.unique)().on(table2.ingestAccountId, table2.folderName)
|
|
659
|
+
]
|
|
660
|
+
);
|
|
661
|
+
var urIngestSessionImapAcctFolderMessage = (0, import_sqlite_core.sqliteTable)(
|
|
662
|
+
"ur_ingest_session_imap_acct_folder_message",
|
|
663
|
+
{
|
|
664
|
+
urIngestSessionImapAcctFolderMessageId: (0, import_sqlite_core.text)(
|
|
665
|
+
"ur_ingest_session_imap_acct_folder_message_id"
|
|
666
|
+
).primaryKey().notNull(),
|
|
667
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
668
|
+
() => urIngestSession.urIngestSessionId
|
|
669
|
+
),
|
|
670
|
+
ingestImapAcctFolderId: (0, import_sqlite_core.text)("ingest_imap_acct_folder_id").notNull().references(
|
|
671
|
+
() => urIngestSessionImapAcctFolder.urIngestSessionImapAcctFolderId
|
|
672
|
+
),
|
|
673
|
+
message: (0, import_sqlite_core.text)().notNull(),
|
|
674
|
+
messageId: (0, import_sqlite_core.text)("message_id").notNull(),
|
|
675
|
+
subject: (0, import_sqlite_core.text)().notNull(),
|
|
676
|
+
from: (0, import_sqlite_core.text)().notNull(),
|
|
677
|
+
cc: (0, import_sqlite_core.text)().notNull(),
|
|
678
|
+
bcc: (0, import_sqlite_core.text)().notNull(),
|
|
679
|
+
status: textArray().notNull(),
|
|
680
|
+
date: date(),
|
|
681
|
+
emailReferences: (0, import_sqlite_core.text)("email_references").notNull(),
|
|
682
|
+
...housekeeping
|
|
683
|
+
},
|
|
684
|
+
(table2) => [
|
|
685
|
+
(0, import_sqlite_core.index)("idx_ur_ingest_session_imap_acct_folder_message__ingest_session_id").on(table2.ingestSessionId),
|
|
686
|
+
(0, import_sqlite_core.unique)().on(table2.message, table2.messageId),
|
|
687
|
+
checkJSON(table2.cc),
|
|
688
|
+
checkJSON(table2.bcc),
|
|
689
|
+
checkJSON(table2.emailReferences)
|
|
690
|
+
]
|
|
691
|
+
);
|
|
692
|
+
var urIngestSessionPlmAccount = (0, import_sqlite_core.sqliteTable)(
|
|
693
|
+
"ur_ingest_session_plm_account",
|
|
694
|
+
{
|
|
695
|
+
urIngestSessionPlmAccountId: varchar("ur_ingest_session_plm_account_id").primaryKey().notNull(),
|
|
696
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
697
|
+
() => urIngestSession.urIngestSessionId
|
|
698
|
+
),
|
|
699
|
+
provider: (0, import_sqlite_core.text)().notNull(),
|
|
700
|
+
orgName: (0, import_sqlite_core.text)("org_name").notNull(),
|
|
701
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
702
|
+
...housekeeping
|
|
703
|
+
},
|
|
704
|
+
(table2) => [
|
|
705
|
+
(0, import_sqlite_core.unique)().on(table2.provider, table2.orgName),
|
|
706
|
+
checkJSON(table2.elaboration)
|
|
707
|
+
]
|
|
708
|
+
);
|
|
709
|
+
var urIngestSessionPlmAcctProject = (0, import_sqlite_core.sqliteTable)(
|
|
710
|
+
"ur_ingest_session_plm_acct_project",
|
|
711
|
+
{
|
|
712
|
+
urIngestSessionPlmAcctProjectId: varchar(
|
|
713
|
+
"ur_ingest_session_plm_acct_project_id"
|
|
714
|
+
).primaryKey().notNull(),
|
|
715
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
716
|
+
() => urIngestSession.urIngestSessionId
|
|
717
|
+
),
|
|
718
|
+
ingestAccountId: (0, import_sqlite_core.text)("ingest_account_id").notNull().references(
|
|
719
|
+
() => urIngestSessionPlmAccount.urIngestSessionPlmAccountId
|
|
720
|
+
),
|
|
721
|
+
parentProjectId: (0, import_sqlite_core.text)("parent_project_id"),
|
|
722
|
+
name: (0, import_sqlite_core.text)().notNull(),
|
|
723
|
+
description: (0, import_sqlite_core.text)(),
|
|
724
|
+
id: (0, import_sqlite_core.text)(),
|
|
725
|
+
key: (0, import_sqlite_core.text)(),
|
|
726
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
727
|
+
...housekeeping
|
|
728
|
+
},
|
|
729
|
+
(table2) => [
|
|
730
|
+
(0, import_sqlite_core.unique)().on(table2.name, table2.description),
|
|
731
|
+
checkJSON(table2.elaboration)
|
|
732
|
+
]
|
|
733
|
+
);
|
|
734
|
+
var urIngestSessionPlmUser = (0, import_sqlite_core.sqliteTable)("ur_ingest_session_plm_user", {
|
|
735
|
+
urIngestSessionPlmUserId: varchar("ur_ingest_session_plm_user_id").primaryKey().notNull(),
|
|
736
|
+
userId: (0, import_sqlite_core.text)("user_id").notNull(),
|
|
737
|
+
login: (0, import_sqlite_core.text)().notNull(),
|
|
738
|
+
email: (0, import_sqlite_core.text)(),
|
|
739
|
+
name: (0, import_sqlite_core.text)(),
|
|
740
|
+
url: (0, import_sqlite_core.text)().notNull(),
|
|
741
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
742
|
+
...housekeeping
|
|
743
|
+
}, (table2) => [
|
|
744
|
+
(0, import_sqlite_core.unique)().on(table2.userId, table2.login),
|
|
745
|
+
checkJSON(table2.elaboration)
|
|
746
|
+
]);
|
|
747
|
+
var urIngestSessionPlmIssueType = (0, import_sqlite_core.sqliteTable)(
|
|
748
|
+
"ur_ingest_session_plm_issue_type",
|
|
749
|
+
{
|
|
750
|
+
urIngestSessionPlmIssueTypeId: varchar("ur_ingest_session_plm_issue_type_id").primaryKey().notNull(),
|
|
751
|
+
avatarId: (0, import_sqlite_core.text)("avatar_id"),
|
|
752
|
+
description: (0, import_sqlite_core.text)().notNull(),
|
|
753
|
+
iconUrl: (0, import_sqlite_core.text)("icon_url").notNull(),
|
|
754
|
+
id: (0, import_sqlite_core.text)().notNull(),
|
|
755
|
+
name: (0, import_sqlite_core.text)().notNull(),
|
|
756
|
+
subtask: (0, import_sqlite_core.integer)().notNull(),
|
|
757
|
+
url: (0, import_sqlite_core.text)().notNull(),
|
|
758
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
759
|
+
...housekeeping
|
|
760
|
+
},
|
|
761
|
+
(table2) => [
|
|
762
|
+
(0, import_sqlite_core.unique)().on(table2.id, table2.name),
|
|
763
|
+
checkJSON(table2.elaboration)
|
|
764
|
+
]
|
|
765
|
+
);
|
|
766
|
+
var urIngestSessionPlmAcctProjectIssue = (0, import_sqlite_core.sqliteTable)(
|
|
767
|
+
"ur_ingest_session_plm_acct_project_issue",
|
|
768
|
+
{
|
|
769
|
+
urIngestSessionPlmAcctProjectIssueId: varchar(
|
|
770
|
+
"ur_ingest_session_plm_acct_project_issue_id"
|
|
771
|
+
).primaryKey().notNull(),
|
|
772
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").notNull().references(
|
|
773
|
+
() => urIngestSession.urIngestSessionId
|
|
774
|
+
),
|
|
775
|
+
urIngestSessionPlmAcctProjectId: (0, import_sqlite_core.text)(
|
|
776
|
+
"ur_ingest_session_plm_acct_project_id"
|
|
777
|
+
).notNull().references(
|
|
778
|
+
() => urIngestSessionPlmAcctProject.urIngestSessionPlmAcctProjectId
|
|
779
|
+
),
|
|
780
|
+
uniformResourceId: (0, import_sqlite_core.text)("uniform_resource_id").references(
|
|
781
|
+
() => uniformResource.uniformResourceId
|
|
782
|
+
),
|
|
783
|
+
issueId: (0, import_sqlite_core.text)("issue_id").notNull(),
|
|
784
|
+
issueNumber: (0, import_sqlite_core.integer)("issue_number"),
|
|
785
|
+
parentIssueId: (0, import_sqlite_core.text)("parent_issue_id"),
|
|
786
|
+
title: (0, import_sqlite_core.text)().notNull(),
|
|
787
|
+
body: (0, import_sqlite_core.text)(),
|
|
788
|
+
bodyText: (0, import_sqlite_core.text)("body_text"),
|
|
789
|
+
bodyHtml: (0, import_sqlite_core.text)("body_html"),
|
|
790
|
+
state: (0, import_sqlite_core.text)().notNull(),
|
|
791
|
+
assignedTo: (0, import_sqlite_core.text)("assigned_to"),
|
|
792
|
+
user: (0, import_sqlite_core.text)().notNull().references(
|
|
793
|
+
() => urIngestSessionPlmUser.urIngestSessionPlmUserId
|
|
794
|
+
),
|
|
795
|
+
url: (0, import_sqlite_core.text)().notNull(),
|
|
796
|
+
closedAt: (0, import_sqlite_core.text)("closed_at"),
|
|
797
|
+
issueTypeId: (0, import_sqlite_core.text)("issue_type_id").references(
|
|
798
|
+
() => urIngestSessionPlmIssueType.urIngestSessionPlmIssueTypeId
|
|
799
|
+
),
|
|
800
|
+
timeEstimate: (0, import_sqlite_core.integer)("time_estimate"),
|
|
801
|
+
aggregateTimeEstimate: (0, import_sqlite_core.integer)("aggregate_time_estimate"),
|
|
802
|
+
timeOriginalEstimate: (0, import_sqlite_core.integer)("time_original_estimate"),
|
|
803
|
+
timeSpent: (0, import_sqlite_core.integer)("time_spent"),
|
|
804
|
+
aggregateTimeSpent: (0, import_sqlite_core.integer)("aggregate_time_spent"),
|
|
805
|
+
aggregateTimeOriginalEstimate: (0, import_sqlite_core.integer)("aggregate_time_original_estimate"),
|
|
806
|
+
workratio: (0, import_sqlite_core.integer)(),
|
|
807
|
+
currentProgress: (0, import_sqlite_core.integer)("current_progress"),
|
|
808
|
+
totalProgress: (0, import_sqlite_core.integer)("total_progress"),
|
|
809
|
+
resolutionName: (0, import_sqlite_core.text)("resolution_name"),
|
|
810
|
+
resolutionDate: (0, import_sqlite_core.text)("resolution_date"),
|
|
811
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
812
|
+
...housekeeping
|
|
813
|
+
},
|
|
814
|
+
(table2) => [
|
|
815
|
+
(0, import_sqlite_core.unique)().on(table2.title, table2.issueId, table2.state, table2.assignedTo),
|
|
816
|
+
checkJSON(table2.elaboration)
|
|
817
|
+
]
|
|
818
|
+
);
|
|
819
|
+
var urIngestSessionPlmAcctLabel = (0, import_sqlite_core.sqliteTable)(
|
|
820
|
+
"ur_ingest_session_plm_acct_label",
|
|
821
|
+
{
|
|
822
|
+
urIngestSessionPlmAcctLabelId: varchar("ur_ingest_session_plm_acct_label_id").primaryKey().notNull(),
|
|
823
|
+
urIngestSessionPlmAcctProjectId: (0, import_sqlite_core.text)(
|
|
824
|
+
"ur_ingest_session_plm_acct_project_id"
|
|
825
|
+
).notNull().references(
|
|
826
|
+
() => urIngestSessionPlmAcctProject.urIngestSessionPlmAcctProjectId
|
|
827
|
+
),
|
|
828
|
+
urIngestSessionPlmAcctProjectIssueId: (0, import_sqlite_core.text)(
|
|
829
|
+
"ur_ingest_session_plm_acct_project_issue_id"
|
|
830
|
+
).notNull().references(
|
|
831
|
+
() => urIngestSessionPlmAcctProjectIssue.urIngestSessionPlmAcctProjectIssueId
|
|
832
|
+
),
|
|
833
|
+
label: (0, import_sqlite_core.text)().notNull(),
|
|
834
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
835
|
+
...housekeeping
|
|
836
|
+
},
|
|
837
|
+
(table2) => [
|
|
838
|
+
checkJSON(table2.elaboration)
|
|
839
|
+
]
|
|
840
|
+
);
|
|
841
|
+
var urIngestSessionPlmMilestone = (0, import_sqlite_core.sqliteTable)(
|
|
842
|
+
"ur_ingest_session_plm_milestone",
|
|
843
|
+
{
|
|
844
|
+
urIngestSessionPlmMilestoneId: varchar("ur_ingest_session_plm_milestone_id").primaryKey().notNull(),
|
|
845
|
+
urIngestSessionPlmAcctProjectId: (0, import_sqlite_core.text)(
|
|
846
|
+
"ur_ingest_session_plm_acct_project_id"
|
|
847
|
+
).notNull().references(
|
|
848
|
+
() => urIngestSessionPlmAcctProject.urIngestSessionPlmAcctProjectId
|
|
849
|
+
),
|
|
850
|
+
title: (0, import_sqlite_core.text)().notNull(),
|
|
851
|
+
milestoneId: (0, import_sqlite_core.text)("milestone_id").notNull(),
|
|
852
|
+
url: (0, import_sqlite_core.text)().notNull(),
|
|
853
|
+
htmlUrl: (0, import_sqlite_core.text)("html_url").notNull(),
|
|
854
|
+
openIssues: (0, import_sqlite_core.integer)("open_issues"),
|
|
855
|
+
closedIssues: (0, import_sqlite_core.integer)("closed_issues"),
|
|
856
|
+
dueOn: timestamptz("due_on"),
|
|
857
|
+
closedAt: timestamptz("closed_at"),
|
|
858
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
859
|
+
...housekeeping
|
|
860
|
+
},
|
|
861
|
+
(table2) => [
|
|
862
|
+
checkJSON(table2.elaboration)
|
|
863
|
+
]
|
|
864
|
+
);
|
|
865
|
+
var urIngestSessionPlmAcctRelationship = (0, import_sqlite_core.sqliteTable)(
|
|
866
|
+
"ur_ingest_session_plm_acct_relationship",
|
|
867
|
+
{
|
|
868
|
+
urIngestSessionPlmAcctRelationshipId: varchar(
|
|
869
|
+
"ur_ingest_session_plm_acct_relationship_id"
|
|
870
|
+
).primaryKey().notNull(),
|
|
871
|
+
urIngestSessionPlmAcctProjectIdPrime: (0, import_sqlite_core.text)(
|
|
872
|
+
"ur_ingest_session_plm_acct_project_id_prime"
|
|
873
|
+
).notNull().references(
|
|
874
|
+
() => urIngestSessionPlmAcctProject.urIngestSessionPlmAcctProjectId
|
|
875
|
+
),
|
|
876
|
+
urIngestSessionPlmAcctProjectIdRelated: (0, import_sqlite_core.text)(
|
|
877
|
+
"ur_ingest_session_plm_acct_project_id_related"
|
|
878
|
+
).notNull(),
|
|
879
|
+
urIngestSessionPlmAcctProjectIssueIdPrime: (0, import_sqlite_core.text)(
|
|
880
|
+
"ur_ingest_session_plm_acct_project_issue_id_prime"
|
|
881
|
+
).notNull().references(
|
|
882
|
+
() => urIngestSessionPlmAcctProjectIssue.urIngestSessionPlmAcctProjectIssueId
|
|
883
|
+
),
|
|
884
|
+
urIngestSessionPlmAcctProjectIssueIdRelated: (0, import_sqlite_core.text)(
|
|
885
|
+
"ur_ingest_session_plm_acct_project_issue_id_related"
|
|
886
|
+
).notNull(),
|
|
887
|
+
relationship: (0, import_sqlite_core.text)(),
|
|
888
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
889
|
+
...housekeeping
|
|
890
|
+
},
|
|
891
|
+
(table2) => [
|
|
892
|
+
checkJSON(table2.elaboration)
|
|
893
|
+
]
|
|
894
|
+
);
|
|
895
|
+
var urIngestSessionPlmComment = (0, import_sqlite_core.sqliteTable)(
|
|
896
|
+
"ur_ingest_session_plm_comment",
|
|
897
|
+
{
|
|
898
|
+
urIngestSessionPlmCommentId: varchar("ur_ingest_session_plm_comment_id").primaryKey().notNull(),
|
|
899
|
+
urIngestSessionPlmAcctProjectIssueId: (0, import_sqlite_core.text)(
|
|
900
|
+
"ur_ingest_session_plm_acct_project_issue_id"
|
|
901
|
+
).notNull().references(
|
|
902
|
+
() => urIngestSessionPlmAcctProjectIssue.urIngestSessionPlmAcctProjectIssueId
|
|
903
|
+
),
|
|
904
|
+
commentId: (0, import_sqlite_core.text)("comment_id").notNull(),
|
|
905
|
+
nodeId: (0, import_sqlite_core.text)("node_id").notNull(),
|
|
906
|
+
url: (0, import_sqlite_core.text)().notNull(),
|
|
907
|
+
body: (0, import_sqlite_core.text)(),
|
|
908
|
+
bodyText: (0, import_sqlite_core.text)("body_text"),
|
|
909
|
+
bodyHtml: (0, import_sqlite_core.text)("body_html"),
|
|
910
|
+
user: (0, import_sqlite_core.text)().notNull().references(
|
|
911
|
+
() => urIngestSessionPlmUser.urIngestSessionPlmUserId
|
|
912
|
+
),
|
|
913
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
914
|
+
...housekeeping
|
|
915
|
+
},
|
|
916
|
+
(table2) => [
|
|
917
|
+
(0, import_sqlite_core.unique)().on(table2.commentId, table2.url, table2.body),
|
|
918
|
+
checkJSON(table2.elaboration)
|
|
919
|
+
]
|
|
920
|
+
);
|
|
921
|
+
var urIngestSessionPlmReaction = (0, import_sqlite_core.sqliteTable)(
|
|
922
|
+
"ur_ingest_session_plm_reaction",
|
|
923
|
+
{
|
|
924
|
+
urIngestSessionPlmReactionId: varchar("ur_ingest_session_plm_reaction_id").primaryKey().notNull(),
|
|
925
|
+
reactionId: (0, import_sqlite_core.text)("reaction_id").notNull(),
|
|
926
|
+
reactionType: (0, import_sqlite_core.text)("reaction_type").notNull(),
|
|
927
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
928
|
+
...housekeeping
|
|
929
|
+
},
|
|
930
|
+
(table2) => [
|
|
931
|
+
(0, import_sqlite_core.unique)().on(table2.reactionType),
|
|
932
|
+
checkJSON(table2.elaboration)
|
|
933
|
+
]
|
|
934
|
+
);
|
|
935
|
+
var urIngestSessionPlmIssueReaction = (0, import_sqlite_core.sqliteTable)(
|
|
936
|
+
"ur_ingest_session_plm_issue_reaction",
|
|
937
|
+
{
|
|
938
|
+
urIngestSessionPlmIssueReactionId: varchar(
|
|
939
|
+
"ur_ingest_session_plm_issue_reaction_id"
|
|
940
|
+
).primaryKey().notNull(),
|
|
941
|
+
urIngestPlmReactionId: (0, import_sqlite_core.text)("ur_ingest_plm_reaction_id").notNull().references(() => urIngestSessionPlmReaction.urIngestSessionPlmReactionId),
|
|
942
|
+
urIngestPlmIssueId: (0, import_sqlite_core.text)("ur_ingest_plm_issue_id").notNull().references(
|
|
943
|
+
() => urIngestSessionPlmAcctProjectIssue.urIngestSessionPlmAcctProjectIssueId
|
|
944
|
+
),
|
|
945
|
+
count: (0, import_sqlite_core.integer)().default(1),
|
|
946
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
947
|
+
...housekeeping
|
|
948
|
+
},
|
|
949
|
+
(table2) => [
|
|
950
|
+
(0, import_sqlite_core.unique)().on(table2.urIngestPlmIssueId, table2.urIngestPlmReactionId),
|
|
951
|
+
checkJSON(table2.elaboration)
|
|
952
|
+
]
|
|
953
|
+
);
|
|
954
|
+
var urIngestSessionAttachment = (0, import_sqlite_core.sqliteTable)("ur_ingest_session_attachment", {
|
|
955
|
+
urIngestSessionAttachmentId: (0, import_sqlite_core.text)("ur_ingest_session_attachment_id").primaryKey().notNull(),
|
|
956
|
+
uniformResourceId: (0, import_sqlite_core.text)("uniform_resource_id").references(
|
|
957
|
+
() => uniformResource.uniformResourceId
|
|
958
|
+
),
|
|
959
|
+
name: (0, import_sqlite_core.text)(),
|
|
960
|
+
uri: (0, import_sqlite_core.text)().notNull(),
|
|
961
|
+
content: (0, import_sqlite_core.blob)(),
|
|
962
|
+
nature: (0, import_sqlite_core.text)(),
|
|
963
|
+
size: (0, import_sqlite_core.integer)(),
|
|
964
|
+
checksum: (0, import_sqlite_core.text)(),
|
|
965
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
966
|
+
...housekeeping
|
|
967
|
+
}, (table2) => [
|
|
968
|
+
(0, import_sqlite_core.index)("idx_ur_ingest_session_attachment__uniform_resource_id__content").on(
|
|
969
|
+
table2.uniformResourceId,
|
|
970
|
+
table2.content
|
|
971
|
+
),
|
|
972
|
+
(0, import_sqlite_core.unique)().on(table2.uniformResourceId, table2.checksum, table2.nature, table2.size)
|
|
973
|
+
]);
|
|
974
|
+
var urIngestSessionUdiPgpSql = (0, import_sqlite_core.sqliteTable)("ur_ingest_session_udi_pgp_sql", {
|
|
975
|
+
urIngestSessionUdiPgpSqlId: (0, import_sqlite_core.text)("ur_ingest_session_udi_pgp_sql_id").primaryKey().notNull(),
|
|
976
|
+
sql: (0, import_sqlite_core.text)().notNull(),
|
|
977
|
+
nature: (0, import_sqlite_core.text)().notNull(),
|
|
978
|
+
content: (0, import_sqlite_core.blob)(),
|
|
979
|
+
behaviour: (0, import_sqlite_core.text)(),
|
|
980
|
+
queryError: (0, import_sqlite_core.text)("query_error"),
|
|
981
|
+
uniformResourceId: (0, import_sqlite_core.text)("uniform_resource_id").references(
|
|
982
|
+
() => uniformResource.uniformResourceId
|
|
983
|
+
),
|
|
984
|
+
ingestSessionId: (0, import_sqlite_core.text)("ingest_session_id").references(
|
|
985
|
+
() => urIngestSession.urIngestSessionId
|
|
986
|
+
),
|
|
987
|
+
...housekeeping
|
|
988
|
+
}, (table2) => [
|
|
989
|
+
(0, import_sqlite_core.index)("idx_ur_ingest_session_udi_pgp_sql__ingest_session_id").on(
|
|
990
|
+
table2.ingestSessionId
|
|
991
|
+
),
|
|
992
|
+
(0, import_sqlite_core.unique)().on(table2.sql, table2.ingestSessionId),
|
|
993
|
+
checkJSON(table2.behaviour)
|
|
994
|
+
]);
|
|
995
|
+
var orchestrationNature = (0, import_sqlite_core.sqliteTable)("orchestration_nature", {
|
|
996
|
+
orchestrationNatureId: (0, import_sqlite_core.text)("orchestration_nature_id").primaryKey().notNull(),
|
|
997
|
+
nature: (0, import_sqlite_core.text)().notNull(),
|
|
998
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
999
|
+
...housekeeping
|
|
1000
|
+
}, (table2) => [
|
|
1001
|
+
(0, import_sqlite_core.index)("idx_orchestration_nature__orchestration_nature_id__nature").on(
|
|
1002
|
+
table2.orchestrationNatureId,
|
|
1003
|
+
table2.nature
|
|
1004
|
+
),
|
|
1005
|
+
(0, import_sqlite_core.unique)().on(table2.orchestrationNatureId, table2.nature)
|
|
1006
|
+
]);
|
|
1007
|
+
var orchestrationSession = (0, import_sqlite_core.sqliteTable)("orchestration_session", {
|
|
1008
|
+
orchestrationSessionId: (0, import_sqlite_core.text)("orchestration_session_id").primaryKey().notNull(),
|
|
1009
|
+
deviceId: (0, import_sqlite_core.text)("device_id").notNull().references(() => device.deviceId),
|
|
1010
|
+
orchestrationNatureId: (0, import_sqlite_core.text)("orchestration_nature_id").notNull().references(
|
|
1011
|
+
() => orchestrationNature.orchestrationNatureId
|
|
1012
|
+
),
|
|
1013
|
+
version: (0, import_sqlite_core.text)().notNull(),
|
|
1014
|
+
orchStartedAt: timestamptz("orch_started_at"),
|
|
1015
|
+
orchFinishedAt: timestamptz("orch_finished_at"),
|
|
1016
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
1017
|
+
argsJson: (0, import_sqlite_core.text)("args_json"),
|
|
1018
|
+
diagnosticsJson: (0, import_sqlite_core.text)("diagnostics_json"),
|
|
1019
|
+
diagnosticsMd: (0, import_sqlite_core.text)("diagnostics_md")
|
|
1020
|
+
}, (table2) => [
|
|
1021
|
+
checkJSON(table2.elaboration),
|
|
1022
|
+
checkJSON(table2.argsJson),
|
|
1023
|
+
checkJSON(table2.diagnosticsJson)
|
|
1024
|
+
]);
|
|
1025
|
+
var orchestrationSessionEntry = (0, import_sqlite_core.sqliteTable)("orchestration_session_entry", {
|
|
1026
|
+
orchestrationSessionEntryId: (0, import_sqlite_core.text)("orchestration_session_entry_id").primaryKey().notNull(),
|
|
1027
|
+
sessionId: (0, import_sqlite_core.text)("session_id").notNull().references(
|
|
1028
|
+
() => orchestrationSession.orchestrationSessionId
|
|
1029
|
+
),
|
|
1030
|
+
ingestSrc: (0, import_sqlite_core.text)("ingest_src").notNull(),
|
|
1031
|
+
ingestTableName: (0, import_sqlite_core.text)("ingest_table_name"),
|
|
1032
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
1033
|
+
}, (table2) => []);
|
|
1034
|
+
var orchestrationSessionState = (0, import_sqlite_core.sqliteTable)("orchestration_session_state", {
|
|
1035
|
+
orchestrationSessionStateId: (0, import_sqlite_core.text)("orchestration_session_state_id").primaryKey().notNull(),
|
|
1036
|
+
sessionId: (0, import_sqlite_core.text)("session_id").notNull().references(
|
|
1037
|
+
() => orchestrationSession.orchestrationSessionId
|
|
1038
|
+
),
|
|
1039
|
+
sessionEntryId: (0, import_sqlite_core.text)("session_entry_id").references(
|
|
1040
|
+
() => orchestrationSessionEntry.orchestrationSessionEntryId
|
|
1041
|
+
),
|
|
1042
|
+
fromState: (0, import_sqlite_core.text)("from_state").notNull(),
|
|
1043
|
+
toState: (0, import_sqlite_core.text)("to_state").notNull(),
|
|
1044
|
+
transitionResult: (0, import_sqlite_core.text)("transition_result"),
|
|
1045
|
+
transitionReason: (0, import_sqlite_core.text)("transition_reason"),
|
|
1046
|
+
transitionedAt: timestamptz("transitioned_at"),
|
|
1047
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
1048
|
+
}, (table2) => [
|
|
1049
|
+
(0, import_sqlite_core.unique)().on(table2.orchestrationSessionStateId, table2.fromState, table2.toState)
|
|
1050
|
+
]);
|
|
1051
|
+
var orchestrationSessionExec = (0, import_sqlite_core.sqliteTable)("orchestration_session_exec", {
|
|
1052
|
+
orchestrationSessionExecId: (0, import_sqlite_core.text)("orchestration_session_exec_id").primaryKey().notNull(),
|
|
1053
|
+
execNature: (0, import_sqlite_core.text)("exec_nature").notNull(),
|
|
1054
|
+
sessionId: (0, import_sqlite_core.text)("session_id").notNull().references(
|
|
1055
|
+
() => orchestrationSession.orchestrationSessionId
|
|
1056
|
+
),
|
|
1057
|
+
sessionEntryId: (0, import_sqlite_core.text)("session_entry_id").references(
|
|
1058
|
+
() => orchestrationSessionEntry.orchestrationSessionEntryId
|
|
1059
|
+
),
|
|
1060
|
+
parentExecId: (0, import_sqlite_core.text)("parent_exec_id"),
|
|
1061
|
+
namespace: (0, import_sqlite_core.text)(),
|
|
1062
|
+
execIdentity: (0, import_sqlite_core.text)("exec_identity"),
|
|
1063
|
+
execCode: (0, import_sqlite_core.text)("exec_code").notNull(),
|
|
1064
|
+
execStatus: (0, import_sqlite_core.integer)("exec_status").notNull(),
|
|
1065
|
+
inputText: (0, import_sqlite_core.text)("input_text"),
|
|
1066
|
+
execErrorText: (0, import_sqlite_core.text)("exec_error_text"),
|
|
1067
|
+
outputText: (0, import_sqlite_core.text)("output_text"),
|
|
1068
|
+
outputNature: (0, import_sqlite_core.text)("output_nature"),
|
|
1069
|
+
narrativeMd: (0, import_sqlite_core.text)("narrative_md"),
|
|
1070
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
1071
|
+
}, (table2) => [
|
|
1072
|
+
(0, import_sqlite_core.foreignKey)(() => ({
|
|
1073
|
+
columns: [table2.parentExecId],
|
|
1074
|
+
foreignColumns: [table2.orchestrationSessionExecId],
|
|
1075
|
+
name: "orchestration_session_exec_parent_exec_id_orchestration_session_exec_orchestration_session_exec_id_fk"
|
|
1076
|
+
}))
|
|
1077
|
+
]);
|
|
1078
|
+
var orchestrationSessionIssue = (0, import_sqlite_core.sqliteTable)("orchestration_session_issue", {
|
|
1079
|
+
orchestrationSessionIssueId: (0, import_sqlite_core.numeric)("orchestration_session_issue_id").primaryKey().notNull(),
|
|
1080
|
+
sessionId: (0, import_sqlite_core.text)("session_id").notNull().references(
|
|
1081
|
+
() => orchestrationSession.orchestrationSessionId
|
|
1082
|
+
),
|
|
1083
|
+
sessionEntryId: (0, import_sqlite_core.text)("session_entry_id").references(
|
|
1084
|
+
() => orchestrationSessionEntry.orchestrationSessionEntryId
|
|
1085
|
+
),
|
|
1086
|
+
issueType: (0, import_sqlite_core.text)("issue_type").notNull(),
|
|
1087
|
+
issueMessage: (0, import_sqlite_core.text)("issue_message").notNull(),
|
|
1088
|
+
issueRow: (0, import_sqlite_core.integer)("issue_row"),
|
|
1089
|
+
issueColumn: (0, import_sqlite_core.text)("issue_column"),
|
|
1090
|
+
invalidValue: (0, import_sqlite_core.text)("invalid_value"),
|
|
1091
|
+
remediation: (0, import_sqlite_core.text)(),
|
|
1092
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
1093
|
+
}, (table2) => []);
|
|
1094
|
+
var orchestrationSessionIssueRelation = (0, import_sqlite_core.sqliteTable)(
|
|
1095
|
+
"orchestration_session_issue_relation",
|
|
1096
|
+
{
|
|
1097
|
+
orchestrationSessionIssueRelationId: (0, import_sqlite_core.numeric)(
|
|
1098
|
+
"orchestration_session_issue_relation_id"
|
|
1099
|
+
).primaryKey().notNull(),
|
|
1100
|
+
issueIdPrime: (0, import_sqlite_core.numeric)("issue_id_prime").notNull().references(
|
|
1101
|
+
() => orchestrationSessionIssue.orchestrationSessionIssueId
|
|
1102
|
+
),
|
|
1103
|
+
issueIdRel: (0, import_sqlite_core.text)("issue_id_rel").notNull(),
|
|
1104
|
+
relationshipNature: (0, import_sqlite_core.text)("relationship_nature").notNull(),
|
|
1105
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
1106
|
+
},
|
|
1107
|
+
(table2) => []
|
|
1108
|
+
);
|
|
1109
|
+
var orchestrationSessionLog = (0, import_sqlite_core.sqliteTable)("orchestration_session_log", {
|
|
1110
|
+
orchestrationSessionLogId: (0, import_sqlite_core.numeric)("orchestration_session_log_id").primaryKey().notNull(),
|
|
1111
|
+
category: (0, import_sqlite_core.text)(),
|
|
1112
|
+
parentExecId: (0, import_sqlite_core.numeric)("parent_exec_id"),
|
|
1113
|
+
content: (0, import_sqlite_core.text)().notNull(),
|
|
1114
|
+
siblingOrder: (0, import_sqlite_core.integer)("sibling_order"),
|
|
1115
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
1116
|
+
}, (table2) => [
|
|
1117
|
+
(0, import_sqlite_core.foreignKey)(() => ({
|
|
1118
|
+
columns: [table2.parentExecId],
|
|
1119
|
+
foreignColumns: [table2.orchestrationSessionLogId],
|
|
1120
|
+
name: "orchestration_session_log_parent_exec_id_orchestration_session_log_orchestration_session_log_id_fk"
|
|
1121
|
+
}))
|
|
1122
|
+
]);
|
|
1123
|
+
var uniformResourceGraph = (0, import_sqlite_core.sqliteTable)("uniform_resource_graph", {
|
|
1124
|
+
name: (0, import_sqlite_core.text)().primaryKey().notNull(),
|
|
1125
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
1126
|
+
}, (table2) => []);
|
|
1127
|
+
var uniformResourceEdge = (0, import_sqlite_core.sqliteTable)("uniform_resource_edge", {
|
|
1128
|
+
graphName: (0, import_sqlite_core.text)("graph_name").notNull().references(
|
|
1129
|
+
() => uniformResourceGraph.name
|
|
1130
|
+
),
|
|
1131
|
+
nature: (0, import_sqlite_core.text)().notNull(),
|
|
1132
|
+
nodeId: (0, import_sqlite_core.text)("node_id").notNull(),
|
|
1133
|
+
uniformResourceId: (0, import_sqlite_core.text)("uniform_resource_id").notNull().references(
|
|
1134
|
+
() => uniformResource.uniformResourceId
|
|
1135
|
+
),
|
|
1136
|
+
elaboration: (0, import_sqlite_core.text)()
|
|
1137
|
+
}, (table2) => [
|
|
1138
|
+
(0, import_sqlite_core.index)("idx_uniform_resource_edge__uniform_resource_id").on(
|
|
1139
|
+
table2.uniformResourceId
|
|
1140
|
+
),
|
|
1141
|
+
(0, import_sqlite_core.unique)().on(table2.graphName, table2.nature, table2.nodeId, table2.uniformResourceId)
|
|
1142
|
+
]);
|
|
1143
|
+
var surveilrOsqueryMsNode = (0, import_sqlite_core.sqliteTable)("surveilr_osquery_ms_node", {
|
|
1144
|
+
surveilrOsqueryMsNodeId: (0, import_sqlite_core.text)("surveilr_osquery_ms_node_id").primaryKey().notNull(),
|
|
1145
|
+
nodeKey: (0, import_sqlite_core.text)("node_key").notNull(),
|
|
1146
|
+
hostIdentifier: (0, import_sqlite_core.text)("host_identifier").notNull(),
|
|
1147
|
+
tlsCertSubject: (0, import_sqlite_core.text)("tls_cert_subject"),
|
|
1148
|
+
osVersion: (0, import_sqlite_core.text)("os_version").notNull(),
|
|
1149
|
+
platform: (0, import_sqlite_core.text)().notNull(),
|
|
1150
|
+
lastSeen: (0, import_sqlite_core.numeric)("last_seen").notNull(),
|
|
1151
|
+
status: (0, import_sqlite_core.text)().default("active").notNull(),
|
|
1152
|
+
osqueryVersion: (0, import_sqlite_core.text)("osquery_version"),
|
|
1153
|
+
osqueryBuildPlatform: (0, import_sqlite_core.text)("osquery_build_platform").notNull(),
|
|
1154
|
+
deviceId: (0, import_sqlite_core.text)("device_id").notNull().references(() => device.deviceId),
|
|
1155
|
+
behaviorId: (0, import_sqlite_core.text)("behavior_id").references(() => behavior.behaviorId),
|
|
1156
|
+
accelerate: (0, import_sqlite_core.integer)().default(60).notNull(),
|
|
1157
|
+
...housekeeping
|
|
1158
|
+
}, (table2) => [
|
|
1159
|
+
(0, import_sqlite_core.index)("idx_surveilr_osquery_ms_node__node_key").on(table2.nodeKey),
|
|
1160
|
+
(0, import_sqlite_core.unique)().on(table2.hostIdentifier, table2.osVersion),
|
|
1161
|
+
(0, import_sqlite_core.unique)().on(table2.nodeKey)
|
|
1162
|
+
]);
|
|
1163
|
+
var urIngestSessionOsqueryMsLog = (0, import_sqlite_core.sqliteTable)(
|
|
1164
|
+
"ur_ingest_session_osquery_ms_log",
|
|
1165
|
+
{
|
|
1166
|
+
urIngestSessionOsqueryMsLogId: (0, import_sqlite_core.text)("ur_ingest_session_osquery_ms_log_id").primaryKey().notNull(),
|
|
1167
|
+
nodeKey: (0, import_sqlite_core.text)("node_key").notNull().references(
|
|
1168
|
+
() => surveilrOsqueryMsNode.nodeKey
|
|
1169
|
+
),
|
|
1170
|
+
logType: (0, import_sqlite_core.text)("log_type").notNull(),
|
|
1171
|
+
logData: (0, import_sqlite_core.text)("log_data").notNull(),
|
|
1172
|
+
appliedJqFilters: (0, import_sqlite_core.text)("applied_jq_filters"),
|
|
1173
|
+
...housekeeping
|
|
1174
|
+
},
|
|
1175
|
+
(table2) => [
|
|
1176
|
+
(0, import_sqlite_core.unique)().on(table2.nodeKey, table2.logType, table2.logData)
|
|
1177
|
+
]
|
|
1178
|
+
);
|
|
1179
|
+
var osqueryPolicy = (0, import_sqlite_core.sqliteTable)("osquery_policy", {
|
|
1180
|
+
osqueryPolicyId: (0, import_sqlite_core.text)("osquery_policy_id").primaryKey().notNull(),
|
|
1181
|
+
policyGroup: (0, import_sqlite_core.text)("policy_group"),
|
|
1182
|
+
policyName: (0, import_sqlite_core.text)("policy_name").notNull(),
|
|
1183
|
+
osqueryCode: (0, import_sqlite_core.text)("osquery_code").notNull(),
|
|
1184
|
+
policyDescription: (0, import_sqlite_core.text)("policy_description").notNull(),
|
|
1185
|
+
policyPassLabel: (0, import_sqlite_core.text)("policy_pass_label").default("Pass").notNull(),
|
|
1186
|
+
policyFailLabel: (0, import_sqlite_core.text)("policy_fail_label").default("Fail").notNull(),
|
|
1187
|
+
policyPassRemarks: (0, import_sqlite_core.text)("policy_pass_remarks"),
|
|
1188
|
+
policyFailRemarks: (0, import_sqlite_core.text)("policy_fail_remarks"),
|
|
1189
|
+
osqueryPlatforms: (0, import_sqlite_core.text)("osquery_platforms"),
|
|
1190
|
+
...housekeeping
|
|
1191
|
+
}, (table2) => [
|
|
1192
|
+
(0, import_sqlite_core.unique)().on(table2.policyName, table2.osqueryCode)
|
|
1193
|
+
]);
|
|
1194
|
+
var surveilrOsqueryMsDistributedQuery = (0, import_sqlite_core.sqliteTable)(
|
|
1195
|
+
"surveilr_osquery_ms_distributed_query",
|
|
1196
|
+
{
|
|
1197
|
+
queryId: (0, import_sqlite_core.text)("query_id").primaryKey().notNull(),
|
|
1198
|
+
nodeKey: (0, import_sqlite_core.text)("node_key").notNull().references(
|
|
1199
|
+
() => surveilrOsqueryMsNode.nodeKey
|
|
1200
|
+
),
|
|
1201
|
+
queryName: (0, import_sqlite_core.text)("query_name").notNull(),
|
|
1202
|
+
querySql: (0, import_sqlite_core.text)("query_sql").notNull(),
|
|
1203
|
+
discoveryQuery: (0, import_sqlite_core.text)("discovery_query"),
|
|
1204
|
+
status: (0, import_sqlite_core.text)().notNull(),
|
|
1205
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
1206
|
+
interval: (0, import_sqlite_core.integer)().notNull(),
|
|
1207
|
+
...housekeeping
|
|
1208
|
+
},
|
|
1209
|
+
(table2) => []
|
|
1210
|
+
);
|
|
1211
|
+
var surveilrOsqueryMsDistributedResult = (0, import_sqlite_core.sqliteTable)(
|
|
1212
|
+
"surveilr_osquery_ms_distributed_result",
|
|
1213
|
+
{
|
|
1214
|
+
surveilrOsqueryMsDistributedResultId: (0, import_sqlite_core.text)(
|
|
1215
|
+
"surveilr_osquery_ms_distributed_result_id"
|
|
1216
|
+
).primaryKey().notNull(),
|
|
1217
|
+
queryId: (0, import_sqlite_core.text)("query_id").notNull().references(
|
|
1218
|
+
() => surveilrOsqueryMsDistributedQuery.queryId
|
|
1219
|
+
),
|
|
1220
|
+
nodeKey: (0, import_sqlite_core.text)("node_key").notNull().references(
|
|
1221
|
+
() => surveilrOsqueryMsNode.nodeKey
|
|
1222
|
+
),
|
|
1223
|
+
results: (0, import_sqlite_core.text)().notNull(),
|
|
1224
|
+
statusCode: (0, import_sqlite_core.integer)("status_code").notNull(),
|
|
1225
|
+
...housekeeping
|
|
1226
|
+
},
|
|
1227
|
+
(table2) => []
|
|
1228
|
+
);
|
|
1229
|
+
var surveilrOsqueryMsCarve = (0, import_sqlite_core.sqliteTable)("surveilr_osquery_ms_carve", {
|
|
1230
|
+
surveilrOsqueryMsCarveId: (0, import_sqlite_core.text)("surveilr_osquery_ms_carve_id").primaryKey().notNull(),
|
|
1231
|
+
nodeKey: (0, import_sqlite_core.text)("node_key").notNull().references(
|
|
1232
|
+
() => surveilrOsqueryMsNode.nodeKey
|
|
1233
|
+
),
|
|
1234
|
+
sessionId: (0, import_sqlite_core.text)("session_id").notNull(),
|
|
1235
|
+
carveGuid: (0, import_sqlite_core.text)("carve_guid").notNull(),
|
|
1236
|
+
carveSize: (0, import_sqlite_core.integer)("carve_size").notNull(),
|
|
1237
|
+
blockCount: (0, import_sqlite_core.integer)("block_count").notNull(),
|
|
1238
|
+
blockSize: (0, import_sqlite_core.integer)("block_size").notNull(),
|
|
1239
|
+
receivedBlocks: (0, import_sqlite_core.integer)("received_blocks").default(0).notNull(),
|
|
1240
|
+
carvePath: (0, import_sqlite_core.text)("carve_path"),
|
|
1241
|
+
status: (0, import_sqlite_core.text)().notNull(),
|
|
1242
|
+
startTime: (0, import_sqlite_core.numeric)("start_time").notNull(),
|
|
1243
|
+
completionTime: (0, import_sqlite_core.numeric)("completion_time"),
|
|
1244
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
1245
|
+
...housekeeping
|
|
1246
|
+
}, (table2) => [
|
|
1247
|
+
(0, import_sqlite_core.unique)().on(table2.sessionId),
|
|
1248
|
+
(0, import_sqlite_core.unique)().on(table2.carveGuid)
|
|
1249
|
+
]);
|
|
1250
|
+
var surveilrOsqueryMsCarvedExtractedFile = (0, import_sqlite_core.sqliteTable)(
|
|
1251
|
+
"surveilr_osquery_ms_carved_extracted_file",
|
|
1252
|
+
{
|
|
1253
|
+
surveilrOsqueryMsCarvedExtractedFileId: (0, import_sqlite_core.text)(
|
|
1254
|
+
"surveilr_osquery_ms_carved_extracted_file_id"
|
|
1255
|
+
).primaryKey().notNull(),
|
|
1256
|
+
carveGuid: (0, import_sqlite_core.text)("carve_guid").notNull().references(
|
|
1257
|
+
() => surveilrOsqueryMsCarve.carveGuid
|
|
1258
|
+
),
|
|
1259
|
+
path: (0, import_sqlite_core.text)().notNull(),
|
|
1260
|
+
sizeBytes: (0, import_sqlite_core.integer)("size_bytes").notNull(),
|
|
1261
|
+
contentDigest: (0, import_sqlite_core.text)("content_digest").notNull(),
|
|
1262
|
+
nature: (0, import_sqlite_core.text)(),
|
|
1263
|
+
extractedAt: timestamptz("extracted_at").notNull(),
|
|
1264
|
+
...housekeeping
|
|
1265
|
+
},
|
|
1266
|
+
(table2) => [
|
|
1267
|
+
(0, import_sqlite_core.index)("idx_surveilr_osquery_ms_carved_extracted_file__path__carve_guid").on(
|
|
1268
|
+
table2.path,
|
|
1269
|
+
table2.carveGuid
|
|
1270
|
+
)
|
|
1271
|
+
]
|
|
1272
|
+
);
|
|
1273
|
+
var surveilrSnmpDevice = (0, import_sqlite_core.sqliteTable)("surveilr_snmp_device", {
|
|
1274
|
+
surveilrSnmpDeviceId: (0, import_sqlite_core.text)("surveilr_snmp_device_id").primaryKey().notNull(),
|
|
1275
|
+
deviceKey: (0, import_sqlite_core.text)("device_key").notNull(),
|
|
1276
|
+
snmpHost: (0, import_sqlite_core.text)("snmp_host").notNull(),
|
|
1277
|
+
snmpPort: (0, import_sqlite_core.integer)("snmp_port").default(161).notNull(),
|
|
1278
|
+
snmpCommunity: (0, import_sqlite_core.text)("snmp_community").notNull(),
|
|
1279
|
+
snmpVersion: (0, import_sqlite_core.text)("snmp_version").default("2c").notNull(),
|
|
1280
|
+
snmpTimeout: (0, import_sqlite_core.integer)("snmp_timeout").default(5).notNull(),
|
|
1281
|
+
snmpRetries: (0, import_sqlite_core.integer)("snmp_retries").default(3).notNull(),
|
|
1282
|
+
deviceType: (0, import_sqlite_core.text)("device_type"),
|
|
1283
|
+
deviceDescription: (0, import_sqlite_core.text)("device_description"),
|
|
1284
|
+
lastSeen: (0, import_sqlite_core.numeric)("last_seen").notNull(),
|
|
1285
|
+
status: (0, import_sqlite_core.text)().default("active").notNull(),
|
|
1286
|
+
deviceId: (0, import_sqlite_core.text)("device_id").notNull().references(() => device.deviceId),
|
|
1287
|
+
behaviorId: (0, import_sqlite_core.text)("behavior_id").references(() => behavior.behaviorId),
|
|
1288
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
1289
|
+
...housekeeping
|
|
1290
|
+
}, (table2) => [
|
|
1291
|
+
(0, import_sqlite_core.index)("idx_surveilr_snmp_device__device_key").on(table2.deviceKey),
|
|
1292
|
+
(0, import_sqlite_core.unique)().on(table2.snmpHost, table2.snmpPort),
|
|
1293
|
+
(0, import_sqlite_core.unique)().on(table2.deviceKey),
|
|
1294
|
+
checkJSON(table2.elaboration)
|
|
1295
|
+
]);
|
|
1296
|
+
var surveilrSnmpCollection = (0, import_sqlite_core.sqliteTable)("surveilr_snmp_collection", {
|
|
1297
|
+
surveilrSnmpCollectionId: (0, import_sqlite_core.text)("surveilr_snmp_collection_id").primaryKey().notNull(),
|
|
1298
|
+
deviceKey: (0, import_sqlite_core.text)("device_key").notNull().references(
|
|
1299
|
+
() => surveilrSnmpDevice.deviceKey
|
|
1300
|
+
),
|
|
1301
|
+
oid: (0, import_sqlite_core.text)().notNull(),
|
|
1302
|
+
oidValue: (0, import_sqlite_core.text)("oid_value").notNull(),
|
|
1303
|
+
oidType: (0, import_sqlite_core.text)("oid_type").notNull(),
|
|
1304
|
+
collectedAt: timestamptz("collected_at").notNull(),
|
|
1305
|
+
elaboration: (0, import_sqlite_core.text)(),
|
|
1306
|
+
...housekeeping
|
|
1307
|
+
}, (table2) => [
|
|
1308
|
+
(0, import_sqlite_core.index)("idx_surveilr_snmp_collection__device_key__oid").on(
|
|
1309
|
+
table2.deviceKey,
|
|
1310
|
+
table2.oid
|
|
1311
|
+
),
|
|
1312
|
+
(0, import_sqlite_core.index)("idx_surveilr_snmp_collection__collected_at").on(table2.collectedAt),
|
|
1313
|
+
checkJSON(table2.elaboration)
|
|
1314
|
+
]);
|
|
1315
|
+
var surveilrFunctionDoc = (0, import_sqlite_core.sqliteTable)("surveilr_function_doc", {
|
|
1316
|
+
name: (0, import_sqlite_core.text)().primaryKey(),
|
|
1317
|
+
description: (0, import_sqlite_core.text)(),
|
|
1318
|
+
parameters: (0, import_sqlite_core.text)({ mode: "json" }),
|
|
1319
|
+
returnType: (0, import_sqlite_core.text)("return_type"),
|
|
1320
|
+
version: (0, import_sqlite_core.text)()
|
|
1321
|
+
}, (table2) => [
|
|
1322
|
+
checkJSON(table2.parameters)
|
|
1323
|
+
]);
|
|
1324
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1325
|
+
0 && (module.exports = {
|
|
1326
|
+
assuranceSchema,
|
|
1327
|
+
behavior,
|
|
1328
|
+
checkJSON,
|
|
1329
|
+
codeNotebookCell,
|
|
1330
|
+
codeNotebookKernel,
|
|
1331
|
+
codeNotebookState,
|
|
1332
|
+
device,
|
|
1333
|
+
devicePartyRelationship,
|
|
1334
|
+
genderType,
|
|
1335
|
+
housekeeping,
|
|
1336
|
+
orchestrationNature,
|
|
1337
|
+
orchestrationSession,
|
|
1338
|
+
orchestrationSessionEntry,
|
|
1339
|
+
orchestrationSessionExec,
|
|
1340
|
+
orchestrationSessionIssue,
|
|
1341
|
+
orchestrationSessionIssueRelation,
|
|
1342
|
+
orchestrationSessionLog,
|
|
1343
|
+
orchestrationSessionState,
|
|
1344
|
+
organization,
|
|
1345
|
+
organizationRole,
|
|
1346
|
+
organizationRoleType,
|
|
1347
|
+
osqueryPolicy,
|
|
1348
|
+
party,
|
|
1349
|
+
partyRelation,
|
|
1350
|
+
partyRelationType,
|
|
1351
|
+
partyType,
|
|
1352
|
+
person,
|
|
1353
|
+
personType,
|
|
1354
|
+
sexType,
|
|
1355
|
+
sqleanDefine,
|
|
1356
|
+
sqlpageAideNavigation,
|
|
1357
|
+
sqlpageFiles,
|
|
1358
|
+
surveilrFunctionDoc,
|
|
1359
|
+
surveilrOsqueryMsCarve,
|
|
1360
|
+
surveilrOsqueryMsCarvedExtractedFile,
|
|
1361
|
+
surveilrOsqueryMsDistributedQuery,
|
|
1362
|
+
surveilrOsqueryMsDistributedResult,
|
|
1363
|
+
surveilrOsqueryMsNode,
|
|
1364
|
+
surveilrSnmpCollection,
|
|
1365
|
+
surveilrSnmpDevice,
|
|
1366
|
+
surveilrTableSize,
|
|
1367
|
+
uniformResource,
|
|
1368
|
+
uniformResourceEdge,
|
|
1369
|
+
uniformResourceGraph,
|
|
1370
|
+
uniformResourceTransform,
|
|
1371
|
+
urIngestResourcePathMatchRule,
|
|
1372
|
+
urIngestResourcePathRewriteRule,
|
|
1373
|
+
urIngestSession,
|
|
1374
|
+
urIngestSessionAttachment,
|
|
1375
|
+
urIngestSessionFsPath,
|
|
1376
|
+
urIngestSessionFsPathEntry,
|
|
1377
|
+
urIngestSessionImapAccount,
|
|
1378
|
+
urIngestSessionImapAcctFolder,
|
|
1379
|
+
urIngestSessionImapAcctFolderMessage,
|
|
1380
|
+
urIngestSessionOsqueryMsLog,
|
|
1381
|
+
urIngestSessionPlmAccount,
|
|
1382
|
+
urIngestSessionPlmAcctLabel,
|
|
1383
|
+
urIngestSessionPlmAcctProject,
|
|
1384
|
+
urIngestSessionPlmAcctProjectIssue,
|
|
1385
|
+
urIngestSessionPlmAcctRelationship,
|
|
1386
|
+
urIngestSessionPlmComment,
|
|
1387
|
+
urIngestSessionPlmIssueReaction,
|
|
1388
|
+
urIngestSessionPlmIssueType,
|
|
1389
|
+
urIngestSessionPlmMilestone,
|
|
1390
|
+
urIngestSessionPlmReaction,
|
|
1391
|
+
urIngestSessionPlmUser,
|
|
1392
|
+
urIngestSessionTask,
|
|
1393
|
+
urIngestSessionUdiPgpSql
|
|
1394
|
+
});
|