@openvtc/trust-tasks 0.26.15 → 0.26.17

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 (43) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/dist/_shared/components.d.ts +35 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +6 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +6 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/keys/act/0.4/payload.d.ts +546 -0
  9. package/dist/rooms/keys/act/0.4/payload.d.ts.map +1 -0
  10. package/dist/rooms/keys/act/0.4/payload.js +305 -0
  11. package/dist/rooms/keys/act/0.4/payload.js.map +1 -0
  12. package/dist/rooms/keys/act/0.5/payload.d.ts +546 -0
  13. package/dist/rooms/keys/act/0.5/payload.d.ts.map +1 -0
  14. package/dist/rooms/keys/act/0.5/payload.js +305 -0
  15. package/dist/rooms/keys/act/0.5/payload.js.map +1 -0
  16. package/dist/rooms/keys/key-package/0.2/payload.d.ts +304 -0
  17. package/dist/rooms/keys/key-package/0.2/payload.d.ts.map +1 -0
  18. package/dist/rooms/keys/key-package/0.2/payload.js +166 -0
  19. package/dist/rooms/keys/key-package/0.2/payload.js.map +1 -0
  20. package/dist/vtc/_shared/0.1/community-room.d.ts +1 -1
  21. package/dist/vtc/_shared/0.1/community-room.d.ts.map +1 -1
  22. package/dist/vtc/community/theme/show/0.1/payload.d.ts +238 -0
  23. package/dist/vtc/community/theme/show/0.1/payload.d.ts.map +1 -0
  24. package/dist/vtc/community/theme/show/0.1/payload.js +135 -0
  25. package/dist/vtc/community/theme/show/0.1/payload.js.map +1 -0
  26. package/dist/vtc/community/theme/update/0.1/payload.d.ts +286 -0
  27. package/dist/vtc/community/theme/update/0.1/payload.d.ts.map +1 -0
  28. package/dist/vtc/community/theme/update/0.1/payload.js +157 -0
  29. package/dist/vtc/community/theme/update/0.1/payload.js.map +1 -0
  30. package/dist/vtc/rooms/memberships/list/0.1/payload.d.ts +696 -0
  31. package/dist/vtc/rooms/memberships/list/0.1/payload.d.ts.map +1 -0
  32. package/dist/vtc/rooms/memberships/list/0.1/payload.js +402 -0
  33. package/dist/vtc/rooms/memberships/list/0.1/payload.js.map +1 -0
  34. package/package.json +1 -1
  35. package/src/_shared/components.ts +35 -0
  36. package/src/index.ts +6 -0
  37. package/src/rooms/keys/act/0.4/payload.ts +380 -0
  38. package/src/rooms/keys/act/0.5/payload.ts +380 -0
  39. package/src/rooms/keys/key-package/0.2/payload.ts +219 -0
  40. package/src/vtc/_shared/0.1/community-room.ts +1 -1
  41. package/src/vtc/community/theme/show/0.1/payload.ts +170 -0
  42. package/src/vtc/community/theme/update/0.1/payload.ts +204 -0
  43. package/src/vtc/rooms/memberships/list/0.1/payload.ts +445 -0
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/community/theme/show/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An empty request: the community has one theme. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCCommunityThemeShowPayload {
13
+ ext?: Ext;
14
+ }
15
+ export interface VTCCommunityThemeShowResponsePayload {
16
+ /**
17
+ * The stored theme stylesheet, in the theme profile of vtc/community/theme/update/0.1. The empty string when the community has none.
18
+ */
19
+ stylesheet: string;
20
+ /**
21
+ * When the stylesheet was last replaced. Absent when the community never set one.
22
+ */
23
+ updatedAt?: string;
24
+ ext?: Ext;
25
+ }
26
+
27
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
28
+ export type { Ext };
29
+
30
+ /** Trust Task type URI. */
31
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/community/theme/show/0.1" as const;
32
+
33
+ /** Stable alias for this specification's request payload shape. */
34
+ export type Payload = VTCCommunityThemeShowPayload;
35
+
36
+ /** Trust Task response type URI (request type URI + "#response"). */
37
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/community/theme/show/0.1#response" as const;
38
+
39
+ /** Stable alias for this specification's success-response payload shape. */
40
+ export type Response = VTCCommunityThemeShowResponsePayload;
41
+
42
+ /**
43
+ * This specification's payload schema, as a value.
44
+ *
45
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
46
+ * rather than only as a `.json` file because TypeScript types are erased
47
+ * at runtime: without a schema a consumer has nothing to validate, and
48
+ * every REQUIRED payload member is optional in practice. Cross-file
49
+ * `$ref`s are already inlined, so it needs no resolver.
50
+ */
51
+ export const PAYLOAD_SCHEMA = {
52
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
53
+ "$id": "https://trusttasks.org/spec/vtc/community/theme/show/0.1",
54
+ "title": "VTC Community — Theme — Show — payload",
55
+ "description": "An empty request: the community has one theme. The outer document members are owned by the framework — SPEC §6.3.",
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "ext": {
60
+ "$ref": "#/$defs/Ext"
61
+ }
62
+ },
63
+ "$defs": {
64
+ "Response": {
65
+ "$anchor": "response",
66
+ "title": "VTC Community — Theme — Show — response payload",
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": [
70
+ "stylesheet"
71
+ ],
72
+ "properties": {
73
+ "stylesheet": {
74
+ "type": "string",
75
+ "maxLength": 32768,
76
+ "description": "The stored theme stylesheet, in the theme profile of vtc/community/theme/update/0.1. The empty string when the community has none."
77
+ },
78
+ "updatedAt": {
79
+ "type": "string",
80
+ "format": "date-time",
81
+ "description": "When the stylesheet was last replaced. Absent when the community never set one."
82
+ },
83
+ "ext": {
84
+ "$ref": "#/$defs/Ext"
85
+ }
86
+ }
87
+ },
88
+ "Ext": {
89
+ "title": "Ext",
90
+ "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.",
91
+ "type": "object",
92
+ "minProperties": 1,
93
+ "additionalProperties": true,
94
+ "propertyNames": {
95
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
96
+ }
97
+ }
98
+ }
99
+ } as const;
100
+
101
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
102
+ export const RESPONSE_PAYLOAD_SCHEMA = {
103
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
104
+ "$ref": "#/$defs/Response",
105
+ "$defs": {
106
+ "Response": {
107
+ "$anchor": "response",
108
+ "title": "VTC Community — Theme — Show — response payload",
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": [
112
+ "stylesheet"
113
+ ],
114
+ "properties": {
115
+ "stylesheet": {
116
+ "type": "string",
117
+ "maxLength": 32768,
118
+ "description": "The stored theme stylesheet, in the theme profile of vtc/community/theme/update/0.1. The empty string when the community has none."
119
+ },
120
+ "updatedAt": {
121
+ "type": "string",
122
+ "format": "date-time",
123
+ "description": "When the stylesheet was last replaced. Absent when the community never set one."
124
+ },
125
+ "ext": {
126
+ "$ref": "#/$defs/Ext"
127
+ }
128
+ }
129
+ },
130
+ "Ext": {
131
+ "title": "Ext",
132
+ "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.",
133
+ "type": "object",
134
+ "minProperties": 1,
135
+ "additionalProperties": true,
136
+ "propertyNames": {
137
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
138
+ }
139
+ }
140
+ }
141
+ } as const;
142
+
143
+ /**
144
+ * SPEC.md §7.2 policy for the request variant, from this specification's
145
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
146
+ * per-specification and cannot be derived from the document alone, and
147
+ * item 2 needs the schema this carries.
148
+ */
149
+ export const SPEC = {
150
+ typeUri: TYPE_URI,
151
+ isBearer: false,
152
+ isProofRequired: false,
153
+ isRecipientRequired: true,
154
+ isIssuedAtRequired: false,
155
+ payloadSchema: PAYLOAD_SCHEMA,
156
+ } as const;
157
+
158
+ /**
159
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
160
+ * tracks the *issuer* party's requirement because a response swaps the
161
+ * parties (§7.3 item 5).
162
+ */
163
+ export const RESPONSE_SPEC = {
164
+ typeUri: RESPONSE_TYPE_URI,
165
+ isBearer: false,
166
+ isProofRequired: false,
167
+ isRecipientRequired: false,
168
+ isIssuedAtRequired: false,
169
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
170
+ } as const;
@@ -0,0 +1,204 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/community/theme/update/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * The whole new stylesheet, which replaces the stored one. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCCommunityThemeUpdatePayload {
13
+ /**
14
+ * The new theme stylesheet, in the theme profile. The empty string removes the theme.
15
+ */
16
+ stylesheet: string;
17
+ /**
18
+ * Absent means false. When true the community checks the stylesheet and answers with what it would store, and stores nothing.
19
+ */
20
+ dryRun?: boolean;
21
+ ext?: Ext;
22
+ }
23
+ export interface VTCCommunityThemeUpdateResponsePayload {
24
+ /**
25
+ * The stylesheet as stored — or, on a dry run, as it would be stored.
26
+ */
27
+ stylesheet: string;
28
+ /**
29
+ * False on a dry run and when the stylesheet equals the one already stored; true when the stored theme changed.
30
+ */
31
+ stored: boolean;
32
+ /**
33
+ * When the stored theme was last replaced. Absent on a dry run, and when the community has never set one.
34
+ */
35
+ updatedAt?: string;
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 { Ext };
41
+
42
+ /** Trust Task type URI. */
43
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/community/theme/update/0.1" as const;
44
+
45
+ /** Stable alias for this specification's request payload shape. */
46
+ export type Payload = VTCCommunityThemeUpdatePayload;
47
+
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/community/theme/update/0.1#response" as const;
50
+
51
+ /** Stable alias for this specification's success-response payload shape. */
52
+ export type Response = VTCCommunityThemeUpdateResponsePayload;
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/vtc/community/theme/update/0.1",
66
+ "title": "VTC Community — Theme — Update — payload",
67
+ "description": "The whole new stylesheet, which replaces the stored one. The outer document members are owned by the framework — SPEC §6.3.",
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "stylesheet"
72
+ ],
73
+ "properties": {
74
+ "stylesheet": {
75
+ "type": "string",
76
+ "maxLength": 32768,
77
+ "description": "The new theme stylesheet, in the theme profile. The empty string removes the theme."
78
+ },
79
+ "dryRun": {
80
+ "type": "boolean",
81
+ "description": "Absent means false. When true the community checks the stylesheet and answers with what it would store, and stores nothing."
82
+ },
83
+ "ext": {
84
+ "$ref": "#/$defs/Ext"
85
+ }
86
+ },
87
+ "$defs": {
88
+ "Response": {
89
+ "$anchor": "response",
90
+ "title": "VTC Community — Theme — Update — response payload",
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": [
94
+ "stylesheet",
95
+ "stored"
96
+ ],
97
+ "properties": {
98
+ "stylesheet": {
99
+ "type": "string",
100
+ "maxLength": 32768,
101
+ "description": "The stylesheet as stored — or, on a dry run, as it would be stored."
102
+ },
103
+ "stored": {
104
+ "type": "boolean",
105
+ "description": "False on a dry run and when the stylesheet equals the one already stored; true when the stored theme changed."
106
+ },
107
+ "updatedAt": {
108
+ "type": "string",
109
+ "format": "date-time",
110
+ "description": "When the stored theme was last replaced. Absent on a dry run, and when the community has never set one."
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
+ }
128
+ } as const;
129
+
130
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
131
+ export const RESPONSE_PAYLOAD_SCHEMA = {
132
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
133
+ "$ref": "#/$defs/Response",
134
+ "$defs": {
135
+ "Response": {
136
+ "$anchor": "response",
137
+ "title": "VTC Community — Theme — Update — response payload",
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "stylesheet",
142
+ "stored"
143
+ ],
144
+ "properties": {
145
+ "stylesheet": {
146
+ "type": "string",
147
+ "maxLength": 32768,
148
+ "description": "The stylesheet as stored — or, on a dry run, as it would be stored."
149
+ },
150
+ "stored": {
151
+ "type": "boolean",
152
+ "description": "False on a dry run and when the stylesheet equals the one already stored; true when the stored theme changed."
153
+ },
154
+ "updatedAt": {
155
+ "type": "string",
156
+ "format": "date-time",
157
+ "description": "When the stored theme was last replaced. Absent on a dry run, and when the community has never set one."
158
+ },
159
+ "ext": {
160
+ "$ref": "#/$defs/Ext"
161
+ }
162
+ }
163
+ },
164
+ "Ext": {
165
+ "title": "Ext",
166
+ "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.",
167
+ "type": "object",
168
+ "minProperties": 1,
169
+ "additionalProperties": true,
170
+ "propertyNames": {
171
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
172
+ }
173
+ }
174
+ }
175
+ } as const;
176
+
177
+ /**
178
+ * SPEC.md §7.2 policy for the request variant, from this specification's
179
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
180
+ * per-specification and cannot be derived from the document alone, and
181
+ * item 2 needs the schema this carries.
182
+ */
183
+ export const SPEC = {
184
+ typeUri: TYPE_URI,
185
+ isBearer: false,
186
+ isProofRequired: true,
187
+ isRecipientRequired: true,
188
+ isIssuedAtRequired: true,
189
+ payloadSchema: PAYLOAD_SCHEMA,
190
+ } as const;
191
+
192
+ /**
193
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
194
+ * tracks the *issuer* party's requirement because a response swaps the
195
+ * parties (§7.3 item 5).
196
+ */
197
+ export const RESPONSE_SPEC = {
198
+ typeUri: RESPONSE_TYPE_URI,
199
+ isBearer: false,
200
+ isProofRequired: true,
201
+ isRecipientRequired: true,
202
+ isIssuedAtRequired: true,
203
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
204
+ } as const;