@wyndlass/app-sdk 0.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +212 -1
- package/cli/app-package.mjs +111 -0
- package/cli/commands.mjs +133 -0
- package/cli/main.mjs +73 -0
- package/cli/package.mjs +119 -0
- package/cli/preview.mjs +142 -0
- package/cli/zip.mjs +63 -0
- package/dist/contract/app-contract.d.ts +221 -0
- package/dist/contract/app-contract.js +6 -0
- package/dist/contract/app-definition.d.ts +155 -0
- package/dist/contract/app-definition.js +3 -0
- package/dist/contract/data-answer.d.ts +40 -0
- package/dist/contract/data-answer.js +3 -0
- package/dist/contract/data-calendar.d.ts +57 -0
- package/dist/contract/data-calendar.js +3 -0
- package/dist/contract/data-news.d.ts +29 -0
- package/dist/contract/data-news.js +3 -0
- package/dist/contract/data-quotes.d.ts +75 -0
- package/dist/contract/data-quotes.js +3 -0
- package/dist/contract/data-series.d.ts +51 -0
- package/dist/contract/data-series.js +3 -0
- package/dist/contract/data-snapshot.d.ts +30 -0
- package/dist/contract/data-snapshot.js +3 -0
- package/dist/contract/data-weather.d.ts +421 -0
- package/dist/contract/data-weather.js +3 -0
- package/dist/contract/player-api-event.d.ts +253 -0
- package/dist/contract/player-api-event.js +3 -0
- package/dist/contract/player-api-status.d.ts +178 -0
- package/dist/contract/player-api-status.js +3 -0
- package/dist/easing.d.ts +16 -0
- package/dist/easing.js +71 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.js +218 -0
- package/dist/preview/frame/frame.js +2 -0
- package/dist/preview/frame/index.html +12 -0
- package/dist/preview/index.html +40 -0
- package/dist/preview/page.js +7 -0
- package/dist/qr.d.ts +5 -0
- package/dist/qr.js +14 -0
- package/dist/react.d.ts +52 -0
- package/dist/react.js +149 -0
- package/package.json +83 -4
- package/protocol/app-definition.schema.json +435 -0
- package/protocol/app-packages.json +172 -0
- package/protocol/common.schema.json +197 -0
- package/protocol/samples/calendar.json +63 -0
- package/protocol/samples/events/app.command.json +14 -0
- package/protocol/samples/events/item.end.json +13 -0
- package/protocol/samples/events/item.start.json +18 -0
- package/protocol/samples/events/state.changed.json +11 -0
- package/protocol/samples/news.json +37 -0
- package/protocol/samples/player-status.json +58 -0
- package/protocol/samples/weather.json +59 -0
- package/skill/wyndlass-app/SKILL.md +90 -0
- package/skill/wyndlass-app/references/contract.md +91 -0
- package/skill/wyndlass-app/references/mcp.md +79 -0
- package/skill/wyndlass-app/references/templates.md +38 -0
- package/templates/react/AGENTS.md +17 -0
- package/templates/react/README.md +23 -0
- package/templates/react/app.json +14 -0
- package/templates/react/gitignore +2 -0
- package/templates/react/package.json +22 -0
- package/templates/react/src/app.css +7 -0
- package/templates/react/src/app.tsx +39 -0
- package/templates/react/src/env.d.ts +13 -0
- package/templates/react/tsconfig.json +13 -0
- package/templates/vanilla/AGENTS.md +17 -0
- package/templates/vanilla/README.md +23 -0
- package/templates/vanilla/app.json +14 -0
- package/templates/vanilla/gitignore +2 -0
- package/templates/vanilla/package.json +18 -0
- package/templates/vanilla/src/app.css +7 -0
- package/templates/vanilla/src/app.ts +59 -0
- package/templates/vanilla/src/env.d.ts +13 -0
- package/templates/vanilla/tsconfig.json +12 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A WMO weather code in Wyndlass's words; the weather condition leaf compares against these.
|
|
3
|
+
*/
|
|
4
|
+
export type Condition = "clear" | "mostly-clear" | "partly-cloudy" | "cloudy" | "fog" | "drizzle" | "freezing-drizzle" | "rain" | "freezing-rain" | "snow" | "snow-grains" | "showers" | "snow-showers" | "thunderstorm" | "hail-thunderstorm" | "unknown";
|
|
5
|
+
/**
|
|
6
|
+
* The data service's weather for a place (ADR 0069): now and the days ahead, in the units asked, and the facts the weather condition leaf reads, always metric. A value the provider does not give is left out.
|
|
7
|
+
*/
|
|
8
|
+
export interface Weather {
|
|
9
|
+
place: {
|
|
10
|
+
lat: number;
|
|
11
|
+
lon: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* metric: °C and km/h; imperial: °F and mph.
|
|
15
|
+
*/
|
|
16
|
+
units: "metric" | "imperial";
|
|
17
|
+
/**
|
|
18
|
+
* The place's IANA time zone.
|
|
19
|
+
*/
|
|
20
|
+
timeZone: string;
|
|
21
|
+
current: {
|
|
22
|
+
at: string;
|
|
23
|
+
temperature: number;
|
|
24
|
+
apparentTemperature?: number;
|
|
25
|
+
condition: Condition;
|
|
26
|
+
code: number;
|
|
27
|
+
isDay: boolean;
|
|
28
|
+
humidity?: number;
|
|
29
|
+
windSpeed?: number;
|
|
30
|
+
windDirection?: number;
|
|
31
|
+
precipitationProbability?: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @maxItems 7
|
|
35
|
+
*/
|
|
36
|
+
daily: [] | [
|
|
37
|
+
{
|
|
38
|
+
date: string;
|
|
39
|
+
high: number;
|
|
40
|
+
low: number;
|
|
41
|
+
condition: Condition;
|
|
42
|
+
/**
|
|
43
|
+
* The WMO weather code.
|
|
44
|
+
*/
|
|
45
|
+
code: number;
|
|
46
|
+
precipitationProbability?: number;
|
|
47
|
+
sunrise?: string;
|
|
48
|
+
sunset?: string;
|
|
49
|
+
}
|
|
50
|
+
] | [
|
|
51
|
+
{
|
|
52
|
+
date: string;
|
|
53
|
+
high: number;
|
|
54
|
+
low: number;
|
|
55
|
+
condition: Condition;
|
|
56
|
+
/**
|
|
57
|
+
* The WMO weather code.
|
|
58
|
+
*/
|
|
59
|
+
code: number;
|
|
60
|
+
precipitationProbability?: number;
|
|
61
|
+
sunrise?: string;
|
|
62
|
+
sunset?: string;
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
date: string;
|
|
66
|
+
high: number;
|
|
67
|
+
low: number;
|
|
68
|
+
condition: Condition;
|
|
69
|
+
/**
|
|
70
|
+
* The WMO weather code.
|
|
71
|
+
*/
|
|
72
|
+
code: number;
|
|
73
|
+
precipitationProbability?: number;
|
|
74
|
+
sunrise?: string;
|
|
75
|
+
sunset?: string;
|
|
76
|
+
}
|
|
77
|
+
] | [
|
|
78
|
+
{
|
|
79
|
+
date: string;
|
|
80
|
+
high: number;
|
|
81
|
+
low: number;
|
|
82
|
+
condition: Condition;
|
|
83
|
+
/**
|
|
84
|
+
* The WMO weather code.
|
|
85
|
+
*/
|
|
86
|
+
code: number;
|
|
87
|
+
precipitationProbability?: number;
|
|
88
|
+
sunrise?: string;
|
|
89
|
+
sunset?: string;
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
date: string;
|
|
93
|
+
high: number;
|
|
94
|
+
low: number;
|
|
95
|
+
condition: Condition;
|
|
96
|
+
/**
|
|
97
|
+
* The WMO weather code.
|
|
98
|
+
*/
|
|
99
|
+
code: number;
|
|
100
|
+
precipitationProbability?: number;
|
|
101
|
+
sunrise?: string;
|
|
102
|
+
sunset?: string;
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
date: string;
|
|
106
|
+
high: number;
|
|
107
|
+
low: number;
|
|
108
|
+
condition: Condition;
|
|
109
|
+
/**
|
|
110
|
+
* The WMO weather code.
|
|
111
|
+
*/
|
|
112
|
+
code: number;
|
|
113
|
+
precipitationProbability?: number;
|
|
114
|
+
sunrise?: string;
|
|
115
|
+
sunset?: string;
|
|
116
|
+
}
|
|
117
|
+
] | [
|
|
118
|
+
{
|
|
119
|
+
date: string;
|
|
120
|
+
high: number;
|
|
121
|
+
low: number;
|
|
122
|
+
condition: Condition;
|
|
123
|
+
/**
|
|
124
|
+
* The WMO weather code.
|
|
125
|
+
*/
|
|
126
|
+
code: number;
|
|
127
|
+
precipitationProbability?: number;
|
|
128
|
+
sunrise?: string;
|
|
129
|
+
sunset?: string;
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
date: string;
|
|
133
|
+
high: number;
|
|
134
|
+
low: number;
|
|
135
|
+
condition: Condition;
|
|
136
|
+
/**
|
|
137
|
+
* The WMO weather code.
|
|
138
|
+
*/
|
|
139
|
+
code: number;
|
|
140
|
+
precipitationProbability?: number;
|
|
141
|
+
sunrise?: string;
|
|
142
|
+
sunset?: string;
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
date: string;
|
|
146
|
+
high: number;
|
|
147
|
+
low: number;
|
|
148
|
+
condition: Condition;
|
|
149
|
+
/**
|
|
150
|
+
* The WMO weather code.
|
|
151
|
+
*/
|
|
152
|
+
code: number;
|
|
153
|
+
precipitationProbability?: number;
|
|
154
|
+
sunrise?: string;
|
|
155
|
+
sunset?: string;
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
date: string;
|
|
159
|
+
high: number;
|
|
160
|
+
low: number;
|
|
161
|
+
condition: Condition;
|
|
162
|
+
/**
|
|
163
|
+
* The WMO weather code.
|
|
164
|
+
*/
|
|
165
|
+
code: number;
|
|
166
|
+
precipitationProbability?: number;
|
|
167
|
+
sunrise?: string;
|
|
168
|
+
sunset?: string;
|
|
169
|
+
}
|
|
170
|
+
] | [
|
|
171
|
+
{
|
|
172
|
+
date: string;
|
|
173
|
+
high: number;
|
|
174
|
+
low: number;
|
|
175
|
+
condition: Condition;
|
|
176
|
+
/**
|
|
177
|
+
* The WMO weather code.
|
|
178
|
+
*/
|
|
179
|
+
code: number;
|
|
180
|
+
precipitationProbability?: number;
|
|
181
|
+
sunrise?: string;
|
|
182
|
+
sunset?: string;
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
date: string;
|
|
186
|
+
high: number;
|
|
187
|
+
low: number;
|
|
188
|
+
condition: Condition;
|
|
189
|
+
/**
|
|
190
|
+
* The WMO weather code.
|
|
191
|
+
*/
|
|
192
|
+
code: number;
|
|
193
|
+
precipitationProbability?: number;
|
|
194
|
+
sunrise?: string;
|
|
195
|
+
sunset?: string;
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
date: string;
|
|
199
|
+
high: number;
|
|
200
|
+
low: number;
|
|
201
|
+
condition: Condition;
|
|
202
|
+
/**
|
|
203
|
+
* The WMO weather code.
|
|
204
|
+
*/
|
|
205
|
+
code: number;
|
|
206
|
+
precipitationProbability?: number;
|
|
207
|
+
sunrise?: string;
|
|
208
|
+
sunset?: string;
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
date: string;
|
|
212
|
+
high: number;
|
|
213
|
+
low: number;
|
|
214
|
+
condition: Condition;
|
|
215
|
+
/**
|
|
216
|
+
* The WMO weather code.
|
|
217
|
+
*/
|
|
218
|
+
code: number;
|
|
219
|
+
precipitationProbability?: number;
|
|
220
|
+
sunrise?: string;
|
|
221
|
+
sunset?: string;
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
date: string;
|
|
225
|
+
high: number;
|
|
226
|
+
low: number;
|
|
227
|
+
condition: Condition;
|
|
228
|
+
/**
|
|
229
|
+
* The WMO weather code.
|
|
230
|
+
*/
|
|
231
|
+
code: number;
|
|
232
|
+
precipitationProbability?: number;
|
|
233
|
+
sunrise?: string;
|
|
234
|
+
sunset?: string;
|
|
235
|
+
}
|
|
236
|
+
] | [
|
|
237
|
+
{
|
|
238
|
+
date: string;
|
|
239
|
+
high: number;
|
|
240
|
+
low: number;
|
|
241
|
+
condition: Condition;
|
|
242
|
+
/**
|
|
243
|
+
* The WMO weather code.
|
|
244
|
+
*/
|
|
245
|
+
code: number;
|
|
246
|
+
precipitationProbability?: number;
|
|
247
|
+
sunrise?: string;
|
|
248
|
+
sunset?: string;
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
date: string;
|
|
252
|
+
high: number;
|
|
253
|
+
low: number;
|
|
254
|
+
condition: Condition;
|
|
255
|
+
/**
|
|
256
|
+
* The WMO weather code.
|
|
257
|
+
*/
|
|
258
|
+
code: number;
|
|
259
|
+
precipitationProbability?: number;
|
|
260
|
+
sunrise?: string;
|
|
261
|
+
sunset?: string;
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
date: string;
|
|
265
|
+
high: number;
|
|
266
|
+
low: number;
|
|
267
|
+
condition: Condition;
|
|
268
|
+
/**
|
|
269
|
+
* The WMO weather code.
|
|
270
|
+
*/
|
|
271
|
+
code: number;
|
|
272
|
+
precipitationProbability?: number;
|
|
273
|
+
sunrise?: string;
|
|
274
|
+
sunset?: string;
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
date: string;
|
|
278
|
+
high: number;
|
|
279
|
+
low: number;
|
|
280
|
+
condition: Condition;
|
|
281
|
+
/**
|
|
282
|
+
* The WMO weather code.
|
|
283
|
+
*/
|
|
284
|
+
code: number;
|
|
285
|
+
precipitationProbability?: number;
|
|
286
|
+
sunrise?: string;
|
|
287
|
+
sunset?: string;
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
date: string;
|
|
291
|
+
high: number;
|
|
292
|
+
low: number;
|
|
293
|
+
condition: Condition;
|
|
294
|
+
/**
|
|
295
|
+
* The WMO weather code.
|
|
296
|
+
*/
|
|
297
|
+
code: number;
|
|
298
|
+
precipitationProbability?: number;
|
|
299
|
+
sunrise?: string;
|
|
300
|
+
sunset?: string;
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
date: string;
|
|
304
|
+
high: number;
|
|
305
|
+
low: number;
|
|
306
|
+
condition: Condition;
|
|
307
|
+
/**
|
|
308
|
+
* The WMO weather code.
|
|
309
|
+
*/
|
|
310
|
+
code: number;
|
|
311
|
+
precipitationProbability?: number;
|
|
312
|
+
sunrise?: string;
|
|
313
|
+
sunset?: string;
|
|
314
|
+
}
|
|
315
|
+
] | [
|
|
316
|
+
{
|
|
317
|
+
date: string;
|
|
318
|
+
high: number;
|
|
319
|
+
low: number;
|
|
320
|
+
condition: Condition;
|
|
321
|
+
/**
|
|
322
|
+
* The WMO weather code.
|
|
323
|
+
*/
|
|
324
|
+
code: number;
|
|
325
|
+
precipitationProbability?: number;
|
|
326
|
+
sunrise?: string;
|
|
327
|
+
sunset?: string;
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
date: string;
|
|
331
|
+
high: number;
|
|
332
|
+
low: number;
|
|
333
|
+
condition: Condition;
|
|
334
|
+
/**
|
|
335
|
+
* The WMO weather code.
|
|
336
|
+
*/
|
|
337
|
+
code: number;
|
|
338
|
+
precipitationProbability?: number;
|
|
339
|
+
sunrise?: string;
|
|
340
|
+
sunset?: string;
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
date: string;
|
|
344
|
+
high: number;
|
|
345
|
+
low: number;
|
|
346
|
+
condition: Condition;
|
|
347
|
+
/**
|
|
348
|
+
* The WMO weather code.
|
|
349
|
+
*/
|
|
350
|
+
code: number;
|
|
351
|
+
precipitationProbability?: number;
|
|
352
|
+
sunrise?: string;
|
|
353
|
+
sunset?: string;
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
date: string;
|
|
357
|
+
high: number;
|
|
358
|
+
low: number;
|
|
359
|
+
condition: Condition;
|
|
360
|
+
/**
|
|
361
|
+
* The WMO weather code.
|
|
362
|
+
*/
|
|
363
|
+
code: number;
|
|
364
|
+
precipitationProbability?: number;
|
|
365
|
+
sunrise?: string;
|
|
366
|
+
sunset?: string;
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
date: string;
|
|
370
|
+
high: number;
|
|
371
|
+
low: number;
|
|
372
|
+
condition: Condition;
|
|
373
|
+
/**
|
|
374
|
+
* The WMO weather code.
|
|
375
|
+
*/
|
|
376
|
+
code: number;
|
|
377
|
+
precipitationProbability?: number;
|
|
378
|
+
sunrise?: string;
|
|
379
|
+
sunset?: string;
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
date: string;
|
|
383
|
+
high: number;
|
|
384
|
+
low: number;
|
|
385
|
+
condition: Condition;
|
|
386
|
+
/**
|
|
387
|
+
* The WMO weather code.
|
|
388
|
+
*/
|
|
389
|
+
code: number;
|
|
390
|
+
precipitationProbability?: number;
|
|
391
|
+
sunrise?: string;
|
|
392
|
+
sunset?: string;
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
date: string;
|
|
396
|
+
high: number;
|
|
397
|
+
low: number;
|
|
398
|
+
condition: Condition;
|
|
399
|
+
/**
|
|
400
|
+
* The WMO weather code.
|
|
401
|
+
*/
|
|
402
|
+
code: number;
|
|
403
|
+
precipitationProbability?: number;
|
|
404
|
+
sunrise?: string;
|
|
405
|
+
sunset?: string;
|
|
406
|
+
}
|
|
407
|
+
];
|
|
408
|
+
/**
|
|
409
|
+
* What the weather condition leaf (condition.schema.json) reads.
|
|
410
|
+
*/
|
|
411
|
+
facts: {
|
|
412
|
+
temperatureC: number;
|
|
413
|
+
condition: Condition;
|
|
414
|
+
precipitationProbability?: number;
|
|
415
|
+
windKph: number;
|
|
416
|
+
/**
|
|
417
|
+
* False until a source of alerts is added.
|
|
418
|
+
*/
|
|
419
|
+
alertActive: boolean;
|
|
420
|
+
};
|
|
421
|
+
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An event the controller emits (protocol/player-api.json, ADR 0050): to apps that subscribed on the screen, and in the ring player.events reads. Told apart by type.
|
|
3
|
+
*/
|
|
4
|
+
export type PlayerAPIEvent = StateChanged | ContentUpdated | ItemStart | ItemEnd | ItemError | ConnectionChanged | AudioChanged | DisplayChanged | TimeChanged | AppCommand | AppFailed | AppHeld;
|
|
5
|
+
/**
|
|
6
|
+
* RFC 3339 timestamp with offset.
|
|
7
|
+
*/
|
|
8
|
+
export type CommonTimestamp = string;
|
|
9
|
+
/**
|
|
10
|
+
* idle: nothing to play; stopped: the standby screen.
|
|
11
|
+
*/
|
|
12
|
+
export type PlayerApiStatusState = "starting" | "playing" | "paused" | "stopped" | "idle" | "error";
|
|
13
|
+
/**
|
|
14
|
+
* Who caused a change: the player itself, an app on the screen, or a remote caller whose principal core relayed.
|
|
15
|
+
*/
|
|
16
|
+
export type PlayerApiCommonBy = {
|
|
17
|
+
kind: "player";
|
|
18
|
+
} | {
|
|
19
|
+
kind: "app";
|
|
20
|
+
/**
|
|
21
|
+
* The app's id (app-definition).
|
|
22
|
+
*/
|
|
23
|
+
app: string;
|
|
24
|
+
instance: string;
|
|
25
|
+
} | {
|
|
26
|
+
kind: "remote";
|
|
27
|
+
principal: CommonPrincipalRef;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A principal, e.g. user:u_123, agent:fleet-guardian, device:dev_...
|
|
31
|
+
*/
|
|
32
|
+
export type CommonPrincipalRef = string;
|
|
33
|
+
/**
|
|
34
|
+
* Lowercase hex SHA-256 digest.
|
|
35
|
+
*/
|
|
36
|
+
export type CommonSha256 = string;
|
|
37
|
+
/**
|
|
38
|
+
* A zone of the screen; main until compositions have zones.
|
|
39
|
+
*/
|
|
40
|
+
export type PlayerApiCommonZone = string;
|
|
41
|
+
/**
|
|
42
|
+
* Media item id (asset, app, composition, playlist or live source).
|
|
43
|
+
*/
|
|
44
|
+
export type CommonMediaId = string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the player is connected to Wyndlass (NATS).
|
|
47
|
+
*/
|
|
48
|
+
export type PlayerApiCommonConnection = "online" | "offline";
|
|
49
|
+
/**
|
|
50
|
+
* The app's id (app-definition), where the layout carries it (appInfo).
|
|
51
|
+
*/
|
|
52
|
+
export type AppId = string;
|
|
53
|
+
/**
|
|
54
|
+
* The app's element, as a path of element ids from the outermost layout (ADR 0053, decision 13).
|
|
55
|
+
*/
|
|
56
|
+
export type ElementPath = string;
|
|
57
|
+
export interface StateChanged {
|
|
58
|
+
type: "state.changed";
|
|
59
|
+
/**
|
|
60
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
61
|
+
*/
|
|
62
|
+
seq: number;
|
|
63
|
+
at: CommonTimestamp;
|
|
64
|
+
state: PlayerApiStatusState;
|
|
65
|
+
previous: PlayerApiStatusState;
|
|
66
|
+
by: PlayerApiCommonBy;
|
|
67
|
+
}
|
|
68
|
+
export interface ContentUpdated {
|
|
69
|
+
type: "content.updated";
|
|
70
|
+
/**
|
|
71
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
72
|
+
*/
|
|
73
|
+
seq: number;
|
|
74
|
+
at: CommonTimestamp;
|
|
75
|
+
manifest: CommonSha256;
|
|
76
|
+
previous?: CommonSha256;
|
|
77
|
+
}
|
|
78
|
+
export interface ItemStart {
|
|
79
|
+
type: "item.start";
|
|
80
|
+
/**
|
|
81
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
82
|
+
*/
|
|
83
|
+
seq: number;
|
|
84
|
+
at: CommonTimestamp;
|
|
85
|
+
zone: PlayerApiCommonZone;
|
|
86
|
+
item: CommonItemRef;
|
|
87
|
+
blob: CommonSha256;
|
|
88
|
+
contentType: string;
|
|
89
|
+
startedAt: CommonTimestamp;
|
|
90
|
+
durationMs?: number;
|
|
91
|
+
/**
|
|
92
|
+
* The transition the item's entry asked for and the one the player played (WP-0056): a crossfade it could not play, between two native videos on a host that holds one, plays as a cut. Absent when the entry asked for none.
|
|
93
|
+
*/
|
|
94
|
+
transition?: {
|
|
95
|
+
asked: "cut" | "crossfade";
|
|
96
|
+
played: "cut" | "crossfade";
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* The layout element the item plays in, as a path of element ids from the outermost layout (ADR 0053, decision 13; WP-0056); `loop` for a playlist playing on its own. Absent for the screen's own loop.
|
|
100
|
+
*/
|
|
101
|
+
element?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* A pinned reference to a media item version.
|
|
105
|
+
*/
|
|
106
|
+
export interface CommonItemRef {
|
|
107
|
+
id: CommonMediaId;
|
|
108
|
+
version: number;
|
|
109
|
+
}
|
|
110
|
+
export interface ItemEnd {
|
|
111
|
+
type: "item.end";
|
|
112
|
+
/**
|
|
113
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
114
|
+
*/
|
|
115
|
+
seq: number;
|
|
116
|
+
at: CommonTimestamp;
|
|
117
|
+
zone: PlayerApiCommonZone;
|
|
118
|
+
item: CommonItemRef;
|
|
119
|
+
blob: CommonSha256;
|
|
120
|
+
endedAt: CommonTimestamp;
|
|
121
|
+
/**
|
|
122
|
+
* replaced: a new manifest; finished: the app ended its slot.
|
|
123
|
+
*/
|
|
124
|
+
reason: "completed" | "skipped" | "stopped" | "error" | "replaced" | "finished";
|
|
125
|
+
/**
|
|
126
|
+
* The layout element the item plays in, as a path of element ids from the outermost layout (ADR 0053, decision 13; WP-0056); `loop` for a playlist playing on its own. Absent for the screen's own loop.
|
|
127
|
+
*/
|
|
128
|
+
element?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface ItemError {
|
|
131
|
+
type: "item.error";
|
|
132
|
+
/**
|
|
133
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
134
|
+
*/
|
|
135
|
+
seq: number;
|
|
136
|
+
at: CommonTimestamp;
|
|
137
|
+
zone: PlayerApiCommonZone;
|
|
138
|
+
item: CommonItemRef;
|
|
139
|
+
blob: CommonSha256;
|
|
140
|
+
code: string;
|
|
141
|
+
message: string;
|
|
142
|
+
}
|
|
143
|
+
export interface ConnectionChanged {
|
|
144
|
+
type: "connection.changed";
|
|
145
|
+
/**
|
|
146
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
147
|
+
*/
|
|
148
|
+
seq: number;
|
|
149
|
+
at: CommonTimestamp;
|
|
150
|
+
connection: PlayerApiCommonConnection;
|
|
151
|
+
}
|
|
152
|
+
export interface AudioChanged {
|
|
153
|
+
type: "audio.changed";
|
|
154
|
+
/**
|
|
155
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
156
|
+
*/
|
|
157
|
+
seq: number;
|
|
158
|
+
at: CommonTimestamp;
|
|
159
|
+
audio: PlayerApiCommonAudio;
|
|
160
|
+
by: PlayerApiCommonBy;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The player's own level, not the operating system's.
|
|
164
|
+
*/
|
|
165
|
+
export interface PlayerApiCommonAudio {
|
|
166
|
+
volume: number;
|
|
167
|
+
muted: boolean;
|
|
168
|
+
}
|
|
169
|
+
export interface DisplayChanged {
|
|
170
|
+
type: "display.changed";
|
|
171
|
+
/**
|
|
172
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
173
|
+
*/
|
|
174
|
+
seq: number;
|
|
175
|
+
at: CommonTimestamp;
|
|
176
|
+
display: PlayerApiCommonDisplay;
|
|
177
|
+
by: PlayerApiCommonBy;
|
|
178
|
+
}
|
|
179
|
+
export interface PlayerApiCommonDisplay {
|
|
180
|
+
power: "on" | "standby" | "unknown";
|
|
181
|
+
brightness?: number;
|
|
182
|
+
}
|
|
183
|
+
export interface TimeChanged {
|
|
184
|
+
type: "time.changed";
|
|
185
|
+
/**
|
|
186
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
187
|
+
*/
|
|
188
|
+
seq: number;
|
|
189
|
+
at: CommonTimestamp;
|
|
190
|
+
reason: "clock-adjusted" | "time-zone-changed";
|
|
191
|
+
}
|
|
192
|
+
export interface AppCommand {
|
|
193
|
+
type: "app.command";
|
|
194
|
+
/**
|
|
195
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
196
|
+
*/
|
|
197
|
+
seq: number;
|
|
198
|
+
at: CommonTimestamp;
|
|
199
|
+
name: string;
|
|
200
|
+
/**
|
|
201
|
+
* Any JSON the sender gave.
|
|
202
|
+
*/
|
|
203
|
+
argument?: {
|
|
204
|
+
[k: string]: unknown | undefined;
|
|
205
|
+
};
|
|
206
|
+
by: PlayerApiCommonBy;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* An app on the screen could not run, or misbehaved (WP-0100). The rest of its layout plays on.
|
|
210
|
+
*/
|
|
211
|
+
export interface AppFailed {
|
|
212
|
+
type: "app.failed";
|
|
213
|
+
/**
|
|
214
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
215
|
+
*/
|
|
216
|
+
seq: number;
|
|
217
|
+
at: CommonTimestamp;
|
|
218
|
+
item: CommonItemRef1;
|
|
219
|
+
app?: AppId;
|
|
220
|
+
element?: ElementPath;
|
|
221
|
+
/**
|
|
222
|
+
* load: its bundle did not import. shape: it exports no element class the host can define, or (a customer's app) no way to take its context. unsupported: it needs a newer Player API or WebView than this screen has, or it is a customer's app and this screen's page was never handed its port (WP-0100 part b). error: it threw three times in a minute, and was stopped. late: it was not ready by its deadline, and shows as it is. overran: an enter or exit ran past its clip.
|
|
223
|
+
*/
|
|
224
|
+
reason: "load" | "shape" | "unsupported" | "error" | "late" | "overran";
|
|
225
|
+
/**
|
|
226
|
+
* The name of what it threw (TypeError), for error, load and shape. Never its message, which could carry anything the app holds.
|
|
227
|
+
*/
|
|
228
|
+
error?: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* A pinned reference to a media item version.
|
|
232
|
+
*/
|
|
233
|
+
export interface CommonItemRef1 {
|
|
234
|
+
id: CommonMediaId;
|
|
235
|
+
version: number;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* An app version held back on this screen until the next manifest, after the page stopped answering twice within an hour while it was on screen (WP-0100). Its element is drawn empty meanwhile.
|
|
239
|
+
*/
|
|
240
|
+
export interface AppHeld {
|
|
241
|
+
type: "app.held";
|
|
242
|
+
/**
|
|
243
|
+
* The event's place in this player's sequence since it started; player.events pages by it.
|
|
244
|
+
*/
|
|
245
|
+
seq: number;
|
|
246
|
+
at: CommonTimestamp;
|
|
247
|
+
item: CommonItemRef;
|
|
248
|
+
app?: AppId;
|
|
249
|
+
/**
|
|
250
|
+
* How many times the page stopped answering in the last hour with this app on screen.
|
|
251
|
+
*/
|
|
252
|
+
hangs: number;
|
|
253
|
+
}
|