@openvtc/trust-tasks 0.20.2 → 0.20.3

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 (85) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/_shared/components.d.ts +175 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/git-ns/_shared/0.1/git-ns.d.ts +16 -0
  5. package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -0
  6. package/dist/git-ns/_shared/0.1/git-ns.js +6 -0
  7. package/dist/git-ns/_shared/0.1/git-ns.js.map +1 -0
  8. package/dist/git-ns/account/link/0.1/payload.d.ts +355 -0
  9. package/dist/git-ns/account/link/0.1/payload.d.ts.map +1 -0
  10. package/dist/git-ns/account/link/0.1/payload.js +192 -0
  11. package/dist/git-ns/account/link/0.1/payload.js.map +1 -0
  12. package/dist/git-ns/account/link-status/0.1/payload.d.ts +403 -0
  13. package/dist/git-ns/account/link-status/0.1/payload.d.ts.map +1 -0
  14. package/dist/git-ns/account/link-status/0.1/payload.js +234 -0
  15. package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -0
  16. package/dist/git-ns/bridge/event/0.1/payload.d.ts +1348 -0
  17. package/dist/git-ns/bridge/event/0.1/payload.d.ts.map +1 -0
  18. package/dist/git-ns/bridge/event/0.1/payload.js +785 -0
  19. package/dist/git-ns/bridge/event/0.1/payload.js.map +1 -0
  20. package/dist/git-ns/bridge/job/0.1/payload.d.ts +1044 -0
  21. package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -0
  22. package/dist/git-ns/bridge/job/0.1/payload.js +564 -0
  23. package/dist/git-ns/bridge/job/0.1/payload.js.map +1 -0
  24. package/dist/git-ns/bridge/result/0.1/payload.d.ts +462 -0
  25. package/dist/git-ns/bridge/result/0.1/payload.d.ts.map +1 -0
  26. package/dist/git-ns/bridge/result/0.1/payload.js +248 -0
  27. package/dist/git-ns/bridge/result/0.1/payload.js.map +1 -0
  28. package/dist/git-ns/namespace/bind/0.1/payload.d.ts +547 -0
  29. package/dist/git-ns/namespace/bind/0.1/payload.d.ts.map +1 -0
  30. package/dist/git-ns/namespace/bind/0.1/payload.js +322 -0
  31. package/dist/git-ns/namespace/bind/0.1/payload.js.map +1 -0
  32. package/dist/git-ns/namespace/unbind/0.1/payload.d.ts +300 -0
  33. package/dist/git-ns/namespace/unbind/0.1/payload.d.ts.map +1 -0
  34. package/dist/git-ns/namespace/unbind/0.1/payload.js +168 -0
  35. package/dist/git-ns/namespace/unbind/0.1/payload.js.map +1 -0
  36. package/dist/git-ns/repo/adopt/0.1/payload.d.ts +962 -0
  37. package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -0
  38. package/dist/git-ns/repo/adopt/0.1/payload.js +583 -0
  39. package/dist/git-ns/repo/adopt/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/repo/archive/0.1/payload.d.ts +959 -0
  41. package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -0
  42. package/dist/git-ns/repo/archive/0.1/payload.js +584 -0
  43. package/dist/git-ns/repo/archive/0.1/payload.js.map +1 -0
  44. package/dist/git-ns/repo/create/0.1/payload.d.ts +1074 -0
  45. package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -0
  46. package/dist/git-ns/repo/create/0.1/payload.js +636 -0
  47. package/dist/git-ns/repo/create/0.1/payload.js.map +1 -0
  48. package/dist/git-ns/repo/transfer/0.1/payload.d.ts +947 -0
  49. package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -0
  50. package/dist/git-ns/repo/transfer/0.1/payload.js +577 -0
  51. package/dist/git-ns/repo/transfer/0.1/payload.js.map +1 -0
  52. package/dist/git-ns/right/grant/0.1/payload.d.ts +506 -0
  53. package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -0
  54. package/dist/git-ns/right/grant/0.1/payload.js +289 -0
  55. package/dist/git-ns/right/grant/0.1/payload.js.map +1 -0
  56. package/dist/git-ns/right/revoke/0.1/payload.d.ts +492 -0
  57. package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -0
  58. package/dist/git-ns/right/revoke/0.1/payload.js +284 -0
  59. package/dist/git-ns/right/revoke/0.1/payload.js.map +1 -0
  60. package/dist/git-ns/view/0.1/payload.d.ts +1407 -0
  61. package/dist/git-ns/view/0.1/payload.d.ts.map +1 -0
  62. package/dist/git-ns/view/0.1/payload.js +860 -0
  63. package/dist/git-ns/view/0.1/payload.js.map +1 -0
  64. package/dist/index.d.ts +15 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +15 -0
  67. package/dist/index.js.map +1 -1
  68. package/package.json +1 -1
  69. package/src/_shared/components.ts +181 -0
  70. package/src/git-ns/_shared/0.1/git-ns.ts +17 -0
  71. package/src/git-ns/account/link/0.1/payload.ts +242 -0
  72. package/src/git-ns/account/link-status/0.1/payload.ts +276 -0
  73. package/src/git-ns/bridge/event/0.1/payload.ts +902 -0
  74. package/src/git-ns/bridge/job/0.1/payload.ts +676 -0
  75. package/src/git-ns/bridge/result/0.1/payload.ts +321 -0
  76. package/src/git-ns/namespace/bind/0.1/payload.ts +374 -0
  77. package/src/git-ns/namespace/unbind/0.1/payload.ts +211 -0
  78. package/src/git-ns/repo/adopt/0.1/payload.ts +628 -0
  79. package/src/git-ns/repo/archive/0.1/payload.ts +626 -0
  80. package/src/git-ns/repo/create/0.1/payload.ts +689 -0
  81. package/src/git-ns/repo/transfer/0.1/payload.ts +619 -0
  82. package/src/git-ns/right/grant/0.1/payload.ts +340 -0
  83. package/src/git-ns/right/revoke/0.1/payload.ts +331 -0
  84. package/src/git-ns/view/0.1/payload.ts +906 -0
  85. package/src/index.ts +15 -0
