@openvtc/trust-tasks 0.21.13 → 0.21.14

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 (60) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/_shared/components.d.ts +91 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/_shared/0.3/session.d.ts +16 -0
  5. package/dist/auth/_shared/0.3/session.d.ts.map +1 -0
  6. package/dist/auth/_shared/0.3/session.js +6 -0
  7. package/dist/auth/_shared/0.3/session.js.map +1 -0
  8. package/dist/auth/authenticate/0.3/payload.d.ts +852 -0
  9. package/dist/auth/authenticate/0.3/payload.d.ts.map +1 -0
  10. package/dist/auth/authenticate/0.3/payload.js +442 -0
  11. package/dist/auth/authenticate/0.3/payload.js.map +1 -0
  12. package/dist/auth/refresh/0.2/payload.d.ts +729 -0
  13. package/dist/auth/refresh/0.2/payload.d.ts.map +1 -0
  14. package/dist/auth/refresh/0.2/payload.js +392 -0
  15. package/dist/auth/refresh/0.2/payload.js.map +1 -0
  16. package/dist/git-ns/_shared/0.5/git-ns.d.ts +16 -0
  17. package/dist/git-ns/_shared/0.5/git-ns.d.ts.map +1 -0
  18. package/dist/git-ns/_shared/0.5/git-ns.js +6 -0
  19. package/dist/git-ns/_shared/0.5/git-ns.js.map +1 -0
  20. package/dist/git-ns/account/list/0.1/payload.d.ts +598 -0
  21. package/dist/git-ns/account/list/0.1/payload.d.ts.map +1 -0
  22. package/dist/git-ns/account/list/0.1/payload.js +317 -0
  23. package/dist/git-ns/account/list/0.1/payload.js.map +1 -0
  24. package/dist/git-ns/activity/list/0.1/payload.d.ts +642 -0
  25. package/dist/git-ns/activity/list/0.1/payload.d.ts.map +1 -0
  26. package/dist/git-ns/activity/list/0.1/payload.js +343 -0
  27. package/dist/git-ns/activity/list/0.1/payload.js.map +1 -0
  28. package/dist/git-ns/bridge/job/list/0.1/payload.d.ts +697 -0
  29. package/dist/git-ns/bridge/job/list/0.1/payload.d.ts.map +1 -0
  30. package/dist/git-ns/bridge/job/list/0.1/payload.js +386 -0
  31. package/dist/git-ns/bridge/job/list/0.1/payload.js.map +1 -0
  32. package/dist/git-ns/projection/show/0.1/payload.d.ts +705 -0
  33. package/dist/git-ns/projection/show/0.1/payload.d.ts.map +1 -0
  34. package/dist/git-ns/projection/show/0.1/payload.js +377 -0
  35. package/dist/git-ns/projection/show/0.1/payload.js.map +1 -0
  36. package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts +862 -0
  37. package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts.map +1 -0
  38. package/dist/git-ns/right/issued-by-departed/0.1/payload.js +487 -0
  39. package/dist/git-ns/right/issued-by-departed/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/right/list/0.1/payload.d.ts +773 -0
  41. package/dist/git-ns/right/list/0.1/payload.d.ts.map +1 -0
  42. package/dist/git-ns/right/list/0.1/payload.js +439 -0
  43. package/dist/git-ns/right/list/0.1/payload.js.map +1 -0
  44. package/dist/index.d.ts +10 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +10 -0
  47. package/dist/index.js.map +1 -1
  48. package/package.json +1 -1
  49. package/src/_shared/components.ts +91 -0
  50. package/src/auth/_shared/0.3/session.ts +17 -0
  51. package/src/auth/authenticate/0.3/payload.ts +527 -0
  52. package/src/auth/refresh/0.2/payload.ts +444 -0
  53. package/src/git-ns/_shared/0.5/git-ns.ts +17 -0
  54. package/src/git-ns/account/list/0.1/payload.ts +392 -0
  55. package/src/git-ns/activity/list/0.1/payload.ts +430 -0
  56. package/src/git-ns/bridge/job/list/0.1/payload.ts +490 -0
  57. package/src/git-ns/projection/show/0.1/payload.ts +479 -0
  58. package/src/git-ns/right/issued-by-departed/0.1/payload.ts +550 -0
  59. package/src/git-ns/right/list/0.1/payload.ts +493 -0
  60. package/src/index.ts +10 -0
