@openvtc/trust-tasks 0.16.9 → 0.16.11

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 (166) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/dist/_shared/components.d.ts +206 -5
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +27 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +27 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/persona/_shared/0.1/persona-record.d.ts +22 -0
  9. package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -0
  10. package/dist/persona/_shared/0.1/persona-record.js +6 -0
  11. package/dist/persona/_shared/0.1/persona-record.js.map +1 -0
  12. package/dist/persona/attribute/delete/1.0/payload.d.ts +351 -0
  13. package/dist/persona/attribute/delete/1.0/payload.d.ts.map +1 -0
  14. package/dist/persona/attribute/delete/1.0/payload.js +188 -0
  15. package/dist/persona/attribute/delete/1.0/payload.js.map +1 -0
  16. package/dist/persona/attribute/list/1.0/payload.d.ts +895 -0
  17. package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -0
  18. package/dist/persona/attribute/list/1.0/payload.js +530 -0
  19. package/dist/persona/attribute/list/1.0/payload.js.map +1 -0
  20. package/dist/persona/attribute/put/1.0/payload.d.ts +829 -0
  21. package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -0
  22. package/dist/persona/attribute/put/1.0/payload.js +487 -0
  23. package/dist/persona/attribute/put/1.0/payload.js.map +1 -0
  24. package/dist/persona/binding/get/1.0/payload.d.ts +382 -0
  25. package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -0
  26. package/dist/persona/binding/get/1.0/payload.js +206 -0
  27. package/dist/persona/binding/get/1.0/payload.js.map +1 -0
  28. package/dist/persona/binding/list/1.0/payload.d.ts +387 -0
  29. package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -0
  30. package/dist/persona/binding/list/1.0/payload.js +210 -0
  31. package/dist/persona/binding/list/1.0/payload.js.map +1 -0
  32. package/dist/persona/binding/set/1.0/payload.d.ts +545 -0
  33. package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -0
  34. package/dist/persona/binding/set/1.0/payload.js +302 -0
  35. package/dist/persona/binding/set/1.0/payload.js.map +1 -0
  36. package/dist/persona/contact/delete/1.0/payload.d.ts +313 -0
  37. package/dist/persona/contact/delete/1.0/payload.d.ts.map +1 -0
  38. package/dist/persona/contact/delete/1.0/payload.js +174 -0
  39. package/dist/persona/contact/delete/1.0/payload.js.map +1 -0
  40. package/dist/persona/contact/get/1.0/payload.d.ts +1027 -0
  41. package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -0
  42. package/dist/persona/contact/get/1.0/payload.js +606 -0
  43. package/dist/persona/contact/get/1.0/payload.js.map +1 -0
  44. package/dist/persona/contact/list/1.0/payload.d.ts +490 -0
  45. package/dist/persona/contact/list/1.0/payload.d.ts.map +1 -0
  46. package/dist/persona/contact/list/1.0/payload.js +262 -0
  47. package/dist/persona/contact/list/1.0/payload.js.map +1 -0
  48. package/dist/persona/contact/put/1.0/payload.d.ts +885 -0
  49. package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -0
  50. package/dist/persona/contact/put/1.0/payload.js +518 -0
  51. package/dist/persona/contact/put/1.0/payload.js.map +1 -0
  52. package/dist/persona/correlation/analyze/1.0/payload.d.ts +648 -0
  53. package/dist/persona/correlation/analyze/1.0/payload.d.ts.map +1 -0
  54. package/dist/persona/correlation/analyze/1.0/payload.js +338 -0
  55. package/dist/persona/correlation/analyze/1.0/payload.js.map +1 -0
  56. package/dist/persona/disclosure/history/1.0/payload.d.ts +639 -0
  57. package/dist/persona/disclosure/history/1.0/payload.d.ts.map +1 -0
  58. package/dist/persona/disclosure/history/1.0/payload.js +339 -0
  59. package/dist/persona/disclosure/history/1.0/payload.js.map +1 -0
  60. package/dist/persona/disclosure/present/1.0/payload.d.ts +400 -0
  61. package/dist/persona/disclosure/present/1.0/payload.d.ts.map +1 -0
  62. package/dist/persona/disclosure/present/1.0/payload.js +211 -0
  63. package/dist/persona/disclosure/present/1.0/payload.js.map +1 -0
  64. package/dist/persona/disclosure/preview/1.0/payload.d.ts +858 -0
  65. package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -0
  66. package/dist/persona/disclosure/preview/1.0/payload.js +480 -0
  67. package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -0
  68. package/dist/persona/local/binding/set/1.0/payload.d.ts +394 -0
  69. package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -0
  70. package/dist/persona/local/binding/set/1.0/payload.js +226 -0
  71. package/dist/persona/local/binding/set/1.0/payload.js.map +1 -0
  72. package/dist/persona/local/profile/delete/1.0/payload.d.ts +311 -0
  73. package/dist/persona/local/profile/delete/1.0/payload.d.ts.map +1 -0
  74. package/dist/persona/local/profile/delete/1.0/payload.js +173 -0
  75. package/dist/persona/local/profile/delete/1.0/payload.js.map +1 -0
  76. package/dist/persona/local/profile/get/1.0/payload.d.ts +368 -0
  77. package/dist/persona/local/profile/get/1.0/payload.d.ts.map +1 -0
  78. package/dist/persona/local/profile/get/1.0/payload.js +210 -0
  79. package/dist/persona/local/profile/get/1.0/payload.js.map +1 -0
  80. package/dist/persona/local/profile/list/1.0/payload.d.ts +387 -0
  81. package/dist/persona/local/profile/list/1.0/payload.d.ts.map +1 -0
  82. package/dist/persona/local/profile/list/1.0/payload.js +214 -0
  83. package/dist/persona/local/profile/list/1.0/payload.js.map +1 -0
  84. package/dist/persona/local/profile/put/1.0/payload.d.ts +545 -0
  85. package/dist/persona/local/profile/put/1.0/payload.d.ts.map +1 -0
  86. package/dist/persona/local/profile/put/1.0/payload.js +315 -0
  87. package/dist/persona/local/profile/put/1.0/payload.js.map +1 -0
  88. package/dist/persona/profile/delete/1.0/payload.d.ts +350 -0
  89. package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -0
  90. package/dist/persona/profile/delete/1.0/payload.js +189 -0
  91. package/dist/persona/profile/delete/1.0/payload.js.map +1 -0
  92. package/dist/persona/profile/get/1.0/payload.d.ts +1307 -0
  93. package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -0
  94. package/dist/persona/profile/get/1.0/payload.js +802 -0
  95. package/dist/persona/profile/get/1.0/payload.js.map +1 -0
  96. package/dist/persona/profile/list/1.0/payload.d.ts +1120 -0
  97. package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -0
  98. package/dist/persona/profile/list/1.0/payload.js +680 -0
  99. package/dist/persona/profile/list/1.0/payload.js.map +1 -0
  100. package/dist/persona/profile/put/1.0/payload.d.ts +1115 -0
  101. package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -0
  102. package/dist/persona/profile/put/1.0/payload.js +675 -0
  103. package/dist/persona/profile/put/1.0/payload.js.map +1 -0
  104. package/dist/persona/renderers/list/1.0/payload.d.ts +362 -0
  105. package/dist/persona/renderers/list/1.0/payload.d.ts.map +1 -0
  106. package/dist/persona/renderers/list/1.0/payload.js +197 -0
  107. package/dist/persona/renderers/list/1.0/payload.js.map +1 -0
  108. package/dist/rooms/owner/claim/0.1/payload.d.ts +391 -0
  109. package/dist/rooms/owner/claim/0.1/payload.d.ts.map +1 -0
  110. package/dist/rooms/owner/claim/0.1/payload.js +214 -0
  111. package/dist/rooms/owner/claim/0.1/payload.js.map +1 -0
  112. package/dist/rooms/owner/transfer/0.1/payload.d.ts +391 -0
  113. package/dist/rooms/owner/transfer/0.1/payload.d.ts.map +1 -0
  114. package/dist/rooms/owner/transfer/0.1/payload.js +214 -0
  115. package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -0
  116. package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
  117. package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
  118. package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
  119. package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
  120. package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
  121. package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
  122. package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
  123. package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
  124. package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
  125. package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
  126. package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
  127. package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
  128. package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
  129. package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
  130. package/package.json +1 -1
  131. package/src/_shared/components.ts +213 -5
  132. package/src/index.ts +27 -0
  133. package/src/persona/_shared/0.1/persona-record.ts +23 -0
  134. package/src/persona/attribute/delete/1.0/payload.ts +238 -0
  135. package/src/persona/attribute/list/1.0/payload.ts +588 -0
  136. package/src/persona/attribute/put/1.0/payload.ts +559 -0
  137. package/src/persona/binding/get/1.0/payload.ts +257 -0
  138. package/src/persona/binding/list/1.0/payload.ts +260 -0
  139. package/src/persona/binding/set/1.0/payload.ts +370 -0
  140. package/src/persona/contact/delete/1.0/payload.ts +216 -0
  141. package/src/persona/contact/get/1.0/payload.ts +662 -0
  142. package/src/persona/contact/list/1.0/payload.ts +323 -0
  143. package/src/persona/contact/put/1.0/payload.ts +580 -0
  144. package/src/persona/correlation/analyze/1.0/payload.ts +466 -0
  145. package/src/persona/disclosure/history/1.0/payload.ts +415 -0
  146. package/src/persona/disclosure/present/1.0/payload.ts +274 -0
  147. package/src/persona/disclosure/preview/1.0/payload.ts +597 -0
  148. package/src/persona/local/binding/set/1.0/payload.ts +267 -0
  149. package/src/persona/local/profile/delete/1.0/payload.ts +215 -0
  150. package/src/persona/local/profile/get/1.0/payload.ts +251 -0
  151. package/src/persona/local/profile/list/1.0/payload.ts +260 -0
  152. package/src/persona/local/profile/put/1.0/payload.ts +373 -0
  153. package/src/persona/profile/delete/1.0/payload.ts +236 -0
  154. package/src/persona/profile/get/1.0/payload.ts +844 -0
  155. package/src/persona/profile/list/1.0/payload.ts +723 -0
  156. package/src/persona/profile/put/1.0/payload.ts +741 -0
  157. package/src/persona/renderers/list/1.0/payload.ts +248 -0
  158. package/src/rooms/owner/claim/0.1/payload.ts +268 -0
  159. package/src/rooms/owner/transfer/0.1/payload.ts +268 -0
  160. package/src/vta/_shared/0.1/app-state-record.ts +1 -1
  161. package/src/vta/app-state/delete/1.0/payload.ts +1 -1
  162. package/src/vta/app-state/get/1.0/payload.ts +1 -1
  163. package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
  164. package/src/vta/app-state/list/1.0/payload.ts +1 -1
  165. package/src/vta/app-state/put/1.0/payload.ts +1 -1
  166. package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
