@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.
Files changed (58) hide show
  1. package/CHANGELOG.md +158 -0
  2. package/dist/_shared/components.d.ts +4 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +8 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +8 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  9. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  10. package/dist/rooms/create/0.1/payload.d.ts +42 -2
  11. package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
  12. package/dist/rooms/create/0.1/payload.js +24 -0
  13. package/dist/rooms/create/0.1/payload.js.map +1 -1
  14. package/dist/rooms/keys/backfill/0.1/payload.d.ts +336 -0
  15. package/dist/rooms/keys/backfill/0.1/payload.d.ts.map +1 -0
  16. package/dist/rooms/keys/backfill/0.1/payload.js +177 -0
  17. package/dist/rooms/keys/backfill/0.1/payload.js.map +1 -0
  18. package/dist/rooms/keys/chain/0.1/payload.d.ts +382 -0
  19. package/dist/rooms/keys/chain/0.1/payload.d.ts.map +1 -0
  20. package/dist/rooms/keys/chain/0.1/payload.js +213 -0
  21. package/dist/rooms/keys/chain/0.1/payload.js.map +1 -0
  22. package/dist/rooms/keys/list/0.1/payload.d.ts +314 -0
  23. package/dist/rooms/keys/list/0.1/payload.d.ts.map +1 -0
  24. package/dist/rooms/keys/list/0.1/payload.js +175 -0
  25. package/dist/rooms/keys/list/0.1/payload.js.map +1 -0
  26. package/dist/rooms/keys/seal/0.1/payload.d.ts +352 -0
  27. package/dist/rooms/keys/seal/0.1/payload.d.ts.map +1 -0
  28. package/dist/rooms/keys/seal/0.1/payload.js +199 -0
  29. package/dist/rooms/keys/seal/0.1/payload.js.map +1 -0
  30. package/dist/rooms/owner/invite/0.1/payload.d.ts +291 -0
  31. package/dist/rooms/owner/invite/0.1/payload.d.ts.map +1 -0
  32. package/dist/rooms/owner/invite/0.1/payload.js +158 -0
  33. package/dist/rooms/owner/invite/0.1/payload.js.map +1 -0
  34. package/dist/rooms/owner/issue-authority/0.1/payload.d.ts +315 -0
  35. package/dist/rooms/owner/issue-authority/0.1/payload.d.ts.map +1 -0
  36. package/dist/rooms/owner/issue-authority/0.1/payload.js +173 -0
  37. package/dist/rooms/owner/issue-authority/0.1/payload.js.map +1 -0
  38. package/dist/rooms/owner/issue-membership/0.1/payload.d.ts +291 -0
  39. package/dist/rooms/owner/issue-membership/0.1/payload.d.ts.map +1 -0
  40. package/dist/rooms/owner/issue-membership/0.1/payload.js +158 -0
  41. package/dist/rooms/owner/issue-membership/0.1/payload.js.map +1 -0
  42. package/dist/rooms/owner/register/0.1/payload.d.ts +382 -0
  43. package/dist/rooms/owner/register/0.1/payload.d.ts.map +1 -0
  44. package/dist/rooms/owner/register/0.1/payload.js +215 -0
  45. package/dist/rooms/owner/register/0.1/payload.js.map +1 -0
  46. package/package.json +1 -1
  47. package/src/_shared/components.ts +4 -0
  48. package/src/index.ts +8 -0
  49. package/src/rooms/_shared/0.1/room.ts +1 -1
  50. package/src/rooms/create/0.1/payload.ts +30 -2
  51. package/src/rooms/keys/backfill/0.1/payload.ts +236 -0
  52. package/src/rooms/keys/chain/0.1/payload.ts +262 -0
  53. package/src/rooms/keys/list/0.1/payload.ts +222 -0
  54. package/src/rooms/keys/seal/0.1/payload.ts +246 -0
  55. package/src/rooms/owner/invite/0.1/payload.ts +212 -0
  56. package/src/rooms/owner/issue-authority/0.1/payload.ts +233 -0
  57. package/src/rooms/owner/issue-membership/0.1/payload.ts +212 -0
  58. package/src/rooms/owner/register/0.1/payload.ts +278 -0
