@aeolus-fleet/common 0.29.2 → 0.30.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.
Files changed (51) hide show
  1. package/dist/header/command-palette.d.ts +2 -0
  2. package/dist/header/command-palette.js +2 -1
  3. package/dist/header/command-palette.js.map +1 -1
  4. package/dist/rules/index.d.ts +2 -0
  5. package/dist/rules/index.js +2 -0
  6. package/dist/rules/index.js.map +1 -1
  7. package/dist/rules/page-size.d.ts +4 -0
  8. package/dist/rules/page-size.js +5 -0
  9. package/dist/rules/page-size.js.map +1 -0
  10. package/dist/rules/ship-filter.d.ts +102 -0
  11. package/dist/rules/ship-filter.js +99 -0
  12. package/dist/rules/ship-filter.js.map +1 -0
  13. package/dist/schemas/crew-request.d.ts +18 -0
  14. package/dist/schemas/crew-request.js +8 -0
  15. package/dist/schemas/crew-request.js.map +1 -1
  16. package/dist/schemas/delivery.d.ts +3 -1
  17. package/dist/schemas/delivery.js +6 -2
  18. package/dist/schemas/delivery.js.map +1 -1
  19. package/dist/schemas/fleet.d.ts +149 -3
  20. package/dist/schemas/fleet.js +25 -2
  21. package/dist/schemas/fleet.js.map +1 -1
  22. package/dist/schemas/health.d.ts +91 -0
  23. package/dist/schemas/health.js +17 -0
  24. package/dist/schemas/health.js.map +1 -1
  25. package/dist/schemas/history.d.ts +148 -130
  26. package/dist/schemas/history.js +10 -5
  27. package/dist/schemas/history.js.map +1 -1
  28. package/dist/schemas/index.d.ts +2 -0
  29. package/dist/schemas/index.js +2 -0
  30. package/dist/schemas/index.js.map +1 -1
  31. package/dist/schemas/label.d.ts +242 -6
  32. package/dist/schemas/label.js +81 -4
  33. package/dist/schemas/label.js.map +1 -1
  34. package/dist/schemas/needs-attention.d.ts +48 -30
  35. package/dist/schemas/needs-attention.js +8 -4
  36. package/dist/schemas/needs-attention.js.map +1 -1
  37. package/dist/schemas/network-rules-file.d.ts +301 -0
  38. package/dist/schemas/network-rules-file.js +97 -0
  39. package/dist/schemas/network-rules-file.js.map +1 -0
  40. package/dist/schemas/network.d.ts +72 -66
  41. package/dist/schemas/network.js +5 -4
  42. package/dist/schemas/network.js.map +1 -1
  43. package/dist/schemas/operator-inbox.d.ts +59 -36
  44. package/dist/schemas/operator-inbox.js +15 -4
  45. package/dist/schemas/operator-inbox.js.map +1 -1
  46. package/dist/schemas/page.d.ts +20 -0
  47. package/dist/schemas/page.js +20 -0
  48. package/dist/schemas/page.js.map +1 -0
  49. package/dist/schemas/question.d.ts +2 -2
  50. package/dist/schemas/question.js +2 -2
  51. package/package.json +1 -1
@@ -7,8 +7,10 @@ export declare const inboxFilterSchema: z.ZodEnum<{
7
7
  all: "all";
8
8
  }>;
9
9
  export type InboxFilter = z.infer<typeof inboxFilterSchema>;