@@ -0,0 +1,257 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/binding/get/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, Ulid } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Read the binding for one persona in a context: whether a profile is bound, and its label — never its contents.
11
+ */
12
+ export interface PersonaBindingGetPayload {
13
+ contextId: string;
14
+ personaDid: string;
15
+ ext?: Ext;
16
+ }
17
+ /**
18
+ * Success response to persona/binding/get. Type https://trusttasks.org/spec/persona/binding/get/1.0#response. This task is context-callable, which is why the response is deliberately thin: an application in the context learns THAT a profile is bound and what the holder calls it, and never what it contains. Contents reach an application only through the disclosure path, where the holder sees a preview first.
19
+ */
20
+ export interface PersonaBindingGetResponsePayload {
21
+ contextId: string;
22
+ personaDid: string;
23
+ /**
24
+ * Whether a profile is bound. False is a normal state, not an error — a persona need not have a profile.
25
+ */
26
+ bound: boolean;
27
+ /**
28
+ * Present when bound. An identifier only; a context-scoped caller cannot resolve it, because profile reads are holder-authorized.
29
+ */
30
+ profileId?: Ulid;
31
+ /**
32
+ * The holder's label for the bound profile, so an application can show which identity is in use. Names a composition; reveals none of it.
33
+ */
34
+ profileName?: string;
35
+ /**
36
+ * How many claims the materialised projection holds. Lets an application render "12 details available" without obtaining any of them.
37
+ */
38
+ claimCount?: number;
39
+ boundAt?: string;
40
+ ext?: Ext;
41
+ }
42
+
43
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
44
+ export type { Ext, Ulid };
45
+
46
+ /** Trust Task type URI. */
47
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/binding/get/1.0" as const;
48
+
49
+ /** Stable alias for this specification's request payload shape. */
50
+ export type Payload = PersonaBindingGetPayload;
51
+
52
+ /** Trust Task response type URI (request type URI + "#response"). */
53
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/binding/get/1.0#response" as const;
54
+
55
+ /** Stable alias for this specification's success-response payload shape. */
56
+ export type Response = PersonaBindingGetResponsePayload;
57
+
58
+ /**
59
+ * This specification's payload schema, as a value.
60
+ *
61
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
62
+ * rather than only as a `.json` file because TypeScript types are erased
63
+ * at runtime: without a schema a consumer has nothing to validate, and
64
+ * every REQUIRED payload member is optional in practice. Cross-file
65
+ * `$ref`s are already inlined, so it needs no resolver.
66
+ */
67
+ export const PAYLOAD_SCHEMA = {
68
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
69
+ "$id": "https://trusttasks.org/spec/persona/binding/get/1.0",
70
+ "title": "Persona Binding Get — payload",
71
+ "description": "Read the binding for one persona in a context: whether a profile is bound, and its label — never its contents.",
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "contextId",
76
+ "personaDid"
77
+ ],
78
+ "properties": {
79
+ "contextId": {
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "personaDid": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "maxLength": 2048
87
+ },
88
+ "ext": {
89
+ "$ref": "#/$defs/Ext"
90
+ }
91
+ },
92
+ "$defs": {
93
+ "Response": {
94
+ "$anchor": "response",
95
+ "title": "Persona Binding Get — response payload",
96
+ "description": "Success response to persona/binding/get. Type https://trusttasks.org/spec/persona/binding/get/1.0#response. This task is context-callable, which is why the response is deliberately thin: an application in the context learns THAT a profile is bound and what the holder calls it, and never what it contains. Contents reach an application only through the disclosure path, where the holder sees a preview first.",
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": [
100
+ "contextId",
101
+ "personaDid",
102
+ "bound"
103
+ ],
104
+ "properties": {
105
+ "contextId": {
106
+ "type": "string",
107
+ "minLength": 1
108
+ },
109
+ "personaDid": {
110
+ "type": "string",
111
+ "minLength": 1
112
+ },
113
+ "bound": {
114
+ "type": "boolean",
115
+ "description": "Whether a profile is bound. False is a normal state, not an error — a persona need not have a profile."
116
+ },
117
+ "profileId": {
118
+ "$ref": "#/$defs/Ulid",
119
+ "description": "Present when bound. An identifier only; a context-scoped caller cannot resolve it, because profile reads are holder-authorized."
120
+ },
121
+ "profileName": {
122
+ "type": "string",
123
+ "maxLength": 128,
124
+ "description": "The holder's label for the bound profile, so an application can show which identity is in use. Names a composition; reveals none of it."
125
+ },
126
+ "claimCount": {
127
+ "type": "integer",
128
+ "minimum": 0,
129
+ "description": "How many claims the materialised projection holds. Lets an application render \"12 details available\" without obtaining any of them."
130
+ },
131
+ "boundAt": {
132
+ "type": "string",
133
+ "format": "date-time"
134
+ },
135
+ "ext": {
136
+ "$ref": "#/$defs/Ext"
137
+ }
138
+ }
139
+ },
140
+ "Ext": {
141
+ "title": "Ext",
142
+ "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.",
143
+ "type": "object",
144
+ "minProperties": 1,
145
+ "additionalProperties": true,
146
+ "propertyNames": {
147
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
148
+ }
149
+ },
150
+ "Ulid": {
151
+ "title": "Ulid",
152
+ "description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
153
+ "type": "string",
154
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
155
+ }
156
+ }
157
+ } as const;
158
+
159
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
160
+ export const RESPONSE_PAYLOAD_SCHEMA = {
161
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
162
+ "$ref": "#/$defs/Response",
163
+ "$defs": {
164
+ "Response": {
165
+ "$anchor": "response",
166
+ "title": "Persona Binding Get — response payload",
167
+ "description": "Success response to persona/binding/get. Type https://trusttasks.org/spec/persona/binding/get/1.0#response. This task is context-callable, which is why the response is deliberately thin: an application in the context learns THAT a profile is bound and what the holder calls it, and never what it contains. Contents reach an application only through the disclosure path, where the holder sees a preview first.",
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": [
171
+ "contextId",
172
+ "personaDid",
173
+ "bound"
174
+ ],
175
+ "properties": {
176
+ "contextId": {
177
+ "type": "string",
178
+ "minLength": 1
179
+ },
180
+ "personaDid": {
181
+ "type": "string",
182
+ "minLength": 1
183
+ },
184
+ "bound": {
185
+ "type": "boolean",
186
+ "description": "Whether a profile is bound. False is a normal state, not an error — a persona need not have a profile."
187
+ },
188
+ "profileId": {
189
+ "$ref": "#/$defs/Ulid",
190
+ "description": "Present when bound. An identifier only; a context-scoped caller cannot resolve it, because profile reads are holder-authorized."
191
+ },
192
+ "profileName": {
193
+ "type": "string",
194
+ "maxLength": 128,
195
+ "description": "The holder's label for the bound profile, so an application can show which identity is in use. Names a composition; reveals none of it."
196
+ },
197
+ "claimCount": {
198
+ "type": "integer",
199
+ "minimum": 0,
200
+ "description": "How many claims the materialised projection holds. Lets an application render \"12 details available\" without obtaining any of them."
201
+ },
202
+ "boundAt": {
203
+ "type": "string",
204
+ "format": "date-time"
205
+ },
206
+ "ext": {
207
+ "$ref": "#/$defs/Ext"
208
+ }
209
+ }
210
+ },
211
+ "Ext": {
212
+ "title": "Ext",
213
+ "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.",
214
+ "type": "object",
215
+ "minProperties": 1,
216
+ "additionalProperties": true,
217
+ "propertyNames": {
218
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
219
+ }
220
+ },
221
+ "Ulid": {
222
+ "title": "Ulid",
223
+ "description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
224
+ "type": "string",
225
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
226
+ }
227
+ }
228
+ } as const;
229
+
230
+ /**
231
+ * SPEC.md §7.2 policy for the request variant, from this specification's
232
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
233
+ * per-specification and cannot be derived from the document alone, and
234
+ * item 2 needs the schema this carries.
235
+ */
236
+ export const SPEC = {
237
+ typeUri: TYPE_URI,
238
+ isBearer: false,
239
+ isProofRequired: true,
240
+ isRecipientRequired: true,
241
+ isIssuedAtRequired: false,
242
+ payloadSchema: PAYLOAD_SCHEMA,
243
+ } as const;
244
+
245
+ /**
246
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
247
+ * tracks the *issuer* party's requirement because a response swaps the
248
+ * parties (§7.3 item 5).
249
+ */
250
+ export const RESPONSE_SPEC = {
251
+ typeUri: RESPONSE_TYPE_URI,
252
+ isBearer: false,
253
+ isProofRequired: true,
254
+ isRecipientRequired: true,
255
+ isIssuedAtRequired: false,
256
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
257
+ } as const;
@@ -0,0 +1,260 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/binding/list/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Enumerate the personas present in one context. This context only — an application learns which identities operate where it does, and nothing about anywhere else the holder operates.
11
+ */
12
+ export interface PersonaBindingListPayload {
13
+ contextId: string;
14
+ cursor?: string;
15
+ limit?: number;
16
+ ext?: Ext;
17
+ }
18
+ /**
19
+ * Success response to persona/binding/list. Type https://trusttasks.org/spec/persona/binding/list/1.0#response. Carries the same thin summary as persona/binding/get, for the same reason: an application needs to know which identity is in use, not what it contains.
20
+ */
21
+ export interface PersonaBindingListResponsePayload {
22
+ /**
23
+ * @maxItems 500
24
+ */
25
+ personas: {
26
+ personaDid: string;
27
+ bound: boolean;
28
+ /**
29
+ * The holder's label for the bound profile. Names a composition; reveals none of it.
30
+ */
31
+ profileName?: string;
32
+ claimCount?: number;
33
+ /**
34
+ * True when the bound profile is context-local rather than imported from the holder's pool. Worth surfacing: a local persona is one the application itself may have composed, and an application should be able to tell what it authored from what the holder pushed down.
35
+ */
36
+ isLocal?: boolean;
37
+ }[];
38
+ nextCursor?: string;
39
+ ext?: Ext;
40
+ }
41
+
42
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
43
+ export type { Ext };
44
+
45
+ /** Trust Task type URI. */
46
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/binding/list/1.0" as const;
47
+
48
+ /** Stable alias for this specification's request payload shape. */
49
+ export type Payload = PersonaBindingListPayload;
50
+
51
+ /** Trust Task response type URI (request type URI + "#response"). */
52
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/binding/list/1.0#response" as const;
53
+
54
+ /** Stable alias for this specification's success-response payload shape. */
55
+ export type Response = PersonaBindingListResponsePayload;
56
+
57
+ /**
58
+ * This specification's payload schema, as a value.
59
+ *
60
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
61
+ * rather than only as a `.json` file because TypeScript types are erased
62
+ * at runtime: without a schema a consumer has nothing to validate, and
63
+ * every REQUIRED payload member is optional in practice. Cross-file
64
+ * `$ref`s are already inlined, so it needs no resolver.
65
+ */
66
+ export const PAYLOAD_SCHEMA = {
67
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
68
+ "$id": "https://trusttasks.org/spec/persona/binding/list/1.0",
69
+ "title": "Persona Binding List — payload",
70
+ "description": "Enumerate the personas present in one context. This context only — an application learns which identities operate where it does, and nothing about anywhere else the holder operates.",
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": [
74
+ "contextId"
75
+ ],
76
+ "properties": {
77
+ "contextId": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "cursor": {
82
+ "type": "string",
83
+ "maxLength": 4096
84
+ },
85
+ "limit": {
86
+ "type": "integer",
87
+ "minimum": 1,
88
+ "maximum": 500,
89
+ "default": 100
90
+ },
91
+ "ext": {
92
+ "$ref": "#/$defs/Ext"
93
+ }
94
+ },
95
+ "$defs": {
96
+ "Response": {
97
+ "$anchor": "response",
98
+ "title": "Persona Binding List — response payload",
99
+ "description": "Success response to persona/binding/list. Type https://trusttasks.org/spec/persona/binding/list/1.0#response. Carries the same thin summary as persona/binding/get, for the same reason: an application needs to know which identity is in use, not what it contains.",
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": [
103
+ "personas"
104
+ ],
105
+ "properties": {
106
+ "personas": {
107
+ "type": "array",
108
+ "maxItems": 500,
109
+ "items": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "personaDid",
114
+ "bound"
115
+ ],
116
+ "properties": {
117
+ "personaDid": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ },
121
+ "bound": {
122
+ "type": "boolean"
123
+ },
124
+ "profileName": {
125
+ "type": "string",
126
+ "maxLength": 128,
127
+ "description": "The holder's label for the bound profile. Names a composition; reveals none of it."
128
+ },
129
+ "claimCount": {
130
+ "type": "integer",
131
+ "minimum": 0
132
+ },
133
+ "isLocal": {
134
+ "type": "boolean",
135
+ "description": "True when the bound profile is context-local rather than imported from the holder's pool. Worth surfacing: a local persona is one the application itself may have composed, and an application should be able to tell what it authored from what the holder pushed down."
136
+ }
137
+ }
138
+ }
139
+ },
140
+ "nextCursor": {
141
+ "type": "string",
142
+ "maxLength": 4096
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
+ }
160
+ } as const;
161
+
162
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
163
+ export const RESPONSE_PAYLOAD_SCHEMA = {
164
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
165
+ "$ref": "#/$defs/Response",
166
+ "$defs": {
167
+ "Response": {
168
+ "$anchor": "response",
169
+ "title": "Persona Binding List — response payload",
170
+ "description": "Success response to persona/binding/list. Type https://trusttasks.org/spec/persona/binding/list/1.0#response. Carries the same thin summary as persona/binding/get, for the same reason: an application needs to know which identity is in use, not what it contains.",
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": [
174
+ "personas"
175
+ ],
176
+ "properties": {
177
+ "personas": {
178
+ "type": "array",
179
+ "maxItems": 500,
180
+ "items": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "required": [
184
+ "personaDid",
185
+ "bound"
186
+ ],
187
+ "properties": {
188
+ "personaDid": {
189
+ "type": "string",
190
+ "minLength": 1
191
+ },
192
+ "bound": {
193
+ "type": "boolean"
194
+ },
195
+ "profileName": {
196
+ "type": "string",
197
+ "maxLength": 128,
198
+ "description": "The holder's label for the bound profile. Names a composition; reveals none of it."
199
+ },
200
+ "claimCount": {
201
+ "type": "integer",
202
+ "minimum": 0
203
+ },
204
+ "isLocal": {
205
+ "type": "boolean",
206
+ "description": "True when the bound profile is context-local rather than imported from the holder's pool. Worth surfacing: a local persona is one the application itself may have composed, and an application should be able to tell what it authored from what the holder pushed down."
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "nextCursor": {
212
+ "type": "string",
213
+ "maxLength": 4096
214
+ },
215
+ "ext": {
216
+ "$ref": "#/$defs/Ext"
217
+ }
218
+ }
219
+ },
220
+ "Ext": {
221
+ "title": "Ext",
222
+ "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.",
223
+ "type": "object",
224
+ "minProperties": 1,
225
+ "additionalProperties": true,
226
+ "propertyNames": {
227
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
228
+ }
229
+ }
230
+ }
231
+ } as const;
232
+
233
+ /**
234
+ * SPEC.md §7.2 policy for the request variant, from this specification's
235
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
236
+ * per-specification and cannot be derived from the document alone, and
237
+ * item 2 needs the schema this carries.
238
+ */
239
+ export const SPEC = {
240
+ typeUri: TYPE_URI,
241
+ isBearer: false,
242
+ isProofRequired: true,
243
+ isRecipientRequired: true,
244
+ isIssuedAtRequired: false,
245
+ payloadSchema: PAYLOAD_SCHEMA,
246
+ } as const;
247
+
248
+ /**
249
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
250
+ * tracks the *issuer* party's requirement because a response swaps the
251
+ * parties (§7.3 item 5).
252
+ */
253
+ export const RESPONSE_SPEC = {
254
+ typeUri: RESPONSE_TYPE_URI,
255
+ isBearer: false,
256
+ isProofRequired: true,
257
+ isRecipientRequired: true,
258
+ isIssuedAtRequired: false,
259
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
260
+ } as const;