@openvtc/trust-tasks 0.26.28 → 0.27.0
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 +34 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/contact/get/1.1/payload.d.ts +12 -5
- package/dist/persona/contact/get/1.1/payload.d.ts.map +1 -1
- package/dist/persona/contact/get/1.1/payload.js +4 -4
- package/dist/persona/contact/get/1.1/payload.js.map +1 -1
- package/dist/persona/contact/list/1.1/payload.d.ts +12 -5
- package/dist/persona/contact/list/1.1/payload.d.ts.map +1 -1
- package/dist/persona/contact/list/1.1/payload.js +4 -4
- package/dist/persona/contact/list/1.1/payload.js.map +1 -1
- package/dist/persona/contact/put/1.1/payload.d.ts +32 -6
- package/dist/persona/contact/put/1.1/payload.d.ts.map +1 -1
- package/dist/persona/contact/put/1.1/payload.js +32 -2
- package/dist/persona/contact/put/1.1/payload.js.map +1 -1
- package/dist/vta/pcs/trustee/decrypt/0.1/payload.d.ts +3 -3
- package/dist/vta/pcs/trustee/decrypt/0.1/payload.js +1 -1
- package/dist/vta/pcs/trustee/decrypt/0.1/payload.js.map +1 -1
- package/dist/vta/pcs/trustee/read/0.1/payload.d.ts +526 -0
- package/dist/vta/pcs/trustee/read/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/read/0.1/payload.js +290 -0
- package/dist/vta/pcs/trustee/read/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/persona/contact/get/1.1/payload.ts +8 -5
- package/src/persona/contact/list/1.1/payload.ts +8 -5
- package/src/persona/contact/put/1.1/payload.ts +34 -4
- package/src/vta/pcs/trustee/decrypt/0.1/payload.ts +2 -2
- package/src/vta/pcs/trustee/read/0.1/payload.ts +369 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/pcs/trustee/read/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/pcs/trustee/read/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/pcs/trustee/read/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/vta/pcs/trustee/read/0.1",
|
|
21
|
+
"title": "VTA PCS — Trustee Read — payload",
|
|
22
|
+
"description": "A trustee's client asks its VTA for a voting/trustees/status or voting/election/show request signed as the trustee, so it can follow the election's ceremony at the ballot box — on a private board as on a public one — without holding the trustee's key.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"contextId",
|
|
27
|
+
"community",
|
|
28
|
+
"electionId",
|
|
29
|
+
"trustee",
|
|
30
|
+
"ballotBox",
|
|
31
|
+
"read"
|
|
32
|
+
],
|
|
33
|
+
"properties": {
|
|
34
|
+
"contextId": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 256,
|
|
38
|
+
"description": "The VTA context the trustee's keys live in."
|
|
39
|
+
},
|
|
40
|
+
"community": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1,
|
|
43
|
+
"maxLength": 2048,
|
|
44
|
+
"description": "The community's DID: the registrar that registered the election."
|
|
45
|
+
},
|
|
46
|
+
"electionId": {
|
|
47
|
+
"$ref": "#/$defs/ElectionId"
|
|
48
|
+
},
|
|
49
|
+
"trustee": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"maxLength": 2048,
|
|
53
|
+
"pattern": "^did:",
|
|
54
|
+
"description": "The trustee's DID: a persona this VTA holds an authentication key of."
|
|
55
|
+
},
|
|
56
|
+
"ballotBox": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"maxLength": 2048,
|
|
60
|
+
"pattern": "^did:",
|
|
61
|
+
"description": "The ballot box's DID: the recipient of the signed request."
|
|
62
|
+
},
|
|
63
|
+
"read": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"enum": [
|
|
66
|
+
"status",
|
|
67
|
+
"election"
|
|
68
|
+
],
|
|
69
|
+
"description": "Which read to sign: voting/trustees/status/0.1 or voting/election/show/0.1."
|
|
70
|
+
},
|
|
71
|
+
"ext": {
|
|
72
|
+
"$ref": "#/$defs/Ext"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"$defs": {
|
|
76
|
+
"ReadDocument": {
|
|
77
|
+
"title": "ReadDocument",
|
|
78
|
+
"description": "A complete, signed voting/trustees/status/0.1 or voting/election/show/0.1 request document, ready to send to the ballot box unchanged.",
|
|
79
|
+
"type": "object",
|
|
80
|
+
"required": [
|
|
81
|
+
"id",
|
|
82
|
+
"type",
|
|
83
|
+
"issuer",
|
|
84
|
+
"recipient",
|
|
85
|
+
"issuedAt",
|
|
86
|
+
"payload",
|
|
87
|
+
"proof"
|
|
88
|
+
],
|
|
89
|
+
"properties": {
|
|
90
|
+
"id": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
|
|
93
|
+
},
|
|
94
|
+
"type": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"enum": [
|
|
97
|
+
"https://trusttasks.org/spec/voting/trustees/status/0.1",
|
|
98
|
+
"https://trusttasks.org/spec/voting/election/show/0.1"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"issuer": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"minLength": 1,
|
|
104
|
+
"maxLength": 2048,
|
|
105
|
+
"description": "The request's `trustee`."
|
|
106
|
+
},
|
|
107
|
+
"recipient": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"maxLength": 2048,
|
|
111
|
+
"description": "The request's `ballotBox`."
|
|
112
|
+
},
|
|
113
|
+
"issuedAt": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"format": "date-time"
|
|
116
|
+
},
|
|
117
|
+
"expiresAt": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"format": "date-time"
|
|
120
|
+
},
|
|
121
|
+
"payload": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"description": "`{ community, electionId }` from the request, exactly."
|
|
124
|
+
},
|
|
125
|
+
"proof": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"description": "A Data Integrity proof by an `authentication` key of `issuer`."
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"Response": {
|
|
132
|
+
"$anchor": "response",
|
|
133
|
+
"title": "VTA PCS — Trustee Read — response payload",
|
|
134
|
+
"description": "The signed read, to send to the ballot box.",
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": [
|
|
138
|
+
"document"
|
|
139
|
+
],
|
|
140
|
+
"properties": {
|
|
141
|
+
"document": {
|
|
142
|
+
"$ref": "#/$defs/ReadDocument"
|
|
143
|
+
},
|
|
144
|
+
"ext": {
|
|
145
|
+
"$ref": "#/$defs/Ext"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"Ext": {
|
|
150
|
+
"title": "Ext",
|
|
151
|
+
"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.",
|
|
152
|
+
"type": "object",
|
|
153
|
+
"minProperties": 1,
|
|
154
|
+
"additionalProperties": true,
|
|
155
|
+
"propertyNames": {
|
|
156
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"ElectionId": {
|
|
160
|
+
"title": "ElectionId",
|
|
161
|
+
"description": "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.",
|
|
162
|
+
"type": "string",
|
|
163
|
+
"pattern": "^[A-Za-z0-9._-]{1,128}$"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
168
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
169
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
170
|
+
"$ref": "#/$defs/Response",
|
|
171
|
+
"$defs": {
|
|
172
|
+
"ReadDocument": {
|
|
173
|
+
"title": "ReadDocument",
|
|
174
|
+
"description": "A complete, signed voting/trustees/status/0.1 or voting/election/show/0.1 request document, ready to send to the ballot box unchanged.",
|
|
175
|
+
"type": "object",
|
|
176
|
+
"required": [
|
|
177
|
+
"id",
|
|
178
|
+
"type",
|
|
179
|
+
"issuer",
|
|
180
|
+
"recipient",
|
|
181
|
+
"issuedAt",
|
|
182
|
+
"payload",
|
|
183
|
+
"proof"
|
|
184
|
+
],
|
|
185
|
+
"properties": {
|
|
186
|
+
"id": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
|
|
189
|
+
},
|
|
190
|
+
"type": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"enum": [
|
|
193
|
+
"https://trusttasks.org/spec/voting/trustees/status/0.1",
|
|
194
|
+
"https://trusttasks.org/spec/voting/election/show/0.1"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"issuer": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"minLength": 1,
|
|
200
|
+
"maxLength": 2048,
|
|
201
|
+
"description": "The request's `trustee`."
|
|
202
|
+
},
|
|
203
|
+
"recipient": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"minLength": 1,
|
|
206
|
+
"maxLength": 2048,
|
|
207
|
+
"description": "The request's `ballotBox`."
|
|
208
|
+
},
|
|
209
|
+
"issuedAt": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"format": "date-time"
|
|
212
|
+
},
|
|
213
|
+
"expiresAt": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"format": "date-time"
|
|
216
|
+
},
|
|
217
|
+
"payload": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"description": "`{ community, electionId }` from the request, exactly."
|
|
220
|
+
},
|
|
221
|
+
"proof": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"description": "A Data Integrity proof by an `authentication` key of `issuer`."
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"Response": {
|
|
228
|
+
"$anchor": "response",
|
|
229
|
+
"title": "VTA PCS — Trustee Read — response payload",
|
|
230
|
+
"description": "The signed read, to send to the ballot box.",
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": [
|
|
234
|
+
"document"
|
|
235
|
+
],
|
|
236
|
+
"properties": {
|
|
237
|
+
"document": {
|
|
238
|
+
"$ref": "#/$defs/ReadDocument"
|
|
239
|
+
},
|
|
240
|
+
"ext": {
|
|
241
|
+
"$ref": "#/$defs/Ext"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"Ext": {
|
|
246
|
+
"title": "Ext",
|
|
247
|
+
"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.",
|
|
248
|
+
"type": "object",
|
|
249
|
+
"minProperties": 1,
|
|
250
|
+
"additionalProperties": true,
|
|
251
|
+
"propertyNames": {
|
|
252
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"ElectionId": {
|
|
256
|
+
"title": "ElectionId",
|
|
257
|
+
"description": "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.",
|
|
258
|
+
"type": "string",
|
|
259
|
+
"pattern": "^[A-Za-z0-9._-]{1,128}$"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
265
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
266
|
+
* per-specification and cannot be derived from the document alone, and
|
|
267
|
+
* item 2 needs the schema this carries.
|
|
268
|
+
*/
|
|
269
|
+
export const SPEC = {
|
|
270
|
+
typeUri: TYPE_URI,
|
|
271
|
+
isBearer: false,
|
|
272
|
+
isProofRequired: true,
|
|
273
|
+
isRecipientRequired: true,
|
|
274
|
+
isIssuedAtRequired: true,
|
|
275
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
279
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
280
|
+
* parties (§7.3 item 5).
|
|
281
|
+
*/
|
|
282
|
+
export const RESPONSE_SPEC = {
|
|
283
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
284
|
+
isBearer: false,
|
|
285
|
+
isProofRequired: false,
|
|
286
|
+
isRecipientRequired: true,
|
|
287
|
+
isIssuedAtRequired: true,
|
|
288
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
289
|
+
};
|
|
290
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vta/pcs/trustee/read/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,sDAA+D,CAAC;AAKxF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,+DAAwE,CAAC;AAK1G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,sDAAsD;IAC7D,OAAO,EAAE,kCAAkC;IAC3C,aAAa,EAAE,6PAA6P;IAC5Q,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,WAAW;QACX,WAAW;QACX,YAAY;QACZ,SAAS;QACT,WAAW;QACX,MAAM;KACP;IACD,YAAY,EAAE;QACZ,WAAW,EAAE;YACX,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,GAAG;YAChB,aAAa,EAAE,6CAA6C;SAC7D;QACD,WAAW,EAAE;YACX,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,kEAAkE;SAClF;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,oBAAoB;SAC7B;QACD,SAAS,EAAE;YACT,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE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YACrB,aAAa,EAAE,uLAAuL;YACtM,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,yBAAyB;SACrC;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -698,6 +698,7 @@ export * as VtaPcsTrusteeDecrypt_v0_1 from "./vta/pcs/trustee/decrypt/0.1/payloa
|
|
|
698
698
|
export * as VtaPcsTrusteeEnrol_v0_1 from "./vta/pcs/trustee/enrol/0.1/payload.js";
|
|
699
699
|
export * as VtaPcsTrusteeJustify_v0_1 from "./vta/pcs/trustee/justify/0.1/payload.js";
|
|
700
700
|
export * as VtaPcsTrusteeKeys_v0_1 from "./vta/pcs/trustee/keys/0.1/payload.js";
|
|
701
|
+
export * as VtaPcsTrusteeRead_v0_1 from "./vta/pcs/trustee/read/0.1/payload.js";
|
|
701
702
|
export * as VtaPcsVerifyAttestation_v0_1 from "./vta/pcs/verify-attestation/0.1/payload.js";
|
|
702
703
|
export * as VtaPcsVetterShow_v0_1 from "./vta/pcs/vetter/show/0.1/payload.js";
|
|
703
704
|
export * as VtaPcsVoteEncrypted_v0_1 from "./vta/pcs/vote-encrypted/0.1/payload.js";
|
|
@@ -27,7 +27,10 @@ export interface PersonaContactGetPayload {
|
|
|
27
27
|
*/
|
|
28
28
|
export interface PersonaContactGetResponsePayload {
|
|
29
29
|
contactId: Ulid;
|
|
30
|
-
|
|
30
|
+
/**
|
|
31
|
+
* The DID the contact disclosed. Absent for a contact made from a community directory entry whose DID the holder has not been shown (persona/contact/put/1.1, linking form).
|
|
32
|
+
*/
|
|
33
|
+
subjectDid?: string;
|
|
31
34
|
knownByPersona: string;
|
|
32
35
|
rev: number;
|
|
33
36
|
document: ContactDocument;
|
|
@@ -127,7 +130,6 @@ export const PAYLOAD_SCHEMA = {
|
|
|
127
130
|
"additionalProperties": false,
|
|
128
131
|
"required": [
|
|
129
132
|
"contactId",
|
|
130
|
-
"subjectDid",
|
|
131
133
|
"knownByPersona",
|
|
132
134
|
"rev",
|
|
133
135
|
"document",
|
|
@@ -139,7 +141,8 @@ export const PAYLOAD_SCHEMA = {
|
|
|
139
141
|
},
|
|
140
142
|
"subjectDid": {
|
|
141
143
|
"type": "string",
|
|
142
|
-
"minLength": 1
|
|
144
|
+
"minLength": 1,
|
|
145
|
+
"description": "The DID the contact disclosed. Absent for a contact made from a community directory entry whose DID the holder has not been shown (persona/contact/put/1.1, linking form)."
|
|
143
146
|
},
|
|
144
147
|
"knownByPersona": {
|
|
145
148
|
"type": "string",
|
|
@@ -493,7 +496,6 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
493
496
|
"additionalProperties": false,
|
|
494
497
|
"required": [
|
|
495
498
|
"contactId",
|
|
496
|
-
"subjectDid",
|
|
497
499
|
"knownByPersona",
|
|
498
500
|
"rev",
|
|
499
501
|
"document",
|
|
@@ -505,7 +507,8 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
505
507
|
},
|
|
506
508
|
"subjectDid": {
|
|
507
509
|
"type": "string",
|
|
508
|
-
"minLength": 1
|
|
510
|
+
"minLength": 1,
|
|
511
|
+
"description": "The DID the contact disclosed. Absent for a contact made from a community directory entry whose DID the holder has not been shown (persona/contact/put/1.1, linking form)."
|
|
509
512
|
},
|
|
510
513
|
"knownByPersona": {
|
|
511
514
|
"type": "string",
|
|
@@ -44,7 +44,10 @@ export interface PersonaContactListResponsePayload {
|
|
|
44
44
|
*/
|
|
45
45
|
contacts: {
|
|
46
46
|
contactId: Ulid;
|
|
47
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The DID the contact disclosed. Absent for a contact made from a community directory entry whose DID the holder has not been shown (persona/contact/put/1.1, linking form).
|
|
49
|
+
*/
|
|
50
|
+
subjectDid?: string;
|
|
48
51
|
knownByPersona: string;
|
|
49
52
|
rev: number;
|
|
50
53
|
/**
|
|
@@ -166,7 +169,6 @@ export const PAYLOAD_SCHEMA = {
|
|
|
166
169
|
"additionalProperties": false,
|
|
167
170
|
"required": [
|
|
168
171
|
"contactId",
|
|
169
|
-
"subjectDid",
|
|
170
172
|
"knownByPersona",
|
|
171
173
|
"rev",
|
|
172
174
|
"receivedAt",
|
|
@@ -178,7 +180,8 @@ export const PAYLOAD_SCHEMA = {
|
|
|
178
180
|
},
|
|
179
181
|
"subjectDid": {
|
|
180
182
|
"type": "string",
|
|
181
|
-
"minLength": 1
|
|
183
|
+
"minLength": 1,
|
|
184
|
+
"description": "The DID the contact disclosed. Absent for a contact made from a community directory entry whose DID the holder has not been shown (persona/contact/put/1.1, linking form)."
|
|
182
185
|
},
|
|
183
186
|
"knownByPersona": {
|
|
184
187
|
"type": "string",
|
|
@@ -328,7 +331,6 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
328
331
|
"additionalProperties": false,
|
|
329
332
|
"required": [
|
|
330
333
|
"contactId",
|
|
331
|
-
"subjectDid",
|
|
332
334
|
"knownByPersona",
|
|
333
335
|
"rev",
|
|
334
336
|
"receivedAt",
|
|
@@ -340,7 +342,8 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
340
342
|
},
|
|
341
343
|
"subjectDid": {
|
|
342
344
|
"type": "string",
|
|
343
|
-
"minLength": 1
|
|
345
|
+
"minLength": 1,
|
|
346
|
+
"description": "The DID the contact disclosed. Absent for a contact made from a community directory entry whose DID the holder has not been shown (persona/contact/put/1.1, linking form)."
|
|
344
347
|
},
|
|
345
348
|
"knownByPersona": {
|
|
346
349
|
"type": "string",
|
|
@@ -7,7 +7,7 @@ import type { ClaimType, ContactDocument, DirectoryEntryId, DirectoryRef, Ext, L
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* File what a peer disclosed, or change the holder's own annotations on a contact, or both.
|
|
10
|
+
* File what a peer disclosed, or change the holder's own annotations on a contact, or both. Three forms. FILING (`subjectDid`, `knownByPersona`, `document`; no `contactId`) appends a revision, never overwrites, so a changed value is visible as a change rather than arriving silently — exactly as 1.0. ANNOTATING (`contactId`; no `subjectDid`, `knownByPersona`, `document` or `credentialRefs`) changes the holder's star, petname, lists, directory link or notes on an existing contact and appends no revision. LINKING (`directoryRef`, `knownByPersona`; no `contactId`, `subjectDid`, `document` or `credentialRefs`) keeps annotations on a member of a community's directory whose DID the holder has not been shown: it finds, or makes, the contact for that entry and persona, and appends no revision. In every form each annotation given replaces the stored one, each `removeX` removes one, and each annotation absent is unchanged. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
11
|
*/
|
|
12
12
|
export type PersonaContactPutPayload = {
|
|
13
13
|
contextId: string;
|
|
@@ -20,7 +20,7 @@ export type PersonaContactPutPayload = {
|
|
|
20
20
|
*/
|
|
21
21
|
subjectDid?: string;
|
|
22
22
|
/**
|
|
23
|
-
* Filing
|
|
23
|
+
* Filing and linking forms. Which of the holder's personas knows this contact. A contact belongs to the relationship, not to the holder at large — the same peer met through two personas is two contacts, and collapsing them would correlate the holder's own personas in their own address book.
|
|
24
24
|
*/
|
|
25
25
|
knownByPersona?: string;
|
|
26
26
|
document?: ContactDocument;
|
|
@@ -125,7 +125,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
125
125
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
126
126
|
"$id": "https://trusttasks.org/spec/persona/contact/put/1.1",
|
|
127
127
|
"title": "Persona Contact Put — payload",
|
|
128
|
-
"description": "File what a peer disclosed, or change the holder's own annotations on a contact, or both.
|
|
128
|
+
"description": "File what a peer disclosed, or change the holder's own annotations on a contact, or both. Three forms. FILING (`subjectDid`, `knownByPersona`, `document`; no `contactId`) appends a revision, never overwrites, so a changed value is visible as a change rather than arriving silently — exactly as 1.0. ANNOTATING (`contactId`; no `subjectDid`, `knownByPersona`, `document` or `credentialRefs`) changes the holder's star, petname, lists, directory link or notes on an existing contact and appends no revision. LINKING (`directoryRef`, `knownByPersona`; no `contactId`, `subjectDid`, `document` or `credentialRefs`) keeps annotations on a member of a community's directory whose DID the holder has not been shown: it finds, or makes, the contact for that entry and persona, and appends no revision. In every form each annotation given replaces the stored one, each `removeX` removes one, and each annotation absent is unchanged. The outer document members are owned by the framework — SPEC §6.3.",
|
|
129
129
|
"type": "object",
|
|
130
130
|
"additionalProperties": false,
|
|
131
131
|
"required": [
|
|
@@ -219,6 +219,36 @@ export const PAYLOAD_SCHEMA = {
|
|
|
219
219
|
]
|
|
220
220
|
}
|
|
221
221
|
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"required": [
|
|
225
|
+
"directoryRef",
|
|
226
|
+
"knownByPersona"
|
|
227
|
+
],
|
|
228
|
+
"not": {
|
|
229
|
+
"anyOf": [
|
|
230
|
+
{
|
|
231
|
+
"required": [
|
|
232
|
+
"contactId"
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"required": [
|
|
237
|
+
"subjectDid"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"required": [
|
|
242
|
+
"document"
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"required": [
|
|
247
|
+
"credentialRefs"
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|
|
222
252
|
}
|
|
223
253
|
],
|
|
224
254
|
"dependentSchemas": {
|
|
@@ -270,7 +300,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
270
300
|
"type": "string",
|
|
271
301
|
"minLength": 1,
|
|
272
302
|
"maxLength": 2048,
|
|
273
|
-
"description": "Filing
|
|
303
|
+
"description": "Filing and linking forms. Which of the holder's personas knows this contact. A contact belongs to the relationship, not to the holder at large — the same peer met through two personas is two contacts, and collapsing them would correlate the holder's own personas in their own address book."
|
|
274
304
|
},
|
|
275
305
|
"document": {
|
|
276
306
|
"$ref": "#/$defs/ContactDocument"
|
|
@@ -31,7 +31,7 @@ export interface VTAPCSTrusteeDecryptPayload {
|
|
|
31
31
|
*/
|
|
32
32
|
targets: [DecryptionTarget, ...DecryptionTarget[]];
|
|
33
33
|
/**
|
|
34
|
-
* When voting closed
|
|
34
|
+
* When voting closed: the board's closed or closedEarly entry, or any time at or after the close and not in the future. The VTA refuses a time in the future.
|
|
35
35
|
*/
|
|
36
36
|
closedAt: string;
|
|
37
37
|
ext?: Ext;
|
|
@@ -139,7 +139,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
139
139
|
"closedAt": {
|
|
140
140
|
"type": "string",
|
|
141
141
|
"format": "date-time",
|
|
142
|
-
"description": "When voting closed
|
|
142
|
+
"description": "When voting closed: the board's closed or closedEarly entry, or any time at or after the close and not in the future. The VTA refuses a time in the future."
|
|
143
143
|
},
|
|
144
144
|
"ext": {
|
|
145
145
|
"$ref": "#/$defs/Ext"
|