10
- /** Input of `fleet.inbox`. */
10
+ /** Input of `fleet.inbox`: the filter, and the cursor and size of a page. */
11
11
  export declare const operatorInboxInputSchema: z.ZodObject<{
12
+ cursor: z.ZodOptional<z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>>;
13
+ limit: z.ZodOptional<z.ZodInt>;
12
14
  filter: z.ZodEnum<{
13
15
  done: "done";
14
16
  open: "open";
@@ -52,47 +54,68 @@ export declare const inboxMessageSchema: z.ZodObject<{
52
54
  }, z.core.$strip>;
53
55
  }, z.core.$strip>;
54
56
  export type InboxMessage = z.infer<typeof inboxMessageSchema>;
55
- /** Output of `fleet.inbox`: the messages to argo the filter keeps, newest first. */
56
- export declare const operatorInboxOutputSchema: z.ZodArray<z.ZodObject<{
57
- deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
58
- state: z.ZodEnum<{
59
- pending: "pending";
60
- received: "received";
61
- handed: "handed";
62
- acknowledged: "acknowledged";
63
- handled: "handled";
64
- notHandled: "notHandled";
65
- undeliverable: "undeliverable";
66
- dismissed: "dismissed";
67
- abandoned: "abandoned";
68
- }>;
69
- readAt: z.ZodNullable<z.ZodISODateTime>;
70
- doneAt: z.ZodNullable<z.ZodISODateTime>;
71
- repliedWith: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
72
- replies: z.ZodArray<z.ZodObject<{
73
- id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
74
- contentType: z.ZodString;
75
- payload: z.ZodString;
76
- sentAt: z.ZodISODateTime;
77
- }, z.core.$strip>>;
78
- message: z.ZodObject<{
79
- id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
80
- sender: z.ZodObject<{
81
- id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
82
- name: z.ZodString;
57
+ /** Output of `fleet.inbox`: a page of the messages to argo the filter keeps, newest first. */
58
+ export declare const operatorInboxOutputSchema: z.ZodObject<{
59
+ items: z.ZodArray<z.ZodObject<{
60
+ deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
61
+ state: z.ZodEnum<{
62
+ pending: "pending";
63
+ received: "received";
64
+ handed: "handed";
65
+ acknowledged: "acknowledged";
66
+ handled: "handled";
67
+ notHandled: "notHandled";
68
+ undeliverable: "undeliverable";
69
+ dismissed: "dismissed";
70
+ abandoned: "abandoned";
71
+ }>;
72
+ readAt: z.ZodNullable<z.ZodISODateTime>;
73
+ doneAt: z.ZodNullable<z.ZodISODateTime>;
74
+ repliedWith: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
75
+ replies: z.ZodArray<z.ZodObject<{
76
+ id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
77
+ contentType: z.ZodString;
78
+ payload: z.ZodString;
79
+ sentAt: z.ZodISODateTime;
80
+ }, z.core.$strip>>;
81
+ message: z.ZodObject<{
82
+ id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
83
+ sender: z.ZodObject<{
84
+ id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
85
+ name: z.ZodString;
86
+ }, z.core.$strip>;
87
+ inReplyTo: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
88
+ sentAt: z.ZodISODateTime;
89
+ contentType: z.ZodString;
90
+ model: z.ZodNullable<z.ZodString>;
91
+ payload: z.ZodString;
83
92
  }, z.core.$strip>;
84
- inReplyTo: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
85
- sentAt: z.ZodISODateTime;
86
- contentType: z.ZodString;
87
- model: z.ZodNullable<z.ZodString>;
88
- payload: z.ZodString;
89
- }, z.core.$strip>;
90
- }, z.core.$strip>>;
93
+ }, z.core.$strip>>;
94
+ nextCursor: z.ZodNullable<z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>>;
95
+ }, z.core.$strip>;
96
+ /** Input of `fleet.inboxMessage`: one message to argo, by its delivery; answers it as `fleet.inbox` lists it. */
97
+ export declare const inboxMessageInputSchema: z.ZodObject<{
98
+ deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
99
+ }, z.core.$strip>;
100
+ /**
101
+ * Input of `fleet.inboxWithdrawals`: a question's uuid (decision 0038), and
102
+ * the cursor and size of a page of the messages to argo that withdraw or
103
+ * replace it, oldest first; answers as `fleet.inbox` does.
104
+ */
105
+ export declare const inboxWithdrawalsInputSchema: z.ZodObject<{
106
+ cursor: z.ZodOptional<z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>>;
107
+ limit: z.ZodOptional<z.ZodInt>;
108
+ questionId: z.ZodUUID;
109
+ }, z.core.$strip>;
91
110
  /** Input of `fleet.markRead`: a delivery to argo, read or unread again. */
92
111
  export declare const markReadInputSchema: z.ZodObject<{
93
112
  deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
94
113
  isRead: z.ZodBoolean;
95
114
  }, z.core.$strip>;
115
+ /** Output of `fleet.inboxCount`: how many messages to argo are open, for the navigation and the Open segment. */
116
+ export declare const inboxCountOutputSchema: z.ZodObject<{
117
+ open: z.ZodInt;
118
+ }, z.core.$strip>;
96
119
  /** Output of `fleet.markRead` and `fleet.markDone`: nothing; the OK is the answer. */
97
120
  export declare const inboxActionOutputSchema: z.ZodObject<{}, z.core.$strict>;
98
121
  /** Input of `fleet.markDone`: a delivery to argo, acknowledged without a reply. */
@@ -3,6 +3,7 @@ import { deliveryStateSchema } from '../fleet/index.js';
3
3
  import { idSchema } from '../ids/index.js';
4
4
  import { partySchema } from './history.js';
5
5
  import { contentTypeSchema, sendInputSchema } from './message.js';
6
+ import { pageInputOf, pageOutputOf } from './page.js';
6
7
  /**
7
8
  * Inputs and outputs of the operator inbox (docs/blueprint.md, "Inbox"): the
8
9
  * messages ships sent to argo. Opening one marks it read; read is not done.
@@ -13,8 +14,8 @@ const isoTime = z.iso.datetime();
13
14
  /** Open: not done yet. Done: acknowledged. All: both. */
14
15
  export const INBOX_FILTERS = ['open', 'done', 'all'];
15
16
  export const inboxFilterSchema = z.enum(INBOX_FILTERS);
16
- /** Input of `fleet.inbox`. */
17
- export const operatorInboxInputSchema = z.object({ filter: inboxFilterSchema });
17
+ /** Input of `fleet.inbox`: the filter, and the cursor and size of a page. */
18
+ export const operatorInboxInputSchema = z.object({ filter: inboxFilterSchema, ...pageInputOf(idSchema('delivery')).shape });
18
19
  /** One message to argo: its delivery's state, when it was read and done, the reply that made it done, argo's replies to it, and the message. */
19
20
  export const inboxMessageSchema = z.object({
20
21
  deliveryId: idSchema('delivery'),
@@ -38,10 +39,20 @@ export const inboxMessageSchema = z.object({
38
39
  payload: z.string(),
39
40
  }),
40
41
  });
41
- /** Output of `fleet.inbox`: the messages to argo the filter keeps, newest first. */
42
- export const operatorInboxOutputSchema = z.array(inboxMessageSchema);
42
+ /** Output of `fleet.inbox`: a page of the messages to argo the filter keeps, newest first. */
43
+ export const operatorInboxOutputSchema = pageOutputOf(inboxMessageSchema, idSchema('delivery'));
44
+ /** Input of `fleet.inboxMessage`: one message to argo, by its delivery; answers it as `fleet.inbox` lists it. */
45
+ export const inboxMessageInputSchema = z.object({ deliveryId: idSchema('delivery') });
46
+ /**
47
+ * Input of `fleet.inboxWithdrawals`: a question's uuid (decision 0038), and
48
+ * the cursor and size of a page of the messages to argo that withdraw or
49
+ * replace it, oldest first; answers as `fleet.inbox` does.
50
+ */
51
+ export const inboxWithdrawalsInputSchema = z.object({ questionId: z.uuid(), ...pageInputOf(idSchema('delivery')).shape });
43
52
  /** Input of `fleet.markRead`: a delivery to argo, read or unread again. */
44
53
  export const markReadInputSchema = z.object({ deliveryId: idSchema('delivery'), isRead: z.boolean() });
54
+ /** Output of `fleet.inboxCount`: how many messages to argo are open, for the navigation and the Open segment. */
55
+ export const inboxCountOutputSchema = z.object({ open: z.int().nonnegative() });
45
56
  /** Output of `fleet.markRead` and `fleet.markDone`: nothing; the OK is the answer. */
46
57
  export const inboxActionOutputSchema = z.strictObject({});
47
58
  /** Input of `fleet.markDone`: a delivery to argo, acknowledged without a reply. */
@@ -1 +1 @@
1
- {"version":3,"file":"operator-inbox.js","sourceRoot":"","sources":["../../src/schemas/operator-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,iBAAiB,E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C,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAEhF,sFAAsF;AACtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAE1D,mFAAmF;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AAElF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC;IAChC,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,OAAO;IACtC,WAAW,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACzC,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,cAAc;CACrD,CAAC,CAAC;AAEH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * A page of a list (decision 4 of docs/design/performance/performance.md):
4
+ * by cursor on the list's time-ordered id, never by offset, so a page costs
5
+ * the same however long the list grows.
6
+ */
7
+ export { PAGE_SIZE_DEFAULT, PAGE_SIZE_MAX } from '../rules/page-size.js';
8
+ /**
9
+ * Input of a paged list: the cursor the last page answered, none for the
10
+ * first page, and the page size the caller asks, at most PAGE_SIZE_MAX.
11
+ */
12
+ export declare function pageInputOf<Cursor extends z.ZodType>(cursor: Cursor): z.ZodObject<{
13
+ cursor: z.ZodOptional<Cursor>;
14
+ limit: z.ZodOptional<z.ZodInt>;
15
+ }, z.core.$strip>;
16
+ /** Output of a paged list: the page, and the cursor the next page starts after; null on the last page. */
17
+ export declare function pageOutputOf<Item extends z.ZodType, Cursor extends z.ZodType>(item: Item, cursor: Cursor): z.ZodObject<{
18
+ items: z.ZodArray<Item>;
19
+ nextCursor: z.ZodNullable<Cursor>;
20
+ }, z.core.$strip>;
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { PAGE_SIZE_MAX } from '../rules/page-size.js';
3
+ /**
4
+ * A page of a list (decision 4 of docs/design/performance/performance.md):
5
+ * by cursor on the list's time-ordered id, never by offset, so a page costs
6
+ * the same however long the list grows.
7
+ */
8
+ export { PAGE_SIZE_DEFAULT, PAGE_SIZE_MAX } from '../rules/page-size.js';
9
+ /**
10
+ * Input of a paged list: the cursor the last page answered, none for the
11
+ * first page, and the page size the caller asks, at most PAGE_SIZE_MAX.
12
+ */
13
+ export function pageInputOf(cursor) {
14
+ return z.object({ cursor: cursor.optional(), limit: z.int().min(1).max(PAGE_SIZE_MAX).optional() });
15
+ }
16
+ /** Output of a paged list: the page, and the cursor the next page starts after; null on the last page. */
17
+ export function pageOutputOf(item, cursor) {
18
+ return z.object({ items: z.array(item), nextCursor: cursor.nullable() });
19
+ }
20
+ //# sourceMappingURL=page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/schemas/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEzE;;;GAGG;AACH,MAAM,UAAU,WAAW,CAA2B,MAAc;IAClE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACtG,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,YAAY,CAAmD,IAAU,EAAE,MAAc;IACvG,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC3E,CAAC"}
@@ -4,8 +4,8 @@ import { type MessageId } from '../ids/index.js';
4
4
  * Questions to argo (decision 0038): a ship asks the operator by sending a
5
5
  * message of the question content type to argo; the console answers it with a
6
6
  * reply of the answer content type. Both payloads are data only: the fleet
7
- * carries them as any message and never reads them; the console's server
8
- * does. A question is open until argo
7
+ * carries them as any message; the console's server reads them. Core only
8
+ * finds a question's withdrawals and replacements by the uuid they name. A question is open until argo
9
9
  * sends its answer, whatever its delivery's state. The asking ship withdraws
10
10
  * a question, or replaces it with a new one, by a message of its own content
11
11
  * type naming the question's uuid.
@@ -4,8 +4,8 @@ import { idSchema } from '../ids/index.js';
4
4
  * Questions to argo (decision 0038): a ship asks the operator by sending a
5
5
  * message of the question content type to argo; the console answers it with a
6
6
  * reply of the answer content type. Both payloads are data only: the fleet
7
- * carries them as any message and never reads them; the console's server
8
- * does. A question is open until argo
7
+ * carries them as any message; the console's server reads them. Core only
8
+ * finds a question's withdrawals and replacements by the uuid they name. A question is open until argo
9
9
  * sends its answer, whatever its delivery's state. The asking ship withdraws
10
10
  * a question, or replaces it with a new one, by a message of its own content
11
11
  * type naming the question's uuid.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeolus-fleet/common",
3
- "version": "0.29.2",
3
+ "version": "0.30.0",
4
4
  "description": "Shared schemas and ids for Aeolus packages, and the header every Aeolus web app shows.",
5
5
  "keywords": [
6
6
  "aeolus"