@openvtc/trust-tasks 0.22.5 → 0.22.7

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 (199) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/_shared/components.d.ts +434 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/acl/_shared/0.1/acl-entry.d.ts +1 -1
  5. package/dist/acl/_shared/0.1/acl-entry.d.ts.map +1 -1
  6. package/dist/acl/_shared/0.2/acl-entry.d.ts +22 -0
  7. package/dist/acl/_shared/0.2/acl-entry.d.ts.map +1 -0
  8. package/dist/acl/_shared/0.2/acl-entry.js +6 -0
  9. package/dist/acl/_shared/0.2/acl-entry.js.map +1 -0
  10. package/dist/acl/change-role/0.1/payload.d.ts +1 -1
  11. package/dist/acl/change-role/0.1/payload.d.ts.map +1 -1
  12. package/dist/acl/change-role/0.2/payload.d.ts +1679 -0
  13. package/dist/acl/change-role/0.2/payload.d.ts.map +1 -0
  14. package/dist/acl/change-role/0.2/payload.js +955 -0
  15. package/dist/acl/change-role/0.2/payload.js.map +1 -0
  16. package/dist/acl/grant/0.1/payload.d.ts +1 -1
  17. package/dist/acl/grant/0.1/payload.d.ts.map +1 -1
  18. package/dist/acl/grant/0.2/payload.d.ts +1649 -0
  19. package/dist/acl/grant/0.2/payload.d.ts.map +1 -0
  20. package/dist/acl/grant/0.2/payload.js +942 -0
  21. package/dist/acl/grant/0.2/payload.js.map +1 -0
  22. package/dist/acl/list/0.1/payload.d.ts +1 -1
  23. package/dist/acl/list/0.1/payload.d.ts.map +1 -1
  24. package/dist/acl/list/0.2/payload.d.ts +1853 -0
  25. package/dist/acl/list/0.2/payload.d.ts.map +1 -0
  26. package/dist/acl/list/0.2/payload.js +1041 -0
  27. package/dist/acl/list/0.2/payload.js.map +1 -0
  28. package/dist/acl/revoke/0.1/payload.d.ts +1 -1
  29. package/dist/acl/revoke/0.1/payload.d.ts.map +1 -1
  30. package/dist/acl/revoke/0.2/payload.d.ts +1844 -0
  31. package/dist/acl/revoke/0.2/payload.d.ts.map +1 -0
  32. package/dist/acl/revoke/0.2/payload.js +1052 -0
  33. package/dist/acl/revoke/0.2/payload.js.map +1 -0
  34. package/dist/acl/show/0.1/payload.d.ts +1 -1
  35. package/dist/acl/show/0.1/payload.d.ts.map +1 -1
  36. package/dist/acl/show/0.2/payload.d.ts +1689 -0
  37. package/dist/acl/show/0.2/payload.d.ts.map +1 -0
  38. package/dist/acl/show/0.2/payload.js +968 -0
  39. package/dist/acl/show/0.2/payload.js.map +1 -0
  40. package/dist/acl/swap-key/0.1/payload.d.ts +1 -1
  41. package/dist/acl/swap-key/0.1/payload.d.ts.map +1 -1
  42. package/dist/acl/update/0.1/payload.d.ts +1 -1
  43. package/dist/acl/update/0.1/payload.d.ts.map +1 -1
  44. package/dist/acl/update/0.2/payload.d.ts +1784 -0
  45. package/dist/acl/update/0.2/payload.d.ts.map +1 -0
  46. package/dist/acl/update/0.2/payload.js +1005 -0
  47. package/dist/acl/update/0.2/payload.js.map +1 -0
  48. package/dist/auth/signing-key/authorize/0.1/payload.d.ts +199 -0
  49. package/dist/auth/signing-key/authorize/0.1/payload.d.ts.map +1 -0
  50. package/dist/auth/signing-key/authorize/0.1/payload.js +108 -0
  51. package/dist/auth/signing-key/authorize/0.1/payload.js.map +1 -0
  52. package/dist/auth/signing-key/enroll/0.2/payload.d.ts +569 -0
  53. package/dist/auth/signing-key/enroll/0.2/payload.d.ts.map +1 -0
  54. package/dist/auth/signing-key/enroll/0.2/payload.js +315 -0
  55. package/dist/auth/signing-key/enroll/0.2/payload.js.map +1 -0
  56. package/dist/auth/step-up/approve-request/0.4/payload.d.ts +672 -0
  57. package/dist/auth/step-up/approve-request/0.4/payload.d.ts.map +1 -0
  58. package/dist/auth/step-up/approve-request/0.4/payload.js +373 -0
  59. package/dist/auth/step-up/approve-request/0.4/payload.js.map +1 -0
  60. package/dist/auth/step-up/approve-response/0.6/payload.d.ts +974 -0
  61. package/dist/auth/step-up/approve-response/0.6/payload.d.ts.map +1 -0
  62. package/dist/auth/step-up/approve-response/0.6/payload.js +552 -0
  63. package/dist/auth/step-up/approve-response/0.6/payload.js.map +1 -0
  64. package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts +16 -0
  65. package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts.map +1 -0
  66. package/dist/auth/step-up/approver/_shared/0.1/approver.js +6 -0
  67. package/dist/auth/step-up/approver/_shared/0.1/approver.js.map +1 -0
  68. package/dist/auth/step-up/approver/attest/0.1/payload.d.ts +174 -0
  69. package/dist/auth/step-up/approver/attest/0.1/payload.d.ts.map +1 -0
  70. package/dist/auth/step-up/approver/attest/0.1/payload.js +97 -0
  71. package/dist/auth/step-up/approver/attest/0.1/payload.js.map +1 -0
  72. package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts +503 -0
  73. package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts.map +1 -0
  74. package/dist/auth/step-up/approver/enroll/0.1/payload.js +285 -0
  75. package/dist/auth/step-up/approver/enroll/0.1/payload.js.map +1 -0
  76. package/dist/auth/step-up/approver/invite/0.1/payload.d.ts +375 -0
  77. package/dist/auth/step-up/approver/invite/0.1/payload.d.ts.map +1 -0
  78. package/dist/auth/step-up/approver/invite/0.1/payload.js +200 -0
  79. package/dist/auth/step-up/approver/invite/0.1/payload.js.map +1 -0
  80. package/dist/auth/step-up/approver/list/0.1/payload.d.ts +477 -0
  81. package/dist/auth/step-up/approver/list/0.1/payload.d.ts.map +1 -0
  82. package/dist/auth/step-up/approver/list/0.1/payload.js +272 -0
  83. package/dist/auth/step-up/approver/list/0.1/payload.js.map +1 -0
  84. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts +512 -0
  85. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts.map +1 -0
  86. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js +290 -0
  87. package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js.map +1 -0
  88. package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts +343 -0
  89. package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts.map +1 -0
  90. package/dist/auth/step-up/approver/redeem/start/0.1/payload.js +187 -0
  91. package/dist/auth/step-up/approver/redeem/start/0.1/payload.js.map +1 -0
  92. package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts +534 -0
  93. package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts.map +1 -0
  94. package/dist/auth/step-up/approver/revoke/0.1/payload.js +301 -0
  95. package/dist/auth/step-up/approver/revoke/0.1/payload.js.map +1 -0
  96. package/dist/index.d.ts +33 -0
  97. package/dist/index.d.ts.map +1 -1
  98. package/dist/index.js +33 -0
  99. package/dist/index.js.map +1 -1
  100. package/dist/task-consent/decision/0.2/payload.d.ts +775 -0
  101. package/dist/task-consent/decision/0.2/payload.d.ts.map +1 -0
  102. package/dist/task-consent/decision/0.2/payload.js +450 -0
  103. package/dist/task-consent/decision/0.2/payload.js.map +1 -0
  104. package/dist/vtc/admin/actions/_shared/0.1/action.d.ts +24 -0
  105. package/dist/vtc/admin/actions/_shared/0.1/action.d.ts.map +1 -0
  106. package/dist/vtc/admin/actions/_shared/0.1/action.js +6 -0
  107. package/dist/vtc/admin/actions/_shared/0.1/action.js.map +1 -0
  108. package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts +1012 -0
  109. package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts.map +1 -0
  110. package/dist/vtc/admin/actions/acknowledge/0.1/payload.js +636 -0
  111. package/dist/vtc/admin/actions/acknowledge/0.1/payload.js.map +1 -0
  112. package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts +1026 -0
  113. package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts.map +1 -0
  114. package/dist/vtc/admin/actions/cancel/0.1/payload.js +641 -0
  115. package/dist/vtc/admin/actions/cancel/0.1/payload.js.map +1 -0
  116. package/dist/vtc/admin/actions/list/0.1/payload.d.ts +1200 -0
  117. package/dist/vtc/admin/actions/list/0.1/payload.d.ts.map +1 -0
  118. package/dist/vtc/admin/actions/list/0.1/payload.js +726 -0
  119. package/dist/vtc/admin/actions/list/0.1/payload.js.map +1 -0
  120. package/dist/vtc/admin/actions/show/0.1/payload.d.ts +1012 -0
  121. package/dist/vtc/admin/actions/show/0.1/payload.d.ts.map +1 -0
  122. package/dist/vtc/admin/actions/show/0.1/payload.js +636 -0
  123. package/dist/vtc/admin/actions/show/0.1/payload.js.map +1 -0
  124. package/dist/vtc/install/claim/finish/0.3/payload.d.ts +379 -0
  125. package/dist/vtc/install/claim/finish/0.3/payload.d.ts.map +1 -0
  126. package/dist/vtc/install/claim/finish/0.3/payload.js +205 -0
  127. package/dist/vtc/install/claim/finish/0.3/payload.js.map +1 -0
  128. package/dist/vtc/install/claim/start/0.3/payload.d.ts +368 -0
  129. package/dist/vtc/install/claim/start/0.3/payload.d.ts.map +1 -0
  130. package/dist/vtc/install/claim/start/0.3/payload.js +201 -0
  131. package/dist/vtc/install/claim/start/0.3/payload.js.map +1 -0
  132. package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts +208 -0
  133. package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts.map +1 -0
  134. package/dist/vtc/members/authority-reduced-notice/0.1/payload.js +112 -0
  135. package/dist/vtc/members/authority-reduced-notice/0.1/payload.js.map +1 -0
  136. package/dist/vtc/roles/_shared/0.1/role.d.ts +16 -0
  137. package/dist/vtc/roles/_shared/0.1/role.d.ts.map +1 -0
  138. package/dist/vtc/roles/_shared/0.1/role.js +6 -0
  139. package/dist/vtc/roles/_shared/0.1/role.js.map +1 -0
  140. package/dist/vtc/roles/define/0.1/payload.d.ts +703 -0
  141. package/dist/vtc/roles/define/0.1/payload.d.ts.map +1 -0
  142. package/dist/vtc/roles/define/0.1/payload.js +371 -0
  143. package/dist/vtc/roles/define/0.1/payload.js.map +1 -0
  144. package/dist/vtc/roles/delete/0.1/payload.d.ts +281 -0
  145. package/dist/vtc/roles/delete/0.1/payload.d.ts.map +1 -0
  146. package/dist/vtc/roles/delete/0.1/payload.js +152 -0
  147. package/dist/vtc/roles/delete/0.1/payload.js.map +1 -0
  148. package/dist/vtc/roles/list/0.1/payload.d.ts +639 -0
  149. package/dist/vtc/roles/list/0.1/payload.d.ts.map +1 -0
  150. package/dist/vtc/roles/list/0.1/payload.js +345 -0
  151. package/dist/vtc/roles/list/0.1/payload.js.map +1 -0
  152. package/dist/vtc/roles/show/0.1/payload.d.ts +651 -0
  153. package/dist/vtc/roles/show/0.1/payload.d.ts.map +1 -0
  154. package/dist/vtc/roles/show/0.1/payload.js +351 -0
  155. package/dist/vtc/roles/show/0.1/payload.js.map +1 -0
  156. package/package.json +1 -1
  157. package/src/_shared/components.ts +440 -1
  158. package/src/acl/_shared/0.1/acl-entry.ts +1 -1
  159. package/src/acl/_shared/0.2/acl-entry.ts +23 -0
  160. package/src/acl/change-role/0.1/payload.ts +1 -1
  161. package/src/acl/change-role/0.2/payload.ts +1011 -0
  162. package/src/acl/grant/0.1/payload.ts +1 -1
  163. package/src/acl/grant/0.2/payload.ts +990 -0
  164. package/src/acl/list/0.1/payload.ts +1 -1
  165. package/src/acl/list/0.2/payload.ts +1125 -0
  166. package/src/acl/revoke/0.1/payload.ts +1 -1
  167. package/src/acl/revoke/0.2/payload.ts +1122 -0
  168. package/src/acl/show/0.1/payload.ts +1 -1
  169. package/src/acl/show/0.2/payload.ts +1016 -0
  170. package/src/acl/swap-key/0.1/payload.ts +1 -1
  171. package/src/acl/update/0.1/payload.ts +1 -1
  172. package/src/acl/update/0.2/payload.ts +1094 -0
  173. package/src/auth/signing-key/authorize/0.1/payload.ts +141 -0
  174. package/src/auth/signing-key/enroll/0.2/payload.ts +365 -0
  175. package/src/auth/step-up/approve-request/0.4/payload.ts +461 -0
  176. package/src/auth/step-up/approve-response/0.6/payload.ts +648 -0
  177. package/src/auth/step-up/approver/_shared/0.1/approver.ts +17 -0
  178. package/src/auth/step-up/approver/attest/0.1/payload.ts +135 -0
  179. package/src/auth/step-up/approver/enroll/0.1/payload.ts +329 -0
  180. package/src/auth/step-up/approver/invite/0.1/payload.ts +258 -0
  181. package/src/auth/step-up/approver/list/0.1/payload.ts +318 -0
  182. package/src/auth/step-up/approver/redeem/finish/0.1/payload.ts +337 -0
  183. package/src/auth/step-up/approver/redeem/start/0.1/payload.ts +241 -0
  184. package/src/auth/step-up/approver/revoke/0.1/payload.ts +352 -0
  185. package/src/index.ts +33 -0
  186. package/src/task-consent/decision/0.2/payload.ts +537 -0
  187. package/src/vtc/admin/actions/_shared/0.1/action.ts +25 -0
  188. package/src/vtc/admin/actions/acknowledge/0.1/payload.ts +671 -0
  189. package/src/vtc/admin/actions/cancel/0.1/payload.ts +680 -0
  190. package/src/vtc/admin/actions/list/0.1/payload.ts +795 -0
  191. package/src/vtc/admin/actions/show/0.1/payload.ts +671 -0
  192. package/src/vtc/install/claim/finish/0.3/payload.ts +253 -0
  193. package/src/vtc/install/claim/start/0.3/payload.ts +256 -0
  194. package/src/vtc/members/authority-reduced-notice/0.1/payload.ts +162 -0
  195. package/src/vtc/roles/_shared/0.1/role.ts +17 -0
  196. package/src/vtc/roles/define/0.1/payload.ts +435 -0
  197. package/src/vtc/roles/delete/0.1/payload.ts +200 -0
  198. package/src/vtc/roles/list/0.1/payload.ts +389 -0
  199. package/src/vtc/roles/show/0.1/payload.ts +399 -0
