@openvtc/trust-tasks 0.17.7 → 0.17.9
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 +110 -0
- package/dist/_shared/components.d.ts +4 -0
- package/dist/_shared/components.d.ts.map +1 -1
- 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/persona/_shared/0.1/persona-record.d.ts +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -1
- package/dist/persona/facet/delete/1.0/payload.d.ts +310 -0
- package/dist/persona/facet/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/facet/delete/1.0/payload.js +169 -0
- package/dist/persona/facet/delete/1.0/payload.js.map +1 -0
- package/dist/persona/facet/list/1.0/payload.d.ts +599 -0
- package/dist/persona/facet/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/facet/list/1.0/payload.js +332 -0
- package/dist/persona/facet/list/1.0/payload.js.map +1 -0
- package/dist/persona/facet/put/1.0/payload.d.ts +490 -0
- package/dist/persona/facet/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/facet/put/1.0/payload.js +272 -0
- package/dist/persona/facet/put/1.0/payload.js.map +1 -0
- 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/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 +5 -0
- package/src/persona/_shared/0.1/persona-record.ts +1 -1
- package/src/persona/facet/delete/1.0/payload.ts +212 -0
- package/src/persona/facet/list/1.0/payload.ts +402 -0
- package/src/persona/facet/put/1.0/payload.ts +339 -0
- package/src/rooms/keys/backfill/0.1/payload.ts +236 -0
- package/src/rooms/owner/register/0.1/payload.ts +278 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/owner/register/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/owner/register/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/owner/register/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/register/0.1",
|
|
21
|
+
"title": "Rooms Owner Register — payload",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": [
|
|
25
|
+
"roomId",
|
|
26
|
+
"host",
|
|
27
|
+
"visibility"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"roomId": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "The room being registered. Its identity exists already — this asks a host to store it, not to name it."
|
|
33
|
+
},
|
|
34
|
+
"host": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "The host to register with, as a DID. Named by the caller because a room has no host until this call succeeds, and because a room may be registered with more than one (a mirror serves reads while its primary takes writes)."
|
|
37
|
+
},
|
|
38
|
+
"visibility": {
|
|
39
|
+
"$ref": "#/$defs/Visibility",
|
|
40
|
+
"description": "The tier to create the room at. Passed through to `rooms/create`, whose description of the choice governs."
|
|
41
|
+
},
|
|
42
|
+
"ownerDid": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "The accountable party. Absent means the caller — a registration is normally made by the owner it names, and defaulting saves a surface repeating the DID it just authenticated as. Present and different is legitimate: an operator registering on behalf of the party who will answer for the room."
|
|
45
|
+
},
|
|
46
|
+
"retentionPolicy": {
|
|
47
|
+
"$ref": "#/$defs/RetentionPolicy",
|
|
48
|
+
"description": "Whether the room keeps its history readable across a membership change. Immutable once set, so a caller that omits it is taking the host's default for the life of the room."
|
|
49
|
+
},
|
|
50
|
+
"retentionDays": {
|
|
51
|
+
"type": "integer",
|
|
52
|
+
"minimum": 1,
|
|
53
|
+
"description": "How long the host is asked to hold the room after it lapses."
|
|
54
|
+
},
|
|
55
|
+
"ext": {
|
|
56
|
+
"$ref": "#/$defs/Ext",
|
|
57
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"$defs": {
|
|
61
|
+
"Response": {
|
|
62
|
+
"$anchor": "response",
|
|
63
|
+
"title": "Rooms Owner Register — response payload",
|
|
64
|
+
"description": "Success response to rooms/owner/register. Type https://trusttasks.org/spec/rooms/owner/register/0.1#response.",
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": [
|
|
68
|
+
"roomId",
|
|
69
|
+
"host",
|
|
70
|
+
"epoch"
|
|
71
|
+
],
|
|
72
|
+
"properties": {
|
|
73
|
+
"roomId": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"host": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "The host that accepted it, echoed so a caller recording where its room lives records what the recipient actually reached rather than what it asked for."
|
|
79
|
+
},
|
|
80
|
+
"epoch": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 1,
|
|
83
|
+
"description": "The epoch the room now stands at, as the host reports it. `1` for a room registered for the first time."
|
|
84
|
+
},
|
|
85
|
+
"ext": {
|
|
86
|
+
"$ref": "#/$defs/Ext"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"Ext": {
|
|
91
|
+
"title": "Ext",
|
|
92
|
+
"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.",
|
|
93
|
+
"type": "object",
|
|
94
|
+
"minProperties": 1,
|
|
95
|
+
"additionalProperties": true,
|
|
96
|
+
"propertyNames": {
|
|
97
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"RetentionPolicy": {
|
|
101
|
+
"title": "RetentionPolicy",
|
|
102
|
+
"type": "string",
|
|
103
|
+
"enum": [
|
|
104
|
+
"chained",
|
|
105
|
+
"fromJoin"
|
|
106
|
+
],
|
|
107
|
+
"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.",
|
|
108
|
+
"$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."
|
|
109
|
+
},
|
|
110
|
+
"Visibility": {
|
|
111
|
+
"title": "Visibility",
|
|
112
|
+
"type": "string",
|
|
113
|
+
"enum": [
|
|
114
|
+
"open",
|
|
115
|
+
"attributed",
|
|
116
|
+
"private"
|
|
117
|
+
],
|
|
118
|
+
"description": "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything."
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
123
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
124
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
125
|
+
"$ref": "#/$defs/Response",
|
|
126
|
+
"$defs": {
|
|
127
|
+
"Response": {
|
|
128
|
+
"$anchor": "response",
|
|
129
|
+
"title": "Rooms Owner Register — response payload",
|
|
130
|
+
"description": "Success response to rooms/owner/register. Type https://trusttasks.org/spec/rooms/owner/register/0.1#response.",
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": [
|
|
134
|
+
"roomId",
|
|
135
|
+
"host",
|
|
136
|
+
"epoch"
|
|
137
|
+
],
|
|
138
|
+
"properties": {
|
|
139
|
+
"roomId": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
142
|
+
"host": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "The host that accepted it, echoed so a caller recording where its room lives records what the recipient actually reached rather than what it asked for."
|
|
145
|
+
},
|
|
146
|
+
"epoch": {
|
|
147
|
+
"type": "integer",
|
|
148
|
+
"minimum": 1,
|
|
149
|
+
"description": "The epoch the room now stands at, as the host reports it. `1` for a room registered for the first time."
|
|
150
|
+
},
|
|
151
|
+
"ext": {
|
|
152
|
+
"$ref": "#/$defs/Ext"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"Ext": {
|
|
157
|
+
"title": "Ext",
|
|
158
|
+
"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.",
|
|
159
|
+
"type": "object",
|
|
160
|
+
"minProperties": 1,
|
|
161
|
+
"additionalProperties": true,
|
|
162
|
+
"propertyNames": {
|
|
163
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"RetentionPolicy": {
|
|
167
|
+
"title": "RetentionPolicy",
|
|
168
|
+
"type": "string",
|
|
169
|
+
"enum": [
|
|
170
|
+
"chained",
|
|
171
|
+
"fromJoin"
|
|
172
|
+
],
|
|
173
|
+
"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.",
|
|
174
|
+
"$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."
|
|
175
|
+
},
|
|
176
|
+
"Visibility": {
|
|
177
|
+
"title": "Visibility",
|
|
178
|
+
"type": "string",
|
|
179
|
+
"enum": [
|
|
180
|
+
"open",
|
|
181
|
+
"attributed",
|
|
182
|
+
"private"
|
|
183
|
+
],
|
|
184
|
+
"description": "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything."
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
190
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
191
|
+
* per-specification and cannot be derived from the document alone, and
|
|
192
|
+
* item 2 needs the schema this carries.
|
|
193
|
+
*/
|
|
194
|
+
export const SPEC = {
|
|
195
|
+
typeUri: TYPE_URI,
|
|
196
|
+
isBearer: false,
|
|
197
|
+
isProofRequired: true,
|
|
198
|
+
isRecipientRequired: true,
|
|
199
|
+
isIssuedAtRequired: true,
|
|
200
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
204
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
205
|
+
* parties (§7.3 item 5).
|
|
206
|
+
*/
|
|
207
|
+
export const RESPONSE_SPEC = {
|
|
208
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
209
|
+
isBearer: false,
|
|
210
|
+
isProofRequired: true,
|
|
211
|
+
isRecipientRequired: true,
|
|
212
|
+
isIssuedAtRequired: true,
|
|
213
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
214
|
+
};
|
|
215
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/owner/register/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,sDAA+D,CAAC;AAKxF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,+DAAwE,CAAC;AAK1G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,sDAAsD;IAC7D,OAAO,EAAE,gCAAgC;IACzC,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,MAAM;QACN,YAAY;KACb;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,wGAAwG;SACxH;QACD,MAAM,EAAE;YACN,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,+NAA+N;SAC/O;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,oBAAoB;YAC5B,aAAa,EAAE,4GAA4G;SAC5H;QACD,UAAU,EAAE;YACV,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,sSAAsS;SACtT;QACD,iBAAiB,EAAE;YACjB,MAAM,EAAE,yBAAyB;YACjC,aAAa,EAAE,8KAA8K;SAC9L;QACD,eAAe,EAAE;YACf,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;YACZ,aAAa,EAAE,8DAA8D;SAC9E;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;YACrB,aAAa,EAAE,yDAAyD;SACzE;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,yCAAyC;YAClD,aAAa,EAAE,+GAA+G;YAC9H,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,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,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -132,6 +132,10 @@ export type ExpectedVersion_PersonaV0_1 = number;
|
|
|
132
132
|
* Optimistic-concurrency precondition on a write. A positive value requires that the record's current `version` equals it exactly. Zero means "create only" — the write applies only if no LIVE record exists at the address, which is what makes lease acquisition safe: without it two instances can each read "absent", each write, and each believe it won. A tombstone is not a live record, so `expectedVersion: 0` succeeds over one; the created record takes the namespace's next counter value, which is necessarily greater than the tombstone's.
|
|
133
133
|
*/
|
|
134
134
|
export type ExpectedVersion_VtaV0_1 = number;
|
|
135
|
+
/**
|
|
136
|
+
* A colour **name**, resolved by each consumer against its own palette — never a hex value or any other literal. Two reasons, and both are about the consumer rather than the holder. A literal cannot be legible in a terminal, in a light theme and in a dark one at once, so a stored `#8B0000` is a colour that is wrong somewhere and the holder has no way to know where. And a consumer that reserves colours to mean something — an error, a warning, an irreversible act — must be able to keep a holder's decorative choice out of that channel; it cannot do that with an arbitrary value, and it can do it trivially with a closed set it maps itself. The eight members are chosen to be distinguishable from one another and deliberately carry no status connotation: none is named for success, warning or danger.
|
|
137
|
+
*/
|
|
138
|
+
export type FacetColour = "slate" | "indigo" | "teal" | "moss" | "sand" | "clay" | "rose" | "plum";
|
|
135
139
|
/**
|
|
136
140
|
* `issued` is outstanding and revocable; `consumed` and `expired` are terminal.
|
|
137
141
|
*/
|
package/src/index.ts
CHANGED
|
@@ -185,6 +185,9 @@ export * as PersonaCorrelationAnalyze_v1_0 from "./persona/correlation/analyze/1
|
|
|
185
185
|
export * as PersonaDisclosureHistory_v1_0 from "./persona/disclosure/history/1.0/payload.js";
|
|
186
186
|
export * as PersonaDisclosurePresent_v1_0 from "./persona/disclosure/present/1.0/payload.js";
|
|
187
187
|
export * as PersonaDisclosurePreview_v1_0 from "./persona/disclosure/preview/1.0/payload.js";
|
|
188
|
+
export * as PersonaFacetDelete_v1_0 from "./persona/facet/delete/1.0/payload.js";
|
|
189
|
+
export * as PersonaFacetList_v1_0 from "./persona/facet/list/1.0/payload.js";
|
|
190
|
+
export * as PersonaFacetPut_v1_0 from "./persona/facet/put/1.0/payload.js";
|
|
188
191
|
export * as PersonaLocalBindingSet_v1_0 from "./persona/local/binding/set/1.0/payload.js";
|
|
189
192
|
export * as PersonaLocalProfileDelete_v1_0 from "./persona/local/profile/delete/1.0/payload.js";
|
|
190
193
|
export * as PersonaLocalProfileGet_v1_0 from "./persona/local/profile/get/1.0/payload.js";
|
|
@@ -233,6 +236,7 @@ export * as RoomShared_v0_1 from "./rooms/_shared/0.1/room.js";
|
|
|
233
236
|
export * as RoomsCreate_v0_1 from "./rooms/create/0.1/payload.js";
|
|
234
237
|
export * as RoomsEpochChain_v0_1 from "./rooms/epoch/chain/0.1/payload.js";
|
|
235
238
|
export * as RoomsEpochMint_v0_1 from "./rooms/epoch/mint/0.1/payload.js";
|
|
239
|
+
export * as RoomsKeysBackfill_v0_1 from "./rooms/keys/backfill/0.1/payload.js";
|
|
236
240
|
export * as RoomsKeysChain_v0_1 from "./rooms/keys/chain/0.1/payload.js";
|
|
237
241
|
export * as RoomsKeysCommit_v0_1 from "./rooms/keys/commit/0.1/payload.js";
|
|
238
242
|
export * as RoomsKeysKeyPackage_v0_1 from "./rooms/keys/key-package/0.1/payload.js";
|
|
@@ -245,6 +249,7 @@ export * as RoomsOwnerClaim_v0_1 from "./rooms/owner/claim/0.1/payload.js";
|
|
|
245
249
|
export * as RoomsOwnerInvite_v0_1 from "./rooms/owner/invite/0.1/payload.js";
|
|
246
250
|
export * as RoomsOwnerIssueAuthority_v0_1 from "./rooms/owner/issue-authority/0.1/payload.js";
|
|
247
251
|
export * as RoomsOwnerIssueMembership_v0_1 from "./rooms/owner/issue-membership/0.1/payload.js";
|
|
252
|
+
export * as RoomsOwnerRegister_v0_1 from "./rooms/owner/register/0.1/payload.js";
|
|
248
253
|
export * as RoomsOwnerTransfer_v0_1 from "./rooms/owner/transfer/0.1/payload.js";
|
|
249
254
|
export * as RoomsRecordsCurate_v0_1 from "./rooms/records/curate/0.1/payload.js";
|
|
250
255
|
export * as RoomsRecordsGet_v0_1 from "./rooms/records/get/0.1/payload.js";
|
|
@@ -20,4 +20,4 @@ export interface PersonaRecordSharedDefinitionsForThePersonaSpecFamily {
|
|
|
20
20
|
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
21
21
|
* See "../../../_shared/components.js".
|
|
22
22
|
*/
|
|
23
|
-
export type { Attribute, ClaimType, ContactDocument, ContactRevision, ExpectedVersion_PersonaV0_1 as ExpectedVersion, Profile, ProfileEntry, ProofRung, Provenance, ReleaseRequirement, ResolvedClaim, Sensitivity, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../_shared/components.js";
|
|
23
|
+
export type { Attribute, ClaimType, ContactDocument, ContactRevision, ExpectedVersion_PersonaV0_1 as ExpectedVersion, FacetColour, Profile, ProfileEntry, ProofRung, Provenance, ReleaseRequirement, ResolvedClaim, Sensitivity, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../_shared/components.js";
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/facet/delete/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ExpectedVersion_PersonaV0_1 as ExpectedVersion, Ext, Ulid } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Delete one facet. The faces and attributes that belonged to it are untouched — a facet is a way of arranging what the holder keeps, never a container for it.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaFacetDeletePayload {
|
|
13
|
+
facetId: Ulid;
|
|
14
|
+
/**
|
|
15
|
+
* Optional precondition. Supply the version a prior read returned to refuse a delete against a facet that has changed since it was looked at.
|
|
16
|
+
*/
|
|
17
|
+
expectedVersion?: ExpectedVersion;
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.
|
|
22
|
+
*/
|
|
23
|
+
export interface PersonaFacetDeleteResponsePayload {
|
|
24
|
+
/**
|
|
25
|
+
* False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first.
|
|
26
|
+
*/
|
|
27
|
+
existed: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'.
|
|
30
|
+
*/
|
|
31
|
+
releasedFaces?: number;
|
|
32
|
+
ext?: Ext;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
36
|
+
export type { ExpectedVersion, Ext, Ulid };
|
|
37
|
+
|
|
38
|
+
/** Trust Task type URI. */
|
|
39
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/facet/delete/1.0" as const;
|
|
40
|
+
|
|
41
|
+
/** Stable alias for this specification's request payload shape. */
|
|
42
|
+
export type Payload = PersonaFacetDeletePayload;
|
|
43
|
+
|
|
44
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
45
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/facet/delete/1.0#response" as const;
|
|
46
|
+
|
|
47
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
48
|
+
export type Response = PersonaFacetDeleteResponsePayload;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* This specification's payload schema, as a value.
|
|
52
|
+
*
|
|
53
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
54
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
55
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
56
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
57
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
58
|
+
*/
|
|
59
|
+
export const PAYLOAD_SCHEMA = {
|
|
60
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
61
|
+
"$id": "https://trusttasks.org/spec/persona/facet/delete/1.0",
|
|
62
|
+
"title": "Persona — Facet Delete — payload",
|
|
63
|
+
"description": "Delete one facet. The faces and attributes that belonged to it are untouched — a facet is a way of arranging what the holder keeps, never a container for it.",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": [
|
|
67
|
+
"facetId"
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"facetId": {
|
|
71
|
+
"$ref": "#/$defs/Ulid"
|
|
72
|
+
},
|
|
73
|
+
"expectedVersion": {
|
|
74
|
+
"$ref": "#/$defs/ExpectedVersion",
|
|
75
|
+
"description": "Optional precondition. Supply the version a prior read returned to refuse a delete against a facet that has changed since it was looked at."
|
|
76
|
+
},
|
|
77
|
+
"ext": {
|
|
78
|
+
"$ref": "#/$defs/Ext"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"$defs": {
|
|
82
|
+
"Response": {
|
|
83
|
+
"$anchor": "response",
|
|
84
|
+
"title": "Persona Facet Delete — response payload",
|
|
85
|
+
"description": "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": [
|
|
89
|
+
"existed"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"existed": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"description": "False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first."
|
|
95
|
+
},
|
|
96
|
+
"releasedFaces": {
|
|
97
|
+
"type": "integer",
|
|
98
|
+
"minimum": 0,
|
|
99
|
+
"description": "How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'."
|
|
100
|
+
},
|
|
101
|
+
"ext": {
|
|
102
|
+
"$ref": "#/$defs/Ext"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"Ext": {
|
|
107
|
+
"title": "Ext",
|
|
108
|
+
"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.",
|
|
109
|
+
"type": "object",
|
|
110
|
+
"minProperties": 1,
|
|
111
|
+
"additionalProperties": true,
|
|
112
|
+
"propertyNames": {
|
|
113
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"ExpectedVersion": {
|
|
117
|
+
"title": "ExpectedVersion",
|
|
118
|
+
"description": "Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.",
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"minimum": 0
|
|
121
|
+
},
|
|
122
|
+
"Ulid": {
|
|
123
|
+
"title": "Ulid",
|
|
124
|
+
"description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
} as const;
|
|
130
|
+
|
|
131
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
132
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
133
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
134
|
+
"$ref": "#/$defs/Response",
|
|
135
|
+
"$defs": {
|
|
136
|
+
"Response": {
|
|
137
|
+
"$anchor": "response",
|
|
138
|
+
"title": "Persona Facet Delete — response payload",
|
|
139
|
+
"description": "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"additionalProperties": false,
|
|
142
|
+
"required": [
|
|
143
|
+
"existed"
|
|
144
|
+
],
|
|
145
|
+
"properties": {
|
|
146
|
+
"existed": {
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"description": "False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first."
|
|
149
|
+
},
|
|
150
|
+
"releasedFaces": {
|
|
151
|
+
"type": "integer",
|
|
152
|
+
"minimum": 0,
|
|
153
|
+
"description": "How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'."
|
|
154
|
+
},
|
|
155
|
+
"ext": {
|
|
156
|
+
"$ref": "#/$defs/Ext"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"Ext": {
|
|
161
|
+
"title": "Ext",
|
|
162
|
+
"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.",
|
|
163
|
+
"type": "object",
|
|
164
|
+
"minProperties": 1,
|
|
165
|
+
"additionalProperties": true,
|
|
166
|
+
"propertyNames": {
|
|
167
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"ExpectedVersion": {
|
|
171
|
+
"title": "ExpectedVersion",
|
|
172
|
+
"description": "Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.",
|
|
173
|
+
"type": "integer",
|
|
174
|
+
"minimum": 0
|
|
175
|
+
},
|
|
176
|
+
"Ulid": {
|
|
177
|
+
"title": "Ulid",
|
|
178
|
+
"description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
|
|
179
|
+
"type": "string",
|
|
180
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
} as const;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
187
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
188
|
+
* per-specification and cannot be derived from the document alone, and
|
|
189
|
+
* item 2 needs the schema this carries.
|
|
190
|
+
*/
|
|
191
|
+
export const SPEC = {
|
|
192
|
+
typeUri: TYPE_URI,
|
|
193
|
+
isBearer: false,
|
|
194
|
+
isProofRequired: true,
|
|
195
|
+
isRecipientRequired: true,
|
|
196
|
+
isIssuedAtRequired: true,
|
|
197
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
198
|
+
} as const;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
202
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
203
|
+
* parties (§7.3 item 5).
|
|
204
|
+
*/
|
|
205
|
+
export const RESPONSE_SPEC = {
|
|
206
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
207
|
+
isBearer: false,
|
|
208
|
+
isProofRequired: true,
|
|
209
|
+
isRecipientRequired: true,
|
|
210
|
+
isIssuedAtRequired: true,
|
|
211
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
212
|
+
} as const;
|