@@ -0,0 +1,199 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/seal/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/seal/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/seal/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/rooms/keys/seal/0.1",
21
+ "title": "Rooms Keys Seal — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "roomId",
26
+ "key",
27
+ "version",
28
+ "plaintext"
29
+ ],
30
+ "properties": {
31
+ "roomId": {
32
+ "type": "string",
33
+ "description": "The room to seal for. The recipient MUST hold group state for it."
34
+ },
35
+ "key": {
36
+ "type": "string",
37
+ "maxLength": 512,
38
+ "description": "The record key this will be stored under. Bound into the associated data, so a record sealed for one key does not open under another. On a sealed tier keys MUST be opaque — a descriptive key defeats the encryption beside it, and structured naming belongs inside the sealed body."
39
+ },
40
+ "version": {
41
+ "type": "integer",
42
+ "minimum": 0,
43
+ "description": "The version the writer INTENDS the record to take, bound into the associated data before the host assigns it. A caller that lets the host assign a different one will find the record does not open, which is the correct failure: accepting whatever came back would mean the binding commits to nothing. The shape that works is a create-only write (`expectedVersion: 0`) or a read of the current version before a rewrite."
44
+ },
45
+ "plaintext": {
46
+ "type": "string",
47
+ "description": "The record body to seal, base64url. Sealed whole rather than field by field: splitting it would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way."
48
+ },
49
+ "ext": {
50
+ "$ref": "#/$defs/Ext",
51
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
52
+ }
53
+ },
54
+ "$defs": {
55
+ "Response": {
56
+ "$anchor": "response",
57
+ "title": "Rooms Keys Seal — response payload",
58
+ "description": "Success response to rooms/keys/seal. Type https://trusttasks.org/spec/rooms/keys/seal/0.1#response. The sealed record, ready to hand to a host with rooms/records/put.",
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": [
62
+ "sealed"
63
+ ],
64
+ "properties": {
65
+ "sealed": {
66
+ "$ref": "#/$defs/SealedRecord"
67
+ },
68
+ "ext": {
69
+ "$ref": "#/$defs/Ext"
70
+ }
71
+ }
72
+ },
73
+ "Ext": {
74
+ "title": "Ext",
75
+ "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.",
76
+ "type": "object",
77
+ "minProperties": 1,
78
+ "additionalProperties": true,
79
+ "propertyNames": {
80
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
81
+ }
82
+ },
83
+ "SealedRecord": {
84
+ "title": "SealedRecord",
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "ciphertext",
89
+ "nonce",
90
+ "epoch"
91
+ ],
92
+ "description": "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.",
93
+ "properties": {
94
+ "ciphertext": {
95
+ "type": "string",
96
+ "description": "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it."
97
+ },
98
+ "nonce": {
99
+ "type": "string",
100
+ "description": "AEAD nonce, base64url."
101
+ },
102
+ "epoch": {
103
+ "type": "integer",
104
+ "minimum": 1,
105
+ "description": "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key."
106
+ }
107
+ }
108
+ }
109
+ }
110
+ };
111
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
112
+ export const RESPONSE_PAYLOAD_SCHEMA = {
113
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
114
+ "$ref": "#/$defs/Response",
115
+ "$defs": {
116
+ "Response": {
117
+ "$anchor": "response",
118
+ "title": "Rooms Keys Seal — response payload",
119
+ "description": "Success response to rooms/keys/seal. Type https://trusttasks.org/spec/rooms/keys/seal/0.1#response. The sealed record, ready to hand to a host with rooms/records/put.",
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": [
123
+ "sealed"
124
+ ],
125
+ "properties": {
126
+ "sealed": {
127
+ "$ref": "#/$defs/SealedRecord"
128
+ },
129
+ "ext": {
130
+ "$ref": "#/$defs/Ext"
131
+ }
132
+ }
133
+ },
134
+ "Ext": {
135
+ "title": "Ext",
136
+ "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.",
137
+ "type": "object",
138
+ "minProperties": 1,
139
+ "additionalProperties": true,
140
+ "propertyNames": {
141
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
142
+ }
143
+ },
144
+ "SealedRecord": {
145
+ "title": "SealedRecord",
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": [
149
+ "ciphertext",
150
+ "nonce",
151
+ "epoch"
152
+ ],
153
+ "description": "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.",
154
+ "properties": {
155
+ "ciphertext": {
156
+ "type": "string",
157
+ "description": "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it."
158
+ },
159
+ "nonce": {
160
+ "type": "string",
161
+ "description": "AEAD nonce, base64url."
162
+ },
163
+ "epoch": {
164
+ "type": "integer",
165
+ "minimum": 1,
166
+ "description": "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key."
167
+ }
168
+ }
169
+ }
170
+ }
171
+ };
172
+ /**
173
+ * SPEC.md §7.2 policy for the request variant, from this specification's
174
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
175
+ * per-specification and cannot be derived from the document alone, and
176
+ * item 2 needs the schema this carries.
177
+ */
178
+ export const SPEC = {
179
+ typeUri: TYPE_URI,
180
+ isBearer: false,
181
+ isProofRequired: true,
182
+ isRecipientRequired: true,
183
+ isIssuedAtRequired: true,
184
+ payloadSchema: PAYLOAD_SCHEMA,
185
+ };
186
+ /**
187
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
188
+ * tracks the *issuer* party's requirement because a response swaps the
189
+ * parties (§7.3 item 5).
190
+ */
191
+ export const RESPONSE_SPEC = {
192
+ typeUri: RESPONSE_TYPE_URI,
193
+ isBearer: false,
194
+ isProofRequired: true,
195
+ isRecipientRequired: true,
196
+ isIssuedAtRequired: true,
197
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
198
+ };
199
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/seal/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,iDAA0D,CAAC;AAKnF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,0DAAmE,CAAC;AAKrG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,2BAA2B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,EAAE,sSAAsS;iBACtT;gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,wBAAwB;iBACxC;gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,SAAS;oBACjB,SAAS,EAAE,CAAC;oBACZ,aAAa,EAAE,2OAA2O;iBAC3P;aACF;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
@@ -0,0 +1,291 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/owner/invite/0.1/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../_shared/components.js";
6
+ export interface RoomsOwnerInvitePayload {
7
+ /**
8
+ * The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.
9
+ */
10
+ roomId: string;
11
+ /**
12
+ * Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.
13
+ */
14
+ signingKeyId: string;
15
+ /**
16
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
17
+ */
18
+ ext?: Ext;
19
+ /**
20
+ * The party being invited. Named in the credential, which is why a VIC is single-use and why it is not presented on every access: presenting one would disclose the member.
21
+ */
22
+ subject: string;
23
+ /**
24
+ * When the invitation expires. An invitation that never expires is a standing right to enter, held by whoever ends up with the bytes.
25
+ */
26
+ validUntil?: string;
27
+ }
28
+ /**
29
+ * Success response to rooms/owner/invite. Type https://trusttasks.org/spec/rooms/owner/invite/0.1#response. The signed VIC, for delivery to the invitee.
30
+ */
31
+ export interface RoomsOwnerInviteResponsePayload {
32
+ /**
33
+ * The signed Verifiable Invitation Credential, serialised.
34
+ */
35
+ credential: string;
36
+ /**
37
+ * Its `id`. The owner tracks consumption by this on a `private` room, where a host-side invitation store would hand the host the membership at invite time.
38
+ */
39
+ credentialId: string;
40
+ ext?: Ext;
41
+ }
42
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
43
+ export type { Ext };
44
+ /** Trust Task type URI. */
45
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/owner/invite/0.1";
46
+ /** Stable alias for this specification's request payload shape. */
47
+ export type Payload = RoomsOwnerInvitePayload;
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/owner/invite/0.1#response";
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = RoomsOwnerInviteResponsePayload;
52
+ /**
53
+ * This specification's payload schema, as a value.
54
+ *
55
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
56
+ * rather than only as a `.json` file because TypeScript types are erased
57
+ * at runtime: without a schema a consumer has nothing to validate, and
58
+ * every REQUIRED payload member is optional in practice. Cross-file
59
+ * `$ref`s are already inlined, so it needs no resolver.
60
+ */
61
+ export declare const PAYLOAD_SCHEMA: {
62
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
63
+ readonly $id: "https://trusttasks.org/spec/rooms/owner/invite/0.1";
64
+ readonly title: "Rooms Owner Invite — payload";
65
+ readonly type: "object";
66
+ readonly additionalProperties: false;
67
+ readonly required: readonly ["roomId", "signingKeyId", "subject"];
68
+ readonly properties: {
69
+ readonly roomId: {
70
+ readonly type: "string";
71
+ readonly description: "The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.";
72
+ };
73
+ readonly signingKeyId: {
74
+ readonly type: "string";
75
+ readonly maxLength: 256;
76
+ readonly description: "Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.";
77
+ };
78
+ readonly ext: {
79
+ readonly $ref: "#/$defs/Ext";
80
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
81
+ };
82
+ readonly subject: {
83
+ readonly type: "string";
84
+ readonly description: "The party being invited. Named in the credential, which is why a VIC is single-use and why it is not presented on every access: presenting one would disclose the member.";
85
+ };
86
+ readonly validUntil: {
87
+ readonly type: "string";
88
+ readonly format: "date-time";
89
+ readonly description: "When the invitation expires. An invitation that never expires is a standing right to enter, held by whoever ends up with the bytes.";
90
+ };
91
+ };
92
+ readonly $defs: {
93
+ readonly Response: {
94
+ readonly $anchor: "response";
95
+ readonly title: "Rooms Owner Invite — response payload";
96
+ readonly description: "Success response to rooms/owner/invite. Type https://trusttasks.org/spec/rooms/owner/invite/0.1#response. The signed VIC, for delivery to the invitee.";
97
+ readonly type: "object";
98
+ readonly additionalProperties: false;
99
+ readonly required: readonly ["credential", "credentialId"];
100
+ readonly properties: {
101
+ readonly credential: {
102
+ readonly type: "string";
103
+ readonly description: "The signed Verifiable Invitation Credential, serialised.";
104
+ };
105
+ readonly credentialId: {
106
+ readonly type: "string";
107
+ readonly description: "Its `id`. The owner tracks consumption by this on a `private` room, where a host-side invitation store would hand the host the membership at invite time.";
108
+ };
109
+ readonly ext: {
110
+ readonly $ref: "#/$defs/Ext";
111
+ };
112
+ };
113
+ };
114
+ readonly Ext: {
115
+ readonly title: "Ext";
116
+ 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.";
117
+ readonly type: "object";
118
+ readonly minProperties: 1;
119
+ readonly additionalProperties: true;
120
+ readonly propertyNames: {
121
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
122
+ };
123
+ };
124
+ };
125
+ };
126
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
127
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
128
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
129
+ readonly $ref: "#/$defs/Response";
130
+ readonly $defs: {
131
+ readonly Response: {
132
+ readonly $anchor: "response";
133
+ readonly title: "Rooms Owner Invite — response payload";
134
+ readonly description: "Success response to rooms/owner/invite. Type https://trusttasks.org/spec/rooms/owner/invite/0.1#response. The signed VIC, for delivery to the invitee.";
135
+ readonly type: "object";
136
+ readonly additionalProperties: false;
137
+ readonly required: readonly ["credential", "credentialId"];
138
+ readonly properties: {
139
+ readonly credential: {
140
+ readonly type: "string";
141
+ readonly description: "The signed Verifiable Invitation Credential, serialised.";
142
+ };
143
+ readonly credentialId: {
144
+ readonly type: "string";
145
+ readonly description: "Its `id`. The owner tracks consumption by this on a `private` room, where a host-side invitation store would hand the host the membership at invite time.";
146
+ };
147
+ readonly ext: {
148
+ readonly $ref: "#/$defs/Ext";
149
+ };
150
+ };
151
+ };
152
+ readonly Ext: {
153
+ readonly title: "Ext";
154
+ 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.";
155
+ readonly type: "object";
156
+ readonly minProperties: 1;
157
+ readonly additionalProperties: true;
158
+ readonly propertyNames: {
159
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
160
+ };
161
+ };
162
+ };
163
+ };
164
+ /**
165
+ * SPEC.md §7.2 policy for the request variant, from this specification's
166
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
167
+ * per-specification and cannot be derived from the document alone, and
168
+ * item 2 needs the schema this carries.
169
+ */
170
+ export declare const SPEC: {
171
+ readonly typeUri: "https://trusttasks.org/spec/rooms/owner/invite/0.1";
172
+ readonly isBearer: false;
173
+ readonly isProofRequired: true;
174
+ readonly isRecipientRequired: true;
175
+ readonly isIssuedAtRequired: true;
176
+ readonly payloadSchema: {
177
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
178
+ readonly $id: "https://trusttasks.org/spec/rooms/owner/invite/0.1";
179
+ readonly title: "Rooms Owner Invite — payload";
180
+ readonly type: "object";
181
+ readonly additionalProperties: false;
182
+ readonly required: readonly ["roomId", "signingKeyId", "subject"];
183
+ readonly properties: {
184
+ readonly roomId: {
185
+ readonly type: "string";
186
+ readonly description: "The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.";
187
+ };
188
+ readonly signingKeyId: {
189
+ readonly type: "string";
190
+ readonly maxLength: 256;
191
+ readonly description: "Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.";
192
+ };
193
+ readonly ext: {
194
+ readonly $ref: "#/$defs/Ext";
195
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
196
+ };
197
+ readonly subject: {
198
+ readonly type: "string";
199
+ readonly description: "The party being invited. Named in the credential, which is why a VIC is single-use and why it is not presented on every access: presenting one would disclose the member.";
200
+ };
201
+ readonly validUntil: {
202
+ readonly type: "string";
203
+ readonly format: "date-time";
204
+ readonly description: "When the invitation expires. An invitation that never expires is a standing right to enter, held by whoever ends up with the bytes.";
205
+ };
206
+ };
207
+ readonly $defs: {
208
+ readonly Response: {
209
+ readonly $anchor: "response";
210
+ readonly title: "Rooms Owner Invite — response payload";
211
+ readonly description: "Success response to rooms/owner/invite. Type https://trusttasks.org/spec/rooms/owner/invite/0.1#response. The signed VIC, for delivery to the invitee.";
212
+ readonly type: "object";
213
+ readonly additionalProperties: false;
214
+ readonly required: readonly ["credential", "credentialId"];
215
+ readonly properties: {
216
+ readonly credential: {
217
+ readonly type: "string";
218
+ readonly description: "The signed Verifiable Invitation Credential, serialised.";
219
+ };
220
+ readonly credentialId: {
221
+ readonly type: "string";
222
+ readonly description: "Its `id`. The owner tracks consumption by this on a `private` room, where a host-side invitation store would hand the host the membership at invite time.";
223
+ };
224
+ readonly ext: {
225
+ readonly $ref: "#/$defs/Ext";
226
+ };
227
+ };
228
+ };
229
+ readonly Ext: {
230
+ readonly title: "Ext";
231
+ 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.";
232
+ readonly type: "object";
233
+ readonly minProperties: 1;
234
+ readonly additionalProperties: true;
235
+ readonly propertyNames: {
236
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
237
+ };
238
+ };
239
+ };
240
+ };
241
+ };
242
+ /**
243
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
244
+ * tracks the *issuer* party's requirement because a response swaps the
245
+ * parties (§7.3 item 5).
246
+ */
247
+ export declare const RESPONSE_SPEC: {
248
+ readonly typeUri: "https://trusttasks.org/spec/rooms/owner/invite/0.1#response";
249
+ readonly isBearer: false;
250
+ readonly isProofRequired: true;
251
+ readonly isRecipientRequired: true;
252
+ readonly isIssuedAtRequired: true;
253
+ readonly payloadSchema: {
254
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
255
+ readonly $ref: "#/$defs/Response";
256
+ readonly $defs: {
257
+ readonly Response: {
258
+ readonly $anchor: "response";
259
+ readonly title: "Rooms Owner Invite — response payload";
260
+ readonly description: "Success response to rooms/owner/invite. Type https://trusttasks.org/spec/rooms/owner/invite/0.1#response. The signed VIC, for delivery to the invitee.";
261
+ readonly type: "object";
262
+ readonly additionalProperties: false;
263
+ readonly required: readonly ["credential", "credentialId"];
264
+ readonly properties: {
265
+ readonly credential: {
266
+ readonly type: "string";
267
+ readonly description: "The signed Verifiable Invitation Credential, serialised.";
268
+ };
269
+ readonly credentialId: {
270
+ readonly type: "string";
271
+ readonly description: "Its `id`. The owner tracks consumption by this on a `private` room, where a host-side invitation store would hand the host the membership at invite time.";
272
+ };
273
+ readonly ext: {
274
+ readonly $ref: "#/$defs/Ext";
275
+ };
276
+ };
277
+ };
278
+ readonly Ext: {
279
+ readonly title: "Ext";
280
+ 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.";
281
+ readonly type: "object";
282
+ readonly minProperties: 1;
283
+ readonly additionalProperties: true;
284
+ readonly propertyNames: {
285
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
286
+ };
287
+ };
288
+ };
289
+ };
290
+ };
291
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/owner/invite/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;IACV;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,oDAA6D,CAAC;AAEtF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,uBAAuB,CAAC;AAE9C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,6DAAsE,CAAC;AAExG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,158 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/owner/invite/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/owner/invite/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/owner/invite/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/rooms/owner/invite/0.1",
21
+ "title": "Rooms Owner Invite — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "roomId",
26
+ "signingKeyId",
27
+ "subject"
28
+ ],
29
+ "properties": {
30
+ "roomId": {
31
+ "type": "string",
32
+ "description": "The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself."
33
+ },
34
+ "signingKeyId": {
35
+ "type": "string",
36
+ "maxLength": 256,
37
+ "description": "Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later."
38
+ },
39
+ "ext": {
40
+ "$ref": "#/$defs/Ext",
41
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
42
+ },
43
+ "subject": {
44
+ "type": "string",
45
+ "description": "The party being invited. Named in the credential, which is why a VIC is single-use and why it is not presented on every access: presenting one would disclose the member."
46
+ },
47
+ "validUntil": {
48
+ "type": "string",
49
+ "format": "date-time",
50
+ "description": "When the invitation expires. An invitation that never expires is a standing right to enter, held by whoever ends up with the bytes."
51
+ }
52
+ },
53
+ "$defs": {
54
+ "Response": {
55
+ "$anchor": "response",
56
+ "title": "Rooms Owner Invite — response payload",
57
+ "description": "Success response to rooms/owner/invite. Type https://trusttasks.org/spec/rooms/owner/invite/0.1#response. The signed VIC, for delivery to the invitee.",
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": [
61
+ "credential",
62
+ "credentialId"
63
+ ],
64
+ "properties": {
65
+ "credential": {
66
+ "type": "string",
67
+ "description": "The signed Verifiable Invitation Credential, serialised."
68
+ },
69
+ "credentialId": {
70
+ "type": "string",
71
+ "description": "Its `id`. The owner tracks consumption by this on a `private` room, where a host-side invitation store would hand the host the membership at invite time."
72
+ },
73
+ "ext": {
74
+ "$ref": "#/$defs/Ext"
75
+ }
76
+ }
77
+ },
78
+ "Ext": {
79
+ "title": "Ext",
80
+ "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.",
81
+ "type": "object",
82
+ "minProperties": 1,
83
+ "additionalProperties": true,
84
+ "propertyNames": {
85
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
86
+ }
87
+ }
88
+ }
89
+ };
90
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
91
+ export const RESPONSE_PAYLOAD_SCHEMA = {
92
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
93
+ "$ref": "#/$defs/Response",
94
+ "$defs": {
95
+ "Response": {
96
+ "$anchor": "response",
97
+ "title": "Rooms Owner Invite — response payload",
98
+ "description": "Success response to rooms/owner/invite. Type https://trusttasks.org/spec/rooms/owner/invite/0.1#response. The signed VIC, for delivery to the invitee.",
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "credential",
103
+ "credentialId"
104
+ ],
105
+ "properties": {
106
+ "credential": {
107
+ "type": "string",
108
+ "description": "The signed Verifiable Invitation Credential, serialised."
109
+ },
110
+ "credentialId": {
111
+ "type": "string",
112
+ "description": "Its `id`. The owner tracks consumption by this on a `private` room, where a host-side invitation store would hand the host the membership at invite time."
113
+ },
114
+ "ext": {
115
+ "$ref": "#/$defs/Ext"
116
+ }
117
+ }
118
+ },
119
+ "Ext": {
120
+ "title": "Ext",
121
+ "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.",
122
+ "type": "object",
123
+ "minProperties": 1,
124
+ "additionalProperties": true,
125
+ "propertyNames": {
126
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
127
+ }
128
+ }
129
+ }
130
+ };
131
+ /**
132
+ * SPEC.md §7.2 policy for the request variant, from this specification's
133
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
134
+ * per-specification and cannot be derived from the document alone, and
135
+ * item 2 needs the schema this carries.
136
+ */
137
+ export const SPEC = {
138
+ typeUri: TYPE_URI,
139
+ isBearer: false,
140
+ isProofRequired: true,
141
+ isRecipientRequired: true,
142
+ isIssuedAtRequired: true,
143
+ payloadSchema: PAYLOAD_SCHEMA,
144
+ };
145
+ /**
146
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
147
+ * tracks the *issuer* party's requirement because a response swaps the
148
+ * parties (§7.3 item 5).
149
+ */
150
+ export const RESPONSE_SPEC = {
151
+ typeUri: RESPONSE_TYPE_URI,
152
+ isBearer: false,
153
+ isProofRequired: true,
154
+ isRecipientRequired: true,
155
+ isIssuedAtRequired: true,
156
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
157
+ };
158
+ //# sourceMappingURL=payload.js.map