@openvtc/trust-tasks 0.16.4 → 0.16.6

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 (40) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/_shared/components.d.ts +4 -4
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +8 -8
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +12 -4
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +8 -8
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +12 -4
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +8 -8
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +12 -4
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +8 -8
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +12 -4
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +2 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +2 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/vta/credentials/list/0.1/payload.d.ts +630 -0
  25. package/dist/vta/credentials/list/0.1/payload.d.ts.map +1 -0
  26. package/dist/vta/credentials/list/0.1/payload.js +322 -0
  27. package/dist/vta/credentials/list/0.1/payload.js.map +1 -0
  28. package/dist/vtc/members/credentials/0.1/payload.d.ts +379 -0
  29. package/dist/vtc/members/credentials/0.1/payload.d.ts.map +1 -0
  30. package/dist/vtc/members/credentials/0.1/payload.js +195 -0
  31. package/dist/vtc/members/credentials/0.1/payload.js.map +1 -0
  32. package/package.json +1 -1
  33. package/src/_shared/components.ts +12 -4
  34. package/src/device/list/0.1/payload.ts +12 -4
  35. package/src/device/list/0.2/payload.ts +12 -4
  36. package/src/device/register/0.1/payload.ts +12 -4
  37. package/src/device/register/0.2/payload.ts +12 -4
  38. package/src/index.ts +2 -0
  39. package/src/vta/credentials/list/0.1/payload.ts +420 -0
  40. package/src/vtc/members/credentials/0.1/payload.ts +259 -0