@@ -0,0 +1,392 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/account/list/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Did_GitNsV0_3 as Did, Ext, ForgeAccount, ForgeHost, ForgeId } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A community administrator lists every member's linked forge accounts, community-wide. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface GitNamespacesListLinkedForgeAccountsPayload {
13
+ /**
14
+ * Only this member's linked accounts. Absent: every member.
15
+ */
16
+ member?: Did;
17
+ /**
18
+ * Only accounts linked on this forge. Absent: every forge.
19
+ */
20
+ forge?: ForgeHost;
21
+ /**
22
+ * Opaque continuation token from a previous response's `nextCursor`. A consumer supplying a `cursor` MUST NOT also change `member` or `forge` from the request that produced it — start a fresh query instead.
23
+ */
24
+ cursor?: string;
25
+ /**
26
+ * Maximum accounts to return in this page. A VTC clamps to 1..=500 (default 100).
27
+ */
28
+ limit?: number;
29
+ ext?: Ext;
30
+ }
31
+ /**
32
+ * The matching links, ordered by member then forge.
33
+ */
34
+ export interface GitNamespacesListLinkedForgeAccountsResponsePayload {
35
+ /**
36
+ * Links matching `member` and `forge`, ordered by `member` then `account.forge`. At most one per member per forge.
37
+ */
38
+ accounts: AccountRow[];
39
+ /**
40
+ * Continuation token for the next page, or `null` when this is the last.
41
+ */
42
+ nextCursor?: string | null;
43
+ ext?: Ext;
44
+ }
45
+ /**
46
+ * One member's account on one forge, as linked through git-ns/account/link.
47
+ */
48
+ export interface AccountRow {
49
+ /**
50
+ * The member the account is linked to.
51
+ */
52
+ member: Did;
53
+ /**
54
+ * The linked account. `id` is authoritative; `login` is as the forge last reported it — display only.
55
+ */
56
+ account: ForgeAccount;
57
+ /**
58
+ * When the VTC recorded the link. Absent for a link recorded before this member was tracked.
59
+ */
60
+ linkedAt?: string;
61
+ /**
62
+ * Whether `member` is still a current member. One whose access lapsed keeps the link — nobody else may link the account — but it projects no forge role, and a forge role it holds cannot be adopted as a right.
63
+ */
64
+ memberCurrent: boolean;
65
+ }
66
+
67
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
68
+ export type { Did, Ext, ForgeAccount, ForgeHost, ForgeId };
69
+
70
+ /** Trust Task type URI. */
71
+ export const TYPE_URI = "https://trusttasks.org/spec/git-ns/account/list/0.1" as const;
72
+
73
+ /** Stable alias for this specification's request payload shape. */
74
+ export type Payload = GitNamespacesListLinkedForgeAccountsPayload;
75
+
76
+ /** Trust Task response type URI (request type URI + "#response"). */
77
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/account/list/0.1#response" as const;
78
+
79
+ /** Stable alias for this specification's success-response payload shape. */
80
+ export type Response = GitNamespacesListLinkedForgeAccountsResponsePayload;
81
+
82
+ /**
83
+ * This specification's payload schema, as a value.
84
+ *
85
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
86
+ * rather than only as a `.json` file because TypeScript types are erased
87
+ * at runtime: without a schema a consumer has nothing to validate, and
88
+ * every REQUIRED payload member is optional in practice. Cross-file
89
+ * `$ref`s are already inlined, so it needs no resolver.
90
+ */
91
+ export const PAYLOAD_SCHEMA = {
92
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
93
+ "$id": "https://trusttasks.org/spec/git-ns/account/list/0.1",
94
+ "title": "Git Namespaces — List Linked Forge Accounts — payload",
95
+ "description": "A community administrator lists every member's linked forge accounts, community-wide. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "properties": {
99
+ "member": {
100
+ "$ref": "#/$defs/Did",
101
+ "description": "Only this member's linked accounts. Absent: every member."
102
+ },
103
+ "forge": {
104
+ "$ref": "#/$defs/ForgeHost",
105
+ "description": "Only accounts linked on this forge. Absent: every forge."
106
+ },
107
+ "cursor": {
108
+ "type": "string",
109
+ "description": "Opaque continuation token from a previous response's `nextCursor`. A consumer supplying a `cursor` MUST NOT also change `member` or `forge` from the request that produced it — start a fresh query instead."
110
+ },
111
+ "limit": {
112
+ "type": "integer",
113
+ "minimum": 1,
114
+ "maximum": 500,
115
+ "description": "Maximum accounts to return in this page. A VTC clamps to 1..=500 (default 100)."
116
+ },
117
+ "ext": {
118
+ "$ref": "#/$defs/Ext"
119
+ }
120
+ },
121
+ "$defs": {
122
+ "AccountRow": {
123
+ "title": "AccountRow",
124
+ "description": "One member's account on one forge, as linked through git-ns/account/link.",
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": [
128
+ "member",
129
+ "account",
130
+ "memberCurrent"
131
+ ],
132
+ "properties": {
133
+ "member": {
134
+ "$ref": "#/$defs/Did",
135
+ "description": "The member the account is linked to."
136
+ },
137
+ "account": {
138
+ "$ref": "#/$defs/ForgeAccount",
139
+ "description": "The linked account. `id` is authoritative; `login` is as the forge last reported it — display only."
140
+ },
141
+ "linkedAt": {
142
+ "type": "string",
143
+ "format": "date-time",
144
+ "description": "When the VTC recorded the link. Absent for a link recorded before this member was tracked."
145
+ },
146
+ "memberCurrent": {
147
+ "type": "boolean",
148
+ "description": "Whether `member` is still a current member. One whose access lapsed keeps the link — nobody else may link the account — but it projects no forge role, and a forge role it holds cannot be adopted as a right."
149
+ }
150
+ }
151
+ },
152
+ "Response": {
153
+ "$anchor": "response",
154
+ "title": "Git Namespaces — List Linked Forge Accounts — response payload",
155
+ "description": "The matching links, ordered by member then forge.",
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": [
159
+ "accounts"
160
+ ],
161
+ "properties": {
162
+ "accounts": {
163
+ "type": "array",
164
+ "items": {
165
+ "$ref": "#/$defs/AccountRow"
166
+ },
167
+ "description": "Links matching `member` and `forge`, ordered by `member` then `account.forge`. At most one per member per forge."
168
+ },
169
+ "nextCursor": {
170
+ "type": [
171
+ "string",
172
+ "null"
173
+ ],
174
+ "description": "Continuation token for the next page, or `null` when this is the last."
175
+ },
176
+ "ext": {
177
+ "$ref": "#/$defs/Ext"
178
+ }
179
+ }
180
+ },
181
+ "Ext": {
182
+ "title": "Ext",
183
+ "description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
184
+ "type": "object",
185
+ "minProperties": 1,
186
+ "additionalProperties": true,
187
+ "propertyNames": {
188
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
189
+ }
190
+ },
191
+ "ForgeAccount": {
192
+ "title": "ForgeAccount",
193
+ "description": "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.",
194
+ "type": "object",
195
+ "additionalProperties": false,
196
+ "required": [
197
+ "forge",
198
+ "id",
199
+ "login"
200
+ ],
201
+ "properties": {
202
+ "forge": {
203
+ "$ref": "#/$defs/ForgeHost"
204
+ },
205
+ "id": {
206
+ "$ref": "#/$defs/ForgeId"
207
+ },
208
+ "login": {
209
+ "type": "string",
210
+ "minLength": 1,
211
+ "maxLength": 100,
212
+ "description": "The account's current login, as the forge reported it when last seen. Display only."
213
+ }
214
+ }
215
+ },
216
+ "ForgeId": {
217
+ "title": "ForgeId",
218
+ "description": "An identifier the forge itself assigns — a repository id, a user or organisation id — carried as a string so a forge whose ids are not numbers needs no new version. GitHub and Forgejo ids are decimal integers written as strings (`\"812736451\"`). Unlike a name, it survives renames and transfers, which is why rights and bindings are keyed by it.",
219
+ "type": "string",
220
+ "minLength": 1,
221
+ "maxLength": 64
222
+ },
223
+ "ForgeHost": {
224
+ "title": "ForgeHost",
225
+ "description": "The lowercased DNS host of a forge: `github.com`, a GitHub Enterprise Server host, `codeberg.org`, or a self-hosted Forgejo instance such as `git.example.org`. No scheme, no port, no path. The host is a segment of every resource, so a right never crosses forges.",
226
+ "type": "string",
227
+ "minLength": 3,
228
+ "maxLength": 253,
229
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
230
+ },
231
+ "Did": {
232
+ "title": "Did",
233
+ "description": "A bare DID in the W3C DID Core syntax (§3.1): `did:`, a method name of lowercase letters and digits, `:`, and a method-specific id of colon-separated segments drawn from `A-Z a-z 0-9 . - _` and percent-encoded octets, the last segment non-empty. A DID URL is not a DID: no path, query or fragment (`/`, `?`, `#`), so a verification-method id such as `did:key:z6Mk…#z6Mk…` is refused. Compared by exact string equality — no case folding or percent-decoding. A consumer MUST still treat the value as data: the pattern keeps shell metacharacters, whitespace and quotes out of the wire form, but it does not make a DID safe to splice into a command or markup.",
234
+ "type": "string",
235
+ "maxLength": 2048,
236
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
237
+ }
238
+ }
239
+ } as const;
240
+
241
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
242
+ export const RESPONSE_PAYLOAD_SCHEMA = {
243
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
244
+ "$ref": "#/$defs/Response",
245
+ "$defs": {
246
+ "AccountRow": {
247
+ "title": "AccountRow",
248
+ "description": "One member's account on one forge, as linked through git-ns/account/link.",
249
+ "type": "object",
250
+ "additionalProperties": false,
251
+ "required": [
252
+ "member",
253
+ "account",
254
+ "memberCurrent"
255
+ ],
256
+ "properties": {
257
+ "member": {
258
+ "$ref": "#/$defs/Did",
259
+ "description": "The member the account is linked to."
260
+ },
261
+ "account": {
262
+ "$ref": "#/$defs/ForgeAccount",
263
+ "description": "The linked account. `id` is authoritative; `login` is as the forge last reported it — display only."
264
+ },
265
+ "linkedAt": {
266
+ "type": "string",
267
+ "format": "date-time",
268
+ "description": "When the VTC recorded the link. Absent for a link recorded before this member was tracked."
269
+ },
270
+ "memberCurrent": {
271
+ "type": "boolean",
272
+ "description": "Whether `member` is still a current member. One whose access lapsed keeps the link — nobody else may link the account — but it projects no forge role, and a forge role it holds cannot be adopted as a right."
273
+ }
274
+ }
275
+ },
276
+ "Response": {
277
+ "$anchor": "response",
278
+ "title": "Git Namespaces — List Linked Forge Accounts — response payload",
279
+ "description": "The matching links, ordered by member then forge.",
280
+ "type": "object",
281
+ "additionalProperties": false,
282
+ "required": [
283
+ "accounts"
284
+ ],
285
+ "properties": {
286
+ "accounts": {
287
+ "type": "array",
288
+ "items": {
289
+ "$ref": "#/$defs/AccountRow"
290
+ },
291
+ "description": "Links matching `member` and `forge`, ordered by `member` then `account.forge`. At most one per member per forge."
292
+ },
293
+ "nextCursor": {
294
+ "type": [
295
+ "string",
296
+ "null"
297
+ ],
298
+ "description": "Continuation token for the next page, or `null` when this is the last."
299
+ },
300
+ "ext": {
301
+ "$ref": "#/$defs/Ext"
302
+ }
303
+ }
304
+ },
305
+ "Ext": {
306
+ "title": "Ext",
307
+ "description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
308
+ "type": "object",
309
+ "minProperties": 1,
310
+ "additionalProperties": true,
311
+ "propertyNames": {
312
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
313
+ }
314
+ },
315
+ "ForgeAccount": {
316
+ "title": "ForgeAccount",
317
+ "description": "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.",
318
+ "type": "object",
319
+ "additionalProperties": false,
320
+ "required": [
321
+ "forge",
322
+ "id",
323
+ "login"
324
+ ],
325
+ "properties": {
326
+ "forge": {
327
+ "$ref": "#/$defs/ForgeHost"
328
+ },
329
+ "id": {
330
+ "$ref": "#/$defs/ForgeId"
331
+ },
332
+ "login": {
333
+ "type": "string",
334
+ "minLength": 1,
335
+ "maxLength": 100,
336
+ "description": "The account's current login, as the forge reported it when last seen. Display only."
337
+ }
338
+ }
339
+ },
340
+ "ForgeId": {
341
+ "title": "ForgeId",
342
+ "description": "An identifier the forge itself assigns — a repository id, a user or organisation id — carried as a string so a forge whose ids are not numbers needs no new version. GitHub and Forgejo ids are decimal integers written as strings (`\"812736451\"`). Unlike a name, it survives renames and transfers, which is why rights and bindings are keyed by it.",
343
+ "type": "string",
344
+ "minLength": 1,
345
+ "maxLength": 64
346
+ },
347
+ "ForgeHost": {
348
+ "title": "ForgeHost",
349
+ "description": "The lowercased DNS host of a forge: `github.com`, a GitHub Enterprise Server host, `codeberg.org`, or a self-hosted Forgejo instance such as `git.example.org`. No scheme, no port, no path. The host is a segment of every resource, so a right never crosses forges.",
350
+ "type": "string",
351
+ "minLength": 3,
352
+ "maxLength": 253,
353
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
354
+ },
355
+ "Did": {
356
+ "title": "Did",
357
+ "description": "A bare DID in the W3C DID Core syntax (§3.1): `did:`, a method name of lowercase letters and digits, `:`, and a method-specific id of colon-separated segments drawn from `A-Z a-z 0-9 . - _` and percent-encoded octets, the last segment non-empty. A DID URL is not a DID: no path, query or fragment (`/`, `?`, `#`), so a verification-method id such as `did:key:z6Mk…#z6Mk…` is refused. Compared by exact string equality — no case folding or percent-decoding. A consumer MUST still treat the value as data: the pattern keeps shell metacharacters, whitespace and quotes out of the wire form, but it does not make a DID safe to splice into a command or markup.",
358
+ "type": "string",
359
+ "maxLength": 2048,
360
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
361
+ }
362
+ }
363
+ } as const;
364
+
365
+ /**
366
+ * SPEC.md §7.2 policy for the request variant, from this specification's
367
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
368
+ * per-specification and cannot be derived from the document alone, and
369
+ * item 2 needs the schema this carries.
370
+ */
371
+ export const SPEC = {
372
+ typeUri: TYPE_URI,
373
+ isBearer: false,
374
+ isProofRequired: true,
375
+ isRecipientRequired: true,
376
+ isIssuedAtRequired: false,
377
+ payloadSchema: PAYLOAD_SCHEMA,
378
+ } as const;
379
+
380
+ /**
381
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
382
+ * tracks the *issuer* party's requirement because a response swaps the
383
+ * parties (§7.3 item 5).
384
+ */
385
+ export const RESPONSE_SPEC = {
386
+ typeUri: RESPONSE_TYPE_URI,
387
+ isBearer: false,
388
+ isProofRequired: true,
389
+ isRecipientRequired: true,
390
+ isIssuedAtRequired: false,
391
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
392
+ } as const;