@openvtc/trust-tasks 0.16.2 → 0.16.4

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 (52) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/dist/consent/approve-request/0.1/payload.d.ts +267 -0
  3. package/dist/consent/approve-request/0.1/payload.d.ts.map +1 -0
  4. package/dist/consent/approve-request/0.1/payload.js +138 -0
  5. package/dist/consent/approve-request/0.1/payload.js.map +1 -0
  6. package/dist/index.d.ts +9 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +9 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/vault/credentials/archive/0.1/payload.d.ts +297 -0
  11. package/dist/vault/credentials/archive/0.1/payload.d.ts.map +1 -0
  12. package/dist/vault/credentials/archive/0.1/payload.js +171 -0
  13. package/dist/vault/credentials/archive/0.1/payload.js.map +1 -0
  14. package/dist/vault/credentials/delete/0.1/payload.d.ts +333 -0
  15. package/dist/vault/credentials/delete/0.1/payload.d.ts.map +1 -0
  16. package/dist/vault/credentials/delete/0.1/payload.js +185 -0
  17. package/dist/vault/credentials/delete/0.1/payload.js.map +1 -0
  18. package/dist/vault/credentials/get/0.1/payload.d.ts +244 -0
  19. package/dist/vault/credentials/get/0.1/payload.d.ts.map +1 -0
  20. package/dist/vault/credentials/get/0.1/payload.js +137 -0
  21. package/dist/vault/credentials/get/0.1/payload.js.map +1 -0
  22. package/dist/vault/credentials/purge/0.1/payload.d.ts +297 -0
  23. package/dist/vault/credentials/purge/0.1/payload.d.ts.map +1 -0
  24. package/dist/vault/credentials/purge/0.1/payload.js +171 -0
  25. package/dist/vault/credentials/purge/0.1/payload.js.map +1 -0
  26. package/dist/vault/credentials/query/0.1/payload.d.ts +689 -0
  27. package/dist/vault/credentials/query/0.1/payload.d.ts.map +1 -0
  28. package/dist/vault/credentials/query/0.1/payload.js +350 -0
  29. package/dist/vault/credentials/query/0.1/payload.js.map +1 -0
  30. package/dist/vault/credentials/receive/0.1/payload.d.ts +414 -0
  31. package/dist/vault/credentials/receive/0.1/payload.d.ts.map +1 -0
  32. package/dist/vault/credentials/receive/0.1/payload.js +226 -0
  33. package/dist/vault/credentials/receive/0.1/payload.js.map +1 -0
  34. package/dist/vault/credentials/restore/0.1/payload.d.ts +297 -0
  35. package/dist/vault/credentials/restore/0.1/payload.d.ts.map +1 -0
  36. package/dist/vault/credentials/restore/0.1/payload.js +171 -0
  37. package/dist/vault/credentials/restore/0.1/payload.js.map +1 -0
  38. package/dist/vault/credentials/unarchive/0.1/payload.d.ts +297 -0
  39. package/dist/vault/credentials/unarchive/0.1/payload.d.ts.map +1 -0
  40. package/dist/vault/credentials/unarchive/0.1/payload.js +171 -0
  41. package/dist/vault/credentials/unarchive/0.1/payload.js.map +1 -0
  42. package/package.json +1 -1
  43. package/src/consent/approve-request/0.1/payload.ts +200 -0
  44. package/src/index.ts +9 -0
  45. package/src/vault/credentials/archive/0.1/payload.ts +217 -0
  46. package/src/vault/credentials/delete/0.1/payload.ts +239 -0
  47. package/src/vault/credentials/get/0.1/payload.ts +178 -0
  48. package/src/vault/credentials/purge/0.1/payload.ts +217 -0
  49. package/src/vault/credentials/query/0.1/payload.ts +459 -0
  50. package/src/vault/credentials/receive/0.1/payload.ts +298 -0
  51. package/src/vault/credentials/restore/0.1/payload.ts +217 -0
  52. package/src/vault/credentials/unarchive/0.1/payload.ts +217 -0
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/credentials/unarchive/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Return an archived credential to the active state.
11
+ */
12
+ export interface VaultCredentialsUnarchive {
13
+ /**
14
+ * Local handle from a query descriptor. Opaque; consumers must not derive or guess one.
15
+ */
16
+ id: string;
17
+ /**
18
+ * Free text recorded with the transition. Must not carry credential contents.
19
+ */
20
+ reason?: string;
21
+ /**
22
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
23
+ */
24
+ ext?: Ext;
25
+ }
26
+ export interface VaultCredentialsUnarchiveResponsePayload {
27
+ id: string;
28
+ /**
29
+ * State after the transition, echoed rather than left to be inferred from the verb.
30
+ */
31
+ lifecycle: "active" | "archived" | "deleted";
32
+ /**
33
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
34
+ */
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 { Ext };
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/vault/credentials/unarchive/0.1" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = VaultCredentialsUnarchive;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/credentials/unarchive/0.1#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = VaultCredentialsUnarchiveResponsePayload;
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/vault/credentials/unarchive/0.1",
65
+ "title": "Vault Credentials — Unarchive",
66
+ "description": "Return an archived credential to the active state.",
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": [
70
+ "id"
71
+ ],
72
+ "properties": {
73
+ "id": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 256,
77
+ "description": "Local handle from a query descriptor. Opaque; consumers must not derive or guess one."
78
+ },
79
+ "reason": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "maxLength": 512,
83
+ "description": "Free text recorded with the transition. Must not carry credential contents."
84
+ },
85
+ "ext": {
86
+ "$ref": "#/$defs/Ext",
87
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
88
+ }
89
+ },
90
+ "$defs": {
91
+ "Response": {
92
+ "$anchor": "response",
93
+ "title": "Vault Credentials Unarchive — response payload",
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": [
97
+ "id",
98
+ "lifecycle"
99
+ ],
100
+ "properties": {
101
+ "id": {
102
+ "type": "string",
103
+ "minLength": 1,
104
+ "maxLength": 256
105
+ },
106
+ "lifecycle": {
107
+ "$ref": "#/$defs/VaultLifecycle",
108
+ "description": "State after the transition, echoed rather than left to be inferred from the verb."
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext",
112
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
113
+ }
114
+ }
115
+ },
116
+ "VaultLifecycle": {
117
+ "type": "string",
118
+ "enum": [
119
+ "active",
120
+ "archived",
121
+ "deleted"
122
+ ],
123
+ "description": "Archival state. Orthogonal to validity."
124
+ },
125
+ "Ext": {
126
+ "title": "Ext",
127
+ "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.",
128
+ "type": "object",
129
+ "minProperties": 1,
130
+ "additionalProperties": true,
131
+ "propertyNames": {
132
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
133
+ }
134
+ }
135
+ }
136
+ } as const;
137
+
138
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
139
+ export const RESPONSE_PAYLOAD_SCHEMA = {
140
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
141
+ "$ref": "#/$defs/Response",
142
+ "$defs": {
143
+ "Response": {
144
+ "$anchor": "response",
145
+ "title": "Vault Credentials Unarchive — response payload",
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": [
149
+ "id",
150
+ "lifecycle"
151
+ ],
152
+ "properties": {
153
+ "id": {
154
+ "type": "string",
155
+ "minLength": 1,
156
+ "maxLength": 256
157
+ },
158
+ "lifecycle": {
159
+ "$ref": "#/$defs/VaultLifecycle",
160
+ "description": "State after the transition, echoed rather than left to be inferred from the verb."
161
+ },
162
+ "ext": {
163
+ "$ref": "#/$defs/Ext",
164
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
165
+ }
166
+ }
167
+ },
168
+ "VaultLifecycle": {
169
+ "type": "string",
170
+ "enum": [
171
+ "active",
172
+ "archived",
173
+ "deleted"
174
+ ],
175
+ "description": "Archival state. Orthogonal to validity."
176
+ },
177
+ "Ext": {
178
+ "title": "Ext",
179
+ "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.",
180
+ "type": "object",
181
+ "minProperties": 1,
182
+ "additionalProperties": true,
183
+ "propertyNames": {
184
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
185
+ }
186
+ }
187
+ }
188
+ } as const;
189
+
190
+ /**
191
+ * SPEC.md §7.2 policy for the request variant, from this specification's
192
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
193
+ * per-specification and cannot be derived from the document alone, and
194
+ * item 2 needs the schema this carries.
195
+ */
196
+ export const SPEC = {
197
+ typeUri: TYPE_URI,
198
+ isBearer: false,
199
+ isProofRequired: true,
200
+ isRecipientRequired: true,
201
+ isIssuedAtRequired: true,
202
+ payloadSchema: PAYLOAD_SCHEMA,
203
+ } as const;
204
+
205
+ /**
206
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
207
+ * tracks the *issuer* party's requirement because a response swaps the
208
+ * parties (§7.3 item 5).
209
+ */
210
+ export const RESPONSE_SPEC = {
211
+ typeUri: RESPONSE_TYPE_URI,
212
+ isBearer: false,
213
+ isProofRequired: true,
214
+ isRecipientRequired: true,
215
+ isIssuedAtRequired: true,
216
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
217
+ } as const;