@aeolus-fleet/common 0.14.0 → 0.15.1
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/fleet/index.d.ts +4 -2
- package/dist/fleet/index.js +2 -1
- package/dist/fleet/index.js.map +1 -1
- package/dist/schemas/console.d.ts +28 -5
- package/dist/schemas/console.js +14 -8
- package/dist/schemas/console.js.map +1 -1
- package/dist/schemas/fleet.d.ts +8 -0
- package/dist/schemas/fleet.js +4 -0
- package/dist/schemas/fleet.js.map +1 -1
- package/dist/schemas/follow.d.ts +1 -0
- package/dist/schemas/guide.d.ts +103 -0
- package/dist/schemas/guide.js +45 -0
- package/dist/schemas/guide.js.map +1 -0
- package/dist/schemas/history.d.ts +5 -1
- package/dist/schemas/history.js +0 -1
- package/dist/schemas/history.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/installation.d.ts +6 -0
- package/dist/schemas/installation.js +4 -1
- package/dist/schemas/installation.js.map +1 -1
- package/dist/schemas/notice.d.ts +100 -0
- package/dist/schemas/notice.js +48 -0
- package/dist/schemas/notice.js.map +1 -0
- package/package.json +1 -1
package/dist/fleet/index.d.ts
CHANGED
|
@@ -24,10 +24,11 @@ export declare const fleetScopeSchema: z.ZodEnum<{
|
|
|
24
24
|
}>;
|
|
25
25
|
export type FleetScope = z.infer<typeof fleetScopeSchema>;
|
|
26
26
|
/** `argo` is the one ship of kind `operator` in a fleet; every other ship is an `agent`. */
|
|
27
|
-
export declare const SHIP_KINDS: readonly ["operator", "agent"];
|
|
27
|
+
export declare const SHIP_KINDS: readonly ["operator", "agent", "viewer"];
|
|
28
28
|
export declare const shipKindSchema: z.ZodEnum<{
|
|
29
29
|
operator: "operator";
|
|
30
30
|
agent: "agent";
|
|
31
|
+
viewer: "viewer";
|
|
31
32
|
}>;
|
|
32
33
|
export type ShipKind = z.infer<typeof shipKindSchema>;
|
|
33
34
|
/** Where the session crewing a ship runs. `OTHER` carries a short description. */
|
|
@@ -73,7 +74,7 @@ export declare const deliveryStateSchema: z.ZodEnum<{
|
|
|
73
74
|
}>;
|
|
74
75
|
export type DeliveryState = z.infer<typeof deliveryStateSchema>;
|
|
75
76
|
/** The event types written so far. Each later slice adds the ones it writes. */
|
|
76
|
-
export declare const EVENT_TYPES: readonly ["FleetInitialised", "ShipCommissioned", "ShipClaimed", "LeaseRevoked", "CredentialRevoked", "StartingPromptIssued", "OperatorPasswordReset", "MessageAccepted", "DeliveryClaimed", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryReturned", "ShipRetired", "DeliveryAbandoned", "DeliveryDismissed", "ShipRenamed", "ShipReported", "SignInTicketIssued", "FleetLimitsChanged"];
|
|
77
|
+
export declare const EVENT_TYPES: readonly ["FleetInitialised", "ShipCommissioned", "ShipClaimed", "LeaseRevoked", "CredentialRevoked", "StartingPromptIssued", "OperatorPasswordReset", "MessageAccepted", "DeliveryClaimed", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryReturned", "ShipRetired", "DeliveryAbandoned", "DeliveryDismissed", "ShipRenamed", "ShipReported", "SignInTicketIssued", "FleetLimitsChanged", "ViewerSessionStarted"];
|
|
77
78
|
export declare const eventTypeSchema: z.ZodEnum<{
|
|
78
79
|
FleetInitialised: "FleetInitialised";
|
|
79
80
|
ShipCommissioned: "ShipCommissioned";
|
|
@@ -94,5 +95,6 @@ export declare const eventTypeSchema: z.ZodEnum<{
|
|
|
94
95
|
ShipReported: "ShipReported";
|
|
95
96
|
SignInTicketIssued: "SignInTicketIssued";
|
|
96
97
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
98
|
+
ViewerSessionStarted: "ViewerSessionStarted";
|
|
97
99
|
}>;
|
|
98
100
|
export type EventType = z.infer<typeof eventTypeSchema>;
|
package/dist/fleet/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export const scopeSchema = z.enum(SCOPES);
|
|
|
14
14
|
export const FLEET_SCOPES = ['fleet:read', 'fleet:manage'];
|
|
15
15
|
export const fleetScopeSchema = z.enum(FLEET_SCOPES);
|
|
16
16
|
/** `argo` is the one ship of kind `operator` in a fleet; every other ship is an `agent`. */
|
|
17
|
-
export const SHIP_KINDS = ['operator', 'agent'];
|
|
17
|
+
export const SHIP_KINDS = ['operator', 'agent', 'viewer'];
|
|
18
18
|
export const shipKindSchema = z.enum(SHIP_KINDS);
|
|
19
19
|
/** Where the session crewing a ship runs. `OTHER` carries a short description. */
|
|
20
20
|
export const LOCATION_KINDS = ['DEVICE', 'CLOUD', 'SERVER', 'OTHER'];
|
|
@@ -56,6 +56,7 @@ export const EVENT_TYPES = [
|
|
|
56
56
|
'ShipReported',
|
|
57
57
|
'SignInTicketIssued',
|
|
58
58
|
'FleetLimitsChanged',
|
|
59
|
+
'ViewerSessionStarted',
|
|
59
60
|
];
|
|
60
61
|
export const eventTypeSchema = z.enum(EVENT_TYPES);
|
|
61
62
|
//# sourceMappingURL=index.js.map
|
package/dist/fleet/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fleet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,CAAU,CAAC;AACnG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAG1C;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,cAAc,CAAU,CAAC;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAGrD,4FAA4F;AAC5F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,U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AAC,cAAc,CAAC,CAAC;AAGzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,CAAU,CAAC;AAC5H,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAG3D,gFAAgF;AAChF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,uBAAuB;IACvB,kBAAkB;IAClB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,aAAa;IACb,cAAc;IACd,oBAAoB;IACpB,oBAAoB;IACpB,sBAAsB;CACd,CAAC;AACX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -35,22 +35,39 @@ export declare const themeSchema: z.ZodEnum<{
|
|
|
35
35
|
system: "system";
|
|
36
36
|
}>;
|
|
37
37
|
export type Theme = z.infer<typeof themeSchema>;
|
|
38
|
+
/** Whose a console session is: the operator's, crewing argo, or a viewer's, through the viewer ship (decision 0022). */
|
|
39
|
+
export declare const consoleSessionKindSchema: z.ZodEnum<{
|
|
40
|
+
operator: "operator";
|
|
41
|
+
viewer: "viewer";
|
|
42
|
+
}>;
|
|
38
43
|
/**
|
|
39
44
|
* Output of `console.session`: for another service the operator uses beside
|
|
40
45
|
* the console, which forwards the browser's session cookie and asks whether
|
|
41
|
-
*
|
|
42
|
-
* session
|
|
46
|
+
* someone is signed in. The fleet, when the session expires (ISO 8601 in
|
|
47
|
+
* UTC), whose session it is, and the scopes of its ship: a viewer reads only.
|
|
43
48
|
*/
|
|
44
49
|
export declare const consoleSessionOutputSchema: z.ZodObject<{
|
|
45
50
|
fleetId: z.ZodType<`flt_${string}`, unknown, z.core.$ZodTypeInternals<`flt_${string}`, unknown>>;
|
|
46
51
|
expiresAt: z.ZodISODateTime;
|
|
52
|
+
kind: z.ZodEnum<{
|
|
53
|
+
operator: "operator";
|
|
54
|
+
viewer: "viewer";
|
|
55
|
+
}>;
|
|
56
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
57
|
+
"messages:send": "messages:send";
|
|
58
|
+
"messages:receive": "messages:receive";
|
|
59
|
+
"fleet:read": "fleet:read";
|
|
60
|
+
"fleet:manage": "fleet:manage";
|
|
61
|
+
}>>;
|
|
47
62
|
}, z.core.$strip>;
|
|
48
63
|
export type ConsoleSessionOutput = z.infer<typeof consoleSessionOutputSchema>;
|
|
49
64
|
/**
|
|
50
65
|
* Output of `console.account`: the signed-in operator, their theme, and this
|
|
51
|
-
* console session: the device it signed in from and since when.
|
|
66
|
+
* console session: the device it signed in from and since when. A viewer's
|
|
67
|
+
* session has no email and no theme (decision 0022).
|
|
52
68
|
*/
|
|
53
|
-
export declare const accountOutputSchema: z.ZodObject<{
|
|
69
|
+
export declare const accountOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
70
|
+
kind: z.ZodLiteral<"operator">;
|
|
54
71
|
email: z.ZodString;
|
|
55
72
|
theme: z.ZodEnum<{
|
|
56
73
|
light: "light";
|
|
@@ -61,7 +78,13 @@ export declare const accountOutputSchema: z.ZodObject<{
|
|
|
61
78
|
device: z.ZodString;
|
|
62
79
|
since: z.ZodISODateTime;
|
|
63
80
|
}, z.core.$strip>;
|
|
64
|
-
}, z.core.$strip
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"viewer">;
|
|
83
|
+
session: z.ZodObject<{
|
|
84
|
+
device: z.ZodString;
|
|
85
|
+
since: z.ZodISODateTime;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
}, z.core.$strip>], "kind">;
|
|
65
88
|
export type Account = z.infer<typeof accountOutputSchema>;
|
|
66
89
|
/** Input of `console.setTheme`. */
|
|
67
90
|
export declare const setThemeInputSchema: z.ZodObject<{
|
package/dist/schemas/console.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { scopeSchema } from '../fleet/index.js';
|
|
2
3
|
import { idSchema } from '../ids/index.js';
|
|
3
4
|
/** The operator's email: at most 254 characters, the longest address mail carries. */
|
|
4
5
|
export const OPERATOR_EMAIL_MAX_LENGTH = 254;
|
|
@@ -32,25 +33,30 @@ export const THEMES = ['light', 'dark', 'system'];
|
|
|
32
33
|
export const themeSchema = z.enum(THEMES);
|
|
33
34
|
/** ISO 8601 in UTC. */
|
|
34
35
|
const isoTime = z.iso.datetime();
|
|
36
|
+
/** Whose a console session is: the operator's, crewing argo, or a viewer's, through the viewer ship (decision 0022). */
|
|
37
|
+
export const consoleSessionKindSchema = z.enum(['operator', 'viewer']);
|
|
35
38
|
/**
|
|
36
39
|
* Output of `console.session`: for another service the operator uses beside
|
|
37
40
|
* the console, which forwards the browser's session cookie and asks whether
|
|
38
|
-
*
|
|
39
|
-
* session
|
|
41
|
+
* someone is signed in. The fleet, when the session expires (ISO 8601 in
|
|
42
|
+
* UTC), whose session it is, and the scopes of its ship: a viewer reads only.
|
|
40
43
|
*/
|
|
41
44
|
export const consoleSessionOutputSchema = z.object({
|
|
42
45
|
fleetId: idSchema('fleet'),
|
|
43
46
|
expiresAt: z.iso.datetime(),
|
|
47
|
+
kind: consoleSessionKindSchema,
|
|
48
|
+
scopes: z.array(scopeSchema),
|
|
44
49
|
});
|
|
50
|
+
const accountSessionSchema = z.object({ device: z.string(), since: isoTime });
|
|
45
51
|
/**
|
|
46
52
|
* Output of `console.account`: the signed-in operator, their theme, and this
|
|
47
|
-
* console session: the device it signed in from and since when.
|
|
53
|
+
* console session: the device it signed in from and since when. A viewer's
|
|
54
|
+
* session has no email and no theme (decision 0022).
|
|
48
55
|
*/
|
|
49
|
-
export const accountOutputSchema = z.
|
|
50
|
-
email: z.string(),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
56
|
+
export const accountOutputSchema = z.discriminatedUnion('kind', [
|
|
57
|
+
z.object({ kind: z.literal('operator'), email: z.string(), theme: themeSchema, session: accountSessionSchema }),
|
|
58
|
+
z.object({ kind: z.literal('viewer'), session: accountSessionSchema }),
|
|
59
|
+
]);
|
|
54
60
|
/** Input of `console.setTheme`. */
|
|
55
61
|
export const setThemeInputSchema = z.object({ theme: themeSchema });
|
|
56
62
|
/** Output of `console.setTheme`: nothing; the OK is the answer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../src/schemas/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,sFAAsF;AACtF,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAC7C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAC1D;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,GAAG,CAAC,yBAAyB,CAAC;IAClF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,GAAG,CAAC,4BAA4B,CAAC;CACrF,CAAC,CAAC;AAIH,2FAA2F;AAC3F,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAEtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6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M,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC9D,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAC/G,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACvE,CAAC,CAAC;AAIH,mCAAmC;AACnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AAEpE,mEAAmE;AACnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC"}
|
package/dist/schemas/fleet.d.ts
CHANGED
|
@@ -138,6 +138,7 @@ export declare const listedShipSchema: z.ZodObject<{
|
|
|
138
138
|
kind: z.ZodEnum<{
|
|
139
139
|
operator: "operator";
|
|
140
140
|
agent: "agent";
|
|
141
|
+
viewer: "viewer";
|
|
141
142
|
}>;
|
|
142
143
|
status: z.ZodEnum<{
|
|
143
144
|
awaitingCrew: "awaitingCrew";
|
|
@@ -188,6 +189,8 @@ export declare const listedShipSchema: z.ZodObject<{
|
|
|
188
189
|
note: z.ZodNullable<z.ZodString>;
|
|
189
190
|
reportedAt: z.ZodISODateTime;
|
|
190
191
|
}, z.core.$strip>>;
|
|
192
|
+
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
193
|
+
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
191
194
|
}, z.core.$strip>;
|
|
192
195
|
export type ListedShip = z.infer<typeof listedShipSchema>;
|
|
193
196
|
/** Output of `fleet.list`: every ship in the caller's fleet, `argo` included. */
|
|
@@ -198,6 +201,7 @@ export declare const fleetListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
198
201
|
kind: z.ZodEnum<{
|
|
199
202
|
operator: "operator";
|
|
200
203
|
agent: "agent";
|
|
204
|
+
viewer: "viewer";
|
|
201
205
|
}>;
|
|
202
206
|
status: z.ZodEnum<{
|
|
203
207
|
awaitingCrew: "awaitingCrew";
|
|
@@ -248,6 +252,8 @@ export declare const fleetListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
248
252
|
note: z.ZodNullable<z.ZodString>;
|
|
249
253
|
reportedAt: z.ZodISODateTime;
|
|
250
254
|
}, z.core.$strip>>;
|
|
255
|
+
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
256
|
+
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
251
257
|
}, z.core.$strip>>;
|
|
252
258
|
/**
|
|
253
259
|
* Input of the `fleet.events` subscription: the number of the last event the
|
|
@@ -287,6 +293,7 @@ export declare const liveFleetEventSchema: z.ZodObject<{
|
|
|
287
293
|
ShipReported: "ShipReported";
|
|
288
294
|
SignInTicketIssued: "SignInTicketIssued";
|
|
289
295
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
296
|
+
ViewerSessionStarted: "ViewerSessionStarted";
|
|
290
297
|
}>;
|
|
291
298
|
occurredAt: z.ZodISODateTime;
|
|
292
299
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
@@ -324,6 +331,7 @@ export declare const fleetStreamItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
324
331
|
ShipReported: "ShipReported";
|
|
325
332
|
SignInTicketIssued: "SignInTicketIssued";
|
|
326
333
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
334
|
+
ViewerSessionStarted: "ViewerSessionStarted";
|
|
327
335
|
}>;
|
|
328
336
|
occurredAt: z.ZodISODateTime;
|
|
329
337
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
package/dist/schemas/fleet.js
CHANGED
|
@@ -160,6 +160,10 @@ export const listedShipSchema = z.object({
|
|
|
160
160
|
reportedAt: z.iso.datetime(),
|
|
161
161
|
})
|
|
162
162
|
.nullable(),
|
|
163
|
+
/** Since when the ship awaits crew (ISO 8601 in UTC): its commission, or the end of its last session. Null unless it awaits crew. */
|
|
164
|
+
awaitingCrewSince: z.iso.datetime().nullable(),
|
|
165
|
+
/** When the operator retired the ship (ISO 8601 in UTC); null while it is active. */
|
|
166
|
+
retiredAt: z.iso.datetime().nullable(),
|
|
163
167
|
});
|
|
164
168
|
/** Output of `fleet.list`: every ship in the caller's fleet, `argo` included. */
|
|
165
169
|
export const fleetListOutputSchema = z.array(listedShipSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../src/schemas/fleet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACzI,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACnD,MAAM,cAAc,GAAG,YAAY,sBAAsB,+CAA+C,CAAC;AAEzG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,EAAE;KACR,GAAG,CAAC,sBAAsB,EA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,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC;CACjH,CAAC,CAAC"}
|
package/dist/schemas/follow.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export declare const followFleetOutputSchema: z.ZodObject<{
|
|
|
41
41
|
ShipReported: "ShipReported";
|
|
42
42
|
SignInTicketIssued: "SignInTicketIssued";
|
|
43
43
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
44
|
+
ViewerSessionStarted: "ViewerSessionStarted";
|
|
44
45
|
}>;
|
|
45
46
|
occurredAt: z.ZodISODateTime;
|
|
46
47
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The most steps a guide has. */
|
|
3
|
+
export declare const MAX_GUIDE_STEPS = 10;
|
|
4
|
+
/** The most characters of a step's title, after trimming. */
|
|
5
|
+
export declare const GUIDE_STEP_TITLE_MAX = 80;
|
|
6
|
+
/** The most characters of a step's text, after trimming. */
|
|
7
|
+
export declare const GUIDE_STEP_TEXT_MAX = 300;
|
|
8
|
+
/**
|
|
9
|
+
* A guide's step (decision 0024): on a console page (its path, such as
|
|
10
|
+
* `/squadrons`), pointing at the element whose `data-testid` is its anchor, or
|
|
11
|
+
* centred on the page without one, with a title and a plain text.
|
|
12
|
+
*/
|
|
13
|
+
export declare const guideStepSchema: z.ZodObject<{
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
anchor: z.ZodOptional<z.ZodString>;
|
|
16
|
+
title: z.ZodString;
|
|
17
|
+
text: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type GuideStep = z.infer<typeof guideStepSchema>;
|
|
20
|
+
/** The guide: steps, in order, for the console sessions of its audience (the audiences notices have). */
|
|
21
|
+
export declare const guideSchema: z.ZodObject<{
|
|
22
|
+
audience: z.ZodEnum<{
|
|
23
|
+
everyone: "everyone";
|
|
24
|
+
operators: "operators";
|
|
25
|
+
viewers: "viewers";
|
|
26
|
+
}>;
|
|
27
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
28
|
+
path: z.ZodString;
|
|
29
|
+
anchor: z.ZodOptional<z.ZodString>;
|
|
30
|
+
title: z.ZodString;
|
|
31
|
+
text: z.ZodString;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
/** Input of `installation.guide.set`: the guide, replacing the one set before; null clears it. */
|
|
35
|
+
export declare const setGuideInputSchema: z.ZodObject<{
|
|
36
|
+
guide: z.ZodNullable<z.ZodObject<{
|
|
37
|
+
audience: z.ZodEnum<{
|
|
38
|
+
everyone: "everyone";
|
|
39
|
+
operators: "operators";
|
|
40
|
+
viewers: "viewers";
|
|
41
|
+
}>;
|
|
42
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
43
|
+
path: z.ZodString;
|
|
44
|
+
anchor: z.ZodOptional<z.ZodString>;
|
|
45
|
+
title: z.ZodString;
|
|
46
|
+
text: z.ZodString;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
/** Output of `installation.guide.get` and `.set`: the guide as set, or null. */
|
|
51
|
+
export declare const guideOutputSchema: z.ZodObject<{
|
|
52
|
+
guide: z.ZodNullable<z.ZodObject<{
|
|
53
|
+
audience: z.ZodEnum<{
|
|
54
|
+
everyone: "everyone";
|
|
55
|
+
operators: "operators";
|
|
56
|
+
viewers: "viewers";
|
|
57
|
+
}>;
|
|
58
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
59
|
+
path: z.ZodString;
|
|
60
|
+
anchor: z.ZodOptional<z.ZodString>;
|
|
61
|
+
title: z.ZodString;
|
|
62
|
+
text: z.ZodString;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
/** Where a session is in the guide: open at its step, or skipped or finished, which hides it. */
|
|
67
|
+
export declare const GUIDE_PROGRESS_STATES: readonly ["open", "skipped", "finished"];
|
|
68
|
+
export type GuideProgressState = (typeof GUIDE_PROGRESS_STATES)[number];
|
|
69
|
+
/** A session's progress in the guide: the step it is at, counted from 0, and the guide's state. */
|
|
70
|
+
export declare const guideProgressSchema: z.ZodObject<{
|
|
71
|
+
step: z.ZodInt;
|
|
72
|
+
state: z.ZodEnum<{
|
|
73
|
+
open: "open";
|
|
74
|
+
skipped: "skipped";
|
|
75
|
+
finished: "finished";
|
|
76
|
+
}>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
/** Input of `console.recordGuideProgress`. */
|
|
79
|
+
export declare const setGuideProgressInputSchema: z.ZodObject<{
|
|
80
|
+
step: z.ZodInt;
|
|
81
|
+
state: z.ZodEnum<{
|
|
82
|
+
open: "open";
|
|
83
|
+
skipped: "skipped";
|
|
84
|
+
finished: "finished";
|
|
85
|
+
}>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
/** Output of `console.guide`: the guide's steps and the session's progress, or null when no guide is for the session. */
|
|
88
|
+
export declare const consoleGuideOutputSchema: z.ZodNullable<z.ZodObject<{
|
|
89
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
90
|
+
path: z.ZodString;
|
|
91
|
+
anchor: z.ZodOptional<z.ZodString>;
|
|
92
|
+
title: z.ZodString;
|
|
93
|
+
text: z.ZodString;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
progress: z.ZodObject<{
|
|
96
|
+
step: z.ZodInt;
|
|
97
|
+
state: z.ZodEnum<{
|
|
98
|
+
open: "open";
|
|
99
|
+
skipped: "skipped";
|
|
100
|
+
finished: "finished";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { noticeAudienceSchema } from './notice.js';
|
|
3
|
+
/** The most steps a guide has. */
|
|
4
|
+
export const MAX_GUIDE_STEPS = 10;
|
|
5
|
+
/** The most characters of a step's title, after trimming. */
|
|
6
|
+
export const GUIDE_STEP_TITLE_MAX = 80;
|
|
7
|
+
/** The most characters of a step's text, after trimming. */
|
|
8
|
+
export const GUIDE_STEP_TEXT_MAX = 300;
|
|
9
|
+
/** The most characters of a step's page. */
|
|
10
|
+
const GUIDE_STEP_PATH_MAX = 200;
|
|
11
|
+
/**
|
|
12
|
+
* A guide's step (decision 0024): on a console page (its path, such as
|
|
13
|
+
* `/squadrons`), pointing at the element whose `data-testid` is its anchor, or
|
|
14
|
+
* centred on the page without one, with a title and a plain text.
|
|
15
|
+
*/
|
|
16
|
+
export const guideStepSchema = z.object({
|
|
17
|
+
path: z.string().max(GUIDE_STEP_PATH_MAX).regex(/^\/[^\s]*$/, "A step's page is a console path, such as /squadrons"),
|
|
18
|
+
anchor: z
|
|
19
|
+
.string()
|
|
20
|
+
.regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "A step's anchor is an element's data-testid: lowercase letters, digits and hyphens, at most 64")
|
|
21
|
+
.optional(),
|
|
22
|
+
title: z.string().trim().min(1).max(GUIDE_STEP_TITLE_MAX),
|
|
23
|
+
text: z.string().trim().min(1).max(GUIDE_STEP_TEXT_MAX),
|
|
24
|
+
});
|
|
25
|
+
/** The guide: steps, in order, for the console sessions of its audience (the audiences notices have). */
|
|
26
|
+
export const guideSchema = z.object({
|
|
27
|
+
audience: noticeAudienceSchema,
|
|
28
|
+
steps: z.array(guideStepSchema).min(1).max(MAX_GUIDE_STEPS),
|
|
29
|
+
});
|
|
30
|
+
/** Input of `installation.guide.set`: the guide, replacing the one set before; null clears it. */
|
|
31
|
+
export const setGuideInputSchema = z.object({ guide: guideSchema.nullable() });
|
|
32
|
+
/** Output of `installation.guide.get` and `.set`: the guide as set, or null. */
|
|
33
|
+
export const guideOutputSchema = z.object({ guide: guideSchema.nullable() });
|
|
34
|
+
/** Where a session is in the guide: open at its step, or skipped or finished, which hides it. */
|
|
35
|
+
export const GUIDE_PROGRESS_STATES = ['open', 'skipped', 'finished'];
|
|
36
|
+
/** A session's progress in the guide: the step it is at, counted from 0, and the guide's state. */
|
|
37
|
+
export const guideProgressSchema = z.object({
|
|
38
|
+
step: z.int().min(0),
|
|
39
|
+
state: z.enum(GUIDE_PROGRESS_STATES),
|
|
40
|
+
});
|
|
41
|
+
/** Input of `console.recordGuideProgress`. */
|
|
42
|
+
export const setGuideProgressInputSchema = guideProgressSchema;
|
|
43
|
+
/** Output of `console.guide`: the guide's steps and the session's progress, or null when no guide is for the session. */
|
|
44
|
+
export const consoleGuideOutputSchema = z.object({ steps: z.array(guideStepSchema), progress: guideProgressSchema }).nullable();
|
|
45
|
+
//# sourceMappingURL=guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide.js","sourceRoot":"","sources":["../../src/schemas/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAClC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AACvC,4CAA4C;AAC5C,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,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EAAE,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC;CACrC,CAAC,CAAC;AAEH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AAE/D,yHAAyH;AACzH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC"}
|
|
@@ -33,6 +33,7 @@ export declare const shipDetailOutputSchema: z.ZodObject<{
|
|
|
33
33
|
kind: z.ZodEnum<{
|
|
34
34
|
operator: "operator";
|
|
35
35
|
agent: "agent";
|
|
36
|
+
viewer: "viewer";
|
|
36
37
|
}>;
|
|
37
38
|
status: z.ZodEnum<{
|
|
38
39
|
awaitingCrew: "awaitingCrew";
|
|
@@ -83,9 +84,10 @@ export declare const shipDetailOutputSchema: z.ZodObject<{
|
|
|
83
84
|
note: z.ZodNullable<z.ZodString>;
|
|
84
85
|
reportedAt: z.ZodISODateTime;
|
|
85
86
|
}, z.core.$strip>>;
|
|
87
|
+
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
88
|
+
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
86
89
|
commissionedAt: z.ZodISODateTime;
|
|
87
90
|
crewedSince: z.ZodNullable<z.ZodISODateTime>;
|
|
88
|
-
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
89
91
|
inFlightDeliveries: z.ZodInt;
|
|
90
92
|
openDeliveries: z.ZodInt;
|
|
91
93
|
}, z.core.$strip>;
|
|
@@ -114,6 +116,7 @@ export declare const timelineEntrySchema: z.ZodObject<{
|
|
|
114
116
|
ShipReported: "ShipReported";
|
|
115
117
|
SignInTicketIssued: "SignInTicketIssued";
|
|
116
118
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
119
|
+
ViewerSessionStarted: "ViewerSessionStarted";
|
|
117
120
|
}>;
|
|
118
121
|
occurredAt: z.ZodISODateTime;
|
|
119
122
|
actor: z.ZodNullable<z.ZodObject<{
|
|
@@ -170,6 +173,7 @@ export declare const shipTimelineOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
170
173
|
ShipReported: "ShipReported";
|
|
171
174
|
SignInTicketIssued: "SignInTicketIssued";
|
|
172
175
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
176
|
+
ViewerSessionStarted: "ViewerSessionStarted";
|
|
173
177
|
}>;
|
|
174
178
|
occurredAt: z.ZodISODateTime;
|
|
175
179
|
actor: z.ZodNullable<z.ZodObject<{
|
package/dist/schemas/history.js
CHANGED
|
@@ -26,7 +26,6 @@ export const shipInputSchema = z.object({ shipId: idSchema('ship') });
|
|
|
26
26
|
export const shipDetailOutputSchema = listedShipSchema.extend({
|
|
27
27
|
commissionedAt: isoTime,
|
|
28
28
|
crewedSince: isoTime.nullable(),
|
|
29
|
-
retiredAt: isoTime.nullable(),
|
|
30
29
|
/** What its crew holds in flight now: what a release or a re-crew returns to pending. */
|
|
31
30
|
inFlightDeliveries: z.int().min(0),
|
|
32
31
|
/** Its direct deliveries pending or in flight: what a retire abandons. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.js","sourceRoot":"","sources":["../../src/schemas/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AAEH,uBAAuB;AACvB,MAAM,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;AAEjC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,WAAW,GAAG,CA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AAC,WAAW,EAAE,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAIH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IACpG,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QACjB,EAAE,EAAE,QAAQ,CAAC,UAAU,CAAC;QACxB,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACxC,SAAS,EAAE,WAAW,CAAC,QAAQ,EAAE;QACjC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC;KAC7C,CAAC;CACH,CAAC,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ export * from './console.js';
|
|
|
2
2
|
export * from './delivery.js';
|
|
3
3
|
export * from './fleet.js';
|
|
4
4
|
export * from './follow.js';
|
|
5
|
+
export * from './guide.js';
|
|
5
6
|
export * from './history.js';
|
|
6
7
|
export * from './idempotency-key.js';
|
|
7
8
|
export * from './installation.js';
|
|
8
9
|
export * from './message.js';
|
|
9
10
|
export * from './needs-attention.js';
|
|
11
|
+
export * from './notice.js';
|
|
10
12
|
export * from './operator-inbox.js';
|
|
11
13
|
export * from './ping.js';
|
|
12
14
|
export * from './report.js';
|
package/dist/schemas/index.js
CHANGED
|
@@ -2,11 +2,13 @@ export * from './console.js';
|
|
|
2
2
|
export * from './delivery.js';
|
|
3
3
|
export * from './fleet.js';
|
|
4
4
|
export * from './follow.js';
|
|
5
|
+
export * from './guide.js';
|
|
5
6
|
export * from './history.js';
|
|
6
7
|
export * from './idempotency-key.js';
|
|
7
8
|
export * from './installation.js';
|
|
8
9
|
export * from './message.js';
|
|
9
10
|
export * from './needs-attention.js';
|
|
11
|
+
export * from './notice.js';
|
|
10
12
|
export * from './operator-inbox.js';
|
|
11
13
|
export * from './ping.js';
|
|
12
14
|
export * from './report.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
@@ -12,6 +12,7 @@ export declare const installationFleetsCreateInputSchema: z.ZodObject<{
|
|
|
12
12
|
requestId: z.ZodString;
|
|
13
13
|
name: z.ZodString;
|
|
14
14
|
operatorEmail: z.ZodString;
|
|
15
|
+
viewer: z.ZodOptional<z.ZodBoolean>;
|
|
15
16
|
}, z.core.$strict>;
|
|
16
17
|
export declare const installationFleetsCreateOutputSchema: z.ZodObject<{
|
|
17
18
|
fleetId: z.ZodType<`flt_${string}`, unknown, z.core.$ZodTypeInternals<`flt_${string}`, unknown>>;
|
|
@@ -105,8 +106,13 @@ export declare const installationFleetsDeleteInputSchema: z.ZodObject<{
|
|
|
105
106
|
}, z.core.$strict>;
|
|
106
107
|
export declare const installationFleetsDeleteOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
107
108
|
/** A one-time sign-in ticket for the fleet's operator: single use, valid 2 minutes, redeemed in the console. */
|
|
109
|
+
/** Whom a ticket signs in as: the operator when left out, or a viewer of a fleet with a viewer ship (decision 0022). */
|
|
108
110
|
export declare const installationOperatorsIssueSignInTicketInputSchema: z.ZodObject<{
|
|
109
111
|
fleetId: z.ZodType<`flt_${string}`, unknown, z.core.$ZodTypeInternals<`flt_${string}`, unknown>>;
|
|
112
|
+
as: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
operator: "operator";
|
|
114
|
+
viewer: "viewer";
|
|
115
|
+
}>>;
|
|
110
116
|
}, z.core.$strict>;
|
|
111
117
|
export declare const installationOperatorsIssueSignInTicketOutputSchema: z.ZodObject<{
|
|
112
118
|
ticket: z.ZodString;
|
|
@@ -21,6 +21,8 @@ export const installationFleetsCreateInputSchema = z.strictObject({
|
|
|
21
21
|
requestId: idempotencyKeySchema,
|
|
22
22
|
name: z.string(),
|
|
23
23
|
operatorEmail: z.string().trim().min(1).max(OPERATOR_EMAIL_MAX_LENGTH),
|
|
24
|
+
/** Whether the fleet gets a viewer ship, its read-only door into the console (decision 0022); none when left out. */
|
|
25
|
+
viewer: z.boolean().optional(),
|
|
24
26
|
});
|
|
25
27
|
export const installationFleetsCreateOutputSchema = z.object({
|
|
26
28
|
fleetId: idSchema('fleet'),
|
|
@@ -55,7 +57,8 @@ export const installationFleetsGetInputSchema = z.strictObject({ fleetId: idSche
|
|
|
55
57
|
export const installationFleetsDeleteInputSchema = z.strictObject({ requestId: idempotencyKeySchema, fleetId: idSchema('fleet') });
|
|
56
58
|
export const installationFleetsDeleteOutputSchema = z.strictObject({});
|
|
57
59
|
/** A one-time sign-in ticket for the fleet's operator: single use, valid 2 minutes, redeemed in the console. */
|
|
58
|
-
|
|
60
|
+
/** Whom a ticket signs in as: the operator when left out, or a viewer of a fleet with a viewer ship (decision 0022). */
|
|
61
|
+
export const installationOperatorsIssueSignInTicketInputSchema = z.strictObject({ fleetId: idSchema('fleet'), as: z.enum(['operator', 'viewer']).optional() });
|
|
59
62
|
export const installationOperatorsIssueSignInTicketOutputSchema = z.object({ ticket: z.string() });
|
|
60
63
|
/**
|
|
61
64
|
* The installation's settings: the ship and daily message limits a fleet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation.js","sourceRoot":"","sources":["../../src/schemas/installation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;GAKG;AAEH,0GAA0G;AAC1G,MAAM,WAAW,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAE9C,mIAAmI;AACnI,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAClE,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IAC9C,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;CACjE,CAAC,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G,CAAC,CAAC,YAAY,CAAC;IACvD,gBAAgB,EAAE,WAAW;IAC7B,wBAAwB,EAAE,WAAW;IACrC,QAAQ,EAAE,WAAW;CACtB,CAAC,CAAC;AAIH,yGAAyG;AACzG,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC1B,KAAK,EAAE,gBAAgB;IACvB,aAAa,EAAE,gBAAgB;CAChC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,YAAY,CAAC;IACnE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC1B,KAAK,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,uBAAuB,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Who sees a notice: every console session, the operator's only, or viewer sessions only (decision 0023). */
|
|
3
|
+
export declare const NOTICE_AUDIENCES: readonly ["everyone", "operators", "viewers"];
|
|
4
|
+
export declare const noticeAudienceSchema: z.ZodEnum<{
|
|
5
|
+
everyone: "everyone";
|
|
6
|
+
operators: "operators";
|
|
7
|
+
viewers: "viewers";
|
|
8
|
+
}>;
|
|
9
|
+
export type NoticeAudience = z.infer<typeof noticeAudienceSchema>;
|
|
10
|
+
/** The most notices the installation sets at once. */
|
|
11
|
+
export declare const MAX_NOTICES = 5;
|
|
12
|
+
/** The most characters of a notice's text, after trimming. */
|
|
13
|
+
export declare const NOTICE_TEXT_MAX = 300;
|
|
14
|
+
/** The most links a notice carries. */
|
|
15
|
+
export declare const MAX_NOTICE_LINKS = 3;
|
|
16
|
+
/** The most characters of a link's label, after trimming. */
|
|
17
|
+
export declare const NOTICE_LINK_LABEL_MAX = 40;
|
|
18
|
+
/**
|
|
19
|
+
* A notice's link: its label, and where it goes (an http(s) URL), whether it
|
|
20
|
+
* ends the console session first, or both: a link that signs out goes to its
|
|
21
|
+
* URL afterwards, or to sign-in without one.
|
|
22
|
+
*/
|
|
23
|
+
export declare const noticeLinkSchema: z.ZodObject<{
|
|
24
|
+
label: z.ZodString;
|
|
25
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
26
|
+
isSignOut: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type NoticeLink = z.infer<typeof noticeLinkSchema>;
|
|
29
|
+
/** A notice: plain text above every console page for the sessions of its audience, with optional links; dismissible or not. */
|
|
30
|
+
export declare const noticeSchema: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
audience: z.ZodEnum<{
|
|
33
|
+
everyone: "everyone";
|
|
34
|
+
operators: "operators";
|
|
35
|
+
viewers: "viewers";
|
|
36
|
+
}>;
|
|
37
|
+
text: z.ZodString;
|
|
38
|
+
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
39
|
+
label: z.ZodString;
|
|
40
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
41
|
+
isSignOut: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
}, z.core.$strip>>>;
|
|
43
|
+
isDismissible: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
/** Input of `installation.notices.set`: the notices, in order, replacing those set before; none clears them. */
|
|
46
|
+
export declare const setNoticesInputSchema: z.ZodObject<{
|
|
47
|
+
notices: z.ZodArray<z.ZodObject<{
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
audience: z.ZodEnum<{
|
|
50
|
+
everyone: "everyone";
|
|
51
|
+
operators: "operators";
|
|
52
|
+
viewers: "viewers";
|
|
53
|
+
}>;
|
|
54
|
+
text: z.ZodString;
|
|
55
|
+
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
56
|
+
label: z.ZodString;
|
|
57
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
58
|
+
isSignOut: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
}, z.core.$strip>>>;
|
|
60
|
+
isDismissible: z.ZodDefault<z.ZodBoolean>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
/** Output of `installation.notices.get` and `.set`: the notices as set. */
|
|
64
|
+
export declare const noticesOutputSchema: z.ZodObject<{
|
|
65
|
+
notices: z.ZodArray<z.ZodObject<{
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
audience: z.ZodEnum<{
|
|
68
|
+
everyone: "everyone";
|
|
69
|
+
operators: "operators";
|
|
70
|
+
viewers: "viewers";
|
|
71
|
+
}>;
|
|
72
|
+
text: z.ZodString;
|
|
73
|
+
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
74
|
+
label: z.ZodString;
|
|
75
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
76
|
+
isSignOut: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
}, z.core.$strip>>>;
|
|
78
|
+
isDismissible: z.ZodDefault<z.ZodBoolean>;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
/** Output of `console.notices`: the notices of the session's audience, less those it dismissed. */
|
|
82
|
+
export declare const consoleNoticesOutputSchema: z.ZodArray<z.ZodObject<{
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
audience: z.ZodEnum<{
|
|
85
|
+
everyone: "everyone";
|
|
86
|
+
operators: "operators";
|
|
87
|
+
viewers: "viewers";
|
|
88
|
+
}>;
|
|
89
|
+
text: z.ZodString;
|
|
90
|
+
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
91
|
+
label: z.ZodString;
|
|
92
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
93
|
+
isSignOut: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
isDismissible: z.ZodDefault<z.ZodBoolean>;
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
/** Input of `console.dismissNotice`. */
|
|
98
|
+
export declare const dismissNoticeInputSchema: z.ZodObject<{
|
|
99
|
+
noticeId: z.ZodString;
|
|
100
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Who sees a notice: every console session, the operator's only, or viewer sessions only (decision 0023). */
|
|
3
|
+
export const NOTICE_AUDIENCES = ['everyone', 'operators', 'viewers'];
|
|
4
|
+
export const noticeAudienceSchema = z.enum(NOTICE_AUDIENCES);
|
|
5
|
+
/** The most notices the installation sets at once. */
|
|
6
|
+
export const MAX_NOTICES = 5;
|
|
7
|
+
/** The most characters of a notice's text, after trimming. */
|
|
8
|
+
export const NOTICE_TEXT_MAX = 300;
|
|
9
|
+
/** The most links a notice carries. */
|
|
10
|
+
export const MAX_NOTICE_LINKS = 3;
|
|
11
|
+
/** The most characters of a link's label, after trimming. */
|
|
12
|
+
export const NOTICE_LINK_LABEL_MAX = 40;
|
|
13
|
+
/** A notice's id: a handle the installation chooses, unique among its notices. */
|
|
14
|
+
const noticeIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, 'A notice id is a handle: lowercase letters, digits and hyphens, at most 64');
|
|
15
|
+
/**
|
|
16
|
+
* A notice's link: its label, and where it goes (an http(s) URL), whether it
|
|
17
|
+
* ends the console session first, or both: a link that signs out goes to its
|
|
18
|
+
* URL afterwards, or to sign-in without one.
|
|
19
|
+
*/
|
|
20
|
+
export const noticeLinkSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
label: z.string().trim().min(1).max(NOTICE_LINK_LABEL_MAX),
|
|
23
|
+
url: z.url({ protocol: /^https?$/ }).optional(),
|
|
24
|
+
isSignOut: z.boolean().optional(),
|
|
25
|
+
})
|
|
26
|
+
.refine((link) => link.url !== undefined || link.isSignOut === true, 'A link goes to a URL, signs out, or both');
|
|
27
|
+
/** A notice: plain text above every console page for the sessions of its audience, with optional links; dismissible or not. */
|
|
28
|
+
export const noticeSchema = z.object({
|
|
29
|
+
id: noticeIdSchema,
|
|
30
|
+
audience: noticeAudienceSchema,
|
|
31
|
+
text: z.string().trim().min(1).max(NOTICE_TEXT_MAX),
|
|
32
|
+
links: z.array(noticeLinkSchema).max(MAX_NOTICE_LINKS).default([]),
|
|
33
|
+
isDismissible: z.boolean().default(false),
|
|
34
|
+
});
|
|
35
|
+
/** Input of `installation.notices.set`: the notices, in order, replacing those set before; none clears them. */
|
|
36
|
+
export const setNoticesInputSchema = z.object({
|
|
37
|
+
notices: z
|
|
38
|
+
.array(noticeSchema)
|
|
39
|
+
.max(MAX_NOTICES)
|
|
40
|
+
.refine((notices) => new Set(notices.map((notice) => notice.id)).size === notices.length, 'Each notice has its own id'),
|
|
41
|
+
});
|
|
42
|
+
/** Output of `installation.notices.get` and `.set`: the notices as set. */
|
|
43
|
+
export const noticesOutputSchema = z.object({ notices: z.array(noticeSchema) });
|
|
44
|
+
/** Output of `console.notices`: the notices of the session's audience, less those it dismissed. */
|
|
45
|
+
export const consoleNoticesOutputSchema = z.array(noticeSchema);
|
|
46
|
+
/** Input of `console.dismissNotice`. */
|
|
47
|
+
export const dismissNoticeInputSchema = z.object({ noticeId: noticeIdSchema });
|
|
48
|
+
//# sourceMappingURL=notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notice.js","sourceRoot":"","sources":["../../src/schemas/notice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8GAA8G;AAC9G,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CAAU,CAAC;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AAG7D,sDAAsD;AACtD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,8DAA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