@@ -0,0 +1,258 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/step-up/approver/invite/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { ApproverLabel, Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An administrator asks the relying party for a single-use invite, redeemed by the invited subject with a separately delivered claim code, to bind a step-up approver to that subject. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface AuthStepUpApproverInvitePayload {
13
+ /**
14
+ * The DID invited to bind a step-up approver. MUST be a subject the relying party recognises, and MUST NOT be the administrator issuing the invite.
15
+ */
16
+ subject: string;
17
+ /**
18
+ * A suggested label for the approver. The subject MAY override it at redeem/finish.
19
+ */
20
+ label?: ApproverLabel;
21
+ /**
22
+ * Seconds the invite stays redeemable. Default 900 (15 minutes). The relying party refuses more than 86400 (24 hours), or more than its own lower cap, with `ttlTooLong`.
23
+ */
24
+ ttl?: number;
25
+ ext?: Ext;
26
+ }
27
+ /**
28
+ * The issued invite. The claim code is returned only here.
29
+ */
30
+ export interface AuthStepUpApproverInviteResponsePayload {
31
+ /**
32
+ * The relying party's identifier for the invite, for audit and administration. Not a redemption factor: it is neither the token nor derivable from it.
33
+ */
34
+ inviteId: string;
35
+ /**
36
+ * Where the invited subject redeems the invite. Carries the single-use token (≥128 bits). MUST NOT carry the claim code.
37
+ */
38
+ url: string;
39
+ /**
40
+ * A short code (≥40 bits) the invited subject types at redemption, returned exactly once. Delivered by the administrator over a different channel from `url`. The relying party stores only a slow hash of it.
41
+ */
42
+ claimCode: string;
43
+ /**
44
+ * When the invite stops being redeemable.
45
+ */
46
+ expiresAt: string;
47
+ ext?: Ext;
48
+ }
49
+
50
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
51
+ export type { ApproverLabel, Ext };
52
+
53
+ /** Trust Task type URI. */
54
+ export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/invite/0.1" as const;
55
+
56
+ /** Stable alias for this specification's request payload shape. */
57
+ export type Payload = AuthStepUpApproverInvitePayload;
58
+
59
+ /** Trust Task response type URI (request type URI + "#response"). */
60
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/invite/0.1#response" as const;
61
+
62
+ /** Stable alias for this specification's success-response payload shape. */
63
+ export type Response = AuthStepUpApproverInviteResponsePayload;
64
+
65
+ /**
66
+ * This specification's payload schema, as a value.
67
+ *
68
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
69
+ * rather than only as a `.json` file because TypeScript types are erased
70
+ * at runtime: without a schema a consumer has nothing to validate, and
71
+ * every REQUIRED payload member is optional in practice. Cross-file
72
+ * `$ref`s are already inlined, so it needs no resolver.
73
+ */
74
+ export const PAYLOAD_SCHEMA = {
75
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
76
+ "$id": "https://trusttasks.org/spec/auth/step-up/approver/invite/0.1",
77
+ "title": "Auth — Step-up Approver Invite — payload",
78
+ "description": "An administrator asks the relying party for a single-use invite, redeemed by the invited subject with a separately delivered claim code, to bind a step-up approver to that subject. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": [
82
+ "subject"
83
+ ],
84
+ "properties": {
85
+ "subject": {
86
+ "type": "string",
87
+ "pattern": "^did:",
88
+ "minLength": 5,
89
+ "maxLength": 2048,
90
+ "description": "The DID invited to bind a step-up approver. MUST be a subject the relying party recognises, and MUST NOT be the administrator issuing the invite."
91
+ },
92
+ "label": {
93
+ "$ref": "#/$defs/ApproverLabel",
94
+ "description": "A suggested label for the approver. The subject MAY override it at redeem/finish."
95
+ },
96
+ "ttl": {
97
+ "type": "integer",
98
+ "minimum": 1,
99
+ "description": "Seconds the invite stays redeemable. Default 900 (15 minutes). The relying party refuses more than 86400 (24 hours), or more than its own lower cap, with `ttlTooLong`."
100
+ },
101
+ "ext": {
102
+ "$ref": "#/$defs/Ext"
103
+ }
104
+ },
105
+ "$defs": {
106
+ "Response": {
107
+ "$anchor": "response",
108
+ "title": "Auth — Step-up Approver Invite — response payload",
109
+ "description": "The issued invite. The claim code is returned only here.",
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "inviteId",
114
+ "url",
115
+ "claimCode",
116
+ "expiresAt"
117
+ ],
118
+ "properties": {
119
+ "inviteId": {
120
+ "type": "string",
121
+ "minLength": 1,
122
+ "maxLength": 128,
123
+ "description": "The relying party's identifier for the invite, for audit and administration. Not a redemption factor: it is neither the token nor derivable from it."
124
+ },
125
+ "url": {
126
+ "type": "string",
127
+ "format": "uri",
128
+ "description": "Where the invited subject redeems the invite. Carries the single-use token (≥128 bits). MUST NOT carry the claim code."
129
+ },
130
+ "claimCode": {
131
+ "type": "string",
132
+ "minLength": 8,
133
+ "maxLength": 64,
134
+ "description": "A short code (≥40 bits) the invited subject types at redemption, returned exactly once. Delivered by the administrator over a different channel from `url`. The relying party stores only a slow hash of it."
135
+ },
136
+ "expiresAt": {
137
+ "type": "string",
138
+ "format": "date-time",
139
+ "description": "When the invite stops being redeemable."
140
+ },
141
+ "ext": {
142
+ "$ref": "#/$defs/Ext"
143
+ }
144
+ }
145
+ },
146
+ "Ext": {
147
+ "title": "Ext",
148
+ "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.",
149
+ "type": "object",
150
+ "minProperties": 1,
151
+ "additionalProperties": true,
152
+ "propertyNames": {
153
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
154
+ }
155
+ },
156
+ "ApproverLabel": {
157
+ "title": "ApproverLabel",
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "maxLength": 64,
161
+ "description": "A human-readable name for where the approver lives — e.g. `Browser plugin — work laptop`. Chosen by the subject (or suggested by an inviter), untrusted, and attributed to its author wherever it is rendered. Absent rather than invented when none was chosen."
162
+ }
163
+ }
164
+ } as const;
165
+
166
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
167
+ export const RESPONSE_PAYLOAD_SCHEMA = {
168
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
169
+ "$ref": "#/$defs/Response",
170
+ "$defs": {
171
+ "Response": {
172
+ "$anchor": "response",
173
+ "title": "Auth — Step-up Approver Invite — response payload",
174
+ "description": "The issued invite. The claim code is returned only here.",
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": [
178
+ "inviteId",
179
+ "url",
180
+ "claimCode",
181
+ "expiresAt"
182
+ ],
183
+ "properties": {
184
+ "inviteId": {
185
+ "type": "string",
186
+ "minLength": 1,
187
+ "maxLength": 128,
188
+ "description": "The relying party's identifier for the invite, for audit and administration. Not a redemption factor: it is neither the token nor derivable from it."
189
+ },
190
+ "url": {
191
+ "type": "string",
192
+ "format": "uri",
193
+ "description": "Where the invited subject redeems the invite. Carries the single-use token (≥128 bits). MUST NOT carry the claim code."
194
+ },
195
+ "claimCode": {
196
+ "type": "string",
197
+ "minLength": 8,
198
+ "maxLength": 64,
199
+ "description": "A short code (≥40 bits) the invited subject types at redemption, returned exactly once. Delivered by the administrator over a different channel from `url`. The relying party stores only a slow hash of it."
200
+ },
201
+ "expiresAt": {
202
+ "type": "string",
203
+ "format": "date-time",
204
+ "description": "When the invite stops being redeemable."
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
+ "ApproverLabel": {
222
+ "title": "ApproverLabel",
223
+ "type": "string",
224
+ "minLength": 1,
225
+ "maxLength": 64,
226
+ "description": "A human-readable name for where the approver lives — e.g. `Browser plugin — work laptop`. Chosen by the subject (or suggested by an inviter), untrusted, and attributed to its author wherever it is rendered. Absent rather than invented when none was chosen."
227
+ }
228
+ }
229
+ } as const;
230
+
231
+ /**
232
+ * SPEC.md §7.2 policy for the request variant, from this specification's
233
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
234
+ * per-specification and cannot be derived from the document alone, and
235
+ * item 2 needs the schema this carries.
236
+ */
237
+ export const SPEC = {
238
+ typeUri: TYPE_URI,
239
+ isBearer: false,
240
+ isProofRequired: true,
241
+ isRecipientRequired: true,
242
+ isIssuedAtRequired: true,
243
+ payloadSchema: PAYLOAD_SCHEMA,
244
+ } as const;
245
+
246
+ /**
247
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
248
+ * tracks the *issuer* party's requirement because a response swaps the
249
+ * parties (§7.3 item 5).
250
+ */
251
+ export const RESPONSE_SPEC = {
252
+ typeUri: RESPONSE_TYPE_URI,
253
+ isBearer: false,
254
+ isProofRequired: true,
255
+ isRecipientRequired: true,
256
+ isIssuedAtRequired: true,
257
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
258
+ } as const;
@@ -0,0 +1,318 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/step-up/approver/list/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Approver, ApproverDid, ApproverLabel, EnrolledVia, Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * List the live step-up approvers bound to one subject — the caller by default, or another subject within an administrator's authority. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface AuthStepUpApproverListPayload {
13
+ /**
14
+ * Whose approvers to list. Absent means the caller. A subject other than the caller is answered only for an administrator whose standing covers it.
15
+ */
16
+ subject?: string;
17
+ ext?: Ext;
18
+ }
19
+ /**
20
+ * Every live approver bound to the subject. Empty when the subject holds none.
21
+ */
22
+ export interface AuthStepUpApproverListResponsePayload {
23
+ /**
24
+ * The subject's live approvers — at most five, so the whole set is always returned.
25
+ *
26
+ * @maxItems 5
27
+ */
28
+ approvers:
29
+ | []
30
+ | [Approver]
31
+ | [Approver, Approver]
32
+ | [Approver, Approver, Approver]
33
+ | [Approver, Approver, Approver, Approver]
34
+ | [Approver, Approver, Approver, Approver, Approver];
35
+ ext?: Ext;
36
+ }
37
+
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { Approver, ApproverDid, ApproverLabel, EnrolledVia, Ext };
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/list/0.1" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = AuthStepUpApproverListPayload;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/list/0.1#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = AuthStepUpApproverListResponsePayload;
52
+
53
+ /**
54
+ * This specification's payload schema, as a value.
55
+ *
56
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
57
+ * rather than only as a `.json` file because TypeScript types are erased
58
+ * at runtime: without a schema a consumer has nothing to validate, and
59
+ * every REQUIRED payload member is optional in practice. Cross-file
60
+ * `$ref`s are already inlined, so it needs no resolver.
61
+ */
62
+ export const PAYLOAD_SCHEMA = {
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "$id": "https://trusttasks.org/spec/auth/step-up/approver/list/0.1",
65
+ "title": "Auth — Step-up Approver List — payload",
66
+ "description": "List the live step-up approvers bound to one subject — the caller by default, or another subject within an administrator's authority. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "properties": {
70
+ "subject": {
71
+ "type": "string",
72
+ "pattern": "^did:",
73
+ "minLength": 5,
74
+ "maxLength": 2048,
75
+ "description": "Whose approvers to list. Absent means the caller. A subject other than the caller is answered only for an administrator whose standing covers it."
76
+ },
77
+ "ext": {
78
+ "$ref": "#/$defs/Ext"
79
+ }
80
+ },
81
+ "$defs": {
82
+ "Response": {
83
+ "$anchor": "response",
84
+ "title": "Auth — Step-up Approver List — response payload",
85
+ "description": "Every live approver bound to the subject. Empty when the subject holds none.",
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": [
89
+ "approvers"
90
+ ],
91
+ "properties": {
92
+ "approvers": {
93
+ "type": "array",
94
+ "maxItems": 5,
95
+ "items": {
96
+ "$ref": "#/$defs/Approver"
97
+ },
98
+ "description": "The subject's live approvers — at most five, so the whole set is always returned."
99
+ },
100
+ "ext": {
101
+ "$ref": "#/$defs/Ext"
102
+ }
103
+ }
104
+ },
105
+ "Ext": {
106
+ "title": "Ext",
107
+ "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.",
108
+ "type": "object",
109
+ "minProperties": 1,
110
+ "additionalProperties": true,
111
+ "propertyNames": {
112
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
113
+ }
114
+ },
115
+ "Approver": {
116
+ "title": "Approver",
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": [
120
+ "approverDid",
121
+ "subject",
122
+ "enrolledAt",
123
+ "enrolledVia"
124
+ ],
125
+ "description": "One step-up approver binding, as its subject or an administrator sees it. The binding confers nothing of its own: it is read only when the relying party checks the evidence of a step-up asked of `subject`.",
126
+ "properties": {
127
+ "approverDid": {
128
+ "$ref": "#/$defs/ApproverDid"
129
+ },
130
+ "subject": {
131
+ "type": "string",
132
+ "pattern": "^did:",
133
+ "minLength": 5,
134
+ "maxLength": 2048,
135
+ "description": "The one subject DID this approver is bound to. An approver DID is bound to at most one subject at a relying party."
136
+ },
137
+ "label": {
138
+ "$ref": "#/$defs/ApproverLabel"
139
+ },
140
+ "enrolledAt": {
141
+ "type": "string",
142
+ "format": "date-time",
143
+ "description": "When the binding was written."
144
+ },
145
+ "enrolledVia": {
146
+ "$ref": "#/$defs/EnrolledVia"
147
+ },
148
+ "lastUsedAt": {
149
+ "type": "string",
150
+ "format": "date-time",
151
+ "description": "When a statement by this approver last satisfied a step-up. Absent when it never has."
152
+ }
153
+ }
154
+ },
155
+ "EnrolledVia": {
156
+ "title": "EnrolledVia",
157
+ "type": "string",
158
+ "enum": [
159
+ "install",
160
+ "invite",
161
+ "selfService",
162
+ "offline"
163
+ ],
164
+ "description": "The anchor the binding rested on, recorded so an incident review can see how each factor came to exist. `install`: claimed with the community's install token (vtc/install/claim/finish/0.3). `invite`: redeemed from an administrator's invite (auth/step-up/approver/redeem/finish/0.1). `selfService`: added by the subject behind a factor they already held (auth/step-up/approver/enroll/0.1). `offline`: redeemed from an invite minted by the operator with host access while the service was stopped — an `invite`-shaped redemption whose issuer was the host rather than an administrator."
165
+ },
166
+ "ApproverLabel": {
167
+ "title": "ApproverLabel",
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "maxLength": 64,
171
+ "description": "A human-readable name for where the approver lives — e.g. `Browser plugin — work laptop`. Chosen by the subject (or suggested by an inviter), untrusted, and attributed to its author wherever it is rendered. Absent rather than invented when none was chosen."
172
+ },
173
+ "ApproverDid": {
174
+ "title": "ApproverDid",
175
+ "type": "string",
176
+ "minLength": 16,
177
+ "maxLength": 128,
178
+ "pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]+$",
179
+ "description": "A step-up approver, as an Ed25519 `did:key` (`z6Mk…`). `did:key` only, because its document is a function of the key and resolves with no network, so verifying an approver's statement never depends on a fetch, and a key whose DID document could be rewritten after enrolment would not be the key that was enrolled. Distinct from the subject's DID, from every verification method in the subject's DID document, and from every key the subject can sign operations with at the relying party."
180
+ }
181
+ }
182
+ } as const;
183
+
184
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
185
+ export const RESPONSE_PAYLOAD_SCHEMA = {
186
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
187
+ "$ref": "#/$defs/Response",
188
+ "$defs": {
189
+ "Response": {
190
+ "$anchor": "response",
191
+ "title": "Auth — Step-up Approver List — response payload",
192
+ "description": "Every live approver bound to the subject. Empty when the subject holds none.",
193
+ "type": "object",
194
+ "additionalProperties": false,
195
+ "required": [
196
+ "approvers"
197
+ ],
198
+ "properties": {
199
+ "approvers": {
200
+ "type": "array",
201
+ "maxItems": 5,
202
+ "items": {
203
+ "$ref": "#/$defs/Approver"
204
+ },
205
+ "description": "The subject's live approvers — at most five, so the whole set is always returned."
206
+ },
207
+ "ext": {
208
+ "$ref": "#/$defs/Ext"
209
+ }
210
+ }
211
+ },
212
+ "Ext": {
213
+ "title": "Ext",
214
+ "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.",
215
+ "type": "object",
216
+ "minProperties": 1,
217
+ "additionalProperties": true,
218
+ "propertyNames": {
219
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
220
+ }
221
+ },
222
+ "Approver": {
223
+ "title": "Approver",
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "required": [
227
+ "approverDid",
228
+ "subject",
229
+ "enrolledAt",
230
+ "enrolledVia"
231
+ ],
232
+ "description": "One step-up approver binding, as its subject or an administrator sees it. The binding confers nothing of its own: it is read only when the relying party checks the evidence of a step-up asked of `subject`.",
233
+ "properties": {
234
+ "approverDid": {
235
+ "$ref": "#/$defs/ApproverDid"
236
+ },
237
+ "subject": {
238
+ "type": "string",
239
+ "pattern": "^did:",
240
+ "minLength": 5,
241
+ "maxLength": 2048,
242
+ "description": "The one subject DID this approver is bound to. An approver DID is bound to at most one subject at a relying party."
243
+ },
244
+ "label": {
245
+ "$ref": "#/$defs/ApproverLabel"
246
+ },
247
+ "enrolledAt": {
248
+ "type": "string",
249
+ "format": "date-time",
250
+ "description": "When the binding was written."
251
+ },
252
+ "enrolledVia": {
253
+ "$ref": "#/$defs/EnrolledVia"
254
+ },
255
+ "lastUsedAt": {
256
+ "type": "string",
257
+ "format": "date-time",
258
+ "description": "When a statement by this approver last satisfied a step-up. Absent when it never has."
259
+ }
260
+ }
261
+ },
262
+ "EnrolledVia": {
263
+ "title": "EnrolledVia",
264
+ "type": "string",
265
+ "enum": [
266
+ "install",
267
+ "invite",
268
+ "selfService",
269
+ "offline"
270
+ ],
271
+ "description": "The anchor the binding rested on, recorded so an incident review can see how each factor came to exist. `install`: claimed with the community's install token (vtc/install/claim/finish/0.3). `invite`: redeemed from an administrator's invite (auth/step-up/approver/redeem/finish/0.1). `selfService`: added by the subject behind a factor they already held (auth/step-up/approver/enroll/0.1). `offline`: redeemed from an invite minted by the operator with host access while the service was stopped — an `invite`-shaped redemption whose issuer was the host rather than an administrator."
272
+ },
273
+ "ApproverLabel": {
274
+ "title": "ApproverLabel",
275
+ "type": "string",
276
+ "minLength": 1,
277
+ "maxLength": 64,
278
+ "description": "A human-readable name for where the approver lives — e.g. `Browser plugin — work laptop`. Chosen by the subject (or suggested by an inviter), untrusted, and attributed to its author wherever it is rendered. Absent rather than invented when none was chosen."
279
+ },
280
+ "ApproverDid": {
281
+ "title": "ApproverDid",
282
+ "type": "string",
283
+ "minLength": 16,
284
+ "maxLength": 128,
285
+ "pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]+$",
286
+ "description": "A step-up approver, as an Ed25519 `did:key` (`z6Mk…`). `did:key` only, because its document is a function of the key and resolves with no network, so verifying an approver's statement never depends on a fetch, and a key whose DID document could be rewritten after enrolment would not be the key that was enrolled. Distinct from the subject's DID, from every verification method in the subject's DID document, and from every key the subject can sign operations with at the relying party."
287
+ }
288
+ }
289
+ } as const;
290
+
291
+ /**
292
+ * SPEC.md §7.2 policy for the request variant, from this specification's
293
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
294
+ * per-specification and cannot be derived from the document alone, and
295
+ * item 2 needs the schema this carries.
296
+ */
297
+ export const SPEC = {
298
+ typeUri: TYPE_URI,
299
+ isBearer: false,
300
+ isProofRequired: true,
301
+ isRecipientRequired: true,
302
+ isIssuedAtRequired: false,
303
+ payloadSchema: PAYLOAD_SCHEMA,
304
+ } as const;
305
+
306
+ /**
307
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
308
+ * tracks the *issuer* party's requirement because a response swaps the
309
+ * parties (§7.3 item 5).
310
+ */
311
+ export const RESPONSE_SPEC = {
312
+ typeUri: RESPONSE_TYPE_URI,
313
+ isBearer: false,
314
+ isProofRequired: true,
315
+ isRecipientRequired: true,
316
+ isIssuedAtRequired: false,
317
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
318
+ } as const;