@kottera/tera-web 0.0.0-stage → 0.1.0-rc.10

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 (42) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +28 -0
  3. package/README.md +56 -2
  4. package/dist/client.d.ts +223 -0
  5. package/dist/client.js +500 -0
  6. package/dist/feed/connection.d.ts +179 -0
  7. package/dist/feed/connection.js +457 -0
  8. package/dist/feed/sse.d.ts +51 -0
  9. package/dist/feed/sse.js +134 -0
  10. package/dist/generated/feed.d.ts +199 -0
  11. package/dist/generated/feed.js +16 -0
  12. package/dist/generated/kit.d.ts +374 -0
  13. package/dist/generated/kit.js +258 -0
  14. package/dist/generated/shares.d.ts +214 -0
  15. package/dist/generated/shares.js +17 -0
  16. package/dist/generated/workorder-events.d.ts +47 -0
  17. package/dist/generated/workorder-events.js +10 -0
  18. package/dist/generated/workorder.d.ts +3775 -0
  19. package/dist/generated/workorder.js +74 -0
  20. package/dist/generated/wsstream.d.ts +34 -0
  21. package/dist/generated/wsstream.js +28 -0
  22. package/dist/index.d.ts +23 -0
  23. package/dist/index.js +24 -0
  24. package/dist/phone.d.ts +11 -0
  25. package/dist/phone.js +24 -0
  26. package/dist/routes.d.ts +32 -0
  27. package/dist/routes.js +69 -0
  28. package/dist/signin.d.ts +48 -0
  29. package/dist/signin.js +74 -0
  30. package/dist/stepup.d.ts +87 -0
  31. package/dist/stepup.js +66 -0
  32. package/dist/stream/connection.d.ts +145 -0
  33. package/dist/stream/connection.js +377 -0
  34. package/dist/terminal/view.d.ts +168 -0
  35. package/dist/terminal/view.js +546 -0
  36. package/dist/terminalwire/codec.d.ts +182 -0
  37. package/dist/terminalwire/codec.js +556 -0
  38. package/dist/terminalwire/collapse.d.ts +4 -0
  39. package/dist/terminalwire/collapse.js +7 -0
  40. package/dist/unreached.d.ts +26 -0
  41. package/dist/unreached.js +30 -0
  42. package/package.json +32 -4
