@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,337 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/step-up/approver/redeem/finish/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Approver, ApproverDid, ApproverLabel, AttestStatement, EnrolledVia, Ext } from "../../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * The invited subject, signing as their own DID, names the step-up approver to bind and carries its signed enrolment statement over the ceremony's challenge; the relying party binds the approver and consumes the invite. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface AuthStepUpApproverRedeemFinishPayload {
13
+ /**
14
+ * The enrollmentId from auth/step-up/approver/redeem/start, echoed verbatim. Also the `boundTo` of the statement.
15
+ */
16
+ enrollmentId: string;
17
+ /**
18
+ * The step-up approver to bind. MUST equal the statement's issuer.
19
+ */
20
+ approverDid: ApproverDid;
21
+ /**
22
+ * A name for where the approver lives. Overrides the inviter's suggestion.
23
+ */
24
+ label?: ApproverLabel;
25
+ /**
26
+ * The approver's complete, signed auth/step-up/approver/attest/0.1 document with `purpose: enrol`, `boundTo` equal to `enrollmentId`, over the start's `challenge` — the proof of possession of the approver key. Verified as received.
27
+ */
28
+ statement: AttestStatement;
29
+ ext?: Ext;
30
+ }
31
+ /**
32
+ * The binding as stored.
33
+ */
34
+ export interface AuthStepUpApproverRedeemFinishResponsePayload {
35
+ approver: Approver;
36
+ ext?: Ext;
37
+ }
38
+
39
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
40
+ export type { Approver, ApproverDid, ApproverLabel, AttestStatement, EnrolledVia, Ext };
41
+
42
+ /** Trust Task type URI. */
43
+ export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/redeem/finish/0.1" as const;
44
+
45
+ /** Stable alias for this specification's request payload shape. */
46
+ export type Payload = AuthStepUpApproverRedeemFinishPayload;
47
+
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/redeem/finish/0.1#response" as const;
50
+
51
+ /** Stable alias for this specification's success-response payload shape. */
52
+ export type Response = AuthStepUpApproverRedeemFinishResponsePayload;
53
+
54
+ /**
55
+ * This specification's payload schema, as a value.
56
+ *
57
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
58
+ * rather than only as a `.json` file because TypeScript types are erased
59
+ * at runtime: without a schema a consumer has nothing to validate, and
60
+ * every REQUIRED payload member is optional in practice. Cross-file
61
+ * `$ref`s are already inlined, so it needs no resolver.
62
+ */
63
+ export const PAYLOAD_SCHEMA = {
64
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
65
+ "$id": "https://trusttasks.org/spec/auth/step-up/approver/redeem/finish/0.1",
66
+ "title": "Auth — Step-up Approver Redeem (finish) — payload",
67
+ "description": "The invited subject, signing as their own DID, names the step-up approver to bind and carries its signed enrolment statement over the ceremony's challenge; the relying party binds the approver and consumes the invite. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "enrollmentId",
72
+ "approverDid",
73
+ "statement"
74
+ ],
75
+ "properties": {
76
+ "enrollmentId": {
77
+ "type": "string",
78
+ "minLength": 1,
79
+ "maxLength": 256,
80
+ "description": "The enrollmentId from auth/step-up/approver/redeem/start, echoed verbatim. Also the `boundTo` of the statement."
81
+ },
82
+ "approverDid": {
83
+ "$ref": "#/$defs/ApproverDid",
84
+ "description": "The step-up approver to bind. MUST equal the statement's issuer."
85
+ },
86
+ "label": {
87
+ "$ref": "#/$defs/ApproverLabel",
88
+ "description": "A name for where the approver lives. Overrides the inviter's suggestion."
89
+ },
90
+ "statement": {
91
+ "$ref": "#/$defs/AttestStatement",
92
+ "description": "The approver's complete, signed auth/step-up/approver/attest/0.1 document with `purpose: enrol`, `boundTo` equal to `enrollmentId`, over the start's `challenge` — the proof of possession of the approver key. Verified as received."
93
+ },
94
+ "ext": {
95
+ "$ref": "#/$defs/Ext"
96
+ }
97
+ },
98
+ "$defs": {
99
+ "Response": {
100
+ "$anchor": "response",
101
+ "title": "Auth — Step-up Approver Redeem (finish) — response payload",
102
+ "description": "The binding as stored.",
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": [
106
+ "approver"
107
+ ],
108
+ "properties": {
109
+ "approver": {
110
+ "$ref": "#/$defs/Approver"
111
+ },
112
+ "ext": {
113
+ "$ref": "#/$defs/Ext"
114
+ }
115
+ }
116
+ },
117
+ "Ext": {
118
+ "title": "Ext",
119
+ "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.",
120
+ "type": "object",
121
+ "minProperties": 1,
122
+ "additionalProperties": true,
123
+ "propertyNames": {
124
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
125
+ }
126
+ },
127
+ "Approver": {
128
+ "title": "Approver",
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "approverDid",
133
+ "subject",
134
+ "enrolledAt",
135
+ "enrolledVia"
136
+ ],
137
+ "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`.",
138
+ "properties": {
139
+ "approverDid": {
140
+ "$ref": "#/$defs/ApproverDid"
141
+ },
142
+ "subject": {
143
+ "type": "string",
144
+ "pattern": "^did:",
145
+ "minLength": 5,
146
+ "maxLength": 2048,
147
+ "description": "The one subject DID this approver is bound to. An approver DID is bound to at most one subject at a relying party."
148
+ },
149
+ "label": {
150
+ "$ref": "#/$defs/ApproverLabel"
151
+ },
152
+ "enrolledAt": {
153
+ "type": "string",
154
+ "format": "date-time",
155
+ "description": "When the binding was written."
156
+ },
157
+ "enrolledVia": {
158
+ "$ref": "#/$defs/EnrolledVia"
159
+ },
160
+ "lastUsedAt": {
161
+ "type": "string",
162
+ "format": "date-time",
163
+ "description": "When a statement by this approver last satisfied a step-up. Absent when it never has."
164
+ }
165
+ }
166
+ },
167
+ "EnrolledVia": {
168
+ "title": "EnrolledVia",
169
+ "type": "string",
170
+ "enum": [
171
+ "install",
172
+ "invite",
173
+ "selfService",
174
+ "offline"
175
+ ],
176
+ "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."
177
+ },
178
+ "ApproverLabel": {
179
+ "title": "ApproverLabel",
180
+ "type": "string",
181
+ "minLength": 1,
182
+ "maxLength": 64,
183
+ "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."
184
+ },
185
+ "ApproverDid": {
186
+ "title": "ApproverDid",
187
+ "type": "string",
188
+ "minLength": 16,
189
+ "maxLength": 128,
190
+ "pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]+$",
191
+ "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."
192
+ },
193
+ "AttestStatement": {
194
+ "title": "AttestStatement",
195
+ "type": "object",
196
+ "minProperties": 1,
197
+ "description": "A complete, signed auth/step-up/approver/attest/0.1 Trust Task document — envelope, payload and proof — issued by the approver. Deliberately an open object here rather than a typed one: the consumer verifies it as a document in its own right (envelope, proof and payload against that specification's schemas), and verifies its proof over the members exactly as received, which a binding that narrowed it to a typed struct and re-serialised it could silently break."
198
+ }
199
+ }
200
+ } as const;
201
+
202
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
203
+ export const RESPONSE_PAYLOAD_SCHEMA = {
204
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
205
+ "$ref": "#/$defs/Response",
206
+ "$defs": {
207
+ "Response": {
208
+ "$anchor": "response",
209
+ "title": "Auth — Step-up Approver Redeem (finish) — response payload",
210
+ "description": "The binding as stored.",
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": [
214
+ "approver"
215
+ ],
216
+ "properties": {
217
+ "approver": {
218
+ "$ref": "#/$defs/Approver"
219
+ },
220
+ "ext": {
221
+ "$ref": "#/$defs/Ext"
222
+ }
223
+ }
224
+ },
225
+ "Ext": {
226
+ "title": "Ext",
227
+ "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.",
228
+ "type": "object",
229
+ "minProperties": 1,
230
+ "additionalProperties": true,
231
+ "propertyNames": {
232
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
233
+ }
234
+ },
235
+ "Approver": {
236
+ "title": "Approver",
237
+ "type": "object",
238
+ "additionalProperties": false,
239
+ "required": [
240
+ "approverDid",
241
+ "subject",
242
+ "enrolledAt",
243
+ "enrolledVia"
244
+ ],
245
+ "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`.",
246
+ "properties": {
247
+ "approverDid": {
248
+ "$ref": "#/$defs/ApproverDid"
249
+ },
250
+ "subject": {
251
+ "type": "string",
252
+ "pattern": "^did:",
253
+ "minLength": 5,
254
+ "maxLength": 2048,
255
+ "description": "The one subject DID this approver is bound to. An approver DID is bound to at most one subject at a relying party."
256
+ },
257
+ "label": {
258
+ "$ref": "#/$defs/ApproverLabel"
259
+ },
260
+ "enrolledAt": {
261
+ "type": "string",
262
+ "format": "date-time",
263
+ "description": "When the binding was written."
264
+ },
265
+ "enrolledVia": {
266
+ "$ref": "#/$defs/EnrolledVia"
267
+ },
268
+ "lastUsedAt": {
269
+ "type": "string",
270
+ "format": "date-time",
271
+ "description": "When a statement by this approver last satisfied a step-up. Absent when it never has."
272
+ }
273
+ }
274
+ },
275
+ "EnrolledVia": {
276
+ "title": "EnrolledVia",
277
+ "type": "string",
278
+ "enum": [
279
+ "install",
280
+ "invite",
281
+ "selfService",
282
+ "offline"
283
+ ],
284
+ "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."
285
+ },
286
+ "ApproverLabel": {
287
+ "title": "ApproverLabel",
288
+ "type": "string",
289
+ "minLength": 1,
290
+ "maxLength": 64,
291
+ "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."
292
+ },
293
+ "ApproverDid": {
294
+ "title": "ApproverDid",
295
+ "type": "string",
296
+ "minLength": 16,
297
+ "maxLength": 128,
298
+ "pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]+$",
299
+ "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."
300
+ },
301
+ "AttestStatement": {
302
+ "title": "AttestStatement",
303
+ "type": "object",
304
+ "minProperties": 1,
305
+ "description": "A complete, signed auth/step-up/approver/attest/0.1 Trust Task document — envelope, payload and proof — issued by the approver. Deliberately an open object here rather than a typed one: the consumer verifies it as a document in its own right (envelope, proof and payload against that specification's schemas), and verifies its proof over the members exactly as received, which a binding that narrowed it to a typed struct and re-serialised it could silently break."
306
+ }
307
+ }
308
+ } as const;
309
+
310
+ /**
311
+ * SPEC.md §7.2 policy for the request variant, from this specification's
312
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
313
+ * per-specification and cannot be derived from the document alone, and
314
+ * item 2 needs the schema this carries.
315
+ */
316
+ export const SPEC = {
317
+ typeUri: TYPE_URI,
318
+ isBearer: false,
319
+ isProofRequired: true,
320
+ isRecipientRequired: true,
321
+ isIssuedAtRequired: true,
322
+ payloadSchema: PAYLOAD_SCHEMA,
323
+ } as const;
324
+
325
+ /**
326
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
327
+ * tracks the *issuer* party's requirement because a response swaps the
328
+ * parties (§7.3 item 5).
329
+ */
330
+ export const RESPONSE_SPEC = {
331
+ typeUri: RESPONSE_TYPE_URI,
332
+ isBearer: false,
333
+ isProofRequired: false,
334
+ isRecipientRequired: true,
335
+ isIssuedAtRequired: true,
336
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
337
+ } as const;
@@ -0,0 +1,241 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/step-up/approver/redeem/start/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * The invited subject, signing as their own DID, presents an auth/step-up/approver/invite token and its claim code, and the relying party opens an enrolment ceremony with a challenge for the approver to sign. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface AuthStepUpApproverRedeemStartPayload {
13
+ /**
14
+ * The invite token, as carried in the invite URL.
15
+ */
16
+ token: string;
17
+ /**
18
+ * The claim code the administrator delivered separately. Never logged; compared with its stored hash.
19
+ */
20
+ claimCode: string;
21
+ ext?: Ext;
22
+ }
23
+ /**
24
+ * The enrolment ceremony the invite authorises: what the approver's enrolment statement is to be made over.
25
+ */
26
+ export interface AuthStepUpApproverRedeemStartResponsePayload {
27
+ /**
28
+ * Opaque, single-use handle for this ceremony. Echoed in redeem/finish, and the `boundTo` of the approver's enrolment statement.
29
+ */
30
+ enrollmentId: string;
31
+ /**
32
+ * A fresh challenge (≥128 bits) the approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`.
33
+ */
34
+ challenge: string;
35
+ /**
36
+ * The relying party's DID, which the statement names as its `audience` and `recipient`.
37
+ */
38
+ audience: string;
39
+ /**
40
+ * When this ceremony lapses (not the invite). No later than the invite's own expiry.
41
+ */
42
+ expiresAt: string;
43
+ ext?: Ext;
44
+ }
45
+
46
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
47
+ export type { Ext };
48
+
49
+ /** Trust Task type URI. */
50
+ export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1" as const;
51
+
52
+ /** Stable alias for this specification's request payload shape. */
53
+ export type Payload = AuthStepUpApproverRedeemStartPayload;
54
+
55
+ /** Trust Task response type URI (request type URI + "#response"). */
56
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1#response" as const;
57
+
58
+ /** Stable alias for this specification's success-response payload shape. */
59
+ export type Response = AuthStepUpApproverRedeemStartResponsePayload;
60
+
61
+ /**
62
+ * This specification's payload schema, as a value.
63
+ *
64
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
65
+ * rather than only as a `.json` file because TypeScript types are erased
66
+ * at runtime: without a schema a consumer has nothing to validate, and
67
+ * every REQUIRED payload member is optional in practice. Cross-file
68
+ * `$ref`s are already inlined, so it needs no resolver.
69
+ */
70
+ export const PAYLOAD_SCHEMA = {
71
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
72
+ "$id": "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1",
73
+ "title": "Auth — Step-up Approver Redeem (start) — payload",
74
+ "description": "The invited subject, signing as their own DID, presents an auth/step-up/approver/invite token and its claim code, and the relying party opens an enrolment ceremony with a challenge for the approver to sign. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": [
78
+ "token",
79
+ "claimCode"
80
+ ],
81
+ "properties": {
82
+ "token": {
83
+ "type": "string",
84
+ "minLength": 16,
85
+ "maxLength": 512,
86
+ "description": "The invite token, as carried in the invite URL."
87
+ },
88
+ "claimCode": {
89
+ "type": "string",
90
+ "minLength": 1,
91
+ "maxLength": 64,
92
+ "description": "The claim code the administrator delivered separately. Never logged; compared with its stored hash."
93
+ },
94
+ "ext": {
95
+ "$ref": "#/$defs/Ext"
96
+ }
97
+ },
98
+ "$defs": {
99
+ "Response": {
100
+ "$anchor": "response",
101
+ "title": "Auth — Step-up Approver Redeem (start) — response payload",
102
+ "description": "The enrolment ceremony the invite authorises: what the approver's enrolment statement is to be made over.",
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": [
106
+ "enrollmentId",
107
+ "challenge",
108
+ "audience",
109
+ "expiresAt"
110
+ ],
111
+ "properties": {
112
+ "enrollmentId": {
113
+ "type": "string",
114
+ "minLength": 1,
115
+ "maxLength": 256,
116
+ "description": "Opaque, single-use handle for this ceremony. Echoed in redeem/finish, and the `boundTo` of the approver's enrolment statement."
117
+ },
118
+ "challenge": {
119
+ "type": "string",
120
+ "minLength": 16,
121
+ "maxLength": 512,
122
+ "description": "A fresh challenge (≥128 bits) the approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`."
123
+ },
124
+ "audience": {
125
+ "type": "string",
126
+ "pattern": "^did:",
127
+ "minLength": 5,
128
+ "maxLength": 2048,
129
+ "description": "The relying party's DID, which the statement names as its `audience` and `recipient`."
130
+ },
131
+ "expiresAt": {
132
+ "type": "string",
133
+ "format": "date-time",
134
+ "description": "When this ceremony lapses (not the invite). No later than the invite's own expiry."
135
+ },
136
+ "ext": {
137
+ "$ref": "#/$defs/Ext"
138
+ }
139
+ }
140
+ },
141
+ "Ext": {
142
+ "title": "Ext",
143
+ "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.",
144
+ "type": "object",
145
+ "minProperties": 1,
146
+ "additionalProperties": true,
147
+ "propertyNames": {
148
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
149
+ }
150
+ }
151
+ }
152
+ } as const;
153
+
154
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
155
+ export const RESPONSE_PAYLOAD_SCHEMA = {
156
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
157
+ "$ref": "#/$defs/Response",
158
+ "$defs": {
159
+ "Response": {
160
+ "$anchor": "response",
161
+ "title": "Auth — Step-up Approver Redeem (start) — response payload",
162
+ "description": "The enrolment ceremony the invite authorises: what the approver's enrolment statement is to be made over.",
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": [
166
+ "enrollmentId",
167
+ "challenge",
168
+ "audience",
169
+ "expiresAt"
170
+ ],
171
+ "properties": {
172
+ "enrollmentId": {
173
+ "type": "string",
174
+ "minLength": 1,
175
+ "maxLength": 256,
176
+ "description": "Opaque, single-use handle for this ceremony. Echoed in redeem/finish, and the `boundTo` of the approver's enrolment statement."
177
+ },
178
+ "challenge": {
179
+ "type": "string",
180
+ "minLength": 16,
181
+ "maxLength": 512,
182
+ "description": "A fresh challenge (≥128 bits) the approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`."
183
+ },
184
+ "audience": {
185
+ "type": "string",
186
+ "pattern": "^did:",
187
+ "minLength": 5,
188
+ "maxLength": 2048,
189
+ "description": "The relying party's DID, which the statement names as its `audience` and `recipient`."
190
+ },
191
+ "expiresAt": {
192
+ "type": "string",
193
+ "format": "date-time",
194
+ "description": "When this ceremony lapses (not the invite). No later than the invite's own expiry."
195
+ },
196
+ "ext": {
197
+ "$ref": "#/$defs/Ext"
198
+ }
199
+ }
200
+ },
201
+ "Ext": {
202
+ "title": "Ext",
203
+ "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.",
204
+ "type": "object",
205
+ "minProperties": 1,
206
+ "additionalProperties": true,
207
+ "propertyNames": {
208
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
209
+ }
210
+ }
211
+ }
212
+ } as const;
213
+
214
+ /**
215
+ * SPEC.md §7.2 policy for the request variant, from this specification's
216
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
217
+ * per-specification and cannot be derived from the document alone, and
218
+ * item 2 needs the schema this carries.
219
+ */
220
+ export const SPEC = {
221
+ typeUri: TYPE_URI,
222
+ isBearer: false,
223
+ isProofRequired: true,
224
+ isRecipientRequired: true,
225
+ isIssuedAtRequired: true,
226
+ payloadSchema: PAYLOAD_SCHEMA,
227
+ } as const;
228
+
229
+ /**
230
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
231
+ * tracks the *issuer* party's requirement because a response swaps the
232
+ * parties (§7.3 item 5).
233
+ */
234
+ export const RESPONSE_SPEC = {
235
+ typeUri: RESPONSE_TYPE_URI,
236
+ isBearer: false,
237
+ isProofRequired: false,
238
+ isRecipientRequired: true,
239
+ isIssuedAtRequired: true,
240
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
241
+ } as const;