@@ -0,0 +1,259 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/members/credentials/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Fetch the membership-pair credential bodies a community holds for one member.
11
+ */
12
+ export interface VTCMembersCredentials {
13
+ /**
14
+ * The member to read.
15
+ */
16
+ did: string;
17
+ /**
18
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
19
+ */
20
+ ext?: Ext;
21
+ }
22
+ /**
23
+ * The documents the community holds for this member. Every credential member is optional; absent means the community holds no such document, which is a real answer rather than a failure.
24
+ */
25
+ export interface VTCMembersCredentialsResponsePayload {
26
+ /**
27
+ * The member these documents belong to.
28
+ */
29
+ did: string;
30
+ /**
31
+ * The community-issued Verifiable Membership Credential — the grant. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2.
32
+ */
33
+ membershipCredential?: {};
34
+ /**
35
+ * The role Verifiable Endorsement Credential. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2.
36
+ */
37
+ roleCredential?: {};
38
+ /**
39
+ * The member-issued reciprocal VMC — the acknowledgement that completes the edge. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2.
40
+ */
41
+ memberVmc?: {};
42
+ /**
43
+ * When the acknowledgement arrived. Paired with `memberVmc`; a maintainer must not send one without the other.
44
+ */
45
+ memberVmcReceivedAt?: string;
46
+ /**
47
+ * Whether the acknowledgement's digest was verified against the grant. REQUIRED so that 'not verified' is stated rather than inferred from silence. Declares no `default` on purpose — a declared default is materialised by the generated bindings and breaks round-trip idempotence for every existing document.
48
+ */
49
+ memberVmcBound: boolean;
50
+ /**
51
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
52
+ */
53
+ ext?: Ext;
54
+ }
55
+
56
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
57
+ export type { Ext };
58
+
59
+ /** Trust Task type URI. */
60
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/members/credentials/0.1" as const;
61
+
62
+ /** Stable alias for this specification's request payload shape. */
63
+ export type Payload = VTCMembersCredentials;
64
+
65
+ /** Trust Task response type URI (request type URI + "#response"). */
66
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/members/credentials/0.1#response" as const;
67
+
68
+ /** Stable alias for this specification's success-response payload shape. */
69
+ export type Response = VTCMembersCredentialsResponsePayload;
70
+
71
+ /**
72
+ * This specification's payload schema, as a value.
73
+ *
74
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
75
+ * rather than only as a `.json` file because TypeScript types are erased
76
+ * at runtime: without a schema a consumer has nothing to validate, and
77
+ * every REQUIRED payload member is optional in practice. Cross-file
78
+ * `$ref`s are already inlined, so it needs no resolver.
79
+ */
80
+ export const PAYLOAD_SCHEMA = {
81
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
82
+ "$id": "https://trusttasks.org/spec/vtc/members/credentials/0.1",
83
+ "title": "VTC Members — Credentials",
84
+ "description": "Fetch the membership-pair credential bodies a community holds for one member.",
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "did"
89
+ ],
90
+ "properties": {
91
+ "did": {
92
+ "$ref": "#/$defs/Did",
93
+ "description": "The member to read."
94
+ },
95
+ "ext": {
96
+ "$ref": "#/$defs/Ext",
97
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
98
+ }
99
+ },
100
+ "$defs": {
101
+ "Response": {
102
+ "$anchor": "response",
103
+ "title": "VTC Members Credentials — response payload",
104
+ "description": "The documents the community holds for this member. Every credential member is optional; absent means the community holds no such document, which is a real answer rather than a failure.",
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": [
108
+ "did",
109
+ "memberVmcBound"
110
+ ],
111
+ "properties": {
112
+ "did": {
113
+ "$ref": "#/$defs/Did",
114
+ "description": "The member these documents belong to."
115
+ },
116
+ "membershipCredential": {
117
+ "type": "object",
118
+ "minProperties": 1,
119
+ "description": "The community-issued Verifiable Membership Credential — the grant. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
120
+ },
121
+ "roleCredential": {
122
+ "type": "object",
123
+ "minProperties": 1,
124
+ "description": "The role Verifiable Endorsement Credential. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
125
+ },
126
+ "memberVmc": {
127
+ "type": "object",
128
+ "minProperties": 1,
129
+ "description": "The member-issued reciprocal VMC — the acknowledgement that completes the edge. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
130
+ },
131
+ "memberVmcReceivedAt": {
132
+ "type": "string",
133
+ "format": "date-time",
134
+ "description": "When the acknowledgement arrived. Paired with `memberVmc`; a maintainer must not send one without the other."
135
+ },
136
+ "memberVmcBound": {
137
+ "type": "boolean",
138
+ "description": "Whether the acknowledgement's digest was verified against the grant. REQUIRED so that 'not verified' is stated rather than inferred from silence. Declares no `default` on purpose — a declared default is materialised by the generated bindings and breaks round-trip idempotence for every existing document."
139
+ },
140
+ "ext": {
141
+ "$ref": "#/$defs/Ext",
142
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
143
+ }
144
+ }
145
+ },
146
+ "Did": {
147
+ "type": "string",
148
+ "pattern": "^did:[a-z0-9]+:.+$",
149
+ "maxLength": 2048
150
+ },
151
+ "Ext": {
152
+ "title": "Ext",
153
+ "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.",
154
+ "type": "object",
155
+ "minProperties": 1,
156
+ "additionalProperties": true,
157
+ "propertyNames": {
158
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
159
+ }
160
+ }
161
+ }
162
+ } as const;
163
+
164
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
165
+ export const RESPONSE_PAYLOAD_SCHEMA = {
166
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
167
+ "$ref": "#/$defs/Response",
168
+ "$defs": {
169
+ "Response": {
170
+ "$anchor": "response",
171
+ "title": "VTC Members Credentials — response payload",
172
+ "description": "The documents the community holds for this member. Every credential member is optional; absent means the community holds no such document, which is a real answer rather than a failure.",
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": [
176
+ "did",
177
+ "memberVmcBound"
178
+ ],
179
+ "properties": {
180
+ "did": {
181
+ "$ref": "#/$defs/Did",
182
+ "description": "The member these documents belong to."
183
+ },
184
+ "membershipCredential": {
185
+ "type": "object",
186
+ "minProperties": 1,
187
+ "description": "The community-issued Verifiable Membership Credential — the grant. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
188
+ },
189
+ "roleCredential": {
190
+ "type": "object",
191
+ "minProperties": 1,
192
+ "description": "The role Verifiable Endorsement Credential. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
193
+ },
194
+ "memberVmc": {
195
+ "type": "object",
196
+ "minProperties": 1,
197
+ "description": "The member-issued reciprocal VMC — the acknowledgement that completes the edge. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
198
+ },
199
+ "memberVmcReceivedAt": {
200
+ "type": "string",
201
+ "format": "date-time",
202
+ "description": "When the acknowledgement arrived. Paired with `memberVmc`; a maintainer must not send one without the other."
203
+ },
204
+ "memberVmcBound": {
205
+ "type": "boolean",
206
+ "description": "Whether the acknowledgement's digest was verified against the grant. REQUIRED so that 'not verified' is stated rather than inferred from silence. Declares no `default` on purpose — a declared default is materialised by the generated bindings and breaks round-trip idempotence for every existing document."
207
+ },
208
+ "ext": {
209
+ "$ref": "#/$defs/Ext",
210
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
211
+ }
212
+ }
213
+ },
214
+ "Did": {
215
+ "type": "string",
216
+ "pattern": "^did:[a-z0-9]+:.+$",
217
+ "maxLength": 2048
218
+ },
219
+ "Ext": {
220
+ "title": "Ext",
221
+ "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.",
222
+ "type": "object",
223
+ "minProperties": 1,
224
+ "additionalProperties": true,
225
+ "propertyNames": {
226
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
227
+ }
228
+ }
229
+ }
230
+ } as const;
231
+
232
+ /**
233
+ * SPEC.md §7.2 policy for the request variant, from this specification's
234
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
235
+ * per-specification and cannot be derived from the document alone, and
236
+ * item 2 needs the schema this carries.
237
+ */
238
+ export const SPEC = {
239
+ typeUri: TYPE_URI,
240
+ isBearer: false,
241
+ isProofRequired: true,
242
+ isRecipientRequired: true,
243
+ isIssuedAtRequired: true,
244
+ payloadSchema: PAYLOAD_SCHEMA,
245
+ } as const;
246
+
247
+ /**
248
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
249
+ * tracks the *issuer* party's requirement because a response swaps the
250
+ * parties (§7.3 item 5).
251
+ */
252
+ export const RESPONSE_SPEC = {
253
+ typeUri: RESPONSE_TYPE_URI,
254
+ isBearer: false,
255
+ isProofRequired: true,
256
+ isRecipientRequired: true,
257
+ isIssuedAtRequired: true,
258
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
259
+ } as const;