@hot-updater/plugin-core 1.0.0-rc.14 → 1.0.0-rc.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundleStorageLayout.cjs +7 -0
- package/dist/bundleStorageLayout.d.cts +5 -1
- package/dist/bundleStorageLayout.d.mts +5 -1
- package/dist/bundleStorageLayout.mjs +7 -1
- package/dist/contentType.cjs +9 -0
- package/dist/contentType.d.cts +4 -0
- package/dist/contentType.d.mts +4 -0
- package/dist/contentType.mjs +7 -0
- package/dist/createDatabasePlugin.cjs +3 -1
- package/dist/createDatabasePlugin.mjs +3 -1
- package/dist/databaseClientUpdates.cjs +0 -3
- package/dist/databaseClientUpdates.mjs +0 -3
- package/dist/databasePluginCrudValidationFields.cjs +3 -12
- package/dist/databasePluginCrudValidationFields.mjs +3 -12
- package/dist/databaseRows.cjs +0 -6
- package/dist/databaseRows.mjs +0 -6
- package/dist/index.cjs +4 -5
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/insightsContract.cjs +46 -0
- package/dist/insightsContract.mjs +46 -0
- package/dist/insightsDistinctSummary.cjs +72 -0
- package/dist/insightsDistinctSummary.d.cts +12 -0
- package/dist/insightsDistinctSummary.d.mts +12 -0
- package/dist/insightsDistinctSummary.mjs +68 -0
- package/dist/insightsOverview.cjs +139 -0
- package/dist/insightsOverview.d.cts +40 -0
- package/dist/insightsOverview.d.mts +40 -0
- package/dist/insightsOverview.mjs +135 -0
- package/dist/internal.cjs +12 -0
- package/dist/internal.d.cts +4 -2
- package/dist/internal.d.mts +4 -2
- package/dist/internal.mjs +3 -1
- package/dist/types/database.d.cts +2 -2
- package/dist/types/database.d.mts +2 -2
- package/dist/types/databaseFields.cjs +0 -3
- package/dist/types/databaseFields.d.cts +1 -1
- package/dist/types/databaseFields.d.mts +1 -1
- package/dist/types/databaseFields.mjs +0 -3
- package/dist/types/databaseOperations.d.cts +2 -0
- package/dist/types/databaseOperations.d.mts +2 -0
- package/dist/types/databasePlugin.d.cts +85 -1
- package/dist/types/databasePlugin.d.mts +85 -1
- package/dist/types/databaseRows.d.cts +3 -6
- package/dist/types/databaseRows.d.mts +3 -6
- package/dist/types/index.d.cts +3 -15
- package/dist/types/index.d.mts +3 -15
- package/dist/types/internal.d.cts +2 -2
- package/dist/types/internal.d.mts +2 -2
- package/dist/types/public.d.cts +2 -2
- package/dist/types/public.d.mts +2 -2
- package/package.json +2 -2
- package/dist/compressionFormat.cjs +0 -62
- package/dist/compressionFormat.d.cts +0 -33
- package/dist/compressionFormat.d.mts +0 -33
- package/dist/compressionFormat.mjs +0 -58
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
//#region src/insightsDistinctSummary.ts
|
|
2
|
+
const PRECISION = 10;
|
|
3
|
+
const REGISTER_COUNT = 1024;
|
|
4
|
+
const MAX_RANK = 55;
|
|
5
|
+
const hash = (value) => {
|
|
6
|
+
let result = 14695981039346656037n;
|
|
7
|
+
for (const byte of new TextEncoder().encode(value)) {
|
|
8
|
+
result ^= BigInt(byte);
|
|
9
|
+
result = BigInt.asUintN(64, result * 1099511628211n);
|
|
10
|
+
}
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
13
|
+
const OFFSET = 33;
|
|
14
|
+
const decode = (summary) => {
|
|
15
|
+
if (!summary) return new Uint8Array(REGISTER_COUNT);
|
|
16
|
+
if (summary.length !== REGISTER_COUNT) throw new Error("Invalid Insights distinct summary");
|
|
17
|
+
const registers = new Uint8Array(REGISTER_COUNT);
|
|
18
|
+
for (let index = 0; index < REGISTER_COUNT; index += 1) {
|
|
19
|
+
const value = summary.charCodeAt(index) - OFFSET;
|
|
20
|
+
if (!Number.isInteger(value) || value < 0 || value > MAX_RANK) throw new Error("Invalid Insights distinct summary");
|
|
21
|
+
registers[index] = value;
|
|
22
|
+
}
|
|
23
|
+
return registers;
|
|
24
|
+
};
|
|
25
|
+
const encode = (registers) => Array.from(registers, (value) => String.fromCharCode(value + OFFSET)).join("");
|
|
26
|
+
const getInsightsDistinctRegister = (identity) => {
|
|
27
|
+
const value = hash(identity);
|
|
28
|
+
const index = Number(value & BigInt(1023));
|
|
29
|
+
let remainder = value >> BigInt(PRECISION);
|
|
30
|
+
let rank = 1;
|
|
31
|
+
while ((remainder & 1n) === 0n && rank < MAX_RANK) {
|
|
32
|
+
rank += 1;
|
|
33
|
+
remainder >>= 1n;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
index,
|
|
37
|
+
rank,
|
|
38
|
+
character: String.fromCharCode(rank + OFFSET)
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const addInsightsDistinct = (summary, identity) => {
|
|
42
|
+
const registers = decode(summary);
|
|
43
|
+
const { index, rank } = getInsightsDistinctRegister(identity);
|
|
44
|
+
registers[index] = Math.max(registers[index], rank);
|
|
45
|
+
return encode(registers);
|
|
46
|
+
};
|
|
47
|
+
const mergeInsightsDistinct = (summaries) => {
|
|
48
|
+
const merged = new Uint8Array(REGISTER_COUNT);
|
|
49
|
+
for (const summary of summaries) {
|
|
50
|
+
const registers = decode(summary);
|
|
51
|
+
for (let index = 0; index < REGISTER_COUNT; index += 1) merged[index] = Math.max(merged[index], registers[index]);
|
|
52
|
+
}
|
|
53
|
+
return encode(merged);
|
|
54
|
+
};
|
|
55
|
+
const countInsightsDistinct = (summary) => {
|
|
56
|
+
const registers = decode(summary);
|
|
57
|
+
let inverseSum = 0;
|
|
58
|
+
let empty = 0;
|
|
59
|
+
for (const register of registers) {
|
|
60
|
+
inverseSum += 2 ** -register;
|
|
61
|
+
if (register === 0) empty += 1;
|
|
62
|
+
}
|
|
63
|
+
const estimate = empty > 0 ? REGISTER_COUNT * Math.log(REGISTER_COUNT / empty) : .7213 / 1.0010537109375 * REGISTER_COUNT ** 2 / inverseSum;
|
|
64
|
+
return Math.max(0, Math.round(estimate));
|
|
65
|
+
};
|
|
66
|
+
const emptyInsightsDistinct = () => encode(new Uint8Array(REGISTER_COUNT));
|
|
67
|
+
//#endregion
|
|
68
|
+
exports.addInsightsDistinct = addInsightsDistinct;
|
|
69
|
+
exports.countInsightsDistinct = countInsightsDistinct;
|
|
70
|
+
exports.emptyInsightsDistinct = emptyInsightsDistinct;
|
|
71
|
+
exports.getInsightsDistinctRegister = getInsightsDistinctRegister;
|
|
72
|
+
exports.mergeInsightsDistinct = mergeInsightsDistinct;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/insightsDistinctSummary.d.ts
|
|
2
|
+
declare const getInsightsDistinctRegister: (identity: string) => {
|
|
3
|
+
index: number;
|
|
4
|
+
rank: number;
|
|
5
|
+
character: string;
|
|
6
|
+
};
|
|
7
|
+
declare const addInsightsDistinct: (summary: string | null | undefined, identity: string) => string;
|
|
8
|
+
declare const mergeInsightsDistinct: (summaries: readonly (string | null | undefined)[]) => string;
|
|
9
|
+
declare const countInsightsDistinct: (summary: string | null | undefined) => number;
|
|
10
|
+
declare const emptyInsightsDistinct: () => string;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { addInsightsDistinct, countInsightsDistinct, emptyInsightsDistinct, getInsightsDistinctRegister, mergeInsightsDistinct };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/insightsDistinctSummary.d.ts
|
|
2
|
+
declare const getInsightsDistinctRegister: (identity: string) => {
|
|
3
|
+
index: number;
|
|
4
|
+
rank: number;
|
|
5
|
+
character: string;
|
|
6
|
+
};
|
|
7
|
+
declare const addInsightsDistinct: (summary: string | null | undefined, identity: string) => string;
|
|
8
|
+
declare const mergeInsightsDistinct: (summaries: readonly (string | null | undefined)[]) => string;
|
|
9
|
+
declare const countInsightsDistinct: (summary: string | null | undefined) => number;
|
|
10
|
+
declare const emptyInsightsDistinct: () => string;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { addInsightsDistinct, countInsightsDistinct, emptyInsightsDistinct, getInsightsDistinctRegister, mergeInsightsDistinct };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region src/insightsDistinctSummary.ts
|
|
2
|
+
const PRECISION = 10;
|
|
3
|
+
const REGISTER_COUNT = 1024;
|
|
4
|
+
const MAX_RANK = 55;
|
|
5
|
+
const hash = (value) => {
|
|
6
|
+
let result = 14695981039346656037n;
|
|
7
|
+
for (const byte of new TextEncoder().encode(value)) {
|
|
8
|
+
result ^= BigInt(byte);
|
|
9
|
+
result = BigInt.asUintN(64, result * 1099511628211n);
|
|
10
|
+
}
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
13
|
+
const OFFSET = 33;
|
|
14
|
+
const decode = (summary) => {
|
|
15
|
+
if (!summary) return new Uint8Array(REGISTER_COUNT);
|
|
16
|
+
if (summary.length !== REGISTER_COUNT) throw new Error("Invalid Insights distinct summary");
|
|
17
|
+
const registers = new Uint8Array(REGISTER_COUNT);
|
|
18
|
+
for (let index = 0; index < REGISTER_COUNT; index += 1) {
|
|
19
|
+
const value = summary.charCodeAt(index) - OFFSET;
|
|
20
|
+
if (!Number.isInteger(value) || value < 0 || value > MAX_RANK) throw new Error("Invalid Insights distinct summary");
|
|
21
|
+
registers[index] = value;
|
|
22
|
+
}
|
|
23
|
+
return registers;
|
|
24
|
+
};
|
|
25
|
+
const encode = (registers) => Array.from(registers, (value) => String.fromCharCode(value + OFFSET)).join("");
|
|
26
|
+
const getInsightsDistinctRegister = (identity) => {
|
|
27
|
+
const value = hash(identity);
|
|
28
|
+
const index = Number(value & BigInt(1023));
|
|
29
|
+
let remainder = value >> BigInt(PRECISION);
|
|
30
|
+
let rank = 1;
|
|
31
|
+
while ((remainder & 1n) === 0n && rank < MAX_RANK) {
|
|
32
|
+
rank += 1;
|
|
33
|
+
remainder >>= 1n;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
index,
|
|
37
|
+
rank,
|
|
38
|
+
character: String.fromCharCode(rank + OFFSET)
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const addInsightsDistinct = (summary, identity) => {
|
|
42
|
+
const registers = decode(summary);
|
|
43
|
+
const { index, rank } = getInsightsDistinctRegister(identity);
|
|
44
|
+
registers[index] = Math.max(registers[index], rank);
|
|
45
|
+
return encode(registers);
|
|
46
|
+
};
|
|
47
|
+
const mergeInsightsDistinct = (summaries) => {
|
|
48
|
+
const merged = new Uint8Array(REGISTER_COUNT);
|
|
49
|
+
for (const summary of summaries) {
|
|
50
|
+
const registers = decode(summary);
|
|
51
|
+
for (let index = 0; index < REGISTER_COUNT; index += 1) merged[index] = Math.max(merged[index], registers[index]);
|
|
52
|
+
}
|
|
53
|
+
return encode(merged);
|
|
54
|
+
};
|
|
55
|
+
const countInsightsDistinct = (summary) => {
|
|
56
|
+
const registers = decode(summary);
|
|
57
|
+
let inverseSum = 0;
|
|
58
|
+
let empty = 0;
|
|
59
|
+
for (const register of registers) {
|
|
60
|
+
inverseSum += 2 ** -register;
|
|
61
|
+
if (register === 0) empty += 1;
|
|
62
|
+
}
|
|
63
|
+
const estimate = empty > 0 ? REGISTER_COUNT * Math.log(REGISTER_COUNT / empty) : .7213 / 1.0010537109375 * REGISTER_COUNT ** 2 / inverseSum;
|
|
64
|
+
return Math.max(0, Math.round(estimate));
|
|
65
|
+
};
|
|
66
|
+
const emptyInsightsDistinct = () => encode(new Uint8Array(REGISTER_COUNT));
|
|
67
|
+
//#endregion
|
|
68
|
+
export { addInsightsDistinct, countInsightsDistinct, emptyInsightsDistinct, getInsightsDistinctRegister, mergeInsightsDistinct };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
//#region src/insightsOverview.ts
|
|
2
|
+
const encodeIdentity = (identity) => [
|
|
3
|
+
identity.scopeKind,
|
|
4
|
+
identity.releaseKind,
|
|
5
|
+
identity.releaseId,
|
|
6
|
+
identity.channel,
|
|
7
|
+
identity.platform,
|
|
8
|
+
identity.appVersionKind,
|
|
9
|
+
identity.appVersion,
|
|
10
|
+
identity.periodKind,
|
|
11
|
+
String(identity.bucketStartMs)
|
|
12
|
+
].map((value) => `${new TextEncoder().encode(value).length}:${value}`).join("");
|
|
13
|
+
const fnv = (value, seed) => {
|
|
14
|
+
let result = seed;
|
|
15
|
+
for (const byte of new TextEncoder().encode(value)) {
|
|
16
|
+
result ^= BigInt(byte);
|
|
17
|
+
result = BigInt.asUintN(64, result * 1099511628211n);
|
|
18
|
+
}
|
|
19
|
+
return result.toString(16).padStart(16, "0");
|
|
20
|
+
};
|
|
21
|
+
const insightsOverviewId = (identity) => {
|
|
22
|
+
const value = encodeIdentity(identity);
|
|
23
|
+
return `${fnv(value, 14695981039346656037n)}${fnv(value, 9521211207457086692n)}`;
|
|
24
|
+
};
|
|
25
|
+
const insightsOverviewValues = (identity) => ({
|
|
26
|
+
id: insightsOverviewId(identity),
|
|
27
|
+
scope_kind: identity.scopeKind,
|
|
28
|
+
release_kind: identity.releaseKind,
|
|
29
|
+
release_id: identity.releaseId,
|
|
30
|
+
channel: identity.channel,
|
|
31
|
+
platform: identity.platform,
|
|
32
|
+
app_version_kind: identity.appVersionKind,
|
|
33
|
+
app_version: identity.appVersion,
|
|
34
|
+
period_kind: identity.periodKind,
|
|
35
|
+
bucket_start_ms: identity.bucketStartMs
|
|
36
|
+
});
|
|
37
|
+
const hour = (value) => Math.floor(value / 36e5) * 36e5;
|
|
38
|
+
const currentInsightsReleaseId = (event) => event.type === "UPDATE_DOWNLOADED" ? event.from_release_id : event.to_release_id;
|
|
39
|
+
const insightsDistributionIdentity = (event) => {
|
|
40
|
+
const releaseId = currentInsightsReleaseId(event);
|
|
41
|
+
return {
|
|
42
|
+
scopeKind: "distribution",
|
|
43
|
+
releaseKind: releaseId === null ? "embedded" : "specific",
|
|
44
|
+
releaseId: releaseId ?? "",
|
|
45
|
+
channel: event.channel,
|
|
46
|
+
platform: event.platform,
|
|
47
|
+
appVersionKind: "specific",
|
|
48
|
+
appVersion: event.app_version,
|
|
49
|
+
periodKind: "latest",
|
|
50
|
+
bucketStartMs: hour(event.received_at_ms)
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
const insightsOverviewDeltas = (event) => {
|
|
54
|
+
const bucketStartMs = hour(event.received_at_ms);
|
|
55
|
+
const counters = /* @__PURE__ */ new Map();
|
|
56
|
+
const append = (identity, values) => {
|
|
57
|
+
const key = encodeIdentity(identity);
|
|
58
|
+
const previous = counters.get(key);
|
|
59
|
+
counters.set(key, {
|
|
60
|
+
identity,
|
|
61
|
+
downloads: (previous?.downloads ?? 0) + values.downloads,
|
|
62
|
+
launches: (previous?.launches ?? 0) + values.launches,
|
|
63
|
+
failedLaunches: (previous?.failedLaunches ?? 0) + values.failedLaunches,
|
|
64
|
+
launchIdentity: previous?.launchIdentity ?? values.launchIdentity,
|
|
65
|
+
activityIdentity: previous?.activityIdentity ?? values.activityIdentity
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const metric = (releaseId, values) => {
|
|
69
|
+
const launchIdentity = values.launches > 0 ? event.install_id : void 0;
|
|
70
|
+
if (releaseId !== null) for (const [periodKind, start] of [["lifetime", 0], ["hour", bucketStartMs]]) append({
|
|
71
|
+
scopeKind: "release",
|
|
72
|
+
releaseKind: "specific",
|
|
73
|
+
releaseId,
|
|
74
|
+
channel: event.channel,
|
|
75
|
+
platform: event.platform,
|
|
76
|
+
appVersionKind: "all",
|
|
77
|
+
appVersion: "",
|
|
78
|
+
periodKind,
|
|
79
|
+
bucketStartMs: start
|
|
80
|
+
}, {
|
|
81
|
+
...values,
|
|
82
|
+
...periodKind === "hour" ? { launchIdentity } : {}
|
|
83
|
+
});
|
|
84
|
+
append({
|
|
85
|
+
scopeKind: "channel",
|
|
86
|
+
releaseKind: "all",
|
|
87
|
+
releaseId: "",
|
|
88
|
+
channel: event.channel,
|
|
89
|
+
platform: event.platform,
|
|
90
|
+
appVersionKind: "all",
|
|
91
|
+
appVersion: "",
|
|
92
|
+
periodKind: "hour",
|
|
93
|
+
bucketStartMs
|
|
94
|
+
}, {
|
|
95
|
+
...values,
|
|
96
|
+
launchIdentity
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
if (event.type === "UPDATE_DOWNLOADED") metric(event.to_release_id, {
|
|
100
|
+
downloads: 1,
|
|
101
|
+
launches: 0,
|
|
102
|
+
failedLaunches: 0
|
|
103
|
+
});
|
|
104
|
+
else {
|
|
105
|
+
metric(event.to_release_id, {
|
|
106
|
+
downloads: 0,
|
|
107
|
+
launches: 1,
|
|
108
|
+
failedLaunches: 0
|
|
109
|
+
});
|
|
110
|
+
if (event.type === "RECOVERED") metric(event.from_release_id, {
|
|
111
|
+
downloads: 0,
|
|
112
|
+
launches: 0,
|
|
113
|
+
failedLaunches: 1
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
for (const platform of [event.platform, "all"]) for (const appVersionKind of ["specific", "all"]) append({
|
|
117
|
+
scopeKind: "usage",
|
|
118
|
+
releaseKind: "all",
|
|
119
|
+
releaseId: "",
|
|
120
|
+
channel: event.channel,
|
|
121
|
+
platform,
|
|
122
|
+
appVersionKind,
|
|
123
|
+
appVersion: appVersionKind === "specific" ? event.app_version : "",
|
|
124
|
+
periodKind: "hour",
|
|
125
|
+
bucketStartMs
|
|
126
|
+
}, {
|
|
127
|
+
downloads: 0,
|
|
128
|
+
launches: 0,
|
|
129
|
+
failedLaunches: 0,
|
|
130
|
+
activityIdentity: event.install_id
|
|
131
|
+
});
|
|
132
|
+
return [...counters.values()];
|
|
133
|
+
};
|
|
134
|
+
//#endregion
|
|
135
|
+
exports.currentInsightsReleaseId = currentInsightsReleaseId;
|
|
136
|
+
exports.insightsDistributionIdentity = insightsDistributionIdentity;
|
|
137
|
+
exports.insightsOverviewDeltas = insightsOverviewDeltas;
|
|
138
|
+
exports.insightsOverviewId = insightsOverviewId;
|
|
139
|
+
exports.insightsOverviewValues = insightsOverviewValues;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BundleEventRow } from "./types/databaseRows.cjs";
|
|
2
|
+
import "./types/internal.cjs";
|
|
3
|
+
//#region src/insightsOverview.d.ts
|
|
4
|
+
type InsightsOverviewIdentity = {
|
|
5
|
+
readonly scopeKind: "release" | "channel" | "usage" | "distribution";
|
|
6
|
+
readonly releaseKind: "all" | "specific" | "embedded";
|
|
7
|
+
readonly releaseId: string;
|
|
8
|
+
readonly channel: string;
|
|
9
|
+
readonly platform: "all" | "ios" | "android";
|
|
10
|
+
readonly appVersionKind: "all" | "specific";
|
|
11
|
+
readonly appVersion: string;
|
|
12
|
+
readonly periodKind: "lifetime" | "hour" | "latest";
|
|
13
|
+
readonly bucketStartMs: number;
|
|
14
|
+
};
|
|
15
|
+
type InsightsOverviewDelta = {
|
|
16
|
+
readonly identity: InsightsOverviewIdentity;
|
|
17
|
+
readonly downloads: number;
|
|
18
|
+
readonly launches: number;
|
|
19
|
+
readonly failedLaunches: number;
|
|
20
|
+
readonly launchIdentity?: string;
|
|
21
|
+
readonly activityIdentity?: string;
|
|
22
|
+
};
|
|
23
|
+
declare const insightsOverviewId: (identity: InsightsOverviewIdentity) => string;
|
|
24
|
+
declare const insightsOverviewValues: (identity: InsightsOverviewIdentity) => {
|
|
25
|
+
id: string;
|
|
26
|
+
scope_kind: "release" | "channel" | "usage" | "distribution";
|
|
27
|
+
release_kind: "all" | "specific" | "embedded";
|
|
28
|
+
release_id: string;
|
|
29
|
+
channel: string;
|
|
30
|
+
platform: "all" | "ios" | "android";
|
|
31
|
+
app_version_kind: "all" | "specific";
|
|
32
|
+
app_version: string;
|
|
33
|
+
period_kind: "lifetime" | "hour" | "latest";
|
|
34
|
+
bucket_start_ms: number;
|
|
35
|
+
};
|
|
36
|
+
declare const currentInsightsReleaseId: (event: BundleEventRow) => string | null;
|
|
37
|
+
declare const insightsDistributionIdentity: (event: BundleEventRow) => InsightsOverviewIdentity;
|
|
38
|
+
declare const insightsOverviewDeltas: (event: BundleEventRow) => readonly InsightsOverviewDelta[];
|
|
39
|
+
//#endregion
|
|
40
|
+
export { InsightsOverviewDelta, InsightsOverviewIdentity, currentInsightsReleaseId, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BundleEventRow } from "./types/databaseRows.mjs";
|
|
2
|
+
import "./types/internal.mjs";
|
|
3
|
+
//#region src/insightsOverview.d.ts
|
|
4
|
+
type InsightsOverviewIdentity = {
|
|
5
|
+
readonly scopeKind: "release" | "channel" | "usage" | "distribution";
|
|
6
|
+
readonly releaseKind: "all" | "specific" | "embedded";
|
|
7
|
+
readonly releaseId: string;
|
|
8
|
+
readonly channel: string;
|
|
9
|
+
readonly platform: "all" | "ios" | "android";
|
|
10
|
+
readonly appVersionKind: "all" | "specific";
|
|
11
|
+
readonly appVersion: string;
|
|
12
|
+
readonly periodKind: "lifetime" | "hour" | "latest";
|
|
13
|
+
readonly bucketStartMs: number;
|
|
14
|
+
};
|
|
15
|
+
type InsightsOverviewDelta = {
|
|
16
|
+
readonly identity: InsightsOverviewIdentity;
|
|
17
|
+
readonly downloads: number;
|
|
18
|
+
readonly launches: number;
|
|
19
|
+
readonly failedLaunches: number;
|
|
20
|
+
readonly launchIdentity?: string;
|
|
21
|
+
readonly activityIdentity?: string;
|
|
22
|
+
};
|
|
23
|
+
declare const insightsOverviewId: (identity: InsightsOverviewIdentity) => string;
|
|
24
|
+
declare const insightsOverviewValues: (identity: InsightsOverviewIdentity) => {
|
|
25
|
+
id: string;
|
|
26
|
+
scope_kind: "release" | "channel" | "usage" | "distribution";
|
|
27
|
+
release_kind: "all" | "specific" | "embedded";
|
|
28
|
+
release_id: string;
|
|
29
|
+
channel: string;
|
|
30
|
+
platform: "all" | "ios" | "android";
|
|
31
|
+
app_version_kind: "all" | "specific";
|
|
32
|
+
app_version: string;
|
|
33
|
+
period_kind: "lifetime" | "hour" | "latest";
|
|
34
|
+
bucket_start_ms: number;
|
|
35
|
+
};
|
|
36
|
+
declare const currentInsightsReleaseId: (event: BundleEventRow) => string | null;
|
|
37
|
+
declare const insightsDistributionIdentity: (event: BundleEventRow) => InsightsOverviewIdentity;
|
|
38
|
+
declare const insightsOverviewDeltas: (event: BundleEventRow) => readonly InsightsOverviewDelta[];
|
|
39
|
+
//#endregion
|
|
40
|
+
export { InsightsOverviewDelta, InsightsOverviewIdentity, currentInsightsReleaseId, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
//#region src/insightsOverview.ts
|
|
2
|
+
const encodeIdentity = (identity) => [
|
|
3
|
+
identity.scopeKind,
|
|
4
|
+
identity.releaseKind,
|
|
5
|
+
identity.releaseId,
|
|
6
|
+
identity.channel,
|
|
7
|
+
identity.platform,
|
|
8
|
+
identity.appVersionKind,
|
|
9
|
+
identity.appVersion,
|
|
10
|
+
identity.periodKind,
|
|
11
|
+
String(identity.bucketStartMs)
|
|
12
|
+
].map((value) => `${new TextEncoder().encode(value).length}:${value}`).join("");
|
|
13
|
+
const fnv = (value, seed) => {
|
|
14
|
+
let result = seed;
|
|
15
|
+
for (const byte of new TextEncoder().encode(value)) {
|
|
16
|
+
result ^= BigInt(byte);
|
|
17
|
+
result = BigInt.asUintN(64, result * 1099511628211n);
|
|
18
|
+
}
|
|
19
|
+
return result.toString(16).padStart(16, "0");
|
|
20
|
+
};
|
|
21
|
+
const insightsOverviewId = (identity) => {
|
|
22
|
+
const value = encodeIdentity(identity);
|
|
23
|
+
return `${fnv(value, 14695981039346656037n)}${fnv(value, 9521211207457086692n)}`;
|
|
24
|
+
};
|
|
25
|
+
const insightsOverviewValues = (identity) => ({
|
|
26
|
+
id: insightsOverviewId(identity),
|
|
27
|
+
scope_kind: identity.scopeKind,
|
|
28
|
+
release_kind: identity.releaseKind,
|
|
29
|
+
release_id: identity.releaseId,
|
|
30
|
+
channel: identity.channel,
|
|
31
|
+
platform: identity.platform,
|
|
32
|
+
app_version_kind: identity.appVersionKind,
|
|
33
|
+
app_version: identity.appVersion,
|
|
34
|
+
period_kind: identity.periodKind,
|
|
35
|
+
bucket_start_ms: identity.bucketStartMs
|
|
36
|
+
});
|
|
37
|
+
const hour = (value) => Math.floor(value / 36e5) * 36e5;
|
|
38
|
+
const currentInsightsReleaseId = (event) => event.type === "UPDATE_DOWNLOADED" ? event.from_release_id : event.to_release_id;
|
|
39
|
+
const insightsDistributionIdentity = (event) => {
|
|
40
|
+
const releaseId = currentInsightsReleaseId(event);
|
|
41
|
+
return {
|
|
42
|
+
scopeKind: "distribution",
|
|
43
|
+
releaseKind: releaseId === null ? "embedded" : "specific",
|
|
44
|
+
releaseId: releaseId ?? "",
|
|
45
|
+
channel: event.channel,
|
|
46
|
+
platform: event.platform,
|
|
47
|
+
appVersionKind: "specific",
|
|
48
|
+
appVersion: event.app_version,
|
|
49
|
+
periodKind: "latest",
|
|
50
|
+
bucketStartMs: hour(event.received_at_ms)
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
const insightsOverviewDeltas = (event) => {
|
|
54
|
+
const bucketStartMs = hour(event.received_at_ms);
|
|
55
|
+
const counters = /* @__PURE__ */ new Map();
|
|
56
|
+
const append = (identity, values) => {
|
|
57
|
+
const key = encodeIdentity(identity);
|
|
58
|
+
const previous = counters.get(key);
|
|
59
|
+
counters.set(key, {
|
|
60
|
+
identity,
|
|
61
|
+
downloads: (previous?.downloads ?? 0) + values.downloads,
|
|
62
|
+
launches: (previous?.launches ?? 0) + values.launches,
|
|
63
|
+
failedLaunches: (previous?.failedLaunches ?? 0) + values.failedLaunches,
|
|
64
|
+
launchIdentity: previous?.launchIdentity ?? values.launchIdentity,
|
|
65
|
+
activityIdentity: previous?.activityIdentity ?? values.activityIdentity
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const metric = (releaseId, values) => {
|
|
69
|
+
const launchIdentity = values.launches > 0 ? event.install_id : void 0;
|
|
70
|
+
if (releaseId !== null) for (const [periodKind, start] of [["lifetime", 0], ["hour", bucketStartMs]]) append({
|
|
71
|
+
scopeKind: "release",
|
|
72
|
+
releaseKind: "specific",
|
|
73
|
+
releaseId,
|
|
74
|
+
channel: event.channel,
|
|
75
|
+
platform: event.platform,
|
|
76
|
+
appVersionKind: "all",
|
|
77
|
+
appVersion: "",
|
|
78
|
+
periodKind,
|
|
79
|
+
bucketStartMs: start
|
|
80
|
+
}, {
|
|
81
|
+
...values,
|
|
82
|
+
...periodKind === "hour" ? { launchIdentity } : {}
|
|
83
|
+
});
|
|
84
|
+
append({
|
|
85
|
+
scopeKind: "channel",
|
|
86
|
+
releaseKind: "all",
|
|
87
|
+
releaseId: "",
|
|
88
|
+
channel: event.channel,
|
|
89
|
+
platform: event.platform,
|
|
90
|
+
appVersionKind: "all",
|
|
91
|
+
appVersion: "",
|
|
92
|
+
periodKind: "hour",
|
|
93
|
+
bucketStartMs
|
|
94
|
+
}, {
|
|
95
|
+
...values,
|
|
96
|
+
launchIdentity
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
if (event.type === "UPDATE_DOWNLOADED") metric(event.to_release_id, {
|
|
100
|
+
downloads: 1,
|
|
101
|
+
launches: 0,
|
|
102
|
+
failedLaunches: 0
|
|
103
|
+
});
|
|
104
|
+
else {
|
|
105
|
+
metric(event.to_release_id, {
|
|
106
|
+
downloads: 0,
|
|
107
|
+
launches: 1,
|
|
108
|
+
failedLaunches: 0
|
|
109
|
+
});
|
|
110
|
+
if (event.type === "RECOVERED") metric(event.from_release_id, {
|
|
111
|
+
downloads: 0,
|
|
112
|
+
launches: 0,
|
|
113
|
+
failedLaunches: 1
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
for (const platform of [event.platform, "all"]) for (const appVersionKind of ["specific", "all"]) append({
|
|
117
|
+
scopeKind: "usage",
|
|
118
|
+
releaseKind: "all",
|
|
119
|
+
releaseId: "",
|
|
120
|
+
channel: event.channel,
|
|
121
|
+
platform,
|
|
122
|
+
appVersionKind,
|
|
123
|
+
appVersion: appVersionKind === "specific" ? event.app_version : "",
|
|
124
|
+
periodKind: "hour",
|
|
125
|
+
bucketStartMs
|
|
126
|
+
}, {
|
|
127
|
+
downloads: 0,
|
|
128
|
+
launches: 0,
|
|
129
|
+
failedLaunches: 0,
|
|
130
|
+
activityIdentity: event.install_id
|
|
131
|
+
});
|
|
132
|
+
return [...counters.values()];
|
|
133
|
+
};
|
|
134
|
+
//#endregion
|
|
135
|
+
export { currentInsightsReleaseId, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues };
|
package/dist/internal.cjs
CHANGED
|
@@ -2,8 +2,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_databaseFields = require("./types/databaseFields.cjs");
|
|
3
3
|
const require_createDatabasePlugin = require("./createDatabasePlugin.cjs");
|
|
4
4
|
const require_insightsLatestQueries = require("./insightsLatestQueries.cjs");
|
|
5
|
+
const require_insightsDistinctSummary = require("./insightsDistinctSummary.cjs");
|
|
6
|
+
const require_insightsOverview = require("./insightsOverview.cjs");
|
|
5
7
|
exports.DatabaseRowReferencedError = require_createDatabasePlugin.DatabaseRowReferencedError;
|
|
8
|
+
exports.addInsightsDistinct = require_insightsDistinctSummary.addInsightsDistinct;
|
|
9
|
+
exports.countInsightsDistinct = require_insightsDistinctSummary.countInsightsDistinct;
|
|
6
10
|
exports.createDatabasePluginAdapter = require_createDatabasePlugin.createDatabasePluginAdapter;
|
|
11
|
+
exports.currentInsightsReleaseId = require_insightsOverview.currentInsightsReleaseId;
|
|
7
12
|
exports.databaseFields = require_databaseFields.databaseFields;
|
|
13
|
+
exports.emptyInsightsDistinct = require_insightsDistinctSummary.emptyInsightsDistinct;
|
|
14
|
+
exports.getInsightsDistinctRegister = require_insightsDistinctSummary.getInsightsDistinctRegister;
|
|
15
|
+
exports.insightsDistributionIdentity = require_insightsOverview.insightsDistributionIdentity;
|
|
16
|
+
exports.insightsOverviewDeltas = require_insightsOverview.insightsOverviewDeltas;
|
|
17
|
+
exports.insightsOverviewId = require_insightsOverview.insightsOverviewId;
|
|
18
|
+
exports.insightsOverviewValues = require_insightsOverview.insightsOverviewValues;
|
|
8
19
|
exports.latestInsightsCountGroups = require_insightsLatestQueries.latestInsightsCountGroups;
|
|
9
20
|
exports.latestInsightsWhere = require_insightsLatestQueries.latestInsightsWhere;
|
|
21
|
+
exports.mergeInsightsDistinct = require_insightsDistinctSummary.mergeInsightsDistinct;
|
package/dist/internal.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
|
|
2
|
-
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, ReleaseCatalogModel, ReleaseModel } from "./types/databasePlugin.cjs";
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsCoverage, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsGetAppUsageInput, InsightsGetAppUsageResult, InsightsGetReleaseActivityInput, InsightsGetReleaseActivityResult, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, InsightsTimeRange, ReleaseActivityMetrics, ReleaseCatalogModel, ReleaseModel, ReleaseReference } from "./types/databasePlugin.cjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./types/databaseQuery.cjs";
|
|
4
4
|
import { ApiKeyRowUpdate, BundleRowUpdate, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseCapability, DatabaseDeleteModel, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseModelCapabilities, DatabaseModelsWithCapability, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRowUpdate, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, ReleaseCatalogRowUpdate, ReleaseRowUpdate, SelectedDatabaseInputRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel } from "./types/databaseOperations.cjs";
|
|
5
5
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.cjs";
|
|
@@ -8,4 +8,6 @@ import { databaseFields } from "./types/databaseFields.cjs";
|
|
|
8
8
|
import "./types/internal.cjs";
|
|
9
9
|
import { DatabasePluginAdapter, DatabaseRowReferencedError, createDatabasePluginAdapter } from "./createDatabasePlugin.cjs";
|
|
10
10
|
import { latestInsightsCountGroups, latestInsightsWhere } from "./insightsLatestQueries.cjs";
|
|
11
|
-
|
|
11
|
+
import { addInsightsDistinct, countInsightsDistinct, emptyInsightsDistinct, getInsightsDistinctRegister, mergeInsightsDistinct } from "./insightsDistinctSummary.cjs";
|
|
12
|
+
import { InsightsOverviewDelta, InsightsOverviewIdentity, currentInsightsReleaseId, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues } from "./insightsOverview.cjs";
|
|
13
|
+
export { type ApiKeyModel, type ApiKeyRow, type ApiKeyRowUpdate, type ApplePlatform, type BasePluginArgs, type BuildPlugin, type BuildPluginConfig, type BuiltIns, type Bundle, type BundleEventRow, type BundleEventRowBase, type BundleModel, type BundleModelQuery, type BundlePatchModel, type BundlePatchRow, type BundleRepository, type BundleRepositoryChange, type BundleRepositoryCommit, type BundleRow, type BundleRowUpdate, type BundleSigningPlugin, type ChannelDeleteInput, type ChannelDeleteResult, type ChannelInsertInput, type ChannelInsertResult, type ChannelModel, type ChannelRow, type ConfigInput, type CountBundlesDatabaseImplementationInput, type CountBundlesDatabaseInput, type CountDatabaseImplementationInput, type CountDatabaseInput, type CountDatabaseModel, type CreateDatabaseImplementationInput, type CreateDatabaseInput, type CreateDatabaseModel, type DatabaseBundleCursor, type DatabaseBundleEventMetadata, type DatabaseBundleIdFilter, type DatabaseBundleMetadata, type DatabaseBundleQueryOptions, type DatabaseBundleQueryOrder, type DatabaseBundleQueryWhere, type DatabaseCapability, type DatabaseChange, type DatabaseCommit, type DatabaseCommitExpectation, type DatabaseCommitResult, type DatabaseDeleteModel, type DatabaseDistinctFields, type DatabaseDistinctOn, type DatabaseField, type DatabaseFindOneModel, type DatabaseImplementationResult, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseModel, type DatabaseModelCapabilities, type DatabaseModelMap, type DatabaseModels, type DatabaseModelsWithCapability, type DatabaseOrderBy, type DatabasePlugin, type DatabasePluginAdapter, type DatabasePluginCrud, type DatabasePluginImplementation, type DatabaseRow, DatabaseRowReferencedError, type DatabaseRowUpdate, type DatabaseSelect, type DatabaseSortBy, type DatabaseSortClause, type DatabaseSortNulls, type DatabaseStringComparisonMode, type DatabaseWhere, type DatabaseWhereConnector, type DatabaseWhereOperator, type DeleteDatabaseImplementationInput, type DeleteDatabaseInput, type DeleteDatabaseModel, type FindManyDatabaseImplementationInput, type FindManyDatabaseInput, type FindManyDatabaseModel, type FindManyDatabasePluginInput, type FindOneDatabaseImplementationInput, type FindOneDatabaseInput, type FindOneDatabaseModel, type FingerprintExtraSources, type HasMultipleCallSignatures, type InsightsBundleEventFilter, type InsightsCountEventsInput, type InsightsCountLatestEventsInput, type InsightsCoverage, type InsightsEventCursor, type InsightsEventFilter, type InsightsFindLatestEventsInput, type InsightsGetAppUsageInput, type InsightsGetAppUsageResult, type InsightsGetReleaseActivityInput, type InsightsGetReleaseActivityResult, type InsightsListEventsInput, type InsightsModel, type InsightsOverviewDelta, type InsightsOverviewIdentity, type InsightsRecordEventInput, type InsightsScope, type InsightsTimeRange, type IosBuildDestination, type LocalSigningConfig, type NativeBuildAndroidScheme, type NativeBuildArgs, type NativeBuildIosScheme, type NativeBuildOptions, type Paginated, type PaginatedResult, type PaginationInfo, type Platform, type PlatformConfig, type Primitive, type ReleaseActivityMetrics, type ReleaseCatalogModel, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, type ReleaseModel, type ReleaseReference, type ReleaseRow, type ReleaseRowUpdate, type RequiredDeep, type SelectedDatabaseInputRow, type SelectedDatabaseRow, type SigningConfig, type StorageDeleteInput, type StorageDeleteResult, type StorageExistsInput, type StorageExistsResult, type StorageGetDownloadUrlInput, type StorageGetDownloadUrlResult, type StorageGetInput, type StorageGetResult, type StorageObject, type StoragePlugin, type StoragePutInput, type StoragePutResult, type TransactionDatabasePluginImplementation, type UpdateBundleDatabaseImplementationInput, type UpdateBundleDatabaseInput, type UpdateDatabaseImplementationInput, type UpdateDatabaseInput, type UpdateDatabaseModel, addInsightsDistinct, countInsightsDistinct, createDatabasePluginAdapter, currentInsightsReleaseId, databaseFields, emptyInsightsDistinct, getInsightsDistinctRegister, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues, latestInsightsCountGroups, latestInsightsWhere, mergeInsightsDistinct, type supportedIosPlatforms };
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
|
|
2
|
-
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, ReleaseCatalogModel, ReleaseModel } from "./types/databasePlugin.mjs";
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsCoverage, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsGetAppUsageInput, InsightsGetAppUsageResult, InsightsGetReleaseActivityInput, InsightsGetReleaseActivityResult, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, InsightsTimeRange, ReleaseActivityMetrics, ReleaseCatalogModel, ReleaseModel, ReleaseReference } from "./types/databasePlugin.mjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./types/databaseQuery.mjs";
|
|
4
4
|
import { ApiKeyRowUpdate, BundleRowUpdate, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseCapability, DatabaseDeleteModel, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseModelCapabilities, DatabaseModelsWithCapability, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRowUpdate, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, ReleaseCatalogRowUpdate, ReleaseRowUpdate, SelectedDatabaseInputRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel } from "./types/databaseOperations.mjs";
|
|
5
5
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.mjs";
|
|
@@ -8,4 +8,6 @@ import { databaseFields } from "./types/databaseFields.mjs";
|
|
|
8
8
|
import "./types/internal.mjs";
|
|
9
9
|
import { DatabasePluginAdapter, DatabaseRowReferencedError, createDatabasePluginAdapter } from "./createDatabasePlugin.mjs";
|
|
10
10
|
import { latestInsightsCountGroups, latestInsightsWhere } from "./insightsLatestQueries.mjs";
|
|
11
|
-
|
|
11
|
+
import { addInsightsDistinct, countInsightsDistinct, emptyInsightsDistinct, getInsightsDistinctRegister, mergeInsightsDistinct } from "./insightsDistinctSummary.mjs";
|
|
12
|
+
import { InsightsOverviewDelta, InsightsOverviewIdentity, currentInsightsReleaseId, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues } from "./insightsOverview.mjs";
|
|
13
|
+
export { type ApiKeyModel, type ApiKeyRow, type ApiKeyRowUpdate, type ApplePlatform, type BasePluginArgs, type BuildPlugin, type BuildPluginConfig, type BuiltIns, type Bundle, type BundleEventRow, type BundleEventRowBase, type BundleModel, type BundleModelQuery, type BundlePatchModel, type BundlePatchRow, type BundleRepository, type BundleRepositoryChange, type BundleRepositoryCommit, type BundleRow, type BundleRowUpdate, type BundleSigningPlugin, type ChannelDeleteInput, type ChannelDeleteResult, type ChannelInsertInput, type ChannelInsertResult, type ChannelModel, type ChannelRow, type ConfigInput, type CountBundlesDatabaseImplementationInput, type CountBundlesDatabaseInput, type CountDatabaseImplementationInput, type CountDatabaseInput, type CountDatabaseModel, type CreateDatabaseImplementationInput, type CreateDatabaseInput, type CreateDatabaseModel, type DatabaseBundleCursor, type DatabaseBundleEventMetadata, type DatabaseBundleIdFilter, type DatabaseBundleMetadata, type DatabaseBundleQueryOptions, type DatabaseBundleQueryOrder, type DatabaseBundleQueryWhere, type DatabaseCapability, type DatabaseChange, type DatabaseCommit, type DatabaseCommitExpectation, type DatabaseCommitResult, type DatabaseDeleteModel, type DatabaseDistinctFields, type DatabaseDistinctOn, type DatabaseField, type DatabaseFindOneModel, type DatabaseImplementationResult, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseModel, type DatabaseModelCapabilities, type DatabaseModelMap, type DatabaseModels, type DatabaseModelsWithCapability, type DatabaseOrderBy, type DatabasePlugin, type DatabasePluginAdapter, type DatabasePluginCrud, type DatabasePluginImplementation, type DatabaseRow, DatabaseRowReferencedError, type DatabaseRowUpdate, type DatabaseSelect, type DatabaseSortBy, type DatabaseSortClause, type DatabaseSortNulls, type DatabaseStringComparisonMode, type DatabaseWhere, type DatabaseWhereConnector, type DatabaseWhereOperator, type DeleteDatabaseImplementationInput, type DeleteDatabaseInput, type DeleteDatabaseModel, type FindManyDatabaseImplementationInput, type FindManyDatabaseInput, type FindManyDatabaseModel, type FindManyDatabasePluginInput, type FindOneDatabaseImplementationInput, type FindOneDatabaseInput, type FindOneDatabaseModel, type FingerprintExtraSources, type HasMultipleCallSignatures, type InsightsBundleEventFilter, type InsightsCountEventsInput, type InsightsCountLatestEventsInput, type InsightsCoverage, type InsightsEventCursor, type InsightsEventFilter, type InsightsFindLatestEventsInput, type InsightsGetAppUsageInput, type InsightsGetAppUsageResult, type InsightsGetReleaseActivityInput, type InsightsGetReleaseActivityResult, type InsightsListEventsInput, type InsightsModel, type InsightsOverviewDelta, type InsightsOverviewIdentity, type InsightsRecordEventInput, type InsightsScope, type InsightsTimeRange, type IosBuildDestination, type LocalSigningConfig, type NativeBuildAndroidScheme, type NativeBuildArgs, type NativeBuildIosScheme, type NativeBuildOptions, type Paginated, type PaginatedResult, type PaginationInfo, type Platform, type PlatformConfig, type Primitive, type ReleaseActivityMetrics, type ReleaseCatalogModel, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, type ReleaseModel, type ReleaseReference, type ReleaseRow, type ReleaseRowUpdate, type RequiredDeep, type SelectedDatabaseInputRow, type SelectedDatabaseRow, type SigningConfig, type StorageDeleteInput, type StorageDeleteResult, type StorageExistsInput, type StorageExistsResult, type StorageGetDownloadUrlInput, type StorageGetDownloadUrlResult, type StorageGetInput, type StorageGetResult, type StorageObject, type StoragePlugin, type StoragePutInput, type StoragePutResult, type TransactionDatabasePluginImplementation, type UpdateBundleDatabaseImplementationInput, type UpdateBundleDatabaseInput, type UpdateDatabaseImplementationInput, type UpdateDatabaseInput, type UpdateDatabaseModel, addInsightsDistinct, countInsightsDistinct, createDatabasePluginAdapter, currentInsightsReleaseId, databaseFields, emptyInsightsDistinct, getInsightsDistinctRegister, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues, latestInsightsCountGroups, latestInsightsWhere, mergeInsightsDistinct, type supportedIosPlatforms };
|
package/dist/internal.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { databaseFields } from "./types/databaseFields.mjs";
|
|
2
2
|
import { DatabaseRowReferencedError, createDatabasePluginAdapter } from "./createDatabasePlugin.mjs";
|
|
3
3
|
import { latestInsightsCountGroups, latestInsightsWhere } from "./insightsLatestQueries.mjs";
|
|
4
|
-
|
|
4
|
+
import { addInsightsDistinct, countInsightsDistinct, emptyInsightsDistinct, getInsightsDistinctRegister, mergeInsightsDistinct } from "./insightsDistinctSummary.mjs";
|
|
5
|
+
import { currentInsightsReleaseId, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues } from "./insightsOverview.mjs";
|
|
6
|
+
export { DatabaseRowReferencedError, addInsightsDistinct, countInsightsDistinct, createDatabasePluginAdapter, currentInsightsReleaseId, databaseFields, emptyInsightsDistinct, getInsightsDistinctRegister, insightsDistributionIdentity, insightsOverviewDeltas, insightsOverviewId, insightsOverviewValues, latestInsightsCountGroups, latestInsightsWhere, mergeInsightsDistinct };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
2
|
-
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.cjs";
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsCoverage, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsGetAppUsageInput, InsightsGetAppUsageResult, InsightsGetReleaseActivityInput, InsightsGetReleaseActivityResult, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, InsightsTimeRange, ReleaseActivityMetrics, ReleaseCatalogModel, ReleaseModel, ReleaseReference } from "./databasePlugin.cjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./databaseQuery.cjs";
|
|
4
4
|
import { ApiKeyRowUpdate, BundleRowUpdate, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseCapability, DatabaseDeleteModel, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseModelCapabilities, DatabaseModelsWithCapability, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRowUpdate, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, ReleaseCatalogRowUpdate, ReleaseRowUpdate, SelectedDatabaseInputRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel } from "./databaseOperations.cjs";
|
|
5
|
-
export { ApiKeyModel, ApiKeyRow, ApiKeyRowUpdate, BundleEventRow, BundleEventRowBase, BundleModel, BundleModelQuery, BundlePatchModel, BundlePatchRow, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, BundleRow, BundleRowUpdate, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, ChannelRow, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseCapability, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseDeleteModel, DatabaseDistinctFields, DatabaseDistinctOn, DatabaseField, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelCapabilities, DatabaseModelMap, DatabaseModels, DatabaseModelsWithCapability, DatabaseOrderBy, DatabasePlugin, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRow, DatabaseRowUpdate, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, ReleaseCatalogModel, ReleaseCatalogRow, ReleaseCatalogRowUpdate, ReleaseModel, ReleaseRow, ReleaseRowUpdate, SelectedDatabaseInputRow, SelectedDatabaseRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel };
|
|
5
|
+
export { ApiKeyModel, ApiKeyRow, ApiKeyRowUpdate, BundleEventRow, BundleEventRowBase, BundleModel, BundleModelQuery, BundlePatchModel, BundlePatchRow, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, BundleRow, BundleRowUpdate, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, ChannelRow, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseCapability, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseDeleteModel, DatabaseDistinctFields, DatabaseDistinctOn, DatabaseField, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelCapabilities, DatabaseModelMap, DatabaseModels, DatabaseModelsWithCapability, DatabaseOrderBy, DatabasePlugin, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRow, DatabaseRowUpdate, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsCoverage, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsGetAppUsageInput, InsightsGetAppUsageResult, InsightsGetReleaseActivityInput, InsightsGetReleaseActivityResult, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, InsightsTimeRange, ReleaseActivityMetrics, ReleaseCatalogModel, ReleaseCatalogRow, ReleaseCatalogRowUpdate, ReleaseModel, ReleaseReference, ReleaseRow, ReleaseRowUpdate, SelectedDatabaseInputRow, SelectedDatabaseRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel };
|