@openvtc/trust-tasks 0.23.1 → 0.23.3
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.
- package/CHANGELOG.md +58 -0
- package/dist/_shared/components.d.ts +8 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/git-ns/bridge/event/0.4/payload.d.ts +1898 -0
- package/dist/git-ns/bridge/event/0.4/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/event/0.4/payload.js +1085 -0
- package/dist/git-ns/bridge/event/0.4/payload.js.map +1 -0
- package/dist/git-ns/bridge/job/0.5/payload.d.ts +1106 -0
- package/dist/git-ns/bridge/job/0.5/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/job/0.5/payload.js +594 -0
- package/dist/git-ns/bridge/job/0.5/payload.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/admin/events/_shared/0.1/topic.d.ts +27 -0
- package/dist/vtc/admin/events/_shared/0.1/topic.d.ts.map +1 -0
- package/dist/vtc/admin/events/_shared/0.1/topic.js +6 -0
- package/dist/vtc/admin/events/_shared/0.1/topic.js.map +1 -0
- package/dist/vtc/admin/events/event/0.1/payload.d.ts +172 -0
- package/dist/vtc/admin/events/event/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/events/event/0.1/payload.js +99 -0
- package/dist/vtc/admin/events/event/0.1/payload.js.map +1 -0
- package/dist/vtc/admin/events/subscribe/0.1/payload.d.ts +409 -0
- package/dist/vtc/admin/events/subscribe/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/events/subscribe/0.1/payload.js +230 -0
- package/dist/vtc/admin/events/subscribe/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +8 -0
- package/src/git-ns/bridge/event/0.4/payload.ts +1283 -0
- package/src/git-ns/bridge/job/0.5/payload.ts +728 -0
- package/src/index.ts +5 -0
- package/src/vtc/admin/events/_shared/0.1/topic.ts +28 -0
- package/src/vtc/admin/events/event/0.1/payload.ts +133 -0
- package/src/vtc/admin/events/subscribe/0.1/payload.ts +302 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/admin/events/event/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/admin/events/event/0.1";
|
|
7
|
+
/**
|
|
8
|
+
* This specification's payload schema, as a value.
|
|
9
|
+
*
|
|
10
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
11
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
12
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
13
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
14
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
15
|
+
*/
|
|
16
|
+
export const PAYLOAD_SCHEMA = {
|
|
17
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
18
|
+
"$id": "https://trusttasks.org/spec/vtc/admin/events/event/0.1",
|
|
19
|
+
"title": "VTC Admin Events — Event — payload",
|
|
20
|
+
"description": "One hint, sent by a Verifiable Trust Community down an administrator console's live channel: something under `topic` changed, re-read it. It never carries the record that changed. Fire-and-forget: there is no response. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": [
|
|
24
|
+
"topic",
|
|
25
|
+
"at",
|
|
26
|
+
"resumeToken"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"topic": {
|
|
30
|
+
"$ref": "#/$defs/Topic",
|
|
31
|
+
"description": "What changed. Always one of the effective topics the subscribe response named."
|
|
32
|
+
},
|
|
33
|
+
"at": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "date-time",
|
|
36
|
+
"description": "When the community observed the change. Where it coalesced several changes into this hint, the latest of them."
|
|
37
|
+
},
|
|
38
|
+
"count": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"minimum": 0,
|
|
41
|
+
"description": "Only on a count topic (`actions`, `acknowledgements`, `joinRequests`): the caller's current count for that topic as of `at` — what a console badge shows. Absent on every other topic. A console MAY show it until its re-fetch returns, and MUST prefer the read's own count once it does."
|
|
42
|
+
},
|
|
43
|
+
"resumeToken": {
|
|
44
|
+
"$ref": "#/$defs/ResumeToken",
|
|
45
|
+
"description": "The stream position after this hint. A console keeps the latest one and passes it back as `since` when it re-subscribes."
|
|
46
|
+
},
|
|
47
|
+
"ext": {
|
|
48
|
+
"$ref": "#/$defs/Ext"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"$defs": {
|
|
52
|
+
"Ext": {
|
|
53
|
+
"title": "Ext",
|
|
54
|
+
"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.",
|
|
55
|
+
"type": "object",
|
|
56
|
+
"minProperties": 1,
|
|
57
|
+
"additionalProperties": true,
|
|
58
|
+
"propertyNames": {
|
|
59
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"ResumeToken": {
|
|
63
|
+
"title": "ResumeToken",
|
|
64
|
+
"description": "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1,
|
|
67
|
+
"maxLength": 256,
|
|
68
|
+
"pattern": "^[A-Za-z0-9._~-]+$"
|
|
69
|
+
},
|
|
70
|
+
"Topic": {
|
|
71
|
+
"title": "Topic",
|
|
72
|
+
"description": "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"enum": [
|
|
75
|
+
"actions",
|
|
76
|
+
"acknowledgements",
|
|
77
|
+
"joinRequests",
|
|
78
|
+
"members",
|
|
79
|
+
"singleAdminMode",
|
|
80
|
+
"config"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
87
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
88
|
+
* per-specification and cannot be derived from the document alone, and
|
|
89
|
+
* item 2 needs the schema this carries.
|
|
90
|
+
*/
|
|
91
|
+
export const SPEC = {
|
|
92
|
+
typeUri: TYPE_URI,
|
|
93
|
+
isBearer: false,
|
|
94
|
+
isProofRequired: false,
|
|
95
|
+
isRecipientRequired: true,
|
|
96
|
+
isIssuedAtRequired: false,
|
|
97
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vtc/admin/events/event/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,wDAAiE,CAAC;AAK1F;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,wDAAwD;IAC/D,OAAO,EAAE,oCAAoC;IAC7C,aAAa,EAAE,yVAAyV;IACxW,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,OAAO;QACP,IAAI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AAc;CACrB,CAAC"}
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/admin/events/subscribe/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext, ResumeToken, Topic } from "../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Open an administrator console's live channel of hint-only events. The success response is the first document on a stream that then carries vtc/admin/events/event/0.1 documents; over HTTPS that stream is the streamed response of bindings/https/0.3 §2.1. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCAdminEventsSubscribePayload {
|
|
10
|
+
/**
|
|
11
|
+
* The topics the console renders. The community narrows this to the topics the caller may read and reports the result as the response's `topics`.
|
|
12
|
+
*
|
|
13
|
+
* @minItems 1
|
|
14
|
+
* @maxItems 6
|
|
15
|
+
*/
|
|
16
|
+
topics: [Topic] | [Topic, Topic] | [Topic, Topic, Topic] | [Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic, Topic];
|
|
17
|
+
/**
|
|
18
|
+
* The last `resumeToken` the console received on an earlier stream, to resume from. A token the community does not recognise, has expired, or minted for another caller is not an error: the stream starts fresh and the response says `resumed: false`.
|
|
19
|
+
*/
|
|
20
|
+
since?: ResumeToken;
|
|
21
|
+
ext?: Ext;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.
|
|
25
|
+
*/
|
|
26
|
+
export interface VTCAdminEventsSubscribeResponsePayload {
|
|
27
|
+
/**
|
|
28
|
+
* The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.
|
|
29
|
+
*
|
|
30
|
+
* @minItems 1
|
|
31
|
+
* @maxItems 6
|
|
32
|
+
*/
|
|
33
|
+
topics: [Topic] | [Topic, Topic] | [Topic, Topic, Topic] | [Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic, Topic];
|
|
34
|
+
/**
|
|
35
|
+
* The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.
|
|
36
|
+
*/
|
|
37
|
+
heartbeatSeconds: number;
|
|
38
|
+
/**
|
|
39
|
+
* `true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.
|
|
40
|
+
*/
|
|
41
|
+
resumed: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.
|
|
44
|
+
*/
|
|
45
|
+
resumeToken: ResumeToken;
|
|
46
|
+
ext?: Ext;
|
|
47
|
+
}
|
|
48
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
49
|
+
export type { Ext, ResumeToken, Topic };
|
|
50
|
+
/** Trust Task type URI. */
|
|
51
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.1";
|
|
52
|
+
/** Stable alias for this specification's request payload shape. */
|
|
53
|
+
export type Payload = VTCAdminEventsSubscribePayload;
|
|
54
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
55
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.1#response";
|
|
56
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
57
|
+
export type Response = VTCAdminEventsSubscribeResponsePayload;
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
68
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
69
|
+
readonly $id: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.1";
|
|
70
|
+
readonly title: "VTC Admin Events — Subscribe — payload";
|
|
71
|
+
readonly description: "Open an administrator console's live channel of hint-only events. The success response is the first document on a stream that then carries vtc/admin/events/event/0.1 documents; over HTTPS that stream is the streamed response of bindings/https/0.3 §2.1. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
72
|
+
readonly type: "object";
|
|
73
|
+
readonly additionalProperties: false;
|
|
74
|
+
readonly required: readonly ["topics"];
|
|
75
|
+
readonly properties: {
|
|
76
|
+
readonly topics: {
|
|
77
|
+
readonly type: "array";
|
|
78
|
+
readonly minItems: 1;
|
|
79
|
+
readonly maxItems: 6;
|
|
80
|
+
readonly uniqueItems: true;
|
|
81
|
+
readonly items: {
|
|
82
|
+
readonly $ref: "#/$defs/Topic";
|
|
83
|
+
};
|
|
84
|
+
readonly description: "The topics the console renders. The community narrows this to the topics the caller may read and reports the result as the response's `topics`.";
|
|
85
|
+
};
|
|
86
|
+
readonly since: {
|
|
87
|
+
readonly $ref: "#/$defs/ResumeToken";
|
|
88
|
+
readonly description: "The last `resumeToken` the console received on an earlier stream, to resume from. A token the community does not recognise, has expired, or minted for another caller is not an error: the stream starts fresh and the response says `resumed: false`.";
|
|
89
|
+
};
|
|
90
|
+
readonly ext: {
|
|
91
|
+
readonly $ref: "#/$defs/Ext";
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
readonly $defs: {
|
|
95
|
+
readonly Response: {
|
|
96
|
+
readonly $anchor: "response";
|
|
97
|
+
readonly title: "VTC Admin Events — Subscribe — response payload";
|
|
98
|
+
readonly description: "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.";
|
|
99
|
+
readonly type: "object";
|
|
100
|
+
readonly additionalProperties: false;
|
|
101
|
+
readonly required: readonly ["topics", "heartbeatSeconds", "resumed", "resumeToken"];
|
|
102
|
+
readonly properties: {
|
|
103
|
+
readonly topics: {
|
|
104
|
+
readonly type: "array";
|
|
105
|
+
readonly minItems: 1;
|
|
106
|
+
readonly maxItems: 6;
|
|
107
|
+
readonly uniqueItems: true;
|
|
108
|
+
readonly items: {
|
|
109
|
+
readonly $ref: "#/$defs/Topic";
|
|
110
|
+
};
|
|
111
|
+
readonly description: "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.";
|
|
112
|
+
};
|
|
113
|
+
readonly heartbeatSeconds: {
|
|
114
|
+
readonly type: "integer";
|
|
115
|
+
readonly minimum: 5;
|
|
116
|
+
readonly maximum: 60;
|
|
117
|
+
readonly description: "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.";
|
|
118
|
+
};
|
|
119
|
+
readonly resumed: {
|
|
120
|
+
readonly type: "boolean";
|
|
121
|
+
readonly description: "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.";
|
|
122
|
+
};
|
|
123
|
+
readonly resumeToken: {
|
|
124
|
+
readonly $ref: "#/$defs/ResumeToken";
|
|
125
|
+
readonly description: "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.";
|
|
126
|
+
};
|
|
127
|
+
readonly ext: {
|
|
128
|
+
readonly $ref: "#/$defs/Ext";
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
readonly Ext: {
|
|
133
|
+
readonly title: "Ext";
|
|
134
|
+
readonly 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.";
|
|
135
|
+
readonly type: "object";
|
|
136
|
+
readonly minProperties: 1;
|
|
137
|
+
readonly additionalProperties: true;
|
|
138
|
+
readonly propertyNames: {
|
|
139
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
readonly ResumeToken: {
|
|
143
|
+
readonly title: "ResumeToken";
|
|
144
|
+
readonly description: "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.";
|
|
145
|
+
readonly type: "string";
|
|
146
|
+
readonly minLength: 1;
|
|
147
|
+
readonly maxLength: 256;
|
|
148
|
+
readonly pattern: "^[A-Za-z0-9._~-]+$";
|
|
149
|
+
};
|
|
150
|
+
readonly Topic: {
|
|
151
|
+
readonly title: "Topic";
|
|
152
|
+
readonly description: "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.";
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly enum: readonly ["actions", "acknowledgements", "joinRequests", "members", "singleAdminMode", "config"];
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
159
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
160
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
161
|
+
readonly $ref: "#/$defs/Response";
|
|
162
|
+
readonly $defs: {
|
|
163
|
+
readonly Response: {
|
|
164
|
+
readonly $anchor: "response";
|
|
165
|
+
readonly title: "VTC Admin Events — Subscribe — response payload";
|
|
166
|
+
readonly description: "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.";
|
|
167
|
+
readonly type: "object";
|
|
168
|
+
readonly additionalProperties: false;
|
|
169
|
+
readonly required: readonly ["topics", "heartbeatSeconds", "resumed", "resumeToken"];
|
|
170
|
+
readonly properties: {
|
|
171
|
+
readonly topics: {
|
|
172
|
+
readonly type: "array";
|
|
173
|
+
readonly minItems: 1;
|
|
174
|
+
readonly maxItems: 6;
|
|
175
|
+
readonly uniqueItems: true;
|
|
176
|
+
readonly items: {
|
|
177
|
+
readonly $ref: "#/$defs/Topic";
|
|
178
|
+
};
|
|
179
|
+
readonly description: "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.";
|
|
180
|
+
};
|
|
181
|
+
readonly heartbeatSeconds: {
|
|
182
|
+
readonly type: "integer";
|
|
183
|
+
readonly minimum: 5;
|
|
184
|
+
readonly maximum: 60;
|
|
185
|
+
readonly description: "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.";
|
|
186
|
+
};
|
|
187
|
+
readonly resumed: {
|
|
188
|
+
readonly type: "boolean";
|
|
189
|
+
readonly description: "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.";
|
|
190
|
+
};
|
|
191
|
+
readonly resumeToken: {
|
|
192
|
+
readonly $ref: "#/$defs/ResumeToken";
|
|
193
|
+
readonly description: "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.";
|
|
194
|
+
};
|
|
195
|
+
readonly ext: {
|
|
196
|
+
readonly $ref: "#/$defs/Ext";
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
readonly Ext: {
|
|
201
|
+
readonly title: "Ext";
|
|
202
|
+
readonly 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.";
|
|
203
|
+
readonly type: "object";
|
|
204
|
+
readonly minProperties: 1;
|
|
205
|
+
readonly additionalProperties: true;
|
|
206
|
+
readonly propertyNames: {
|
|
207
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
readonly ResumeToken: {
|
|
211
|
+
readonly title: "ResumeToken";
|
|
212
|
+
readonly description: "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.";
|
|
213
|
+
readonly type: "string";
|
|
214
|
+
readonly minLength: 1;
|
|
215
|
+
readonly maxLength: 256;
|
|
216
|
+
readonly pattern: "^[A-Za-z0-9._~-]+$";
|
|
217
|
+
};
|
|
218
|
+
readonly Topic: {
|
|
219
|
+
readonly title: "Topic";
|
|
220
|
+
readonly description: "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.";
|
|
221
|
+
readonly type: "string";
|
|
222
|
+
readonly enum: readonly ["actions", "acknowledgements", "joinRequests", "members", "singleAdminMode", "config"];
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
228
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
229
|
+
* per-specification and cannot be derived from the document alone, and
|
|
230
|
+
* item 2 needs the schema this carries.
|
|
231
|
+
*/
|
|
232
|
+
export declare const SPEC: {
|
|
233
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.1";
|
|
234
|
+
readonly isBearer: false;
|
|
235
|
+
readonly isProofRequired: true;
|
|
236
|
+
readonly isRecipientRequired: true;
|
|
237
|
+
readonly isIssuedAtRequired: true;
|
|
238
|
+
readonly payloadSchema: {
|
|
239
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
240
|
+
readonly $id: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.1";
|
|
241
|
+
readonly title: "VTC Admin Events — Subscribe — payload";
|
|
242
|
+
readonly description: "Open an administrator console's live channel of hint-only events. The success response is the first document on a stream that then carries vtc/admin/events/event/0.1 documents; over HTTPS that stream is the streamed response of bindings/https/0.3 §2.1. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
243
|
+
readonly type: "object";
|
|
244
|
+
readonly additionalProperties: false;
|
|
245
|
+
readonly required: readonly ["topics"];
|
|
246
|
+
readonly properties: {
|
|
247
|
+
readonly topics: {
|
|
248
|
+
readonly type: "array";
|
|
249
|
+
readonly minItems: 1;
|
|
250
|
+
readonly maxItems: 6;
|
|
251
|
+
readonly uniqueItems: true;
|
|
252
|
+
readonly items: {
|
|
253
|
+
readonly $ref: "#/$defs/Topic";
|
|
254
|
+
};
|
|
255
|
+
readonly description: "The topics the console renders. The community narrows this to the topics the caller may read and reports the result as the response's `topics`.";
|
|
256
|
+
};
|
|
257
|
+
readonly since: {
|
|
258
|
+
readonly $ref: "#/$defs/ResumeToken";
|
|
259
|
+
readonly description: "The last `resumeToken` the console received on an earlier stream, to resume from. A token the community does not recognise, has expired, or minted for another caller is not an error: the stream starts fresh and the response says `resumed: false`.";
|
|
260
|
+
};
|
|
261
|
+
readonly ext: {
|
|
262
|
+
readonly $ref: "#/$defs/Ext";
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
readonly $defs: {
|
|
266
|
+
readonly Response: {
|
|
267
|
+
readonly $anchor: "response";
|
|
268
|
+
readonly title: "VTC Admin Events — Subscribe — response payload";
|
|
269
|
+
readonly description: "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.";
|
|
270
|
+
readonly type: "object";
|
|
271
|
+
readonly additionalProperties: false;
|
|
272
|
+
readonly required: readonly ["topics", "heartbeatSeconds", "resumed", "resumeToken"];
|
|
273
|
+
readonly properties: {
|
|
274
|
+
readonly topics: {
|
|
275
|
+
readonly type: "array";
|
|
276
|
+
readonly minItems: 1;
|
|
277
|
+
readonly maxItems: 6;
|
|
278
|
+
readonly uniqueItems: true;
|
|
279
|
+
readonly items: {
|
|
280
|
+
readonly $ref: "#/$defs/Topic";
|
|
281
|
+
};
|
|
282
|
+
readonly description: "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.";
|
|
283
|
+
};
|
|
284
|
+
readonly heartbeatSeconds: {
|
|
285
|
+
readonly type: "integer";
|
|
286
|
+
readonly minimum: 5;
|
|
287
|
+
readonly maximum: 60;
|
|
288
|
+
readonly description: "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.";
|
|
289
|
+
};
|
|
290
|
+
readonly resumed: {
|
|
291
|
+
readonly type: "boolean";
|
|
292
|
+
readonly description: "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.";
|
|
293
|
+
};
|
|
294
|
+
readonly resumeToken: {
|
|
295
|
+
readonly $ref: "#/$defs/ResumeToken";
|
|
296
|
+
readonly description: "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.";
|
|
297
|
+
};
|
|
298
|
+
readonly ext: {
|
|
299
|
+
readonly $ref: "#/$defs/Ext";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
readonly Ext: {
|
|
304
|
+
readonly title: "Ext";
|
|
305
|
+
readonly 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.";
|
|
306
|
+
readonly type: "object";
|
|
307
|
+
readonly minProperties: 1;
|
|
308
|
+
readonly additionalProperties: true;
|
|
309
|
+
readonly propertyNames: {
|
|
310
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
readonly ResumeToken: {
|
|
314
|
+
readonly title: "ResumeToken";
|
|
315
|
+
readonly description: "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.";
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
readonly minLength: 1;
|
|
318
|
+
readonly maxLength: 256;
|
|
319
|
+
readonly pattern: "^[A-Za-z0-9._~-]+$";
|
|
320
|
+
};
|
|
321
|
+
readonly Topic: {
|
|
322
|
+
readonly title: "Topic";
|
|
323
|
+
readonly description: "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.";
|
|
324
|
+
readonly type: "string";
|
|
325
|
+
readonly enum: readonly ["actions", "acknowledgements", "joinRequests", "members", "singleAdminMode", "config"];
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
332
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
333
|
+
* parties (§7.3 item 5).
|
|
334
|
+
*/
|
|
335
|
+
export declare const RESPONSE_SPEC: {
|
|
336
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.1#response";
|
|
337
|
+
readonly isBearer: false;
|
|
338
|
+
readonly isProofRequired: false;
|
|
339
|
+
readonly isRecipientRequired: true;
|
|
340
|
+
readonly isIssuedAtRequired: true;
|
|
341
|
+
readonly payloadSchema: {
|
|
342
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
343
|
+
readonly $ref: "#/$defs/Response";
|
|
344
|
+
readonly $defs: {
|
|
345
|
+
readonly Response: {
|
|
346
|
+
readonly $anchor: "response";
|
|
347
|
+
readonly title: "VTC Admin Events — Subscribe — response payload";
|
|
348
|
+
readonly description: "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.";
|
|
349
|
+
readonly type: "object";
|
|
350
|
+
readonly additionalProperties: false;
|
|
351
|
+
readonly required: readonly ["topics", "heartbeatSeconds", "resumed", "resumeToken"];
|
|
352
|
+
readonly properties: {
|
|
353
|
+
readonly topics: {
|
|
354
|
+
readonly type: "array";
|
|
355
|
+
readonly minItems: 1;
|
|
356
|
+
readonly maxItems: 6;
|
|
357
|
+
readonly uniqueItems: true;
|
|
358
|
+
readonly items: {
|
|
359
|
+
readonly $ref: "#/$defs/Topic";
|
|
360
|
+
};
|
|
361
|
+
readonly description: "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.";
|
|
362
|
+
};
|
|
363
|
+
readonly heartbeatSeconds: {
|
|
364
|
+
readonly type: "integer";
|
|
365
|
+
readonly minimum: 5;
|
|
366
|
+
readonly maximum: 60;
|
|
367
|
+
readonly description: "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.";
|
|
368
|
+
};
|
|
369
|
+
readonly resumed: {
|
|
370
|
+
readonly type: "boolean";
|
|
371
|
+
readonly description: "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.";
|
|
372
|
+
};
|
|
373
|
+
readonly resumeToken: {
|
|
374
|
+
readonly $ref: "#/$defs/ResumeToken";
|
|
375
|
+
readonly description: "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.";
|
|
376
|
+
};
|
|
377
|
+
readonly ext: {
|
|
378
|
+
readonly $ref: "#/$defs/Ext";
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
readonly Ext: {
|
|
383
|
+
readonly title: "Ext";
|
|
384
|
+
readonly 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.";
|
|
385
|
+
readonly type: "object";
|
|
386
|
+
readonly minProperties: 1;
|
|
387
|
+
readonly additionalProperties: true;
|
|
388
|
+
readonly propertyNames: {
|
|
389
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
readonly ResumeToken: {
|
|
393
|
+
readonly title: "ResumeToken";
|
|
394
|
+
readonly description: "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.";
|
|
395
|
+
readonly type: "string";
|
|
396
|
+
readonly minLength: 1;
|
|
397
|
+
readonly maxLength: 256;
|
|
398
|
+
readonly pattern: "^[A-Za-z0-9._~-]+$";
|
|
399
|
+
};
|
|
400
|
+
readonly Topic: {
|
|
401
|
+
readonly title: "Topic";
|
|
402
|
+
readonly description: "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.";
|
|
403
|
+
readonly type: "string";
|
|
404
|
+
readonly enum: readonly ["actions", "acknowledgements", "joinRequests", "members", "singleAdminMode", "config"];
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/admin/events/subscribe/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAGpF;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;;OAKG;IACH,MAAM,EACF,CAAC,KAAK,CAAC,GACP,CAAC,KAAK,EAAE,KAAK,CAAC,GACd,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,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