@openvtc/trust-tasks 0.17.6 → 0.17.8
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 +158 -0
- package/dist/_shared/components.d.ts +4 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.d.ts +42 -2
- package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.js +24 -0
- package/dist/rooms/create/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/backfill/0.1/payload.d.ts +336 -0
- package/dist/rooms/keys/backfill/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/backfill/0.1/payload.js +177 -0
- package/dist/rooms/keys/backfill/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/chain/0.1/payload.d.ts +382 -0
- package/dist/rooms/keys/chain/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/chain/0.1/payload.js +213 -0
- package/dist/rooms/keys/chain/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/list/0.1/payload.d.ts +314 -0
- package/dist/rooms/keys/list/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/list/0.1/payload.js +175 -0
- package/dist/rooms/keys/list/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts +352 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.js +199 -0
- package/dist/rooms/keys/seal/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/invite/0.1/payload.d.ts +291 -0
- package/dist/rooms/owner/invite/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/invite/0.1/payload.js +158 -0
- package/dist/rooms/owner/invite/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.d.ts +315 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.js +173 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.d.ts +291 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.js +158 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/register/0.1/payload.d.ts +382 -0
- package/dist/rooms/owner/register/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/register/0.1/payload.js +215 -0
- package/dist/rooms/owner/register/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +4 -0
- package/src/index.ts +8 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/create/0.1/payload.ts +30 -2
- package/src/rooms/keys/backfill/0.1/payload.ts +236 -0
- package/src/rooms/keys/chain/0.1/payload.ts +262 -0
- package/src/rooms/keys/list/0.1/payload.ts +222 -0
- package/src/rooms/keys/seal/0.1/payload.ts +246 -0
- package/src/rooms/owner/invite/0.1/payload.ts +212 -0
- package/src/rooms/owner/issue-authority/0.1/payload.ts +233 -0
- package/src/rooms/owner/issue-membership/0.1/payload.ts +212 -0
- package/src/rooms/owner/register/0.1/payload.ts +278 -0
|
@@ -12,5 +12,5 @@ export interface RoomsSharedTypes {
|
|
|
12
12
|
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
13
13
|
* See "../../../_shared/components.js".
|
|
14
14
|
*/
|
|
15
|
-
export type { AuthorityPresentation, EpochLink, RecordMetadata, SealedRecord, Visibility } from "../../../_shared/components.js";
|
|
15
|
+
export type { AuthorityPresentation, EpochLink, RecordMetadata, RetentionPolicy, SealedRecord, Visibility } from "../../../_shared/components.js";
|
|
16
16
|
//# sourceMappingURL=room.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"room.d.ts","sourceRoot":"","sources":["../../../../src/rooms/_shared/0.1/room.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED;;;GAGG;AACH,YAAY,EAAE,qBAAqB,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"room.d.ts","sourceRoot":"","sources":["../../../../src/rooms/_shared/0.1/room.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED;;;GAGG;AACH,YAAY,EAAE,qBAAqB,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
3
|
* Source: specs/rooms/create/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
|
-
import type { Ext, Visibility } from "../../../_shared/components.js";
|
|
5
|
+
import type { Ext, RetentionPolicy, Visibility } from "../../../_shared/components.js";
|
|
6
6
|
export interface RoomsCreatePayload {
|
|
7
7
|
/**
|
|
8
8
|
* The room's identifier, minted by its owner before this call. A host is told the identifier; it does not assign one, because a room whose identity the host chose could not move to another host.
|
|
@@ -13,6 +13,10 @@ export interface RoomsCreatePayload {
|
|
|
13
13
|
* The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.
|
|
14
14
|
*/
|
|
15
15
|
ownerDid: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether this room keeps its history readable across a membership change. Absent means `chained`, which is the choice a room wants unless it has a reason not to: joining a room should mean being able to read it. A host MUST reject an epoch link for a room whose policy is `fromJoin` rather than storing one it declared it would not have.
|
|
18
|
+
*/
|
|
19
|
+
retentionPolicy?: RetentionPolicy;
|
|
16
20
|
/**
|
|
17
21
|
* How long the host will hold the room after its epoch lapses without renewal, before storage may be reclaimed. Stated at creation rather than discovered: reclamation that surprises a member is a failure of the design, not of the member.
|
|
18
22
|
*/
|
|
@@ -34,7 +38,7 @@ export interface RoomsCreateResponsePayload {
|
|
|
34
38
|
ext?: Ext;
|
|
35
39
|
}
|
|
36
40
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
37
|
-
export type { Ext, Visibility };
|
|
41
|
+
export type { Ext, RetentionPolicy, Visibility };
|
|
38
42
|
/** Trust Task type URI. */
|
|
39
43
|
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/create/0.1";
|
|
40
44
|
/** Stable alias for this specification's request payload shape. */
|
|
@@ -71,6 +75,10 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
71
75
|
readonly type: "string";
|
|
72
76
|
readonly description: "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.";
|
|
73
77
|
};
|
|
78
|
+
readonly retentionPolicy: {
|
|
79
|
+
readonly $ref: "#/$defs/RetentionPolicy";
|
|
80
|
+
readonly description: "Whether this room keeps its history readable across a membership change. Absent means `chained`, which is the choice a room wants unless it has a reason not to: joining a room should mean being able to read it. A host MUST reject an epoch link for a room whose policy is `fromJoin` rather than storing one it declared it would not have.";
|
|
81
|
+
};
|
|
74
82
|
readonly retentionDays: {
|
|
75
83
|
readonly type: "integer";
|
|
76
84
|
readonly minimum: 1;
|
|
@@ -113,6 +121,13 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
113
121
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
114
122
|
};
|
|
115
123
|
};
|
|
124
|
+
readonly RetentionPolicy: {
|
|
125
|
+
readonly title: "RetentionPolicy";
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly enum: readonly ["chained", "fromJoin"];
|
|
128
|
+
readonly description: "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.";
|
|
129
|
+
readonly $comment: "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it.";
|
|
130
|
+
};
|
|
116
131
|
readonly Visibility: {
|
|
117
132
|
readonly title: "Visibility";
|
|
118
133
|
readonly type: "string";
|
|
@@ -157,6 +172,13 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
157
172
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
158
173
|
};
|
|
159
174
|
};
|
|
175
|
+
readonly RetentionPolicy: {
|
|
176
|
+
readonly title: "RetentionPolicy";
|
|
177
|
+
readonly type: "string";
|
|
178
|
+
readonly enum: readonly ["chained", "fromJoin"];
|
|
179
|
+
readonly description: "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.";
|
|
180
|
+
readonly $comment: "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it.";
|
|
181
|
+
};
|
|
160
182
|
readonly Visibility: {
|
|
161
183
|
readonly title: "Visibility";
|
|
162
184
|
readonly type: "string";
|
|
@@ -196,6 +218,10 @@ export declare const SPEC: {
|
|
|
196
218
|
readonly type: "string";
|
|
197
219
|
readonly description: "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.";
|
|
198
220
|
};
|
|
221
|
+
readonly retentionPolicy: {
|
|
222
|
+
readonly $ref: "#/$defs/RetentionPolicy";
|
|
223
|
+
readonly description: "Whether this room keeps its history readable across a membership change. Absent means `chained`, which is the choice a room wants unless it has a reason not to: joining a room should mean being able to read it. A host MUST reject an epoch link for a room whose policy is `fromJoin` rather than storing one it declared it would not have.";
|
|
224
|
+
};
|
|
199
225
|
readonly retentionDays: {
|
|
200
226
|
readonly type: "integer";
|
|
201
227
|
readonly minimum: 1;
|
|
@@ -238,6 +264,13 @@ export declare const SPEC: {
|
|
|
238
264
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
239
265
|
};
|
|
240
266
|
};
|
|
267
|
+
readonly RetentionPolicy: {
|
|
268
|
+
readonly title: "RetentionPolicy";
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly enum: readonly ["chained", "fromJoin"];
|
|
271
|
+
readonly description: "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.";
|
|
272
|
+
readonly $comment: "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it.";
|
|
273
|
+
};
|
|
241
274
|
readonly Visibility: {
|
|
242
275
|
readonly title: "Visibility";
|
|
243
276
|
readonly type: "string";
|
|
@@ -293,6 +326,13 @@ export declare const RESPONSE_SPEC: {
|
|
|
293
326
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
294
327
|
};
|
|
295
328
|
};
|
|
329
|
+
readonly RetentionPolicy: {
|
|
330
|
+
readonly title: "RetentionPolicy";
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
readonly enum: readonly ["chained", "fromJoin"];
|
|
333
|
+
readonly description: "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.";
|
|
334
|
+
readonly $comment: "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it.";
|
|
335
|
+
};
|
|
296
336
|
readonly Visibility: {
|
|
297
337
|
readonly title: "Visibility";
|
|
298
338
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAGvF,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC;AAEjD,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,8CAAuD,CAAC;AAEhF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,kBAAkB,CAAC;AAEzC,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,uDAAgE,CAAC;AAElG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAElD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2D1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|
|
@@ -38,6 +38,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
38
38
|
"type": "string",
|
|
39
39
|
"description": "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it."
|
|
40
40
|
},
|
|
41
|
+
"retentionPolicy": {
|
|
42
|
+
"$ref": "#/$defs/RetentionPolicy",
|
|
43
|
+
"description": "Whether this room keeps its history readable across a membership change. Absent means `chained`, which is the choice a room wants unless it has a reason not to: joining a room should mean being able to read it. A host MUST reject an epoch link for a room whose policy is `fromJoin` rather than storing one it declared it would not have."
|
|
44
|
+
},
|
|
41
45
|
"retentionDays": {
|
|
42
46
|
"type": "integer",
|
|
43
47
|
"minimum": 1,
|
|
@@ -83,6 +87,16 @@ export const PAYLOAD_SCHEMA = {
|
|
|
83
87
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
84
88
|
}
|
|
85
89
|
},
|
|
90
|
+
"RetentionPolicy": {
|
|
91
|
+
"title": "RetentionPolicy",
|
|
92
|
+
"type": "string",
|
|
93
|
+
"enum": [
|
|
94
|
+
"chained",
|
|
95
|
+
"fromJoin"
|
|
96
|
+
],
|
|
97
|
+
"description": "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.",
|
|
98
|
+
"$comment": "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it."
|
|
99
|
+
},
|
|
86
100
|
"Visibility": {
|
|
87
101
|
"title": "Visibility",
|
|
88
102
|
"type": "string",
|
|
@@ -134,6 +148,16 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
134
148
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
135
149
|
}
|
|
136
150
|
},
|
|
151
|
+
"RetentionPolicy": {
|
|
152
|
+
"title": "RetentionPolicy",
|
|
153
|
+
"type": "string",
|
|
154
|
+
"enum": [
|
|
155
|
+
"chained",
|
|
156
|
+
"fromJoin"
|
|
157
|
+
],
|
|
158
|
+
"description": "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.",
|
|
159
|
+
"$comment": "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it."
|
|
160
|
+
},
|
|
137
161
|
"Visibility": {
|
|
138
162
|
"title": "Visibility",
|
|
139
163
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/backfill/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
6
|
+
export interface RoomsKeysBackfillPayload {
|
|
7
|
+
/**
|
|
8
|
+
* The room to backfill. The recipient MUST already hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so fetching them for a room one is not in would retain key material for nothing.
|
|
9
|
+
*/
|
|
10
|
+
roomId: string;
|
|
11
|
+
/**
|
|
12
|
+
* The host to fetch from, as a DID. Named by the caller because nothing maps a room to its host: a room is portable — re-point it and it has moved — so a remembered host is a value that goes stale, and the recipient holds key custody rather than a hosting record. A caller who names the wrong host learns so as a refusal from a party that does not serve this room, which is loud and immediate.
|
|
13
|
+
*/
|
|
14
|
+
host: string;
|
|
15
|
+
/**
|
|
16
|
+
* Fetch only rungs at or below this epoch. Absent means from the room's current epoch down. A recipient that already reads to some epoch SHOULD pass it, so a host serves the part that is missing rather than the whole chain.
|
|
17
|
+
*/
|
|
18
|
+
fromEpoch?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Maximum rungs to request in one pass, highest `epoch` first. A host MAY return fewer. A caller walking a long history calls again with `fromEpoch` set below what it has.
|
|
21
|
+
*/
|
|
22
|
+
limit?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
25
|
+
*/
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.
|
|
30
|
+
*/
|
|
31
|
+
export interface RoomsKeysBackfillResponsePayload {
|
|
32
|
+
roomId: string;
|
|
33
|
+
/**
|
|
34
|
+
* The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.
|
|
35
|
+
*/
|
|
36
|
+
earliestReadableEpoch: number;
|
|
37
|
+
/**
|
|
38
|
+
* How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.
|
|
39
|
+
*/
|
|
40
|
+
fetched?: number;
|
|
41
|
+
/**
|
|
42
|
+
* How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.
|
|
43
|
+
*/
|
|
44
|
+
stored?: number;
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
48
|
+
export type { Ext };
|
|
49
|
+
/** Trust Task type URI. */
|
|
50
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/backfill/0.1";
|
|
51
|
+
/** Stable alias for this specification's request payload shape. */
|
|
52
|
+
export type Payload = RoomsKeysBackfillPayload;
|
|
53
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
54
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/backfill/0.1#response";
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = RoomsKeysBackfillResponsePayload;
|
|
57
|
+
/**
|
|
58
|
+
* This specification's payload schema, as a value.
|
|
59
|
+
*
|
|
60
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
61
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
62
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
63
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
64
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
65
|
+
*/
|
|
66
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
67
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
68
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/backfill/0.1";
|
|
69
|
+
readonly title: "Rooms Keys Backfill — payload";
|
|
70
|
+
readonly type: "object";
|
|
71
|
+
readonly additionalProperties: false;
|
|
72
|
+
readonly required: readonly ["roomId", "host"];
|
|
73
|
+
readonly properties: {
|
|
74
|
+
readonly roomId: {
|
|
75
|
+
readonly type: "string";
|
|
76
|
+
readonly description: "The room to backfill. The recipient MUST already hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so fetching them for a room one is not in would retain key material for nothing.";
|
|
77
|
+
};
|
|
78
|
+
readonly host: {
|
|
79
|
+
readonly type: "string";
|
|
80
|
+
readonly description: "The host to fetch from, as a DID. Named by the caller because nothing maps a room to its host: a room is portable — re-point it and it has moved — so a remembered host is a value that goes stale, and the recipient holds key custody rather than a hosting record. A caller who names the wrong host learns so as a refusal from a party that does not serve this room, which is loud and immediate.";
|
|
81
|
+
};
|
|
82
|
+
readonly fromEpoch: {
|
|
83
|
+
readonly type: "integer";
|
|
84
|
+
readonly minimum: 1;
|
|
85
|
+
readonly description: "Fetch only rungs at or below this epoch. Absent means from the room's current epoch down. A recipient that already reads to some epoch SHOULD pass it, so a host serves the part that is missing rather than the whole chain.";
|
|
86
|
+
};
|
|
87
|
+
readonly limit: {
|
|
88
|
+
readonly type: "integer";
|
|
89
|
+
readonly minimum: 1;
|
|
90
|
+
readonly description: "Maximum rungs to request in one pass, highest `epoch` first. A host MAY return fewer. A caller walking a long history calls again with `fromEpoch` set below what it has.";
|
|
91
|
+
};
|
|
92
|
+
readonly ext: {
|
|
93
|
+
readonly $ref: "#/$defs/Ext";
|
|
94
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
readonly $defs: {
|
|
98
|
+
readonly Response: {
|
|
99
|
+
readonly $anchor: "response";
|
|
100
|
+
readonly title: "Rooms Keys Backfill — response payload";
|
|
101
|
+
readonly description: "Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.";
|
|
102
|
+
readonly type: "object";
|
|
103
|
+
readonly additionalProperties: false;
|
|
104
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
105
|
+
readonly properties: {
|
|
106
|
+
readonly roomId: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
readonly earliestReadableEpoch: {
|
|
110
|
+
readonly type: "integer";
|
|
111
|
+
readonly minimum: 1;
|
|
112
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.";
|
|
113
|
+
};
|
|
114
|
+
readonly fetched: {
|
|
115
|
+
readonly type: "integer";
|
|
116
|
+
readonly minimum: 0;
|
|
117
|
+
readonly description: "How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.";
|
|
118
|
+
};
|
|
119
|
+
readonly stored: {
|
|
120
|
+
readonly type: "integer";
|
|
121
|
+
readonly minimum: 0;
|
|
122
|
+
readonly description: "How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.";
|
|
123
|
+
};
|
|
124
|
+
readonly ext: {
|
|
125
|
+
readonly $ref: "#/$defs/Ext";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly Ext: {
|
|
130
|
+
readonly title: "Ext";
|
|
131
|
+
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.";
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
readonly minProperties: 1;
|
|
134
|
+
readonly additionalProperties: true;
|
|
135
|
+
readonly propertyNames: {
|
|
136
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
142
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
143
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
144
|
+
readonly $ref: "#/$defs/Response";
|
|
145
|
+
readonly $defs: {
|
|
146
|
+
readonly Response: {
|
|
147
|
+
readonly $anchor: "response";
|
|
148
|
+
readonly title: "Rooms Keys Backfill — response payload";
|
|
149
|
+
readonly description: "Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.";
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly additionalProperties: false;
|
|
152
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
153
|
+
readonly properties: {
|
|
154
|
+
readonly roomId: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
};
|
|
157
|
+
readonly earliestReadableEpoch: {
|
|
158
|
+
readonly type: "integer";
|
|
159
|
+
readonly minimum: 1;
|
|
160
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.";
|
|
161
|
+
};
|
|
162
|
+
readonly fetched: {
|
|
163
|
+
readonly type: "integer";
|
|
164
|
+
readonly minimum: 0;
|
|
165
|
+
readonly description: "How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.";
|
|
166
|
+
};
|
|
167
|
+
readonly stored: {
|
|
168
|
+
readonly type: "integer";
|
|
169
|
+
readonly minimum: 0;
|
|
170
|
+
readonly description: "How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.";
|
|
171
|
+
};
|
|
172
|
+
readonly ext: {
|
|
173
|
+
readonly $ref: "#/$defs/Ext";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
readonly Ext: {
|
|
178
|
+
readonly title: "Ext";
|
|
179
|
+
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.";
|
|
180
|
+
readonly type: "object";
|
|
181
|
+
readonly minProperties: 1;
|
|
182
|
+
readonly additionalProperties: true;
|
|
183
|
+
readonly propertyNames: {
|
|
184
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
191
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
192
|
+
* per-specification and cannot be derived from the document alone, and
|
|
193
|
+
* item 2 needs the schema this carries.
|
|
194
|
+
*/
|
|
195
|
+
export declare const SPEC: {
|
|
196
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/backfill/0.1";
|
|
197
|
+
readonly isBearer: false;
|
|
198
|
+
readonly isProofRequired: true;
|
|
199
|
+
readonly isRecipientRequired: true;
|
|
200
|
+
readonly isIssuedAtRequired: true;
|
|
201
|
+
readonly payloadSchema: {
|
|
202
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
203
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/backfill/0.1";
|
|
204
|
+
readonly title: "Rooms Keys Backfill — payload";
|
|
205
|
+
readonly type: "object";
|
|
206
|
+
readonly additionalProperties: false;
|
|
207
|
+
readonly required: readonly ["roomId", "host"];
|
|
208
|
+
readonly properties: {
|
|
209
|
+
readonly roomId: {
|
|
210
|
+
readonly type: "string";
|
|
211
|
+
readonly description: "The room to backfill. The recipient MUST already hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so fetching them for a room one is not in would retain key material for nothing.";
|
|
212
|
+
};
|
|
213
|
+
readonly host: {
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
readonly description: "The host to fetch from, as a DID. Named by the caller because nothing maps a room to its host: a room is portable — re-point it and it has moved — so a remembered host is a value that goes stale, and the recipient holds key custody rather than a hosting record. A caller who names the wrong host learns so as a refusal from a party that does not serve this room, which is loud and immediate.";
|
|
216
|
+
};
|
|
217
|
+
readonly fromEpoch: {
|
|
218
|
+
readonly type: "integer";
|
|
219
|
+
readonly minimum: 1;
|
|
220
|
+
readonly description: "Fetch only rungs at or below this epoch. Absent means from the room's current epoch down. A recipient that already reads to some epoch SHOULD pass it, so a host serves the part that is missing rather than the whole chain.";
|
|
221
|
+
};
|
|
222
|
+
readonly limit: {
|
|
223
|
+
readonly type: "integer";
|
|
224
|
+
readonly minimum: 1;
|
|
225
|
+
readonly description: "Maximum rungs to request in one pass, highest `epoch` first. A host MAY return fewer. A caller walking a long history calls again with `fromEpoch` set below what it has.";
|
|
226
|
+
};
|
|
227
|
+
readonly ext: {
|
|
228
|
+
readonly $ref: "#/$defs/Ext";
|
|
229
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
readonly $defs: {
|
|
233
|
+
readonly Response: {
|
|
234
|
+
readonly $anchor: "response";
|
|
235
|
+
readonly title: "Rooms Keys Backfill — response payload";
|
|
236
|
+
readonly description: "Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.";
|
|
237
|
+
readonly type: "object";
|
|
238
|
+
readonly additionalProperties: false;
|
|
239
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
240
|
+
readonly properties: {
|
|
241
|
+
readonly roomId: {
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
};
|
|
244
|
+
readonly earliestReadableEpoch: {
|
|
245
|
+
readonly type: "integer";
|
|
246
|
+
readonly minimum: 1;
|
|
247
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.";
|
|
248
|
+
};
|
|
249
|
+
readonly fetched: {
|
|
250
|
+
readonly type: "integer";
|
|
251
|
+
readonly minimum: 0;
|
|
252
|
+
readonly description: "How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.";
|
|
253
|
+
};
|
|
254
|
+
readonly stored: {
|
|
255
|
+
readonly type: "integer";
|
|
256
|
+
readonly minimum: 0;
|
|
257
|
+
readonly description: "How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.";
|
|
258
|
+
};
|
|
259
|
+
readonly ext: {
|
|
260
|
+
readonly $ref: "#/$defs/Ext";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
readonly Ext: {
|
|
265
|
+
readonly title: "Ext";
|
|
266
|
+
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.";
|
|
267
|
+
readonly type: "object";
|
|
268
|
+
readonly minProperties: 1;
|
|
269
|
+
readonly additionalProperties: true;
|
|
270
|
+
readonly propertyNames: {
|
|
271
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
279
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
280
|
+
* parties (§7.3 item 5).
|
|
281
|
+
*/
|
|
282
|
+
export declare const RESPONSE_SPEC: {
|
|
283
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/backfill/0.1#response";
|
|
284
|
+
readonly isBearer: false;
|
|
285
|
+
readonly isProofRequired: true;
|
|
286
|
+
readonly isRecipientRequired: true;
|
|
287
|
+
readonly isIssuedAtRequired: true;
|
|
288
|
+
readonly payloadSchema: {
|
|
289
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
290
|
+
readonly $ref: "#/$defs/Response";
|
|
291
|
+
readonly $defs: {
|
|
292
|
+
readonly Response: {
|
|
293
|
+
readonly $anchor: "response";
|
|
294
|
+
readonly title: "Rooms Keys Backfill — response payload";
|
|
295
|
+
readonly description: "Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.";
|
|
296
|
+
readonly type: "object";
|
|
297
|
+
readonly additionalProperties: false;
|
|
298
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
299
|
+
readonly properties: {
|
|
300
|
+
readonly roomId: {
|
|
301
|
+
readonly type: "string";
|
|
302
|
+
};
|
|
303
|
+
readonly earliestReadableEpoch: {
|
|
304
|
+
readonly type: "integer";
|
|
305
|
+
readonly minimum: 1;
|
|
306
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.";
|
|
307
|
+
};
|
|
308
|
+
readonly fetched: {
|
|
309
|
+
readonly type: "integer";
|
|
310
|
+
readonly minimum: 0;
|
|
311
|
+
readonly description: "How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.";
|
|
312
|
+
};
|
|
313
|
+
readonly stored: {
|
|
314
|
+
readonly type: "integer";
|
|
315
|
+
readonly minimum: 0;
|
|
316
|
+
readonly description: "How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.";
|
|
317
|
+
};
|
|
318
|
+
readonly ext: {
|
|
319
|
+
readonly $ref: "#/$defs/Ext";
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
readonly Ext: {
|
|
324
|
+
readonly title: "Ext";
|
|
325
|
+
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.";
|
|
326
|
+
readonly type: "object";
|
|
327
|
+
readonly minProperties: 1;
|
|
328
|
+
readonly additionalProperties: true;
|
|
329
|
+
readonly propertyNames: {
|
|
330
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/backfill/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,qDAA8D,CAAC;AAEvF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAE/C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,8DAAuE,CAAC;AAEzG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|