@@ -0,0 +1,355 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/account/link/0.1/payload.schema.json
4
+ */
5
+ import type { Ext, ForgeHost } from "../../../../_shared/components.js";
6
+ /**
7
+ * A member begins linking their account on a forge to their DID. The response carries where the member goes to authorise it; the member then polls git-ns/account/link-status.
8
+ */
9
+ export interface GitNamespacesLinkForgeAccountPayload {
10
+ /**
11
+ * The forge whose account to link.
12
+ */
13
+ forge: ForgeHost;
14
+ ext?: Ext;
15
+ }
16
+ /**
17
+ * Where to authorise the link.
18
+ */
19
+ export interface GitNamespacesLinkForgeAccountResponsePayload {
20
+ /**
21
+ * Identifies this attempt for git-ns/account/link-status. Opaque; meaningful only to the member who began it.
22
+ */
23
+ linkId: string;
24
+ /**
25
+ * Where the member authorises the link: the device-code entry page (GitHub), or the forge's authorisation page (Forgejo, authorisation code with PKCE).
26
+ */
27
+ url: string;
28
+ /**
29
+ * The code the member types at `url`, for a forge that uses a device flow. Absent otherwise.
30
+ */
31
+ userCode?: string;
32
+ /**
33
+ * When this attempt lapses if not completed.
34
+ */
35
+ expiresAt: string;
36
+ ext?: Ext;
37
+ }
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { Ext, ForgeHost };
40
+ /** Trust Task type URI. */
41
+ export declare const TYPE_URI: "https://trusttasks.org/spec/git-ns/account/link/0.1";
42
+ /** Stable alias for this specification's request payload shape. */
43
+ export type Payload = GitNamespacesLinkForgeAccountPayload;
44
+ /** Trust Task response type URI (request type URI + "#response"). */
45
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/git-ns/account/link/0.1#response";
46
+ /** Stable alias for this specification's success-response payload shape. */
47
+ export type Response = GitNamespacesLinkForgeAccountResponsePayload;
48
+ /**
49
+ * This specification's payload schema, as a value.
50
+ *
51
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
52
+ * rather than only as a `.json` file because TypeScript types are erased
53
+ * at runtime: without a schema a consumer has nothing to validate, and
54
+ * every REQUIRED payload member is optional in practice. Cross-file
55
+ * `$ref`s are already inlined, so it needs no resolver.
56
+ */
57
+ export declare const PAYLOAD_SCHEMA: {
58
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
59
+ readonly $id: "https://trusttasks.org/spec/git-ns/account/link/0.1";
60
+ readonly title: "Git Namespaces — Link Forge Account — payload";
61
+ readonly description: "A member begins linking their account on a forge to their DID. The response carries where the member goes to authorise it; the member then polls git-ns/account/link-status.";
62
+ readonly type: "object";
63
+ readonly additionalProperties: false;
64
+ readonly required: readonly ["forge"];
65
+ readonly properties: {
66
+ readonly forge: {
67
+ readonly $ref: "#/$defs/ForgeHost";
68
+ readonly description: "The forge whose account to link.";
69
+ };
70
+ readonly ext: {
71
+ readonly $ref: "#/$defs/Ext";
72
+ };
73
+ };
74
+ readonly $defs: {
75
+ readonly Response: {
76
+ readonly $anchor: "response";
77
+ readonly title: "Git Namespaces — Link Forge Account — response payload";
78
+ readonly description: "Where to authorise the link.";
79
+ readonly type: "object";
80
+ readonly additionalProperties: false;
81
+ readonly required: readonly ["linkId", "url", "expiresAt"];
82
+ readonly properties: {
83
+ readonly linkId: {
84
+ readonly type: "string";
85
+ readonly minLength: 1;
86
+ readonly maxLength: 128;
87
+ readonly description: "Identifies this attempt for git-ns/account/link-status. Opaque; meaningful only to the member who began it.";
88
+ };
89
+ readonly url: {
90
+ readonly type: "string";
91
+ readonly format: "uri";
92
+ readonly maxLength: 2048;
93
+ readonly pattern: "^https://";
94
+ readonly description: "Where the member authorises the link: the device-code entry page (GitHub), or the forge's authorisation page (Forgejo, authorisation code with PKCE).";
95
+ };
96
+ readonly userCode: {
97
+ readonly type: "string";
98
+ readonly minLength: 1;
99
+ readonly maxLength: 64;
100
+ readonly description: "The code the member types at `url`, for a forge that uses a device flow. Absent otherwise.";
101
+ };
102
+ readonly expiresAt: {
103
+ readonly type: "string";
104
+ readonly format: "date-time";
105
+ readonly description: "When this attempt lapses if not completed.";
106
+ };
107
+ readonly ext: {
108
+ readonly $ref: "#/$defs/Ext";
109
+ };
110
+ };
111
+ };
112
+ readonly Ext: {
113
+ readonly title: "Ext";
114
+ readonly 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.";
115
+ readonly type: "object";
116
+ readonly minProperties: 1;
117
+ readonly additionalProperties: true;
118
+ readonly propertyNames: {
119
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
120
+ };
121
+ };
122
+ readonly ForgeHost: {
123
+ readonly title: "ForgeHost";
124
+ readonly 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.";
125
+ readonly type: "string";
126
+ readonly minLength: 3;
127
+ readonly maxLength: 253;
128
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
129
+ };
130
+ };
131
+ };
132
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
133
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
134
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
135
+ readonly $ref: "#/$defs/Response";
136
+ readonly $defs: {
137
+ readonly Response: {
138
+ readonly $anchor: "response";
139
+ readonly title: "Git Namespaces — Link Forge Account — response payload";
140
+ readonly description: "Where to authorise the link.";
141
+ readonly type: "object";
142
+ readonly additionalProperties: false;
143
+ readonly required: readonly ["linkId", "url", "expiresAt"];
144
+ readonly properties: {
145
+ readonly linkId: {
146
+ readonly type: "string";
147
+ readonly minLength: 1;
148
+ readonly maxLength: 128;
149
+ readonly description: "Identifies this attempt for git-ns/account/link-status. Opaque; meaningful only to the member who began it.";
150
+ };
151
+ readonly url: {
152
+ readonly type: "string";
153
+ readonly format: "uri";
154
+ readonly maxLength: 2048;
155
+ readonly pattern: "^https://";
156
+ readonly description: "Where the member authorises the link: the device-code entry page (GitHub), or the forge's authorisation page (Forgejo, authorisation code with PKCE).";
157
+ };
158
+ readonly userCode: {
159
+ readonly type: "string";
160
+ readonly minLength: 1;
161
+ readonly maxLength: 64;
162
+ readonly description: "The code the member types at `url`, for a forge that uses a device flow. Absent otherwise.";
163
+ };
164
+ readonly expiresAt: {
165
+ readonly type: "string";
166
+ readonly format: "date-time";
167
+ readonly description: "When this attempt lapses if not completed.";
168
+ };
169
+ readonly ext: {
170
+ readonly $ref: "#/$defs/Ext";
171
+ };
172
+ };
173
+ };
174
+ readonly Ext: {
175
+ readonly title: "Ext";
176
+ readonly 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.";
177
+ readonly type: "object";
178
+ readonly minProperties: 1;
179
+ readonly additionalProperties: true;
180
+ readonly propertyNames: {
181
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
182
+ };
183
+ };
184
+ readonly ForgeHost: {
185
+ readonly title: "ForgeHost";
186
+ readonly 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.";
187
+ readonly type: "string";
188
+ readonly minLength: 3;
189
+ readonly maxLength: 253;
190
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
191
+ };
192
+ };
193
+ };
194
+ /**
195
+ * SPEC.md §7.2 policy for the request variant, from this specification's
196
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
197
+ * per-specification and cannot be derived from the document alone, and
198
+ * item 2 needs the schema this carries.
199
+ */
200
+ export declare const SPEC: {
201
+ readonly typeUri: "https://trusttasks.org/spec/git-ns/account/link/0.1";
202
+ readonly isBearer: false;
203
+ readonly isProofRequired: true;
204
+ readonly isRecipientRequired: true;
205
+ readonly isIssuedAtRequired: true;
206
+ readonly payloadSchema: {
207
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
208
+ readonly $id: "https://trusttasks.org/spec/git-ns/account/link/0.1";
209
+ readonly title: "Git Namespaces — Link Forge Account — payload";
210
+ readonly description: "A member begins linking their account on a forge to their DID. The response carries where the member goes to authorise it; the member then polls git-ns/account/link-status.";
211
+ readonly type: "object";
212
+ readonly additionalProperties: false;
213
+ readonly required: readonly ["forge"];
214
+ readonly properties: {
215
+ readonly forge: {
216
+ readonly $ref: "#/$defs/ForgeHost";
217
+ readonly description: "The forge whose account to link.";
218
+ };
219
+ readonly ext: {
220
+ readonly $ref: "#/$defs/Ext";
221
+ };
222
+ };
223
+ readonly $defs: {
224
+ readonly Response: {
225
+ readonly $anchor: "response";
226
+ readonly title: "Git Namespaces — Link Forge Account — response payload";
227
+ readonly description: "Where to authorise the link.";
228
+ readonly type: "object";
229
+ readonly additionalProperties: false;
230
+ readonly required: readonly ["linkId", "url", "expiresAt"];
231
+ readonly properties: {
232
+ readonly linkId: {
233
+ readonly type: "string";
234
+ readonly minLength: 1;
235
+ readonly maxLength: 128;
236
+ readonly description: "Identifies this attempt for git-ns/account/link-status. Opaque; meaningful only to the member who began it.";
237
+ };
238
+ readonly url: {
239
+ readonly type: "string";
240
+ readonly format: "uri";
241
+ readonly maxLength: 2048;
242
+ readonly pattern: "^https://";
243
+ readonly description: "Where the member authorises the link: the device-code entry page (GitHub), or the forge's authorisation page (Forgejo, authorisation code with PKCE).";
244
+ };
245
+ readonly userCode: {
246
+ readonly type: "string";
247
+ readonly minLength: 1;
248
+ readonly maxLength: 64;
249
+ readonly description: "The code the member types at `url`, for a forge that uses a device flow. Absent otherwise.";
250
+ };
251
+ readonly expiresAt: {
252
+ readonly type: "string";
253
+ readonly format: "date-time";
254
+ readonly description: "When this attempt lapses if not completed.";
255
+ };
256
+ readonly ext: {
257
+ readonly $ref: "#/$defs/Ext";
258
+ };
259
+ };
260
+ };
261
+ readonly Ext: {
262
+ readonly title: "Ext";
263
+ readonly 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.";
264
+ readonly type: "object";
265
+ readonly minProperties: 1;
266
+ readonly additionalProperties: true;
267
+ readonly propertyNames: {
268
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
269
+ };
270
+ };
271
+ readonly ForgeHost: {
272
+ readonly title: "ForgeHost";
273
+ readonly 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.";
274
+ readonly type: "string";
275
+ readonly minLength: 3;
276
+ readonly maxLength: 253;
277
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
278
+ };
279
+ };
280
+ };
281
+ };
282
+ /**
283
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
284
+ * tracks the *issuer* party's requirement because a response swaps the
285
+ * parties (§7.3 item 5).
286
+ */
287
+ export declare const RESPONSE_SPEC: {
288
+ readonly typeUri: "https://trusttasks.org/spec/git-ns/account/link/0.1#response";
289
+ readonly isBearer: false;
290
+ readonly isProofRequired: true;
291
+ readonly isRecipientRequired: true;
292
+ readonly isIssuedAtRequired: true;
293
+ readonly payloadSchema: {
294
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
295
+ readonly $ref: "#/$defs/Response";
296
+ readonly $defs: {
297
+ readonly Response: {
298
+ readonly $anchor: "response";
299
+ readonly title: "Git Namespaces — Link Forge Account — response payload";
300
+ readonly description: "Where to authorise the link.";
301
+ readonly type: "object";
302
+ readonly additionalProperties: false;
303
+ readonly required: readonly ["linkId", "url", "expiresAt"];
304
+ readonly properties: {
305
+ readonly linkId: {
306
+ readonly type: "string";
307
+ readonly minLength: 1;
308
+ readonly maxLength: 128;
309
+ readonly description: "Identifies this attempt for git-ns/account/link-status. Opaque; meaningful only to the member who began it.";
310
+ };
311
+ readonly url: {
312
+ readonly type: "string";
313
+ readonly format: "uri";
314
+ readonly maxLength: 2048;
315
+ readonly pattern: "^https://";
316
+ readonly description: "Where the member authorises the link: the device-code entry page (GitHub), or the forge's authorisation page (Forgejo, authorisation code with PKCE).";
317
+ };
318
+ readonly userCode: {
319
+ readonly type: "string";
320
+ readonly minLength: 1;
321
+ readonly maxLength: 64;
322
+ readonly description: "The code the member types at `url`, for a forge that uses a device flow. Absent otherwise.";
323
+ };
324
+ readonly expiresAt: {
325
+ readonly type: "string";
326
+ readonly format: "date-time";
327
+ readonly description: "When this attempt lapses if not completed.";
328
+ };
329
+ readonly ext: {
330
+ readonly $ref: "#/$defs/Ext";
331
+ };
332
+ };
333
+ };
334
+ readonly Ext: {
335
+ readonly title: "Ext";
336
+ readonly 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.";
337
+ readonly type: "object";
338
+ readonly minProperties: 1;
339
+ readonly additionalProperties: true;
340
+ readonly propertyNames: {
341
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
342
+ };
343
+ };
344
+ readonly ForgeHost: {
345
+ readonly title: "ForgeHost";
346
+ readonly 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.";
347
+ readonly type: "string";
348
+ readonly minLength: 3;
349
+ readonly maxLength: 253;
350
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
351
+ };
352
+ };
353
+ };
354
+ };
355
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/git-ns/account/link/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAA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;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,192 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/account/link/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/git-ns/account/link/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/account/link/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/git-ns/account/link/0.1",
21
+ "title": "Git Namespaces — Link Forge Account — payload",
22
+ "description": "A member begins linking their account on a forge to their DID. The response carries where the member goes to authorise it; the member then polls git-ns/account/link-status.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "forge"
27
+ ],
28
+ "properties": {
29
+ "forge": {
30
+ "$ref": "#/$defs/ForgeHost",
31
+ "description": "The forge whose account to link."
32
+ },
33
+ "ext": {
34
+ "$ref": "#/$defs/Ext"
35
+ }
36
+ },
37
+ "$defs": {
38
+ "Response": {
39
+ "$anchor": "response",
40
+ "title": "Git Namespaces — Link Forge Account — response payload",
41
+ "description": "Where to authorise the link.",
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": [
45
+ "linkId",
46
+ "url",
47
+ "expiresAt"
48
+ ],
49
+ "properties": {
50
+ "linkId": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "maxLength": 128,
54
+ "description": "Identifies this attempt for git-ns/account/link-status. Opaque; meaningful only to the member who began it."
55
+ },
56
+ "url": {
57
+ "type": "string",
58
+ "format": "uri",
59
+ "maxLength": 2048,
60
+ "pattern": "^https://",
61
+ "description": "Where the member authorises the link: the device-code entry page (GitHub), or the forge's authorisation page (Forgejo, authorisation code with PKCE)."
62
+ },
63
+ "userCode": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "maxLength": 64,
67
+ "description": "The code the member types at `url`, for a forge that uses a device flow. Absent otherwise."
68
+ },
69
+ "expiresAt": {
70
+ "type": "string",
71
+ "format": "date-time",
72
+ "description": "When this attempt lapses if not completed."
73
+ },
74
+ "ext": {
75
+ "$ref": "#/$defs/Ext"
76
+ }
77
+ }
78
+ },
79
+ "Ext": {
80
+ "title": "Ext",
81
+ "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.",
82
+ "type": "object",
83
+ "minProperties": 1,
84
+ "additionalProperties": true,
85
+ "propertyNames": {
86
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
87
+ }
88
+ },
89
+ "ForgeHost": {
90
+ "title": "ForgeHost",
91
+ "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.",
92
+ "type": "string",
93
+ "minLength": 3,
94
+ "maxLength": 253,
95
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
96
+ }
97
+ }
98
+ };
99
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
100
+ export const RESPONSE_PAYLOAD_SCHEMA = {
101
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
102
+ "$ref": "#/$defs/Response",
103
+ "$defs": {
104
+ "Response": {
105
+ "$anchor": "response",
106
+ "title": "Git Namespaces — Link Forge Account — response payload",
107
+ "description": "Where to authorise the link.",
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": [
111
+ "linkId",
112
+ "url",
113
+ "expiresAt"
114
+ ],
115
+ "properties": {
116
+ "linkId": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 128,
120
+ "description": "Identifies this attempt for git-ns/account/link-status. Opaque; meaningful only to the member who began it."
121
+ },
122
+ "url": {
123
+ "type": "string",
124
+ "format": "uri",
125
+ "maxLength": 2048,
126
+ "pattern": "^https://",
127
+ "description": "Where the member authorises the link: the device-code entry page (GitHub), or the forge's authorisation page (Forgejo, authorisation code with PKCE)."
128
+ },
129
+ "userCode": {
130
+ "type": "string",
131
+ "minLength": 1,
132
+ "maxLength": 64,
133
+ "description": "The code the member types at `url`, for a forge that uses a device flow. Absent otherwise."
134
+ },
135
+ "expiresAt": {
136
+ "type": "string",
137
+ "format": "date-time",
138
+ "description": "When this attempt lapses if not completed."
139
+ },
140
+ "ext": {
141
+ "$ref": "#/$defs/Ext"
142
+ }
143
+ }
144
+ },
145
+ "Ext": {
146
+ "title": "Ext",
147
+ "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.",
148
+ "type": "object",
149
+ "minProperties": 1,
150
+ "additionalProperties": true,
151
+ "propertyNames": {
152
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
153
+ }
154
+ },
155
+ "ForgeHost": {
156
+ "title": "ForgeHost",
157
+ "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.",
158
+ "type": "string",
159
+ "minLength": 3,
160
+ "maxLength": 253,
161
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
162
+ }
163
+ }
164
+ };
165
+ /**
166
+ * SPEC.md §7.2 policy for the request variant, from this specification's
167
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
168
+ * per-specification and cannot be derived from the document alone, and
169
+ * item 2 needs the schema this carries.
170
+ */
171
+ export const SPEC = {
172
+ typeUri: TYPE_URI,
173
+ isBearer: false,
174
+ isProofRequired: true,
175
+ isRecipientRequired: true,
176
+ isIssuedAtRequired: true,
177
+ payloadSchema: PAYLOAD_SCHEMA,
178
+ };
179
+ /**
180
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
181
+ * tracks the *issuer* party's requirement because a response swaps the
182
+ * parties (§7.3 item 5).
183
+ */
184
+ export const RESPONSE_SPEC = {
185
+ typeUri: RESPONSE_TYPE_URI,
186
+ isBearer: false,
187
+ isProofRequired: true,
188
+ isRecipientRequired: true,
189
+ isIssuedAtRequired: true,
190
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
191
+ };
192
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/git-ns/account/link/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,qDAA8D,CAAC;AAKvF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,8DAAuE,CAAC;AAKzG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,qDAAqD;IAC5D,OAAO,EAAE,+CAA+C;IACxD,aAAa,EAAE,8KAA8K;IAC7L,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,OAAO;KACR;IACD,YAAY,EAAE;QACZ,OAAO,EAAE;YACP,MAAM,EAAE,mBAAmB;YAC3B,aAAa,EAAE,kCAAkC;SAClD;QACD,KAAK,EAAE;YAC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