@g9tm/app-diagnostic 0.2.0 → 0.2.2
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 +20 -12
- package/src/bytes.ts +48 -48
- package/src/host.ts +124 -124
- package/src/index.ts +30 -30
- package/src/live/bundle.ts +77 -77
- package/src/live/channel.ts +496 -496
- package/src/live/handlers.ts +426 -426
- package/src/live/models.ts +366 -360
- package/src/live/upload.ts +175 -175
- package/src/recording.ts +176 -176
- package/src/store.ts +39 -39
- package/src/strings.generated.ts +242 -242
- package/src/strings.ts +37 -37
- package/src/tester/archive.ts +83 -83
- package/src/tester/compose.ts +99 -99
- package/src/tester/engine.ts +2 -0
- package/src/tester/feed.ts +182 -182
- package/src/tester/gesture.ts +61 -61
- package/src/tester/model.ts +125 -125
- package/src/tester/outbox.ts +131 -131
- package/src/tester/screen.ts +117 -117
- package/src/tester/store.ts +145 -145
- package/src/tester/timeline.ts +98 -98
- package/src/upload.ts +236 -236
- package/src/wire.ts +133 -133
package/src/live/models.ts
CHANGED
|
@@ -1,360 +1,366 @@
|
|
|
1
|
-
// The live channel's payloads as the wire carries them (shared/schema/live-channel.schema.json $defs; the .NET twin is
|
|
2
|
-
// G9AppDiagnostic.Shared/Models). camelCase names, enums as numbers, dates as ISO strings, byte[] as base64. A field the
|
|
3
|
-
// gateway adds later is simply ignored by an older client; a field is added, never renamed.
|
|
4
|
-
|
|
5
|
-
export interface PresencePayload {
|
|
6
|
-
clientId: string;
|
|
7
|
-
username: string;
|
|
8
|
-
displayName: string;
|
|
9
|
-
firstName: string;
|
|
10
|
-
lastName: string;
|
|
11
|
-
fullName: string;
|
|
12
|
-
firstNameEn: string;
|
|
13
|
-
firstNameFa: string;
|
|
14
|
-
lastNameEn: string;
|
|
15
|
-
lastNameFa: string;
|
|
16
|
-
fullNameEn: string;
|
|
17
|
-
fullNameFa: string;
|
|
18
|
-
avatarBase64?: string | null;
|
|
19
|
-
gender: number;
|
|
20
|
-
deviceModel: string;
|
|
21
|
-
deviceManufacturer: string;
|
|
22
|
-
deviceIdiom: string;
|
|
23
|
-
platform: string;
|
|
24
|
-
platformVersion: string;
|
|
25
|
-
appVersion: string;
|
|
26
|
-
/** The branch and commit the app was built from (an older app sends none). */
|
|
27
|
-
buildBranch?: string | null;
|
|
28
|
-
buildCommit?: string | null;
|
|
29
|
-
appBuild: string;
|
|
30
|
-
environment: string;
|
|
31
|
-
culture: string;
|
|
32
|
-
capabilities: string[];
|
|
33
|
-
currentPageName: string;
|
|
34
|
-
connectivityOnline: boolean;
|
|
35
|
-
batteryPercent: number;
|
|
36
|
-
powerSource: string;
|
|
37
|
-
freeDiskBytes: number;
|
|
38
|
-
totalDiskBytes: number;
|
|
39
|
-
managedMemoryBytes: number;
|
|
40
|
-
sqliteDbBytes: number;
|
|
41
|
-
geoDbBytes: number;
|
|
42
|
-
attachmentDbBytes: number;
|
|
43
|
-
lastSeenUtc: string;
|
|
44
|
-
foregroundConsented: boolean;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface HelloRequest {
|
|
48
|
-
clientId: string;
|
|
49
|
-
protocolTag: string;
|
|
50
|
-
presence: PresencePayload;
|
|
51
|
-
deviceAuthToken?: string | null;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface DeviceSettingItem {
|
|
55
|
-
key: string;
|
|
56
|
-
kind: string;
|
|
57
|
-
value: string;
|
|
58
|
-
category: string;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface HelloResponse {
|
|
62
|
-
accepted: boolean;
|
|
63
|
-
rejectionReason?: string | null;
|
|
64
|
-
serverProtocolMajor?: number;
|
|
65
|
-
deviceAuthToken?: string | null;
|
|
66
|
-
deviceSettings?: DeviceSettingItem[] | null;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface ForegroundAnnounce {
|
|
70
|
-
consented: boolean;
|
|
71
|
-
consentedAtUtc: string;
|
|
72
|
-
overlayPhase?: 'open' | 'minimized' | 'closed' | null;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface PeerInfo {
|
|
76
|
-
peerId: string;
|
|
77
|
-
displayLabel: string;
|
|
78
|
-
roleKind: string;
|
|
79
|
-
scopes: string[];
|
|
80
|
-
connectedAtUtc: string;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export interface LogEntryPayload {
|
|
84
|
-
timestampUtc: string;
|
|
85
|
-
level: string;
|
|
86
|
-
category: string;
|
|
87
|
-
message: string;
|
|
88
|
-
exception?: string | null;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface LogsBatchPayload {
|
|
92
|
-
entries: LogEntryPayload[];
|
|
93
|
-
isTail: boolean;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface ScreenshotFramePayload {
|
|
97
|
-
widthPx: number;
|
|
98
|
-
heightPx: number;
|
|
99
|
-
mimeType: string;
|
|
100
|
-
dataBase64: string;
|
|
101
|
-
capturedAtUtc: string;
|
|
102
|
-
pageName?: string | null;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface ScreenshotErrorPayload {
|
|
106
|
-
requestId: string;
|
|
107
|
-
errorCode: string;
|
|
108
|
-
message?: string | null;
|
|
109
|
-
reportedAtUtc: string;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export interface CpuSamplePayload {
|
|
113
|
-
cpuPercent: number;
|
|
114
|
-
processorCount: number;
|
|
115
|
-
sampledAtUtc: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface SqlExecRequestPayload {
|
|
119
|
-
sql: string;
|
|
120
|
-
readOnly: boolean;
|
|
121
|
-
timeoutSeconds: number;
|
|
122
|
-
maxRows: number;
|
|
123
|
-
databaseKey: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface SqlResultPayload {
|
|
127
|
-
columnNames: string[];
|
|
128
|
-
columnTypes: string[];
|
|
129
|
-
rows: Array<Array<string | null>>;
|
|
130
|
-
rowsAffected: number;
|
|
131
|
-
rowsReturned: number;
|
|
132
|
-
durationMs: number;
|
|
133
|
-
errorMessage?: string | null;
|
|
134
|
-
truncated: boolean;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface LogFileDescriptor {
|
|
138
|
-
name: string;
|
|
139
|
-
sizeBytes: number;
|
|
140
|
-
lastWriteUtc: string;
|
|
141
|
-
isActive: boolean;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface LogFileListPayload {
|
|
145
|
-
files: LogFileDescriptor[];
|
|
146
|
-
fileLoggingEnabled: boolean;
|
|
147
|
-
retainedFileLimit: number;
|
|
148
|
-
errorMessage?: string | null;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export interface LogFileReadRequestPayload {
|
|
152
|
-
name: string;
|
|
153
|
-
offset: number;
|
|
154
|
-
maxBytes: number;
|
|
155
|
-
fromEnd: boolean;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export interface LogFileContentPayload {
|
|
159
|
-
name: string;
|
|
160
|
-
content: string;
|
|
161
|
-
offset: number;
|
|
162
|
-
nextOffset: number;
|
|
163
|
-
totalBytes: number;
|
|
164
|
-
endOfFile: boolean;
|
|
165
|
-
errorMessage?: string | null;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface BackupBuildRequestPayload {
|
|
169
|
-
includeSqlite: boolean;
|
|
170
|
-
includeGeoDatabase: boolean;
|
|
171
|
-
includeAttachments: boolean;
|
|
172
|
-
includeLogs: boolean;
|
|
173
|
-
includePreferences: boolean;
|
|
174
|
-
includeSecureStorage: boolean;
|
|
175
|
-
includeErrors: boolean;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/** BackupSource (a number on the wire). */
|
|
179
|
-
export const BackupSource = { liveDiagnostic: 0, userReport: 1 } as const;
|
|
180
|
-
|
|
181
|
-
export interface BackupUploadInitRequest {
|
|
182
|
-
clientId: string;
|
|
183
|
-
sha256Hex: string;
|
|
184
|
-
sizeBytes: number;
|
|
185
|
-
isPasswordProtected: boolean;
|
|
186
|
-
resumeToken?: string | null;
|
|
187
|
-
filename: string;
|
|
188
|
-
isSensitive: boolean;
|
|
189
|
-
note?: string | null;
|
|
190
|
-
includeSqlite: boolean;
|
|
191
|
-
includeGeoDatabase: boolean;
|
|
192
|
-
includeAttachments: boolean;
|
|
193
|
-
includeLogs: boolean;
|
|
194
|
-
includePreferences: boolean;
|
|
195
|
-
includeSecureStorage: boolean;
|
|
196
|
-
source: number;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export interface BackupUploadInitResponse {
|
|
200
|
-
accepted: boolean;
|
|
201
|
-
rejectionReason?: string | null;
|
|
202
|
-
token: string;
|
|
203
|
-
resumeFromOffset: number;
|
|
204
|
-
expiresAtUtc?: string;
|
|
205
|
-
cancelledByOperator?: boolean;
|
|
206
|
-
unknownResumeToken?: boolean;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export interface BackupUploadChunksAck {
|
|
210
|
-
accepted: boolean;
|
|
211
|
-
rejectionReason?: string | null;
|
|
212
|
-
receivedOffset: number;
|
|
213
|
-
cancelledByOperator?: boolean;
|
|
214
|
-
streamBusy?: boolean;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export interface BackupUploadCompleteRequest {
|
|
218
|
-
token: string;
|
|
219
|
-
sha256Hex: string;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export interface BackupUploadCompleteResponse {
|
|
223
|
-
accepted: boolean;
|
|
224
|
-
rejectionReason?: string | null;
|
|
225
|
-
finalSizeBytes?: number;
|
|
226
|
-
restartFromZero?: boolean;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
export interface RestoreResultPayload {
|
|
230
|
-
transferId: string;
|
|
231
|
-
ok: boolean;
|
|
232
|
-
error?: string | null;
|
|
233
|
-
receivedBytes: number;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export interface RemoteInputCommand {
|
|
237
|
-
kind: 'tap' | 'down' | 'move' | 'up' | 'text' | string;
|
|
238
|
-
normX: number;
|
|
239
|
-
normY: number;
|
|
240
|
-
text?: string | null;
|
|
241
|
-
seqMs: number;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export interface QaCommandPayload {
|
|
245
|
-
command: string;
|
|
246
|
-
argsJson: string;
|
|
247
|
-
timeoutMs: number;
|
|
248
|
-
leaseId?: string | null;
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
1
|
+
// The live channel's payloads as the wire carries them (shared/schema/live-channel.schema.json $defs; the .NET twin is
|
|
2
|
+
// G9AppDiagnostic.Shared/Models). camelCase names, enums as numbers, dates as ISO strings, byte[] as base64. A field the
|
|
3
|
+
// gateway adds later is simply ignored by an older client; a field is added, never renamed.
|
|
4
|
+
|
|
5
|
+
export interface PresencePayload {
|
|
6
|
+
clientId: string;
|
|
7
|
+
username: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
firstName: string;
|
|
10
|
+
lastName: string;
|
|
11
|
+
fullName: string;
|
|
12
|
+
firstNameEn: string;
|
|
13
|
+
firstNameFa: string;
|
|
14
|
+
lastNameEn: string;
|
|
15
|
+
lastNameFa: string;
|
|
16
|
+
fullNameEn: string;
|
|
17
|
+
fullNameFa: string;
|
|
18
|
+
avatarBase64?: string | null;
|
|
19
|
+
gender: number;
|
|
20
|
+
deviceModel: string;
|
|
21
|
+
deviceManufacturer: string;
|
|
22
|
+
deviceIdiom: string;
|
|
23
|
+
platform: string;
|
|
24
|
+
platformVersion: string;
|
|
25
|
+
appVersion: string;
|
|
26
|
+
/** The branch and commit the app was built from (an older app sends none). */
|
|
27
|
+
buildBranch?: string | null;
|
|
28
|
+
buildCommit?: string | null;
|
|
29
|
+
appBuild: string;
|
|
30
|
+
environment: string;
|
|
31
|
+
culture: string;
|
|
32
|
+
capabilities: string[];
|
|
33
|
+
currentPageName: string;
|
|
34
|
+
connectivityOnline: boolean;
|
|
35
|
+
batteryPercent: number;
|
|
36
|
+
powerSource: string;
|
|
37
|
+
freeDiskBytes: number;
|
|
38
|
+
totalDiskBytes: number;
|
|
39
|
+
managedMemoryBytes: number;
|
|
40
|
+
sqliteDbBytes: number;
|
|
41
|
+
geoDbBytes: number;
|
|
42
|
+
attachmentDbBytes: number;
|
|
43
|
+
lastSeenUtc: string;
|
|
44
|
+
foregroundConsented: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface HelloRequest {
|
|
48
|
+
clientId: string;
|
|
49
|
+
protocolTag: string;
|
|
50
|
+
presence: PresencePayload;
|
|
51
|
+
deviceAuthToken?: string | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface DeviceSettingItem {
|
|
55
|
+
key: string;
|
|
56
|
+
kind: string;
|
|
57
|
+
value: string;
|
|
58
|
+
category: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface HelloResponse {
|
|
62
|
+
accepted: boolean;
|
|
63
|
+
rejectionReason?: string | null;
|
|
64
|
+
serverProtocolMajor?: number;
|
|
65
|
+
deviceAuthToken?: string | null;
|
|
66
|
+
deviceSettings?: DeviceSettingItem[] | null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface ForegroundAnnounce {
|
|
70
|
+
consented: boolean;
|
|
71
|
+
consentedAtUtc: string;
|
|
72
|
+
overlayPhase?: 'open' | 'minimized' | 'closed' | null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface PeerInfo {
|
|
76
|
+
peerId: string;
|
|
77
|
+
displayLabel: string;
|
|
78
|
+
roleKind: string;
|
|
79
|
+
scopes: string[];
|
|
80
|
+
connectedAtUtc: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface LogEntryPayload {
|
|
84
|
+
timestampUtc: string;
|
|
85
|
+
level: string;
|
|
86
|
+
category: string;
|
|
87
|
+
message: string;
|
|
88
|
+
exception?: string | null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface LogsBatchPayload {
|
|
92
|
+
entries: LogEntryPayload[];
|
|
93
|
+
isTail: boolean;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface ScreenshotFramePayload {
|
|
97
|
+
widthPx: number;
|
|
98
|
+
heightPx: number;
|
|
99
|
+
mimeType: string;
|
|
100
|
+
dataBase64: string;
|
|
101
|
+
capturedAtUtc: string;
|
|
102
|
+
pageName?: string | null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface ScreenshotErrorPayload {
|
|
106
|
+
requestId: string;
|
|
107
|
+
errorCode: string;
|
|
108
|
+
message?: string | null;
|
|
109
|
+
reportedAtUtc: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface CpuSamplePayload {
|
|
113
|
+
cpuPercent: number;
|
|
114
|
+
processorCount: number;
|
|
115
|
+
sampledAtUtc: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface SqlExecRequestPayload {
|
|
119
|
+
sql: string;
|
|
120
|
+
readOnly: boolean;
|
|
121
|
+
timeoutSeconds: number;
|
|
122
|
+
maxRows: number;
|
|
123
|
+
databaseKey: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface SqlResultPayload {
|
|
127
|
+
columnNames: string[];
|
|
128
|
+
columnTypes: string[];
|
|
129
|
+
rows: Array<Array<string | null>>;
|
|
130
|
+
rowsAffected: number;
|
|
131
|
+
rowsReturned: number;
|
|
132
|
+
durationMs: number;
|
|
133
|
+
errorMessage?: string | null;
|
|
134
|
+
truncated: boolean;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface LogFileDescriptor {
|
|
138
|
+
name: string;
|
|
139
|
+
sizeBytes: number;
|
|
140
|
+
lastWriteUtc: string;
|
|
141
|
+
isActive: boolean;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface LogFileListPayload {
|
|
145
|
+
files: LogFileDescriptor[];
|
|
146
|
+
fileLoggingEnabled: boolean;
|
|
147
|
+
retainedFileLimit: number;
|
|
148
|
+
errorMessage?: string | null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface LogFileReadRequestPayload {
|
|
152
|
+
name: string;
|
|
153
|
+
offset: number;
|
|
154
|
+
maxBytes: number;
|
|
155
|
+
fromEnd: boolean;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface LogFileContentPayload {
|
|
159
|
+
name: string;
|
|
160
|
+
content: string;
|
|
161
|
+
offset: number;
|
|
162
|
+
nextOffset: number;
|
|
163
|
+
totalBytes: number;
|
|
164
|
+
endOfFile: boolean;
|
|
165
|
+
errorMessage?: string | null;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface BackupBuildRequestPayload {
|
|
169
|
+
includeSqlite: boolean;
|
|
170
|
+
includeGeoDatabase: boolean;
|
|
171
|
+
includeAttachments: boolean;
|
|
172
|
+
includeLogs: boolean;
|
|
173
|
+
includePreferences: boolean;
|
|
174
|
+
includeSecureStorage: boolean;
|
|
175
|
+
includeErrors: boolean;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** BackupSource (a number on the wire). */
|
|
179
|
+
export const BackupSource = { liveDiagnostic: 0, userReport: 1 } as const;
|
|
180
|
+
|
|
181
|
+
export interface BackupUploadInitRequest {
|
|
182
|
+
clientId: string;
|
|
183
|
+
sha256Hex: string;
|
|
184
|
+
sizeBytes: number;
|
|
185
|
+
isPasswordProtected: boolean;
|
|
186
|
+
resumeToken?: string | null;
|
|
187
|
+
filename: string;
|
|
188
|
+
isSensitive: boolean;
|
|
189
|
+
note?: string | null;
|
|
190
|
+
includeSqlite: boolean;
|
|
191
|
+
includeGeoDatabase: boolean;
|
|
192
|
+
includeAttachments: boolean;
|
|
193
|
+
includeLogs: boolean;
|
|
194
|
+
includePreferences: boolean;
|
|
195
|
+
includeSecureStorage: boolean;
|
|
196
|
+
source: number;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface BackupUploadInitResponse {
|
|
200
|
+
accepted: boolean;
|
|
201
|
+
rejectionReason?: string | null;
|
|
202
|
+
token: string;
|
|
203
|
+
resumeFromOffset: number;
|
|
204
|
+
expiresAtUtc?: string;
|
|
205
|
+
cancelledByOperator?: boolean;
|
|
206
|
+
unknownResumeToken?: boolean;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface BackupUploadChunksAck {
|
|
210
|
+
accepted: boolean;
|
|
211
|
+
rejectionReason?: string | null;
|
|
212
|
+
receivedOffset: number;
|
|
213
|
+
cancelledByOperator?: boolean;
|
|
214
|
+
streamBusy?: boolean;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface BackupUploadCompleteRequest {
|
|
218
|
+
token: string;
|
|
219
|
+
sha256Hex: string;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface BackupUploadCompleteResponse {
|
|
223
|
+
accepted: boolean;
|
|
224
|
+
rejectionReason?: string | null;
|
|
225
|
+
finalSizeBytes?: number;
|
|
226
|
+
restartFromZero?: boolean;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface RestoreResultPayload {
|
|
230
|
+
transferId: string;
|
|
231
|
+
ok: boolean;
|
|
232
|
+
error?: string | null;
|
|
233
|
+
receivedBytes: number;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface RemoteInputCommand {
|
|
237
|
+
kind: 'tap' | 'down' | 'move' | 'up' | 'text' | string;
|
|
238
|
+
normX: number;
|
|
239
|
+
normY: number;
|
|
240
|
+
text?: string | null;
|
|
241
|
+
seqMs: number;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface QaCommandPayload {
|
|
245
|
+
command: string;
|
|
246
|
+
argsJson: string;
|
|
247
|
+
timeoutMs: number;
|
|
248
|
+
leaseId?: string | null;
|
|
249
|
+
/** G9AppPilot: the exact POST /qa body the controller signed; when present the device verifies and runs THIS body. */
|
|
250
|
+
signedBody?: string | null;
|
|
251
|
+
signatureKid?: string | null;
|
|
252
|
+
signatureTs?: string | null;
|
|
253
|
+
signatureNonce?: string | null;
|
|
254
|
+
signature?: string | null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface QaResultPayload {
|
|
258
|
+
ok: boolean;
|
|
259
|
+
resultJson: string;
|
|
260
|
+
error?: string | null;
|
|
261
|
+
durationMs: number;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface NfcWriteRequestPayload {
|
|
265
|
+
envelopeB64: string;
|
|
266
|
+
profile: number;
|
|
267
|
+
chipName: string;
|
|
268
|
+
persianLabel?: string | null;
|
|
269
|
+
englishLabel?: string | null;
|
|
270
|
+
makeReadOnly: boolean;
|
|
271
|
+
shortCode?: string | null;
|
|
272
|
+
tagPresentTimeoutSeconds: number;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface NfcWriteResultPayload {
|
|
276
|
+
ok: boolean;
|
|
277
|
+
outcome: string;
|
|
278
|
+
error?: string | null;
|
|
279
|
+
chipUid?: string | null;
|
|
280
|
+
totalBytes: number;
|
|
281
|
+
preservedForeignRecords: number;
|
|
282
|
+
ownershipTrusted: boolean;
|
|
283
|
+
backupCreated: boolean;
|
|
284
|
+
restoreAttempted: boolean;
|
|
285
|
+
restoreSucceeded: boolean;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface SyncScopeInfoPayload {
|
|
289
|
+
scopeName: string;
|
|
290
|
+
parametersLabel: string;
|
|
291
|
+
parametersJson: string;
|
|
292
|
+
lastSyncUtc?: string | null;
|
|
293
|
+
hasErrors: boolean;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface SyncTablePendingPayload {
|
|
297
|
+
tableName: string;
|
|
298
|
+
upserts: number;
|
|
299
|
+
deletes: number;
|
|
300
|
+
totalChanges: number;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface SyncScopePendingPayload {
|
|
304
|
+
scopeName: string;
|
|
305
|
+
parametersLabel: string;
|
|
306
|
+
parametersJson: string;
|
|
307
|
+
totalChanges: number;
|
|
308
|
+
tables: SyncTablePendingPayload[];
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface SyncRetryScopePayload {
|
|
312
|
+
scopeName: string;
|
|
313
|
+
parametersLabel: string;
|
|
314
|
+
errorBlobBytes: number;
|
|
315
|
+
lastSyncUtc?: string | null;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface SyncHealthPayload {
|
|
319
|
+
pendingScopes: SyncScopePendingPayload[];
|
|
320
|
+
retryScopes: SyncRetryScopePayload[];
|
|
321
|
+
pendingTotal: number;
|
|
322
|
+
batchFileCount: number;
|
|
323
|
+
batchTotalBytes: number;
|
|
324
|
+
batchDirectoryPath?: string | null;
|
|
325
|
+
allScopes: SyncScopeInfoPayload[];
|
|
326
|
+
severity: 'healthy' | 'warning' | 'error' | string;
|
|
327
|
+
error?: string | null;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** SyncReinitializeMode (a number on the wire). */
|
|
331
|
+
export const SyncReinitializeMode = { normal: 0, reinitialize: 1, reinitializeWithUpload: 2 } as const;
|
|
332
|
+
|
|
333
|
+
export interface SyncScopeSelector {
|
|
334
|
+
scopeName: string;
|
|
335
|
+
parametersJson?: string | null;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface SyncRunRequestPayload {
|
|
339
|
+
scope?: string | null;
|
|
340
|
+
parametersJson?: string | null;
|
|
341
|
+
mode: number;
|
|
342
|
+
scopes?: SyncScopeSelector[] | null;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export interface SyncRunScopeResultPayload {
|
|
346
|
+
scopeName: string;
|
|
347
|
+
parametersLabel: string;
|
|
348
|
+
uploaded: number;
|
|
349
|
+
downloaded: number;
|
|
350
|
+
ok: boolean;
|
|
351
|
+
error?: string | null;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface SyncRunResultPayload {
|
|
355
|
+
ok: boolean;
|
|
356
|
+
error?: string | null;
|
|
357
|
+
totalUploaded: number;
|
|
358
|
+
totalDownloaded: number;
|
|
359
|
+
scopes: SyncRunScopeResultPayload[];
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export interface SyncClearResultPayload {
|
|
363
|
+
scopesCleared: number;
|
|
364
|
+
batchFilesDeleted: number;
|
|
365
|
+
error?: string | null;
|
|
366
|
+
}
|