@hot-updater/plugin-insights 1.0.0-rc.20
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/LICENSE +33 -0
- package/README.md +24 -0
- package/client/package.json +7 -0
- package/dist/client/eventId.cjs +181 -0
- package/dist/client/eventId.mjs +179 -0
- package/dist/client/index.cjs +234 -0
- package/dist/client/index.d.cts +42 -0
- package/dist/client/index.d.mts +42 -0
- package/dist/client/index.mjs +233 -0
- package/dist/client/sender.cjs +103 -0
- package/dist/client/sender.mjs +103 -0
- package/dist/client/state.cjs +121 -0
- package/dist/client/state.mjs +119 -0
- package/dist/internal.cjs +9 -0
- package/dist/internal.d.cts +5 -0
- package/dist/internal.d.mts +5 -0
- package/dist/internal.mjs +5 -0
- package/dist/server/contract.cjs +193 -0
- package/dist/server/contract.mjs +189 -0
- package/dist/server/domain.d.cts +149 -0
- package/dist/server/domain.d.mts +149 -0
- package/dist/server/errors.cjs +15 -0
- package/dist/server/errors.d.cts +6 -0
- package/dist/server/errors.d.mts +6 -0
- package/dist/server/errors.mjs +14 -0
- package/dist/server/eventInput.cjs +284 -0
- package/dist/server/eventInput.d.cts +6 -0
- package/dist/server/eventInput.d.mts +6 -0
- package/dist/server/eventInput.mjs +282 -0
- package/dist/server/eventRow.cjs +49 -0
- package/dist/server/eventRow.d.cts +64 -0
- package/dist/server/eventRow.d.mts +64 -0
- package/dist/server/eventRow.mjs +47 -0
- package/dist/server/index.cjs +128 -0
- package/dist/server/index.d.cts +394 -0
- package/dist/server/index.d.mts +394 -0
- package/dist/server/index.mjs +121 -0
- package/dist/server/model.cjs +17 -0
- package/dist/server/model.d.cts +10 -0
- package/dist/server/model.d.mts +10 -0
- package/dist/server/model.mjs +17 -0
- package/dist/server/modelTypes.d.cts +176 -0
- package/dist/server/modelTypes.d.mts +176 -0
- package/dist/server/overview.cjs +109 -0
- package/dist/server/overview.d.cts +15 -0
- package/dist/server/overview.d.mts +15 -0
- package/dist/server/overview.mjs +107 -0
- package/dist/server/provider.cjs +375 -0
- package/dist/server/provider.d.cts +6 -0
- package/dist/server/provider.d.mts +6 -0
- package/dist/server/provider.mjs +374 -0
- package/dist/server/queryInput.cjs +93 -0
- package/dist/server/queryInput.mjs +91 -0
- package/dist/server/reads.cjs +681 -0
- package/dist/server/reads.d.cts +60 -0
- package/dist/server/reads.d.mts +60 -0
- package/dist/server/reads.mjs +674 -0
- package/dist/server/recordEvent.cjs +319 -0
- package/dist/server/recordEvent.d.cts +17 -0
- package/dist/server/recordEvent.d.mts +17 -0
- package/dist/server/recordEvent.mjs +316 -0
- package/dist/server/routes.cjs +96 -0
- package/dist/server/routes.d.cts +36 -0
- package/dist/server/routes.d.mts +36 -0
- package/dist/server/routes.mjs +95 -0
- package/dist/server/schema.cjs +489 -0
- package/dist/server/schema.d.cts +706 -0
- package/dist/server/schema.d.mts +706 -0
- package/dist/server/schema.mjs +483 -0
- package/dist/server/testing/eventRow.d.mts +64 -0
- package/dist/server/testing/expectInsightsIndex.mjs +18 -0
- package/dist/server/testing/fixtures.d.mts +8 -0
- package/dist/server/testing/fixtures.mjs +25 -0
- package/dist/server/testing/index.d.mts +24 -0
- package/dist/server/testing/index.mjs +25 -0
- package/dist/server/testing/insightsModelTests.mjs +714 -0
- package/dist/server/testing/modelTypes.d.mts +176 -0
- package/dist/server/testing/setupInsightsHttpTestSuite.d.mts +11 -0
- package/dist/server/testing/setupInsightsHttpTestSuite.mjs +107 -0
- package/dist/server/testing/setupInsightsModelTestSuite.d.mts +11 -0
- package/dist/server/testing/setupInsightsModelTestSuite.mjs +31 -0
- package/dist/server/testing/types.d.mts +26 -0
- package/dist/server/types.d.cts +33 -0
- package/dist/server/types.d.mts +33 -0
- package/package.json +68 -0
|
@@ -0,0 +1,706 @@
|
|
|
1
|
+
//#region src/server/schema.d.ts
|
|
2
|
+
/** How long Insights keeps its rows, in whole days. Lifetime counters are kept. */
|
|
3
|
+
interface InsightsRetention {
|
|
4
|
+
/** Raw events and hourly rollups. */
|
|
5
|
+
readonly rawDays: number;
|
|
6
|
+
/** Daily rollups, and each installation's latest event and the gauges that count it. */
|
|
7
|
+
readonly dailyDays: number;
|
|
8
|
+
}
|
|
9
|
+
declare const DEFAULT_INSIGHTS_RETENTION: InsightsRetention;
|
|
10
|
+
/**
|
|
11
|
+
* The `insights_outcomes` identity that counts every stored event, for the
|
|
12
|
+
* global event list. Its bucket is a UTC day, not an hour. Every event's
|
|
13
|
+
* platform is ios or android, so no outcome row of a bundle filter shares it.
|
|
14
|
+
*/
|
|
15
|
+
declare const DAILY_EVENTS: {
|
|
16
|
+
readonly platform: "*";
|
|
17
|
+
readonly channel: "";
|
|
18
|
+
readonly type: "";
|
|
19
|
+
readonly bundle_ref: "";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Insights' tables, each expiring after its period. The periods are values
|
|
23
|
+
* the engine applies at runtime; the tables and indexes are the same for
|
|
24
|
+
* any periods.
|
|
25
|
+
*/
|
|
26
|
+
declare const createInsightsSchema: ({ rawDays, dailyDays }?: InsightsRetention) => {
|
|
27
|
+
readonly bundle_events: import("@hot-updater/plugin-core/server-plugin").TableDefinition<{
|
|
28
|
+
readonly id: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
readonly maxLength: 36;
|
|
31
|
+
};
|
|
32
|
+
readonly type: {
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly maxLength: 32;
|
|
35
|
+
};
|
|
36
|
+
readonly install_id: {
|
|
37
|
+
readonly type: "string";
|
|
38
|
+
readonly maxLength: 255;
|
|
39
|
+
};
|
|
40
|
+
readonly user_id: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
readonly maxLength: 255;
|
|
43
|
+
readonly required: false;
|
|
44
|
+
};
|
|
45
|
+
readonly from_release_id: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly maxLength: 36;
|
|
48
|
+
readonly required: false;
|
|
49
|
+
};
|
|
50
|
+
readonly from_bundle_id: {
|
|
51
|
+
readonly type: "string";
|
|
52
|
+
readonly maxLength: 36;
|
|
53
|
+
readonly required: false;
|
|
54
|
+
};
|
|
55
|
+
readonly to_release_id: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
readonly maxLength: 36;
|
|
58
|
+
readonly required: false;
|
|
59
|
+
};
|
|
60
|
+
readonly to_bundle_id: {
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
readonly maxLength: 36;
|
|
63
|
+
};
|
|
64
|
+
readonly platform: {
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
readonly maxLength: 16;
|
|
67
|
+
};
|
|
68
|
+
readonly app_version: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
};
|
|
71
|
+
readonly channel: {
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
};
|
|
74
|
+
readonly metadata: {
|
|
75
|
+
readonly type: "json";
|
|
76
|
+
};
|
|
77
|
+
readonly received_at_ms: {
|
|
78
|
+
readonly type: "integer";
|
|
79
|
+
};
|
|
80
|
+
}, {
|
|
81
|
+
day: "integer";
|
|
82
|
+
movement_install_id: "string";
|
|
83
|
+
bundle_ref: "string";
|
|
84
|
+
}, {
|
|
85
|
+
readonly recent: {
|
|
86
|
+
readonly eq: readonly ["channel", "platform", "day"];
|
|
87
|
+
readonly sort: readonly ["received_at_ms"];
|
|
88
|
+
};
|
|
89
|
+
readonly movementsByInstall: {
|
|
90
|
+
readonly eq: readonly ["movement_install_id"];
|
|
91
|
+
readonly sort: readonly ["received_at_ms"];
|
|
92
|
+
};
|
|
93
|
+
readonly byBundle: {
|
|
94
|
+
readonly eq: readonly ["platform", "channel", "type", "bundle_ref", "day"];
|
|
95
|
+
readonly sort: readonly ["received_at_ms"];
|
|
96
|
+
};
|
|
97
|
+
/** Events of every scope by day, for the console's unfiltered event list. */
|
|
98
|
+
readonly byDay: {
|
|
99
|
+
readonly eq: readonly ["day"];
|
|
100
|
+
readonly sort: readonly ["received_at_ms"];
|
|
101
|
+
};
|
|
102
|
+
}, readonly ["id"]>;
|
|
103
|
+
readonly bundle_event_heads: import("@hot-updater/plugin-core/server-plugin").TableDefinition<{
|
|
104
|
+
readonly install_id: {
|
|
105
|
+
readonly type: "string";
|
|
106
|
+
readonly maxLength: 255;
|
|
107
|
+
};
|
|
108
|
+
readonly id: {
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
readonly maxLength: 36;
|
|
111
|
+
};
|
|
112
|
+
readonly type: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly maxLength: 32;
|
|
115
|
+
};
|
|
116
|
+
readonly user_id: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
readonly maxLength: 255;
|
|
119
|
+
readonly required: false;
|
|
120
|
+
};
|
|
121
|
+
readonly from_release_id: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly maxLength: 36;
|
|
124
|
+
readonly required: false;
|
|
125
|
+
};
|
|
126
|
+
readonly from_bundle_id: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly maxLength: 36;
|
|
129
|
+
readonly required: false;
|
|
130
|
+
};
|
|
131
|
+
readonly to_release_id: {
|
|
132
|
+
readonly type: "string";
|
|
133
|
+
readonly maxLength: 36;
|
|
134
|
+
readonly required: false;
|
|
135
|
+
};
|
|
136
|
+
readonly to_bundle_id: {
|
|
137
|
+
readonly type: "string";
|
|
138
|
+
readonly maxLength: 36;
|
|
139
|
+
};
|
|
140
|
+
readonly platform: {
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
readonly maxLength: 16;
|
|
143
|
+
};
|
|
144
|
+
readonly app_version: {
|
|
145
|
+
readonly type: "string";
|
|
146
|
+
};
|
|
147
|
+
readonly channel: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
};
|
|
150
|
+
readonly metadata: {
|
|
151
|
+
readonly type: "json";
|
|
152
|
+
};
|
|
153
|
+
readonly received_at_ms: {
|
|
154
|
+
readonly type: "integer";
|
|
155
|
+
};
|
|
156
|
+
}, Readonly<Record<string, import("@hot-updater/plugin-core/server-plugin").FieldType>>, {
|
|
157
|
+
readonly byUser: {
|
|
158
|
+
readonly eq: readonly ["user_id"];
|
|
159
|
+
readonly sort: readonly ["install_id"];
|
|
160
|
+
};
|
|
161
|
+
}, readonly ["install_id"]>;
|
|
162
|
+
/** Hourly counters and sketches: the raw period. */
|
|
163
|
+
readonly insights_overview: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
164
|
+
readonly identity: {
|
|
165
|
+
readonly type: "string";
|
|
166
|
+
readonly maxLength: 32;
|
|
167
|
+
};
|
|
168
|
+
readonly bucket_start_ms: {
|
|
169
|
+
readonly type: "integer";
|
|
170
|
+
};
|
|
171
|
+
}, "downloads" | "launches" | "failed_launches" | "failed_updates" | "patch_downloads" | "patch_fallbacks", {
|
|
172
|
+
readonly window: {
|
|
173
|
+
readonly eq: readonly ["identity"];
|
|
174
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
175
|
+
};
|
|
176
|
+
}, never, readonly ["identity", "bucket_start_ms"]>;
|
|
177
|
+
readonly insights_sketches: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
178
|
+
readonly identity: {
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
readonly maxLength: 32;
|
|
181
|
+
};
|
|
182
|
+
readonly bucket_start_ms: {
|
|
183
|
+
readonly type: "integer";
|
|
184
|
+
};
|
|
185
|
+
}, never, {
|
|
186
|
+
readonly window: {
|
|
187
|
+
readonly eq: readonly ["identity"];
|
|
188
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
189
|
+
};
|
|
190
|
+
}, "launch_users" | "activity_users" | "failed_users", readonly ["identity", "bucket_start_ms"]>;
|
|
191
|
+
/** Daily counters and sketches: the daily period. */
|
|
192
|
+
readonly insights_overview_daily: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
193
|
+
readonly identity: {
|
|
194
|
+
readonly type: "string";
|
|
195
|
+
readonly maxLength: 32;
|
|
196
|
+
};
|
|
197
|
+
readonly bucket_start_ms: {
|
|
198
|
+
readonly type: "integer";
|
|
199
|
+
};
|
|
200
|
+
}, "downloads" | "launches" | "failed_launches" | "failed_updates" | "patch_downloads" | "patch_fallbacks", {
|
|
201
|
+
readonly window: {
|
|
202
|
+
readonly eq: readonly ["identity"];
|
|
203
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
204
|
+
};
|
|
205
|
+
}, never, readonly ["identity", "bucket_start_ms"]>;
|
|
206
|
+
readonly insights_sketches_daily: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
207
|
+
readonly identity: {
|
|
208
|
+
readonly type: "string";
|
|
209
|
+
readonly maxLength: 32;
|
|
210
|
+
};
|
|
211
|
+
readonly bucket_start_ms: {
|
|
212
|
+
readonly type: "integer";
|
|
213
|
+
};
|
|
214
|
+
}, never, {
|
|
215
|
+
readonly window: {
|
|
216
|
+
readonly eq: readonly ["identity"];
|
|
217
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
218
|
+
};
|
|
219
|
+
}, "launch_users" | "activity_users" | "failed_users", readonly ["identity", "bucket_start_ms"]>;
|
|
220
|
+
/** A release's counters since its first event, and its failed installations: kept. */
|
|
221
|
+
readonly insights_overview_lifetime: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
222
|
+
readonly identity: {
|
|
223
|
+
readonly type: "string";
|
|
224
|
+
readonly maxLength: 32;
|
|
225
|
+
};
|
|
226
|
+
readonly bucket_start_ms: {
|
|
227
|
+
readonly type: "integer";
|
|
228
|
+
};
|
|
229
|
+
}, "downloads" | "launches" | "failed_launches" | "failed_updates" | "patch_downloads" | "patch_fallbacks", {
|
|
230
|
+
readonly window: {
|
|
231
|
+
readonly eq: readonly ["identity"];
|
|
232
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
233
|
+
};
|
|
234
|
+
}, never, readonly ["identity", "bucket_start_ms"]>;
|
|
235
|
+
readonly insights_sketches_lifetime: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
236
|
+
readonly identity: {
|
|
237
|
+
readonly type: "string";
|
|
238
|
+
readonly maxLength: 32;
|
|
239
|
+
};
|
|
240
|
+
readonly bucket_start_ms: {
|
|
241
|
+
readonly type: "integer";
|
|
242
|
+
};
|
|
243
|
+
}, never, {
|
|
244
|
+
readonly window: {
|
|
245
|
+
readonly eq: readonly ["identity"];
|
|
246
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
247
|
+
};
|
|
248
|
+
}, "failed_users", readonly ["identity", "bucket_start_ms"]>;
|
|
249
|
+
readonly insights_distribution: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
250
|
+
readonly channel: {
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
};
|
|
253
|
+
readonly platform: {
|
|
254
|
+
readonly type: "string";
|
|
255
|
+
readonly maxLength: 16;
|
|
256
|
+
};
|
|
257
|
+
readonly app_version: {
|
|
258
|
+
readonly type: "string";
|
|
259
|
+
};
|
|
260
|
+
readonly release_id: {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
readonly maxLength: 36;
|
|
263
|
+
};
|
|
264
|
+
readonly bucket_start_ms: {
|
|
265
|
+
readonly type: "integer";
|
|
266
|
+
};
|
|
267
|
+
}, "latest_installations", {
|
|
268
|
+
readonly byScope: {
|
|
269
|
+
readonly eq: readonly ["channel", "platform"];
|
|
270
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
271
|
+
};
|
|
272
|
+
readonly byVersion: {
|
|
273
|
+
readonly eq: readonly ["channel", "platform", "app_version"];
|
|
274
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
275
|
+
};
|
|
276
|
+
}, never, readonly ["channel", "platform", "app_version", "release_id", "bucket_start_ms"]>;
|
|
277
|
+
readonly insights_latest_by_bundle: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
278
|
+
readonly platform: {
|
|
279
|
+
readonly type: "string";
|
|
280
|
+
readonly maxLength: 16;
|
|
281
|
+
};
|
|
282
|
+
readonly channel: {
|
|
283
|
+
readonly type: "string";
|
|
284
|
+
};
|
|
285
|
+
readonly bundle_field: {
|
|
286
|
+
readonly type: "string";
|
|
287
|
+
readonly maxLength: 16;
|
|
288
|
+
};
|
|
289
|
+
readonly bundle_id: {
|
|
290
|
+
readonly type: "string";
|
|
291
|
+
readonly maxLength: 36;
|
|
292
|
+
};
|
|
293
|
+
readonly type: {
|
|
294
|
+
readonly type: "string";
|
|
295
|
+
readonly maxLength: 32;
|
|
296
|
+
};
|
|
297
|
+
readonly bucket_start_ms: {
|
|
298
|
+
readonly type: "integer";
|
|
299
|
+
};
|
|
300
|
+
}, "installations", {
|
|
301
|
+
readonly byBundle: {
|
|
302
|
+
readonly eq: readonly ["platform", "channel", "bundle_field", "bundle_id", "type"];
|
|
303
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
304
|
+
};
|
|
305
|
+
}, never, readonly ["platform", "channel", "bundle_field", "bundle_id", "type", "bucket_start_ms"]>;
|
|
306
|
+
readonly insights_outcomes: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
307
|
+
readonly platform: {
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
readonly maxLength: 16;
|
|
310
|
+
};
|
|
311
|
+
readonly channel: {
|
|
312
|
+
readonly type: "string";
|
|
313
|
+
};
|
|
314
|
+
readonly type: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
readonly maxLength: 32;
|
|
317
|
+
};
|
|
318
|
+
readonly bundle_ref: {
|
|
319
|
+
readonly type: "string";
|
|
320
|
+
readonly maxLength: 41;
|
|
321
|
+
};
|
|
322
|
+
readonly bucket_start_ms: {
|
|
323
|
+
readonly type: "integer";
|
|
324
|
+
};
|
|
325
|
+
}, "events", {
|
|
326
|
+
readonly byRef: {
|
|
327
|
+
readonly eq: readonly ["platform", "channel", "type", "bundle_ref"];
|
|
328
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
329
|
+
};
|
|
330
|
+
}, never, readonly ["platform", "channel", "type", "bundle_ref", "bucket_start_ms"]>;
|
|
331
|
+
readonly insights_failures: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
332
|
+
readonly platform: {
|
|
333
|
+
readonly type: "string";
|
|
334
|
+
readonly maxLength: 16;
|
|
335
|
+
};
|
|
336
|
+
readonly channel: {
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
};
|
|
339
|
+
readonly bucket_start_ms: {
|
|
340
|
+
readonly type: "integer";
|
|
341
|
+
};
|
|
342
|
+
readonly release_id: {
|
|
343
|
+
readonly type: "string";
|
|
344
|
+
readonly maxLength: 36;
|
|
345
|
+
};
|
|
346
|
+
readonly stage: {
|
|
347
|
+
readonly type: "string";
|
|
348
|
+
readonly maxLength: 16;
|
|
349
|
+
};
|
|
350
|
+
readonly reason: {
|
|
351
|
+
readonly type: "string";
|
|
352
|
+
readonly maxLength: 64;
|
|
353
|
+
};
|
|
354
|
+
readonly detail: {
|
|
355
|
+
readonly type: "string";
|
|
356
|
+
readonly maxLength: 160;
|
|
357
|
+
};
|
|
358
|
+
}, "events", {
|
|
359
|
+
readonly byScope: {
|
|
360
|
+
readonly eq: readonly ["platform", "channel"];
|
|
361
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
362
|
+
};
|
|
363
|
+
}, never, readonly ["platform", "channel", "bucket_start_ms", "release_id", "stage", "reason", "detail"]>;
|
|
364
|
+
};
|
|
365
|
+
declare const insightsSchema: {
|
|
366
|
+
readonly bundle_events: import("@hot-updater/plugin-core/server-plugin").TableDefinition<{
|
|
367
|
+
readonly id: {
|
|
368
|
+
readonly type: "string";
|
|
369
|
+
readonly maxLength: 36;
|
|
370
|
+
};
|
|
371
|
+
readonly type: {
|
|
372
|
+
readonly type: "string";
|
|
373
|
+
readonly maxLength: 32;
|
|
374
|
+
};
|
|
375
|
+
readonly install_id: {
|
|
376
|
+
readonly type: "string";
|
|
377
|
+
readonly maxLength: 255;
|
|
378
|
+
};
|
|
379
|
+
readonly user_id: {
|
|
380
|
+
readonly type: "string";
|
|
381
|
+
readonly maxLength: 255;
|
|
382
|
+
readonly required: false;
|
|
383
|
+
};
|
|
384
|
+
readonly from_release_id: {
|
|
385
|
+
readonly type: "string";
|
|
386
|
+
readonly maxLength: 36;
|
|
387
|
+
readonly required: false;
|
|
388
|
+
};
|
|
389
|
+
readonly from_bundle_id: {
|
|
390
|
+
readonly type: "string";
|
|
391
|
+
readonly maxLength: 36;
|
|
392
|
+
readonly required: false;
|
|
393
|
+
};
|
|
394
|
+
readonly to_release_id: {
|
|
395
|
+
readonly type: "string";
|
|
396
|
+
readonly maxLength: 36;
|
|
397
|
+
readonly required: false;
|
|
398
|
+
};
|
|
399
|
+
readonly to_bundle_id: {
|
|
400
|
+
readonly type: "string";
|
|
401
|
+
readonly maxLength: 36;
|
|
402
|
+
};
|
|
403
|
+
readonly platform: {
|
|
404
|
+
readonly type: "string";
|
|
405
|
+
readonly maxLength: 16;
|
|
406
|
+
};
|
|
407
|
+
readonly app_version: {
|
|
408
|
+
readonly type: "string";
|
|
409
|
+
};
|
|
410
|
+
readonly channel: {
|
|
411
|
+
readonly type: "string";
|
|
412
|
+
};
|
|
413
|
+
readonly metadata: {
|
|
414
|
+
readonly type: "json";
|
|
415
|
+
};
|
|
416
|
+
readonly received_at_ms: {
|
|
417
|
+
readonly type: "integer";
|
|
418
|
+
};
|
|
419
|
+
}, {
|
|
420
|
+
day: "integer";
|
|
421
|
+
movement_install_id: "string";
|
|
422
|
+
bundle_ref: "string";
|
|
423
|
+
}, {
|
|
424
|
+
readonly recent: {
|
|
425
|
+
readonly eq: readonly ["channel", "platform", "day"];
|
|
426
|
+
readonly sort: readonly ["received_at_ms"];
|
|
427
|
+
};
|
|
428
|
+
readonly movementsByInstall: {
|
|
429
|
+
readonly eq: readonly ["movement_install_id"];
|
|
430
|
+
readonly sort: readonly ["received_at_ms"];
|
|
431
|
+
};
|
|
432
|
+
readonly byBundle: {
|
|
433
|
+
readonly eq: readonly ["platform", "channel", "type", "bundle_ref", "day"];
|
|
434
|
+
readonly sort: readonly ["received_at_ms"];
|
|
435
|
+
};
|
|
436
|
+
/** Events of every scope by day, for the console's unfiltered event list. */
|
|
437
|
+
readonly byDay: {
|
|
438
|
+
readonly eq: readonly ["day"];
|
|
439
|
+
readonly sort: readonly ["received_at_ms"];
|
|
440
|
+
};
|
|
441
|
+
}, readonly ["id"]>;
|
|
442
|
+
readonly bundle_event_heads: import("@hot-updater/plugin-core/server-plugin").TableDefinition<{
|
|
443
|
+
readonly install_id: {
|
|
444
|
+
readonly type: "string";
|
|
445
|
+
readonly maxLength: 255;
|
|
446
|
+
};
|
|
447
|
+
readonly id: {
|
|
448
|
+
readonly type: "string";
|
|
449
|
+
readonly maxLength: 36;
|
|
450
|
+
};
|
|
451
|
+
readonly type: {
|
|
452
|
+
readonly type: "string";
|
|
453
|
+
readonly maxLength: 32;
|
|
454
|
+
};
|
|
455
|
+
readonly user_id: {
|
|
456
|
+
readonly type: "string";
|
|
457
|
+
readonly maxLength: 255;
|
|
458
|
+
readonly required: false;
|
|
459
|
+
};
|
|
460
|
+
readonly from_release_id: {
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
readonly maxLength: 36;
|
|
463
|
+
readonly required: false;
|
|
464
|
+
};
|
|
465
|
+
readonly from_bundle_id: {
|
|
466
|
+
readonly type: "string";
|
|
467
|
+
readonly maxLength: 36;
|
|
468
|
+
readonly required: false;
|
|
469
|
+
};
|
|
470
|
+
readonly to_release_id: {
|
|
471
|
+
readonly type: "string";
|
|
472
|
+
readonly maxLength: 36;
|
|
473
|
+
readonly required: false;
|
|
474
|
+
};
|
|
475
|
+
readonly to_bundle_id: {
|
|
476
|
+
readonly type: "string";
|
|
477
|
+
readonly maxLength: 36;
|
|
478
|
+
};
|
|
479
|
+
readonly platform: {
|
|
480
|
+
readonly type: "string";
|
|
481
|
+
readonly maxLength: 16;
|
|
482
|
+
};
|
|
483
|
+
readonly app_version: {
|
|
484
|
+
readonly type: "string";
|
|
485
|
+
};
|
|
486
|
+
readonly channel: {
|
|
487
|
+
readonly type: "string";
|
|
488
|
+
};
|
|
489
|
+
readonly metadata: {
|
|
490
|
+
readonly type: "json";
|
|
491
|
+
};
|
|
492
|
+
readonly received_at_ms: {
|
|
493
|
+
readonly type: "integer";
|
|
494
|
+
};
|
|
495
|
+
}, Readonly<Record<string, import("@hot-updater/plugin-core/server-plugin").FieldType>>, {
|
|
496
|
+
readonly byUser: {
|
|
497
|
+
readonly eq: readonly ["user_id"];
|
|
498
|
+
readonly sort: readonly ["install_id"];
|
|
499
|
+
};
|
|
500
|
+
}, readonly ["install_id"]>;
|
|
501
|
+
/** Hourly counters and sketches: the raw period. */
|
|
502
|
+
readonly insights_overview: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
503
|
+
readonly identity: {
|
|
504
|
+
readonly type: "string";
|
|
505
|
+
readonly maxLength: 32;
|
|
506
|
+
};
|
|
507
|
+
readonly bucket_start_ms: {
|
|
508
|
+
readonly type: "integer";
|
|
509
|
+
};
|
|
510
|
+
}, "downloads" | "launches" | "failed_launches" | "failed_updates" | "patch_downloads" | "patch_fallbacks", {
|
|
511
|
+
readonly window: {
|
|
512
|
+
readonly eq: readonly ["identity"];
|
|
513
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
514
|
+
};
|
|
515
|
+
}, never, readonly ["identity", "bucket_start_ms"]>;
|
|
516
|
+
readonly insights_sketches: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
517
|
+
readonly identity: {
|
|
518
|
+
readonly type: "string";
|
|
519
|
+
readonly maxLength: 32;
|
|
520
|
+
};
|
|
521
|
+
readonly bucket_start_ms: {
|
|
522
|
+
readonly type: "integer";
|
|
523
|
+
};
|
|
524
|
+
}, never, {
|
|
525
|
+
readonly window: {
|
|
526
|
+
readonly eq: readonly ["identity"];
|
|
527
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
528
|
+
};
|
|
529
|
+
}, "launch_users" | "activity_users" | "failed_users", readonly ["identity", "bucket_start_ms"]>;
|
|
530
|
+
/** Daily counters and sketches: the daily period. */
|
|
531
|
+
readonly insights_overview_daily: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
532
|
+
readonly identity: {
|
|
533
|
+
readonly type: "string";
|
|
534
|
+
readonly maxLength: 32;
|
|
535
|
+
};
|
|
536
|
+
readonly bucket_start_ms: {
|
|
537
|
+
readonly type: "integer";
|
|
538
|
+
};
|
|
539
|
+
}, "downloads" | "launches" | "failed_launches" | "failed_updates" | "patch_downloads" | "patch_fallbacks", {
|
|
540
|
+
readonly window: {
|
|
541
|
+
readonly eq: readonly ["identity"];
|
|
542
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
543
|
+
};
|
|
544
|
+
}, never, readonly ["identity", "bucket_start_ms"]>;
|
|
545
|
+
readonly insights_sketches_daily: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
546
|
+
readonly identity: {
|
|
547
|
+
readonly type: "string";
|
|
548
|
+
readonly maxLength: 32;
|
|
549
|
+
};
|
|
550
|
+
readonly bucket_start_ms: {
|
|
551
|
+
readonly type: "integer";
|
|
552
|
+
};
|
|
553
|
+
}, never, {
|
|
554
|
+
readonly window: {
|
|
555
|
+
readonly eq: readonly ["identity"];
|
|
556
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
557
|
+
};
|
|
558
|
+
}, "launch_users" | "activity_users" | "failed_users", readonly ["identity", "bucket_start_ms"]>;
|
|
559
|
+
/** A release's counters since its first event, and its failed installations: kept. */
|
|
560
|
+
readonly insights_overview_lifetime: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
561
|
+
readonly identity: {
|
|
562
|
+
readonly type: "string";
|
|
563
|
+
readonly maxLength: 32;
|
|
564
|
+
};
|
|
565
|
+
readonly bucket_start_ms: {
|
|
566
|
+
readonly type: "integer";
|
|
567
|
+
};
|
|
568
|
+
}, "downloads" | "launches" | "failed_launches" | "failed_updates" | "patch_downloads" | "patch_fallbacks", {
|
|
569
|
+
readonly window: {
|
|
570
|
+
readonly eq: readonly ["identity"];
|
|
571
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
572
|
+
};
|
|
573
|
+
}, never, readonly ["identity", "bucket_start_ms"]>;
|
|
574
|
+
readonly insights_sketches_lifetime: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
575
|
+
readonly identity: {
|
|
576
|
+
readonly type: "string";
|
|
577
|
+
readonly maxLength: 32;
|
|
578
|
+
};
|
|
579
|
+
readonly bucket_start_ms: {
|
|
580
|
+
readonly type: "integer";
|
|
581
|
+
};
|
|
582
|
+
}, never, {
|
|
583
|
+
readonly window: {
|
|
584
|
+
readonly eq: readonly ["identity"];
|
|
585
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
586
|
+
};
|
|
587
|
+
}, "failed_users", readonly ["identity", "bucket_start_ms"]>;
|
|
588
|
+
readonly insights_distribution: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
589
|
+
readonly channel: {
|
|
590
|
+
readonly type: "string";
|
|
591
|
+
};
|
|
592
|
+
readonly platform: {
|
|
593
|
+
readonly type: "string";
|
|
594
|
+
readonly maxLength: 16;
|
|
595
|
+
};
|
|
596
|
+
readonly app_version: {
|
|
597
|
+
readonly type: "string";
|
|
598
|
+
};
|
|
599
|
+
readonly release_id: {
|
|
600
|
+
readonly type: "string";
|
|
601
|
+
readonly maxLength: 36;
|
|
602
|
+
};
|
|
603
|
+
readonly bucket_start_ms: {
|
|
604
|
+
readonly type: "integer";
|
|
605
|
+
};
|
|
606
|
+
}, "latest_installations", {
|
|
607
|
+
readonly byScope: {
|
|
608
|
+
readonly eq: readonly ["channel", "platform"];
|
|
609
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
610
|
+
};
|
|
611
|
+
readonly byVersion: {
|
|
612
|
+
readonly eq: readonly ["channel", "platform", "app_version"];
|
|
613
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
614
|
+
};
|
|
615
|
+
}, never, readonly ["channel", "platform", "app_version", "release_id", "bucket_start_ms"]>;
|
|
616
|
+
readonly insights_latest_by_bundle: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
617
|
+
readonly platform: {
|
|
618
|
+
readonly type: "string";
|
|
619
|
+
readonly maxLength: 16;
|
|
620
|
+
};
|
|
621
|
+
readonly channel: {
|
|
622
|
+
readonly type: "string";
|
|
623
|
+
};
|
|
624
|
+
readonly bundle_field: {
|
|
625
|
+
readonly type: "string";
|
|
626
|
+
readonly maxLength: 16;
|
|
627
|
+
};
|
|
628
|
+
readonly bundle_id: {
|
|
629
|
+
readonly type: "string";
|
|
630
|
+
readonly maxLength: 36;
|
|
631
|
+
};
|
|
632
|
+
readonly type: {
|
|
633
|
+
readonly type: "string";
|
|
634
|
+
readonly maxLength: 32;
|
|
635
|
+
};
|
|
636
|
+
readonly bucket_start_ms: {
|
|
637
|
+
readonly type: "integer";
|
|
638
|
+
};
|
|
639
|
+
}, "installations", {
|
|
640
|
+
readonly byBundle: {
|
|
641
|
+
readonly eq: readonly ["platform", "channel", "bundle_field", "bundle_id", "type"];
|
|
642
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
643
|
+
};
|
|
644
|
+
}, never, readonly ["platform", "channel", "bundle_field", "bundle_id", "type", "bucket_start_ms"]>;
|
|
645
|
+
readonly insights_outcomes: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
646
|
+
readonly platform: {
|
|
647
|
+
readonly type: "string";
|
|
648
|
+
readonly maxLength: 16;
|
|
649
|
+
};
|
|
650
|
+
readonly channel: {
|
|
651
|
+
readonly type: "string";
|
|
652
|
+
};
|
|
653
|
+
readonly type: {
|
|
654
|
+
readonly type: "string";
|
|
655
|
+
readonly maxLength: 32;
|
|
656
|
+
};
|
|
657
|
+
readonly bundle_ref: {
|
|
658
|
+
readonly type: "string";
|
|
659
|
+
readonly maxLength: 41;
|
|
660
|
+
};
|
|
661
|
+
readonly bucket_start_ms: {
|
|
662
|
+
readonly type: "integer";
|
|
663
|
+
};
|
|
664
|
+
}, "events", {
|
|
665
|
+
readonly byRef: {
|
|
666
|
+
readonly eq: readonly ["platform", "channel", "type", "bundle_ref"];
|
|
667
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
668
|
+
};
|
|
669
|
+
}, never, readonly ["platform", "channel", "type", "bundle_ref", "bucket_start_ms"]>;
|
|
670
|
+
readonly insights_failures: import("@hot-updater/plugin-core/server-plugin").AggregateDefinition<{
|
|
671
|
+
readonly platform: {
|
|
672
|
+
readonly type: "string";
|
|
673
|
+
readonly maxLength: 16;
|
|
674
|
+
};
|
|
675
|
+
readonly channel: {
|
|
676
|
+
readonly type: "string";
|
|
677
|
+
};
|
|
678
|
+
readonly bucket_start_ms: {
|
|
679
|
+
readonly type: "integer";
|
|
680
|
+
};
|
|
681
|
+
readonly release_id: {
|
|
682
|
+
readonly type: "string";
|
|
683
|
+
readonly maxLength: 36;
|
|
684
|
+
};
|
|
685
|
+
readonly stage: {
|
|
686
|
+
readonly type: "string";
|
|
687
|
+
readonly maxLength: 16;
|
|
688
|
+
};
|
|
689
|
+
readonly reason: {
|
|
690
|
+
readonly type: "string";
|
|
691
|
+
readonly maxLength: 64;
|
|
692
|
+
};
|
|
693
|
+
readonly detail: {
|
|
694
|
+
readonly type: "string";
|
|
695
|
+
readonly maxLength: 160;
|
|
696
|
+
};
|
|
697
|
+
}, "events", {
|
|
698
|
+
readonly byScope: {
|
|
699
|
+
readonly eq: readonly ["platform", "channel"];
|
|
700
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
701
|
+
};
|
|
702
|
+
}, never, readonly ["platform", "channel", "bucket_start_ms", "release_id", "stage", "reason", "detail"]>;
|
|
703
|
+
};
|
|
704
|
+
type InsightsSchema = typeof insightsSchema;
|
|
705
|
+
//#endregion
|
|
706
|
+
export { DAILY_EVENTS, DEFAULT_INSIGHTS_RETENTION, InsightsRetention, InsightsSchema, createInsightsSchema, insightsSchema };
|