@mentra/cloud-client 3.3.0-dev.766 → 3.3.0-dev.770
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/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/modules/core/core.ts +10 -0
- package/src/modules/core/reports.ts +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mentra/cloud-client",
|
|
3
|
-
"version": "3.3.0-dev.
|
|
3
|
+
"version": "3.3.0-dev.770",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"exports": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"test": "bun test"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@mentra/cloud-protocol": "3.3.0-dev.
|
|
15
|
+
"@mentra/cloud-protocol": "3.3.0-dev.770",
|
|
16
16
|
"tweetnacl": "^1.0.3"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
package/src/index.ts
CHANGED
package/src/modules/core/core.ts
CHANGED
|
@@ -22,6 +22,8 @@ import {
|
|
|
22
22
|
type AddReportArtifactsResult,
|
|
23
23
|
type ReportAttachmentInput,
|
|
24
24
|
type ReportLogEntry,
|
|
25
|
+
type ReportLogCollectionUpdate,
|
|
26
|
+
type ReportLogSource,
|
|
25
27
|
type ReportStatus,
|
|
26
28
|
type SubmitReportInput,
|
|
27
29
|
type SubmitReportResult,
|
|
@@ -39,6 +41,8 @@ export type {
|
|
|
39
41
|
ReportDetails,
|
|
40
42
|
ReportKind,
|
|
41
43
|
ReportLogEntry,
|
|
44
|
+
ReportLogCollectionUpdate,
|
|
45
|
+
ReportLogSource,
|
|
42
46
|
ReportStatus,
|
|
43
47
|
ReportSystemPriority,
|
|
44
48
|
ReportTrigger,
|
|
@@ -144,6 +148,11 @@ export class Core {
|
|
|
144
148
|
};
|
|
145
149
|
readonly reports: {
|
|
146
150
|
submit(input: SubmitReportInput): Promise<SubmitReportResult>;
|
|
151
|
+
updateLogCollection(
|
|
152
|
+
reportId: string,
|
|
153
|
+
source: ReportLogSource,
|
|
154
|
+
update: ReportLogCollectionUpdate,
|
|
155
|
+
): Promise<void>;
|
|
147
156
|
addLogs(
|
|
148
157
|
reportId: string,
|
|
149
158
|
source: string,
|
|
@@ -213,6 +222,7 @@ export class Core {
|
|
|
213
222
|
};
|
|
214
223
|
this.reports = {
|
|
215
224
|
submit: reports.submit.bind(reports),
|
|
225
|
+
updateLogCollection: reports.updateLogCollection.bind(reports),
|
|
216
226
|
addLogs: reports.addLogs.bind(reports),
|
|
217
227
|
addScreenshots: reports.addScreenshots.bind(reports),
|
|
218
228
|
addVideos: reports.addVideos.bind(reports),
|
|
@@ -12,6 +12,11 @@ const REPORTS_PATH = "/api/client/reports";
|
|
|
12
12
|
|
|
13
13
|
export type ReportKind = "bug" | "feedback" | "automatic";
|
|
14
14
|
export type ReportStatus = "collecting" | "ready" | "closed";
|
|
15
|
+
export type ReportLogSource = "phone" | "glasses" | "glasses_firmware" | "cloud" | "miniapp_server";
|
|
16
|
+
export interface ReportLogCollectionUpdate {
|
|
17
|
+
state: "requested" | "unavailable" | "failed";
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
15
20
|
export type ReportSystemPriority = "low" | "medium" | "high" | "critical";
|
|
16
21
|
|
|
17
22
|
interface BaseReportTrigger {
|
|
@@ -99,6 +104,18 @@ export class Reports {
|
|
|
99
104
|
return this.http.post<SubmitReportResult>(REPORTS_PATH, input);
|
|
100
105
|
}
|
|
101
106
|
|
|
107
|
+
/** Record a local collection attempt; only Core artifact storage confirms receipt. */
|
|
108
|
+
updateLogCollection(
|
|
109
|
+
reportId: string,
|
|
110
|
+
source: ReportLogSource,
|
|
111
|
+
update: ReportLogCollectionUpdate,
|
|
112
|
+
): Promise<void> {
|
|
113
|
+
return this.http.post<void>(
|
|
114
|
+
`${REPORTS_PATH}/${encodeURIComponent(reportId)}/log-collection/${source}`,
|
|
115
|
+
update,
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
102
119
|
async addLogs(
|
|
103
120
|
reportId: string,
|
|
104
121
|
source: string,
|