@@ -0,0 +1,258 @@
1
+ // Code generated by cmd/internal/genwebtypes from sdk/plugin/webui/schema/v1/; DO NOT EDIT.
2
+ // Regenerate with `make web-types` (ADR-162 D4 item 1).
3
+ /**
4
+ * Every type this module declares, mapped to the repository path of the schema
5
+ * it was generated from.
6
+ */
7
+ export const KIT_SCHEMAS = {
8
+ KitErrorCode: "sdk/plugin/webui/schema/v1/error-code.json",
9
+ KitError: "sdk/plugin/webui/schema/v1/error.json",
10
+ KitFeedEventReauthenticate: "sdk/plugin/webui/schema/v1/feed.event.reauthenticate.json",
11
+ KitInvokeResponse: "sdk/plugin/webui/schema/v1/invoke.response.json",
12
+ KitMeResponse: "sdk/plugin/webui/schema/v1/me.response.json",
13
+ KitStepUpResponse: "sdk/plugin/webui/schema/v1/step-up.response.json",
14
+ KitUploadResponse: "sdk/plugin/webui/schema/v1/upload.response.json",
15
+ };
16
+ /** The prefix every kit route is served under (ADR-162 D3), below the app's base. */
17
+ export const KIT_ROUTE_PREFIX = "/tera/v1/";
18
+ /** tera's own sign-out path, which `GET /tera/v1/me` answers as signout_path: relative, resolved against the app's base. */
19
+ export const KIT_SIGNOUT_PATH = "_tera/signout";
20
+ /** tera's proxy's phone path, which `GET /tera/v1/me` answers as phone_path: relative, resolved against the app's base. */
21
+ export const KIT_PHONE_PATH = "_tera/phone";
22
+ /** The kit's route table (ADR-162 D3), as sdk/plugin/webui declares it. */
23
+ export const KIT_ROUTE_TABLE = {
24
+ prefix: "/tera/v1/",
25
+ signout_path: "_tera/signout",
26
+ phone_path: "_tera/phone",
27
+ same_origin: "A route marked same_origin refuses a request unless it is same-origin: when the request carries Sec-Fetch-Site, that header must be same-origin; when it does not, its Origin must equal the request's own (scheme http or https, and the Host the request was sent to). The refusal is 403 cross_origin.",
28
+ public: "None. Every route under the prefix refuses a request with no verified caller, 401 unauthenticated, before anything else is decided. Only the app's assets, outside the prefix, are served to an anonymous request.",
29
+ error: {
30
+ media_type: "application/json",
31
+ schema: "https://kottera.dev/schemas/plugin/webui/error/v1",
32
+ description: "Every failure of every route: the kit's own refusal, under one of the error-code vocabulary, or a verb's refusal passed through as the verb gave it.",
33
+ },
34
+ routes: [
35
+ {
36
+ name: "me",
37
+ method: "GET",
38
+ path: "/tera/v1/me",
39
+ summary: "Who is signed in, where to send them to sign out, and where to send them to open a page on their phone.",
40
+ same_origin: false,
41
+ response: {
42
+ media_type: "application/json",
43
+ schema: "https://kottera.dev/schemas/plugin/webui/me.response/v1",
44
+ description: "The signed-in person.",
45
+ },
46
+ },
47
+ {
48
+ name: "invoke",
49
+ method: "POST",
50
+ path: "/tera/v1/invoke/{capability}",
51
+ summary: "Invoke one capability as the person, with the request body as its params. tera decides it on the person's token; the kit vets nothing.",
52
+ same_origin: true,
53
+ path_params: [
54
+ {
55
+ name: "capability",
56
+ description: "The capability to invoke, e.g. work_order.get.",
57
+ required: true,
58
+ },
59
+ ],
60
+ request: {
61
+ media_type: "application/json",
62
+ description: "The capability's params. For a work_order.* verb, valid against sdk/workorder/schema/v1/<verb>.params.json.",
63
+ },
64
+ response: {
65
+ media_type: "application/json",
66
+ schema: "https://kottera.dev/schemas/plugin/webui/invoke.response/v1",
67
+ description: "The verb's reply envelope, HTTP 200 whenever the verb ran, refusals included.",
68
+ },
69
+ },
70
+ {
71
+ name: "feed",
72
+ method: "GET",
73
+ path: "/tera/v1/feeds/{feed}",
74
+ summary: "Open a feed as the person: server-sent events carrying feed records and status frames verbatim.",
75
+ same_origin: false,
76
+ path_params: [
77
+ {
78
+ name: "feed",
79
+ description: "The feed's name.",
80
+ required: true,
81
+ },
82
+ ],
83
+ query: [
84
+ {
85
+ name: "topics",
86
+ description: "Selects a subset of the topics the person may subscribe to; each occurrence may be a comma-separated list. Widening is refused.",
87
+ repeated: true,
88
+ },
89
+ {
90
+ name: "backfill",
91
+ description: "Precede the live stream with the stored history of the run the connection selected.",
92
+ values: [
93
+ "all",
94
+ ],
95
+ },
96
+ ],
97
+ response: {
98
+ media_type: "text/event-stream",
99
+ description: "A stream of the events below, until the person's token expires or either side closes it. Any other feed frame (a heartbeat, a batch, a type this kit does not know) is relayed verbatim as an unnamed event, read by its own type.",
100
+ },
101
+ events: [
102
+ {
103
+ name: "record",
104
+ schema: "https://kottera.dev/schemas/feed/frame.record/v1",
105
+ description: "A feed record frame, verbatim.",
106
+ },
107
+ {
108
+ name: "status",
109
+ schema: "https://kottera.dev/schemas/feed/frame.status/v1",
110
+ description: "A feed status frame, verbatim; loss is reported here and nowhere else.",
111
+ },
112
+ {
113
+ name: "reauthenticate",
114
+ schema: "https://kottera.dev/schemas/plugin/webui/feed.event.reauthenticate/v1",
115
+ description: "The last event of a stream closed because the person's token expired. Reconnect at once.",
116
+ },
117
+ ],
118
+ },
119
+ {
120
+ name: "upload",
121
+ method: "POST",
122
+ path: "/tera/v1/uploads",
123
+ summary: "Upload one file as the person (ADR-123): the kit streams the body once, digesting it, then authorizes and stores it.",
124
+ same_origin: true,
125
+ headers: [
126
+ {
127
+ name: "Content-Type",
128
+ description: "The file's media type.",
129
+ required: true,
130
+ },
131
+ {
132
+ name: "Tera-Upload-Filename",
133
+ description: "The file's name, percent-encoded UTF-8.",
134
+ required: true,
135
+ },
136
+ {
137
+ name: "Tera-Upload-Description",
138
+ description: "A description of the file, percent-encoded UTF-8.",
139
+ },
140
+ ],
141
+ request: {
142
+ media_type: "application/octet-stream",
143
+ description: "The file's bytes, any media type. The body is read against its declared Content-Length, capped by the 33554432-byte (32 MiB) bound on an input artifact; a body with no declared length is held to the cap. A declaration over the cap is refused before the body is read, and a body is refused at the first byte past its bound, never after it is read whole.",
144
+ },
145
+ response: {
146
+ media_type: "application/json",
147
+ schema: "https://kottera.dev/schemas/plugin/webui/upload.response/v1",
148
+ description: "The staged artifact.",
149
+ },
150
+ },
151
+ {
152
+ name: "step_up",
153
+ method: "GET",
154
+ path: "/tera/v1/step-ups/{id}",
155
+ summary: "Read one of the person's own step-ups as the person (ADR-173 D11): what a page polls, after opening the step-up's url, until it is satisfied, declined or expired. A step-up that is not the person's is tera's 404, the same as an id no step-up carries.",
156
+ same_origin: false,
157
+ path_params: [
158
+ {
159
+ name: "id",
160
+ description: "The step-up's id, as a step_up_required refusal's step_up names it.",
161
+ required: true,
162
+ },
163
+ ],
164
+ response: {
165
+ media_type: "application/json",
166
+ schema: "https://kottera.dev/schemas/plugin/webui/step-up.response/v1",
167
+ description: "The step-up's state.",
168
+ },
169
+ },
170
+ {
171
+ name: "terminal",
172
+ method: "GET",
173
+ path: "/tera/v1/workorders/{id}/terminal",
174
+ summary: "Open one view of an attended session's terminal as the person (ADR-181 D8): a WebSocket the kit splices to tera's terminal door, opened with the person's token. Which Work Order it is, and whether the person may see it, is tera's to decide; the kit keeps no list of sessions. Every refusal after the upgrade is a close: a query of the wrong shape is refused invalid_request; tera's 401 is reconnect, reason reauthenticate, and a second within the minute refused; its 400, 403 and 404 are refused with tera's code (not_attendee, attend_view_not_granted, not_found); its 410 is refused, reason ended, a session with no process and none coming without the person's act; its 409 (not_running, a session whose process is coming), 408, 429 and 5xx, and no answer, are retry_later with tera's code or tera_unavailable. A text message is refused binary_only.",
175
+ same_origin: true,
176
+ path_params: [
177
+ {
178
+ name: "id",
179
+ description: "The attended Work Order's id.",
180
+ required: true,
181
+ },
182
+ ],
183
+ query: [
184
+ {
185
+ name: "view",
186
+ description: "The view's id: a canonical, lower-case UUIDv7 the page mints per pane and keeps across reconnects.",
187
+ required: true,
188
+ },
189
+ {
190
+ name: "want",
191
+ description: "Whether the view asks to type (control), only to watch (view), or to watch without being counted as attached (peek).",
192
+ required: true,
193
+ values: [
194
+ "control",
195
+ "view",
196
+ "peek",
197
+ ],
198
+ },
199
+ {
200
+ name: "resume",
201
+ description: "The output offset the page has handed to its renderer so far, a decimal integer from 0 to 9007199254740991; absent on a fresh view, which replays.",
202
+ },
203
+ {
204
+ name: "cols",
205
+ description: "The view's width in cells, a decimal integer from 1 to 65535.",
206
+ required: true,
207
+ },
208
+ {
209
+ name: "rows",
210
+ description: "The view's height in cells, a decimal integer from 1 to 65535.",
211
+ required: true,
212
+ },
213
+ ],
214
+ response: {
215
+ media_type: "application/octet-stream",
216
+ description: "A WebSocket upgrade (101), then messages both ways until either side closes, with the close vocabulary.",
217
+ },
218
+ upgrade: "websocket",
219
+ subprotocol: "tera.terminalwire.v1",
220
+ messages: {
221
+ media_type: "application/octet-stream",
222
+ description: "One sdk/terminalwire frame per binary message, each way, at most 16388 bytes. The kit relays each as it arrived, reading no payload and redacting nothing.",
223
+ },
224
+ },
225
+ ],
226
+ close_codes: [
227
+ {
228
+ code: 1000,
229
+ name: "ended",
230
+ does: "what the protocol above said last; otherwise nothing",
231
+ },
232
+ {
233
+ code: 1001,
234
+ name: "going_away",
235
+ does: "reconnects after backoff: the peer is stopping or stopped answering pings",
236
+ },
237
+ {
238
+ code: 1009,
239
+ name: "too_big",
240
+ does: "nothing: a message broke the route's bound, a client defect",
241
+ },
242
+ {
243
+ code: 4000,
244
+ name: "reconnect",
245
+ does: "reconnects at once with the same identity: a token renewal",
246
+ },
247
+ {
248
+ code: 4001,
249
+ name: "retry_later",
250
+ does: "reconnects after backoff: the far side is unreachable or not ready",
251
+ },
252
+ {
253
+ code: 4003,
254
+ name: "refused",
255
+ does: "nothing until something changes; the reason is the error code",
256
+ },
257
+ ],
258
+ };
@@ -0,0 +1,214 @@
1
+ /**
2
+ * An ended share.
3
+ *
4
+ * The result of api.v1.shares.delete and api.v1.shares.leave: what the act ended. An ended share decides nothing and is not listed.
5
+ *
6
+ * Schema: sdk/shares/schema/v1/ended.json
7
+ */
8
+ export type SharesEnded = {
9
+ /** The ended share's id. */
10
+ id: string;
11
+ /** The installation whose resource was shared, <vault>/plugins/<installation>. */
12
+ installation: string;
13
+ /** The resource that was shared. */
14
+ resource: string;
15
+ /** The grantee person's id. */
16
+ grantee: string;
17
+ /** The sharer person's id. */
18
+ sharer: string;
19
+ /** How the share ended, as its record holds it: revoked or left. */
20
+ ended: "revoked" | "left";
21
+ };
22
+ /**
23
+ * Extend a share.
24
+ *
25
+ * The params of api.v1.shares.patch, PATCH /api/v1/shares/{id} (ADR-174 D11).
26
+ *
27
+ * Schema: sdk/shares/schema/v1/extend.request.json
28
+ */
29
+ export type SharesExtendRequest = {
30
+ /** The share's id, a UUIDv7. */
31
+ id: string;
32
+ /** The new expiry: later than the share's, at most the installation's max_expiry from now. Absent takes the kind's default_expiry from now, clamped to max_expiry. */
33
+ expires_at?: string;
34
+ };
35
+ /**
36
+ * Name one share.
37
+ *
38
+ * The params of api.v1.shares.get, api.v1.shares.delete and api.v1.shares.leave: the {id} of /api/v1/shares/{id}.
39
+ *
40
+ * Schema: sdk/shares/schema/v1/id.request.json
41
+ */
42
+ export type SharesIdRequest = {
43
+ /** The share's id, a UUIDv7. */
44
+ id: string;
45
+ };
46
+ /**
47
+ * A list of shares.
48
+ *
49
+ * The result of api.v1.shares.list.
50
+ *
51
+ * Schema: sdk/shares/schema/v1/list.json
52
+ */
53
+ export type SharesList = {
54
+ /** The shares, each with whether it decides now. */
55
+ shares: {
56
+ /** The share's id, a UUIDv7. */
57
+ id: string;
58
+ /** The installation whose resource is shared, <vault>/plugins/<installation>. */
59
+ installation: string;
60
+ /** The resource shared, plugins/<vault>/<installation>/<kind>/<id>. */
61
+ resource: string;
62
+ /** The shared verbs. */
63
+ verbs: string[] | null;
64
+ /** What the grantee is: person. */
65
+ grantee_kind: string;
66
+ /** The grantee person's id. */
67
+ grantee: string;
68
+ /** The id of the person who made the share. */
69
+ sharer: string;
70
+ /** The grantee person's display name. Presentation only: grantee stays the identity. Absent when tera has no name to show: a pending invitation has none, the directory has no person for the id, or the read failed. Render the name, else the address, else Someone; never the principal id. */
71
+ grantee_name?: string;
72
+ /** The grantee person's address, or a pending share's invitation address. Presentation only: grantee stays the identity. Absent when tera has no address to show: the directory has no person for the id, or the read failed. */
73
+ grantee_address?: string;
74
+ /** The sharer's display name. Presentation only: sharer stays the identity. Absent when tera has no name to show: the directory has no person for the id, or the read failed. Render the name, else the address, else Someone; never the principal id. */
75
+ sharer_name?: string;
76
+ /** The sharer's address. Presentation only: sharer stays the identity. Absent when tera has no address to show: the directory has no person for the id, or the read failed. */
77
+ sharer_address?: string;
78
+ /** The plugin principal that made the share for its sharer; absent when the sharer made it directly. */
79
+ created_via?: string;
80
+ /** When the share was made. */
81
+ created_at: string;
82
+ /** When the share stops deciding. */
83
+ expires_at: string;
84
+ /** When the share was last extended; absent if never. */
85
+ extended_at?: string;
86
+ /** Whether the share decides at least one of its verbs on the grantee's next request, computed from what decides now. */
87
+ deciding: boolean;
88
+ /** When deciding is false, the one reason why. Absent while the share decides. */
89
+ not_deciding?: "sharer_lost_access" | "sharing_disabled" | "installation_not_standing" | "verb_no_longer_shareable" | "pending_invitation";
90
+ }[] | null;
91
+ };
92
+ /**
93
+ * List shares.
94
+ *
95
+ * The params of api.v1.shares.list, the query of GET /api/v1/shares. At most one member is named; with none, the caller's own live shares as grantee and as sharer.
96
+ *
97
+ * Schema: sdk/shares/schema/v1/list.request.json
98
+ */
99
+ export type SharesListRequest = {
100
+ /** An installation, <vault>/plugins/<name>: every share on it. Needs the shares admin grant (api/v1/shares/admin). */
101
+ installation?: string;
102
+ /** One resource, plugins/<vault>/<installation>/<kind>/<id>: every share on it when the caller's own grants include its share-conferring verb, else the caller's own shares on it. */
103
+ resource?: string;
104
+ /** A grantee's person id; someone else's needs the shares admin grant. */
105
+ grantee?: string;
106
+ /** A sharer's person id; someone else's needs the shares admin grant. */
107
+ sharer?: string;
108
+ };
109
+ /**
110
+ * Make a share.
111
+ *
112
+ * The params of api.v1.shares.create, the body of POST /api/v1/shares (ADR-174 D6).
113
+ *
114
+ * Schema: sdk/shares/schema/v1/make.request.json
115
+ */
116
+ export type SharesMakeRequest = {
117
+ /** The one resource shared, plugins/<vault>/<installation>/<kind>/<id>. */
118
+ resource: string;
119
+ /** The shared verbs: a non-empty subset of the kind's sharing { verbs }, never its share-conferring verb. */
120
+ verbs: string[];
121
+ /** The grantee person's id. Exactly one of grantee and grantee_address names the grantee. */
122
+ grantee?: string;
123
+ /** An email address the directory resolves to the grantee. An address no person holds is invited, and the share is pending until they sign in, on a kind whose effective grantee class is addresses; otherwise it is refused share_grantee_not_admitted. */
124
+ grantee_address?: string;
125
+ /** The share's expiry, at most the installation's max_expiry from now. Absent takes the kind's default_expiry, clamped to max_expiry. */
126
+ expires_at?: string;
127
+ };
128
+ /**
129
+ * The vocabulary of the share acts' refusal codes (sdk/shares.Codes).
130
+ *
131
+ * Every stable code a share act is refused with. A code is never renamed; a new refusal is a new code, so a reader keeps a code it does not know as it arrived. share_not_found answers a share the caller may not see exactly as an id no share has. share_grantee_not_admitted answers an address no person holds on a kind whose effective grantee class is not addresses; on one that is, the address is invited and the share is pending until the invitee signs in.
132
+ *
133
+ * Schema: sdk/shares/schema/v1/refusal-code.json
134
+ */
135
+ export type SharesRefusalCode = "share_sharer_not_a_person" | "share_sharing_disabled" | "share_resource_not_shareable" | "share_resource_unknown" | "share_actor_other_installation" | "share_verb_not_shareable" | "share_verb_confers_sharing" | "share_verb_not_held" | "share_grantee_not_admitted" | "share_guest_cannot_invite" | "share_invitation_refused" | "share_grantee_is_sharer" | "share_expiry_beyond_max" | "share_cap_active" | "share_cap_pending_invitations" | "share_exists" | "share_plugin_only" | "share_caller_not_a_person" | "share_not_found" | "share_sharer_lost_access" | "share_expiry_not_later" | "share_admin_required" | "share_list_query" | "shares_unavailable";
136
+ /**
137
+ * A share act refused.
138
+ *
139
+ * A share act tera refused, as the shares client answers it: the route's stable code and its words, unchanged, and the detail the code declares.
140
+ *
141
+ * Schema: sdk/shares/schema/v1/refusal.json
142
+ */
143
+ export type SharesRefusal = {
144
+ /** The route's stable code. A code a reader does not know is kept as it arrived. */
145
+ code: string;
146
+ /** The route's words for a person, unchanged. */
147
+ message: string;
148
+ /** On share_verb_not_held, share_verb_not_shareable and share_verb_confers_sharing, the verb refused. */
149
+ verb?: string;
150
+ /** On share_exists, the id of the share already there. */
151
+ existing?: string;
152
+ /** On share_invitation_refused, why the address was not invited (inviter_limited, email_unavailable, ...). */
153
+ invitation?: string;
154
+ /** On share_plugin_only, the installation's name: the plugin the share is made or extended through. */
155
+ plugin?: string;
156
+ };
157
+ /**
158
+ * A share.
159
+ *
160
+ * One live share, with whether it decides now: the result of api.v1.shares.create, api.v1.shares.get and api.v1.shares.patch, and each member of a list (ADR-174 D14).
161
+ *
162
+ * Schema: sdk/shares/schema/v1/share.json
163
+ */
164
+ export type SharesShare = {
165
+ /** The share's id, a UUIDv7. */
166
+ id: string;
167
+ /** The installation whose resource is shared, <vault>/plugins/<installation>. */
168
+ installation: string;
169
+ /** The resource shared, plugins/<vault>/<installation>/<kind>/<id>. */
170
+ resource: string;
171
+ /** The shared verbs. */
172
+ verbs: string[] | null;
173
+ /** What the grantee is: person. */
174
+ grantee_kind: string;
175
+ /** The grantee person's id. */
176
+ grantee: string;
177
+ /** The id of the person who made the share. */
178
+ sharer: string;
179
+ /** The grantee person's display name. Presentation only: grantee stays the identity. Absent when tera has no name to show: a pending invitation has none, the directory has no person for the id, or the read failed. Render the name, else the address, else Someone; never the principal id. */
180
+ grantee_name?: string;
181
+ /** The grantee person's address, or a pending share's invitation address. Presentation only: grantee stays the identity. Absent when tera has no address to show: the directory has no person for the id, or the read failed. */
182
+ grantee_address?: string;
183
+ /** The sharer's display name. Presentation only: sharer stays the identity. Absent when tera has no name to show: the directory has no person for the id, or the read failed. Render the name, else the address, else Someone; never the principal id. */
184
+ sharer_name?: string;
185
+ /** The sharer's address. Presentation only: sharer stays the identity. Absent when tera has no address to show: the directory has no person for the id, or the read failed. */
186
+ sharer_address?: string;
187
+ /** The plugin principal that made the share for its sharer; absent when the sharer made it directly. */
188
+ created_via?: string;
189
+ /** When the share was made. */
190
+ created_at: string;
191
+ /** When the share stops deciding. */
192
+ expires_at: string;
193
+ /** When the share was last extended; absent if never. */
194
+ extended_at?: string;
195
+ /** Whether the share decides at least one of its verbs on the grantee's next request, computed from what decides now. */
196
+ deciding: boolean;
197
+ /** When deciding is false, the one reason why. Absent while the share decides. */
198
+ not_deciding?: "sharer_lost_access" | "sharing_disabled" | "installation_not_standing" | "verb_no_longer_shareable" | "pending_invitation";
199
+ };
200
+ /**
201
+ * Every type this module declares, mapped to the repository path of the schema
202
+ * it was generated from.
203
+ */
204
+ export declare const SHARES_SCHEMAS: {
205
+ readonly SharesEnded: "sdk/shares/schema/v1/ended.json";
206
+ readonly SharesExtendRequest: "sdk/shares/schema/v1/extend.request.json";
207
+ readonly SharesIdRequest: "sdk/shares/schema/v1/id.request.json";
208
+ readonly SharesList: "sdk/shares/schema/v1/list.json";
209
+ readonly SharesListRequest: "sdk/shares/schema/v1/list.request.json";
210
+ readonly SharesMakeRequest: "sdk/shares/schema/v1/make.request.json";
211
+ readonly SharesRefusalCode: "sdk/shares/schema/v1/refusal-code.json";
212
+ readonly SharesRefusal: "sdk/shares/schema/v1/refusal.json";
213
+ readonly SharesShare: "sdk/shares/schema/v1/share.json";
214
+ };
@@ -0,0 +1,17 @@
1
+ // Code generated by cmd/internal/genwebtypes from sdk/shares/schema/v1/; DO NOT EDIT.
2
+ // Regenerate with `make web-types` (ADR-162 D4 item 1).
3
+ /**
4
+ * Every type this module declares, mapped to the repository path of the schema
5
+ * it was generated from.
6
+ */
7
+ export const SHARES_SCHEMAS = {
8
+ SharesEnded: "sdk/shares/schema/v1/ended.json",
9
+ SharesExtendRequest: "sdk/shares/schema/v1/extend.request.json",
10
+ SharesIdRequest: "sdk/shares/schema/v1/id.request.json",
11
+ SharesList: "sdk/shares/schema/v1/list.json",
12
+ SharesListRequest: "sdk/shares/schema/v1/list.request.json",
13
+ SharesMakeRequest: "sdk/shares/schema/v1/make.request.json",
14
+ SharesRefusalCode: "sdk/shares/schema/v1/refusal-code.json",
15
+ SharesRefusal: "sdk/shares/schema/v1/refusal.json",
16
+ SharesShare: "sdk/shares/schema/v1/share.json",
17
+ };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The vocabulary of the event types within the `workorder` payload.
3
+ *
4
+ * Every member the daemon writes. A later level adds members and removes none (ADR-143 D3); how a consumer reads an unknown member is ADR-143 D13's.
5
+ *
6
+ * Schema: sdk/workorder/schema/events/v1/event-kind.workorder.json
7
+ */
8
+ export type WorkOrderEventKind = "cohort.set" | "off_tera.wake" | "relation.set" | "relation.removed" | "off_tera.taken" | "off_tera.progress" | "off_tera.reposted" | "off_tera.late_report" | "off_tera.checks_started" | "created" | "transitioned" | "acknowledged" | "retention_expired" | "edited" | "seat.reclaimed" | "claim.overdue" | "claim.unreadable" | "subject_claim.overridden" | "seat.cooling" | "seat.credential_held" | "member_credential.requested" | "member_credential.settled" | "seat.acquired" | "seat.runner_released" | "seat.meters_voided" | "step.binding" | "session.terminated" | "postcondition.verdict" | "parked_run.unreadable" | "parked_run.reclaimed" | "dispatch.settled_unobserved" | "parked_run.parked" | "parked_run.resumed" | "resume.refused" | "dispatch.salvaged" | "workspace.retired" | "dispatch.routed" | "session.lost" | "activity_partition.pinned" | "session.continuity" | "session.context_compacted" | "upstream.answer_forwarded" | "invocation.checkpoint" | "invocation.guidance" | "invocation.guidance.ack" | "invocation.reply" | "invocation.checkpoint.unreadable" | "invocation.guidance.unreadable" | "config_pin.unreadable" | "config_pin.repinned" | "type.followed" | "observation.scrubbed" | "observation.secret-shape-redacted" | "observation.promoted" | "observation.refuted" | "observation.purged" | "conversation.input_barrier" | "walk_resume.fell_back" | "store.ahead_of_binary" | "artifact.published" | "history.dropped" | "history.archived" | "seat.work_order_released" | "step.settled_late" | "step.reattached" | "relay.unrebuilt" | "references.recorded" | "attended.wall_reported" | "attended.signal" | "attended.attached" | "attended.detached" | "attended.handed_over" | "attended.handover_stranded";
9
+ /**
10
+ * `workorder` event payload (event/workorder).
11
+ *
12
+ * The payload published on every topic of the `workorder` family, generated from github.com/kottera/sdk/workorder.Envelope.
13
+ *
14
+ * Schema: sdk/workorder/schema/events/v1/payload.workorder.json
15
+ */
16
+ export type WorkOrderEventPayload = {
17
+ /** The event row's primary key: monotonic across every Work Order, and the replay cursor (ADR-078 D3). */
18
+ id: number;
19
+ /** The owning Work Order's UUIDv7. */
20
+ work_order_id: string;
21
+ /** The owning Work Order's namespaced type key (<vault>/work-order-types/<stem>); absent only on an event with no Work Order row (ADR-142 D3). */
22
+ work_order_type?: string;
23
+ /** The event timestamp, RFC 3339 with nanosecond precision, UTC. */
24
+ ts: string;
25
+ /** Who caused the event, as stored. The shape written is an EventActor; a row written before a field existed lacks that key. */
26
+ actor?: unknown;
27
+ /** The event's type within the family; a member of the event-kind vocabulary, and a value this version does not know is kept verbatim (ADR-143 D13). */
28
+ kind: string;
29
+ /** The state before the transition; absent on created. */
30
+ from_state?: string;
31
+ /** The state after the transition. */
32
+ to_state?: string;
33
+ /** The optional human-readable reason for the transition. */
34
+ reason?: string;
35
+ /** The per-event payload as stored, whose shape the event kind decides. */
36
+ payload?: unknown;
37
+ /** The persisted-schema marker of the envelope. */
38
+ schema_version: string;
39
+ };
40
+ /**
41
+ * Every type this module declares, mapped to the repository path of the schema
42
+ * it was generated from.
43
+ */
44
+ export declare const WORK_ORDER_EVENT_SCHEMAS: {
45
+ readonly WorkOrderEventKind: "sdk/workorder/schema/events/v1/event-kind.workorder.json";
46
+ readonly WorkOrderEventPayload: "sdk/workorder/schema/events/v1/payload.workorder.json";
47
+ };
@@ -0,0 +1,10 @@
1
+ // Code generated by cmd/internal/genwebtypes from sdk/workorder/schema/events/v1/; DO NOT EDIT.
2
+ // Regenerate with `make web-types` (ADR-162 D4 item 1).
3
+ /**
4
+ * Every type this module declares, mapped to the repository path of the schema
5
+ * it was generated from.
6
+ */
7
+ export const WORK_ORDER_EVENT_SCHEMAS = {
8
+ WorkOrderEventKind: "sdk/workorder/schema/events/v1/event-kind.workorder.json",
9
+ WorkOrderEventPayload: "sdk/workorder/schema/events/v1/payload.workorder.json",
10
+ };