@openvtc/trust-tasks 0.21.3 → 0.21.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/dist/auth/passkey/admin-list/0.1/payload.d.ts +484 -0
- package/dist/auth/passkey/admin-list/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/admin-list/0.1/payload.js +257 -0
- package/dist/auth/passkey/admin-list/0.1/payload.js.map +1 -0
- package/dist/git-ns/namespace/list/0.1/payload.d.ts +1343 -0
- package/dist/git-ns/namespace/list/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/list/0.1/payload.js +704 -0
- package/dist/git-ns/namespace/list/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/list/0.1/payload.d.ts +1377 -0
- package/dist/git-ns/repo/list/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/list/0.1/payload.js +744 -0
- package/dist/git-ns/repo/list/0.1/payload.js.map +1 -0
- package/dist/git-ns/view/0.5/payload.d.ts +1722 -0
- package/dist/git-ns/view/0.5/payload.d.ts.map +1 -0
- package/dist/git-ns/view/0.5/payload.js +1024 -0
- package/dist/git-ns/view/0.5/payload.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/auth/passkey/admin-list/0.1/payload.ts +338 -0
- package/src/git-ns/namespace/list/0.1/payload.ts +883 -0
- package/src/git-ns/repo/list/0.1/payload.ts +909 -0
- package/src/git-ns/view/0.5/payload.ts +1095 -0
- package/src/index.ts +4 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/passkey/admin-list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An administrator lists one subject's passkeys of one purpose — for example a member's step-up passkeys — as non-secret metadata, so they can tell which to revoke. The owner's own listing is auth/passkey/list, which takes no subject; this task exists because a subject in that payload is refused by design.
|
|
11
|
+
*/
|
|
12
|
+
export interface AuthPasskeyAdminList {
|
|
13
|
+
/**
|
|
14
|
+
* The VID whose credentials are listed. A request, never a grant: the consumer authorises the producer over this subject from its own state.
|
|
15
|
+
*/
|
|
16
|
+
subject: string;
|
|
17
|
+
/**
|
|
18
|
+
* Which credentials to list: `session` (sign-in) or `stepUp` (the step-up-only passkeys of auth/passkey/enroll/invite 0.2). REQUIRED, with no default, so an administrator reads exactly the inventory they asked for and a consumer can refuse one it does not disclose to administrators.
|
|
19
|
+
*/
|
|
20
|
+
purpose: "session" | "stepUp";
|
|
21
|
+
/**
|
|
22
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
23
|
+
*/
|
|
24
|
+
ext?: Ext;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/passkey/admin-list/0.1#response.
|
|
28
|
+
*/
|
|
29
|
+
export interface AuthPasskeyAdminListResponsePayload {
|
|
30
|
+
/**
|
|
31
|
+
* Echo of payload.subject.
|
|
32
|
+
*/
|
|
33
|
+
subject: string;
|
|
34
|
+
/**
|
|
35
|
+
* Echo of payload.purpose.
|
|
36
|
+
*/
|
|
37
|
+
purpose: "session" | "stepUp";
|
|
38
|
+
/**
|
|
39
|
+
* Every credential of that purpose currently bound to the subject, newest registeredAt first. MAY be empty: a member holding none is not an error.
|
|
40
|
+
*/
|
|
41
|
+
credentials: ListedCredential[];
|
|
42
|
+
/**
|
|
43
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
44
|
+
*/
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The administrator's view of one credential: an identifier, a label, two instants and the signature counter. Never key material, never the credential public key, never attestation.
|
|
49
|
+
*/
|
|
50
|
+
export interface ListedCredential {
|
|
51
|
+
/**
|
|
52
|
+
* Durable identifier of the credential, as auth/passkey/revoke/start takes it. Opaque to the producer: echoed verbatim, never parsed.
|
|
53
|
+
*/
|
|
54
|
+
credentialId: string;
|
|
55
|
+
/**
|
|
56
|
+
* Label captured at enrolment. Untrusted free text; absent when none was given. Consumers MUST NOT synthesize one.
|
|
57
|
+
*/
|
|
58
|
+
deviceLabel?: string;
|
|
59
|
+
/**
|
|
60
|
+
* When the credential was bound to the subject.
|
|
61
|
+
*/
|
|
62
|
+
registeredAt: string;
|
|
63
|
+
/**
|
|
64
|
+
* When the credential last completed an assertion. Absent if it never has, or if the consumer does not track use.
|
|
65
|
+
*/
|
|
66
|
+
lastUsedAt?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The WebAuthn signature counter the consumer last recorded for the credential. Absent when the consumer does not track it. Zero is a real value: many platform authenticators never increment the counter.
|
|
69
|
+
*/
|
|
70
|
+
signCount?: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
74
|
+
export type { Ext };
|
|
75
|
+
|
|
76
|
+
/** Trust Task type URI. */
|
|
77
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/passkey/admin-list/0.1" as const;
|
|
78
|
+
|
|
79
|
+
/** Stable alias for this specification's request payload shape. */
|
|
80
|
+
export type Payload = AuthPasskeyAdminList;
|
|
81
|
+
|
|
82
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
83
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/passkey/admin-list/0.1#response" as const;
|
|
84
|
+
|
|
85
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
86
|
+
export type Response = AuthPasskeyAdminListResponsePayload;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* This specification's payload schema, as a value.
|
|
90
|
+
*
|
|
91
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
92
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
93
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
94
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
95
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
96
|
+
*/
|
|
97
|
+
export const PAYLOAD_SCHEMA = {
|
|
98
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
99
|
+
"$id": "https://trusttasks.org/spec/auth/passkey/admin-list/0.1",
|
|
100
|
+
"title": "Auth — Passkey Admin List",
|
|
101
|
+
"description": "An administrator lists one subject's passkeys of one purpose — for example a member's step-up passkeys — as non-secret metadata, so they can tell which to revoke. The owner's own listing is auth/passkey/list, which takes no subject; this task exists because a subject in that payload is refused by design.",
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": [
|
|
105
|
+
"subject",
|
|
106
|
+
"purpose"
|
|
107
|
+
],
|
|
108
|
+
"properties": {
|
|
109
|
+
"subject": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"minLength": 1,
|
|
112
|
+
"description": "The VID whose credentials are listed. A request, never a grant: the consumer authorises the producer over this subject from its own state."
|
|
113
|
+
},
|
|
114
|
+
"purpose": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"enum": [
|
|
117
|
+
"session",
|
|
118
|
+
"stepUp"
|
|
119
|
+
],
|
|
120
|
+
"description": "Which credentials to list: `session` (sign-in) or `stepUp` (the step-up-only passkeys of auth/passkey/enroll/invite 0.2). REQUIRED, with no default, so an administrator reads exactly the inventory they asked for and a consumer can refuse one it does not disclose to administrators."
|
|
121
|
+
},
|
|
122
|
+
"ext": {
|
|
123
|
+
"$ref": "#/$defs/Ext",
|
|
124
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"$defs": {
|
|
128
|
+
"ListedCredential": {
|
|
129
|
+
"$anchor": "listedCredential",
|
|
130
|
+
"title": "ListedCredential",
|
|
131
|
+
"description": "The administrator's view of one credential: an identifier, a label, two instants and the signature counter. Never key material, never the credential public key, never attestation.",
|
|
132
|
+
"type": "object",
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"required": [
|
|
135
|
+
"credentialId",
|
|
136
|
+
"registeredAt"
|
|
137
|
+
],
|
|
138
|
+
"properties": {
|
|
139
|
+
"credentialId": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 1,
|
|
142
|
+
"description": "Durable identifier of the credential, as auth/passkey/revoke/start takes it. Opaque to the producer: echoed verbatim, never parsed."
|
|
143
|
+
},
|
|
144
|
+
"deviceLabel": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"maxLength": 256,
|
|
147
|
+
"description": "Label captured at enrolment. Untrusted free text; absent when none was given. Consumers MUST NOT synthesize one."
|
|
148
|
+
},
|
|
149
|
+
"registeredAt": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"format": "date-time",
|
|
152
|
+
"description": "When the credential was bound to the subject."
|
|
153
|
+
},
|
|
154
|
+
"lastUsedAt": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "date-time",
|
|
157
|
+
"description": "When the credential last completed an assertion. Absent if it never has, or if the consumer does not track use."
|
|
158
|
+
},
|
|
159
|
+
"signCount": {
|
|
160
|
+
"type": "integer",
|
|
161
|
+
"minimum": 0,
|
|
162
|
+
"description": "The WebAuthn signature counter the consumer last recorded for the credential. Absent when the consumer does not track it. Zero is a real value: many platform authenticators never increment the counter."
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"Response": {
|
|
167
|
+
"$anchor": "response",
|
|
168
|
+
"title": "Auth Passkey Admin List — response payload",
|
|
169
|
+
"description": "Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/passkey/admin-list/0.1#response.",
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"required": [
|
|
173
|
+
"subject",
|
|
174
|
+
"purpose",
|
|
175
|
+
"credentials"
|
|
176
|
+
],
|
|
177
|
+
"properties": {
|
|
178
|
+
"subject": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"minLength": 1,
|
|
181
|
+
"description": "Echo of payload.subject."
|
|
182
|
+
},
|
|
183
|
+
"purpose": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"enum": [
|
|
186
|
+
"session",
|
|
187
|
+
"stepUp"
|
|
188
|
+
],
|
|
189
|
+
"description": "Echo of payload.purpose."
|
|
190
|
+
},
|
|
191
|
+
"credentials": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"$ref": "#/$defs/ListedCredential"
|
|
195
|
+
},
|
|
196
|
+
"description": "Every credential of that purpose currently bound to the subject, newest registeredAt first. MAY be empty: a member holding none is not an error."
|
|
197
|
+
},
|
|
198
|
+
"ext": {
|
|
199
|
+
"$ref": "#/$defs/Ext",
|
|
200
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"Ext": {
|
|
205
|
+
"title": "Ext",
|
|
206
|
+
"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.",
|
|
207
|
+
"type": "object",
|
|
208
|
+
"minProperties": 1,
|
|
209
|
+
"additionalProperties": true,
|
|
210
|
+
"propertyNames": {
|
|
211
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
} as const;
|
|
216
|
+
|
|
217
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
218
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
219
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
220
|
+
"$ref": "#/$defs/Response",
|
|
221
|
+
"$defs": {
|
|
222
|
+
"ListedCredential": {
|
|
223
|
+
"$anchor": "listedCredential",
|
|
224
|
+
"title": "ListedCredential",
|
|
225
|
+
"description": "The administrator's view of one credential: an identifier, a label, two instants and the signature counter. Never key material, never the credential public key, never attestation.",
|
|
226
|
+
"type": "object",
|
|
227
|
+
"additionalProperties": false,
|
|
228
|
+
"required": [
|
|
229
|
+
"credentialId",
|
|
230
|
+
"registeredAt"
|
|
231
|
+
],
|
|
232
|
+
"properties": {
|
|
233
|
+
"credentialId": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"minLength": 1,
|
|
236
|
+
"description": "Durable identifier of the credential, as auth/passkey/revoke/start takes it. Opaque to the producer: echoed verbatim, never parsed."
|
|
237
|
+
},
|
|
238
|
+
"deviceLabel": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"maxLength": 256,
|
|
241
|
+
"description": "Label captured at enrolment. Untrusted free text; absent when none was given. Consumers MUST NOT synthesize one."
|
|
242
|
+
},
|
|
243
|
+
"registeredAt": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"format": "date-time",
|
|
246
|
+
"description": "When the credential was bound to the subject."
|
|
247
|
+
},
|
|
248
|
+
"lastUsedAt": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"format": "date-time",
|
|
251
|
+
"description": "When the credential last completed an assertion. Absent if it never has, or if the consumer does not track use."
|
|
252
|
+
},
|
|
253
|
+
"signCount": {
|
|
254
|
+
"type": "integer",
|
|
255
|
+
"minimum": 0,
|
|
256
|
+
"description": "The WebAuthn signature counter the consumer last recorded for the credential. Absent when the consumer does not track it. Zero is a real value: many platform authenticators never increment the counter."
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"Response": {
|
|
261
|
+
"$anchor": "response",
|
|
262
|
+
"title": "Auth Passkey Admin List — response payload",
|
|
263
|
+
"description": "Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/passkey/admin-list/0.1#response.",
|
|
264
|
+
"type": "object",
|
|
265
|
+
"additionalProperties": false,
|
|
266
|
+
"required": [
|
|
267
|
+
"subject",
|
|
268
|
+
"purpose",
|
|
269
|
+
"credentials"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"subject": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1,
|
|
275
|
+
"description": "Echo of payload.subject."
|
|
276
|
+
},
|
|
277
|
+
"purpose": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"enum": [
|
|
280
|
+
"session",
|
|
281
|
+
"stepUp"
|
|
282
|
+
],
|
|
283
|
+
"description": "Echo of payload.purpose."
|
|
284
|
+
},
|
|
285
|
+
"credentials": {
|
|
286
|
+
"type": "array",
|
|
287
|
+
"items": {
|
|
288
|
+
"$ref": "#/$defs/ListedCredential"
|
|
289
|
+
},
|
|
290
|
+
"description": "Every credential of that purpose currently bound to the subject, newest registeredAt first. MAY be empty: a member holding none is not an error."
|
|
291
|
+
},
|
|
292
|
+
"ext": {
|
|
293
|
+
"$ref": "#/$defs/Ext",
|
|
294
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"Ext": {
|
|
299
|
+
"title": "Ext",
|
|
300
|
+
"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.",
|
|
301
|
+
"type": "object",
|
|
302
|
+
"minProperties": 1,
|
|
303
|
+
"additionalProperties": true,
|
|
304
|
+
"propertyNames": {
|
|
305
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
} as const;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
313
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
314
|
+
* per-specification and cannot be derived from the document alone, and
|
|
315
|
+
* item 2 needs the schema this carries.
|
|
316
|
+
*/
|
|
317
|
+
export const SPEC = {
|
|
318
|
+
typeUri: TYPE_URI,
|
|
319
|
+
isBearer: false,
|
|
320
|
+
isProofRequired: true,
|
|
321
|
+
isRecipientRequired: true,
|
|
322
|
+
isIssuedAtRequired: false,
|
|
323
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
324
|
+
} as const;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
328
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
329
|
+
* parties (§7.3 item 5).
|
|
330
|
+
*/
|
|
331
|
+
export const RESPONSE_SPEC = {
|
|
332
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
333
|
+
isBearer: false,
|
|
334
|
+
isProofRequired: true,
|
|
335
|
+
isRecipientRequired: true,
|
|
336
|
+
isIssuedAtRequired: false,
|
|
337
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
338
|
+
} as const;
|