@openvtc/trust-tasks 0.27.6 → 0.27.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 +41 -0
- package/README.md +16 -13
- package/dist/_runtime/consume.d.ts +2 -2
- package/dist/_runtime/consume.js +2 -2
- package/dist/_runtime/extends.d.ts +20 -1
- package/dist/_runtime/extends.d.ts.map +1 -1
- package/dist/_runtime/extends.js +39 -3
- package/dist/_runtime/extends.js.map +1 -1
- package/dist/_runtime/index.d.ts +1 -1
- package/dist/_runtime/index.d.ts.map +1 -1
- package/dist/_runtime/index.js +1 -1
- package/dist/_runtime/index.js.map +1 -1
- package/dist/_shared/components.d.ts +29 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/registry/_shared/0.2/registry.d.ts +16 -0
- package/dist/registry/_shared/0.2/registry.d.ts.map +1 -0
- package/dist/registry/_shared/0.2/registry.js +6 -0
- package/dist/registry/_shared/0.2/registry.js.map +1 -0
- package/dist/registry/authorization/0.1/payload.d.ts +13 -2
- package/dist/registry/authorization/0.1/payload.d.ts.map +1 -1
- package/dist/registry/authorization/0.1/payload.js +1 -1
- package/dist/registry/authorization/0.1/payload.js.map +1 -1
- package/dist/registry/authorization/0.2/payload.d.ts +494 -0
- package/dist/registry/authorization/0.2/payload.d.ts.map +1 -0
- package/dist/registry/authorization/0.2/payload.js +270 -0
- package/dist/registry/authorization/0.2/payload.js.map +1 -0
- package/dist/registry/did/rotate/0.1/payload.d.ts +13 -2
- package/dist/registry/did/rotate/0.1/payload.d.ts.map +1 -1
- package/dist/registry/did/rotate/0.1/payload.js +1 -1
- package/dist/registry/did/rotate/0.1/payload.js.map +1 -1
- package/dist/registry/did/rotate/0.2/payload.d.ts +292 -0
- package/dist/registry/did/rotate/0.2/payload.d.ts.map +1 -0
- package/dist/registry/did/rotate/0.2/payload.js +167 -0
- package/dist/registry/did/rotate/0.2/payload.js.map +1 -0
- package/dist/registry/recognition/0.1/payload.d.ts +13 -2
- package/dist/registry/recognition/0.1/payload.d.ts.map +1 -1
- package/dist/registry/recognition/0.1/payload.js +1 -1
- package/dist/registry/recognition/0.1/payload.js.map +1 -1
- package/dist/registry/recognition/0.2/payload.d.ts +494 -0
- package/dist/registry/recognition/0.2/payload.d.ts.map +1 -0
- package/dist/registry/recognition/0.2/payload.js +270 -0
- package/dist/registry/recognition/0.2/payload.js.map +1 -0
- package/dist/registry/record/create/0.1/payload.d.ts +4 -4
- package/dist/registry/record/create/0.1/payload.js +1 -1
- package/dist/registry/record/delete/0.1/payload.d.ts +13 -2
- package/dist/registry/record/delete/0.1/payload.d.ts.map +1 -1
- package/dist/registry/record/delete/0.1/payload.js +1 -1
- package/dist/registry/record/delete/0.1/payload.js.map +1 -1
- package/dist/registry/record/delete/0.2/payload.d.ts +278 -0
- package/dist/registry/record/delete/0.2/payload.d.ts.map +1 -0
- package/dist/registry/record/delete/0.2/payload.js +165 -0
- package/dist/registry/record/delete/0.2/payload.js.map +1 -0
- package/dist/registry/record/list/0.1/payload.d.ts +4 -4
- package/dist/registry/record/list/0.1/payload.js +1 -1
- package/dist/registry/record/put/0.1/payload.d.ts +4 -4
- package/dist/registry/record/put/0.1/payload.js +1 -1
- package/dist/registry/record/put/0.2/payload.d.ts +13 -2
- package/dist/registry/record/put/0.2/payload.d.ts.map +1 -1
- package/dist/registry/record/put/0.2/payload.js +1 -1
- package/dist/registry/record/put/0.2/payload.js.map +1 -1
- package/dist/registry/record/put/0.3/payload.d.ts +497 -0
- package/dist/registry/record/put/0.3/payload.d.ts.map +1 -0
- package/dist/registry/record/put/0.3/payload.js +289 -0
- package/dist/registry/record/put/0.3/payload.js.map +1 -0
- package/dist/registry/record/query/0.1/payload.d.ts +4 -4
- package/dist/registry/record/query/0.1/payload.js +1 -1
- package/dist/registry/record/query/0.2/payload.d.ts +13 -2
- package/dist/registry/record/query/0.2/payload.d.ts.map +1 -1
- package/dist/registry/record/query/0.2/payload.js +1 -1
- package/dist/registry/record/query/0.2/payload.js.map +1 -1
- package/dist/registry/record/query/0.3/payload.d.ts +540 -0
- package/dist/registry/record/query/0.3/payload.d.ts.map +1 -0
- package/dist/registry/record/query/0.3/payload.js +299 -0
- package/dist/registry/record/query/0.3/payload.js.map +1 -0
- package/dist/registry/record/read/0.1/payload.d.ts +4 -4
- package/dist/registry/record/read/0.1/payload.js +1 -1
- package/dist/registry/record/update/0.1/payload.d.ts +4 -4
- package/dist/registry/record/update/0.1/payload.js +1 -1
- package/package.json +5 -1
- package/src/_runtime/consume.ts +2 -2
- package/src/_runtime/extends.ts +41 -4
- package/src/_runtime/index.ts +1 -0
- package/src/_shared/components.ts +29 -0
- package/src/index.ts +7 -0
- package/src/registry/_shared/0.2/registry.ts +17 -0
- package/src/registry/authorization/0.1/payload.ts +14 -3
- package/src/registry/authorization/0.2/payload.ts +337 -0
- package/src/registry/did/rotate/0.1/payload.ts +14 -3
- package/src/registry/did/rotate/0.2/payload.ts +216 -0
- package/src/registry/recognition/0.1/payload.ts +14 -3
- package/src/registry/recognition/0.2/payload.ts +337 -0
- package/src/registry/record/create/0.1/payload.ts +5 -5
- package/src/registry/record/delete/0.1/payload.ts +14 -3
- package/src/registry/record/delete/0.2/payload.ts +206 -0
- package/src/registry/record/list/0.1/payload.ts +5 -5
- package/src/registry/record/put/0.1/payload.ts +5 -5
- package/src/registry/record/put/0.2/payload.ts +14 -3
- package/src/registry/record/put/0.3/payload.ts +335 -0
- package/src/registry/record/query/0.1/payload.ts +5 -5
- package/src/registry/record/query/0.2/payload.ts +14 -3
- package/src/registry/record/query/0.3/payload.ts +360 -0
- package/src/registry/record/read/0.1/payload.ts +5 -5
- package/src/registry/record/update/0.1/payload.ts +5 -5
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/registry/record/put/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext, RecordType, TrustRecord_RegistryV0_2 as TrustRecord } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* An administrator asks a trust registry to create or replace the trust record at its four-part key (entity+authority+action+resource). Create-or-update in one task, following the vault/upsert precedent; the optional `expectedExisting` assertion recovers the strict create-only / update-only semantics of the superseded registry/record/create and registry/record/update tasks.
|
|
8
|
+
*/
|
|
9
|
+
export interface RegistryRecordPutPayload {
|
|
10
|
+
record: TrustRecord;
|
|
11
|
+
/**
|
|
12
|
+
* Optional existence assertion. When true, the registry MUST reject with `registry/record/put:notFound` if no record exists at the key (strict update). When false, the registry MUST reject with `registry/record/put:alreadyExists` if one does (strict create). Omitted: pure create-or-update.
|
|
13
|
+
*/
|
|
14
|
+
expectedExisting?: boolean;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
export interface RegistryRecordPutResponsePayload {
|
|
18
|
+
/**
|
|
19
|
+
* Whether the record was stored.
|
|
20
|
+
*/
|
|
21
|
+
ok: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* True when the put created a new record, false when it replaced an existing one.
|
|
24
|
+
*/
|
|
25
|
+
wasCreated: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Optional human-readable detail.
|
|
28
|
+
*/
|
|
29
|
+
message?: string;
|
|
30
|
+
ext?: Ext;
|
|
31
|
+
}
|
|
32
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
33
|
+
export type { Ext, RecordType, TrustRecord };
|
|
34
|
+
/** Trust Task type URI. */
|
|
35
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/registry/record/put/0.3";
|
|
36
|
+
/**
|
|
37
|
+
* The earlier version of this specification that this one declares it
|
|
38
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
39
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
40
|
+
* `extendsChain` / `readForSpec`.
|
|
41
|
+
*/
|
|
42
|
+
export declare const EXTENDS: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
45
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
46
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
47
|
+
* Versions").
|
|
48
|
+
*/
|
|
49
|
+
export declare const DEPRECATION: string | null;
|
|
50
|
+
/** Stable alias for this specification's request payload shape. */
|
|
51
|
+
export type Payload = RegistryRecordPutPayload;
|
|
52
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
53
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/registry/record/put/0.3#response";
|
|
54
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
55
|
+
export type Response = RegistryRecordPutResponsePayload;
|
|
56
|
+
/**
|
|
57
|
+
* This specification's payload schema, as a value.
|
|
58
|
+
*
|
|
59
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
60
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
61
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
62
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
63
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
64
|
+
*/
|
|
65
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
66
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
67
|
+
readonly $id: "https://trusttasks.org/spec/registry/record/put/0.3";
|
|
68
|
+
readonly title: "Registry Record Put — payload";
|
|
69
|
+
readonly description: "An administrator asks a trust registry to create or replace the trust record at its four-part key (entity+authority+action+resource). Create-or-update in one task, following the vault/upsert precedent; the optional `expectedExisting` assertion recovers the strict create-only / update-only semantics of the superseded registry/record/create and registry/record/update tasks.";
|
|
70
|
+
readonly type: "object";
|
|
71
|
+
readonly additionalProperties: false;
|
|
72
|
+
readonly required: readonly ["record"];
|
|
73
|
+
readonly properties: {
|
|
74
|
+
readonly record: {
|
|
75
|
+
readonly $ref: "#/$defs/TrustRecord";
|
|
76
|
+
};
|
|
77
|
+
readonly expectedExisting: {
|
|
78
|
+
readonly type: "boolean";
|
|
79
|
+
readonly description: "Optional existence assertion. When true, the registry MUST reject with `registry/record/put:notFound` if no record exists at the key (strict update). When false, the registry MUST reject with `registry/record/put:alreadyExists` if one does (strict create). Omitted: pure create-or-update.";
|
|
80
|
+
};
|
|
81
|
+
readonly ext: {
|
|
82
|
+
readonly $ref: "#/$defs/Ext";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly $defs: {
|
|
86
|
+
readonly Response: {
|
|
87
|
+
readonly $anchor: "response";
|
|
88
|
+
readonly title: "Registry Record Put — response payload";
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly additionalProperties: false;
|
|
91
|
+
readonly required: readonly ["ok", "wasCreated"];
|
|
92
|
+
readonly properties: {
|
|
93
|
+
readonly ok: {
|
|
94
|
+
readonly type: "boolean";
|
|
95
|
+
readonly description: "Whether the record was stored.";
|
|
96
|
+
};
|
|
97
|
+
readonly wasCreated: {
|
|
98
|
+
readonly type: "boolean";
|
|
99
|
+
readonly description: "True when the put created a new record, false when it replaced an existing one.";
|
|
100
|
+
};
|
|
101
|
+
readonly message: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly maxLength: 1024;
|
|
104
|
+
readonly description: "Optional human-readable detail.";
|
|
105
|
+
};
|
|
106
|
+
readonly ext: {
|
|
107
|
+
readonly $ref: "#/$defs/Ext";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly Ext: {
|
|
112
|
+
readonly title: "Ext";
|
|
113
|
+
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.";
|
|
114
|
+
readonly type: "object";
|
|
115
|
+
readonly minProperties: 1;
|
|
116
|
+
readonly additionalProperties: true;
|
|
117
|
+
readonly propertyNames: {
|
|
118
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
readonly TrustRecord: {
|
|
122
|
+
readonly title: "TrustRecord";
|
|
123
|
+
readonly type: "object";
|
|
124
|
+
readonly additionalProperties: false;
|
|
125
|
+
readonly required: readonly ["entityId", "authorityId", "action", "resource", "recordType"];
|
|
126
|
+
readonly properties: {
|
|
127
|
+
readonly entityId: {
|
|
128
|
+
readonly type: "string";
|
|
129
|
+
};
|
|
130
|
+
readonly authorityId: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
};
|
|
133
|
+
readonly action: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
};
|
|
136
|
+
readonly resource: {
|
|
137
|
+
readonly type: "string";
|
|
138
|
+
};
|
|
139
|
+
readonly recognized: {
|
|
140
|
+
readonly type: "boolean";
|
|
141
|
+
readonly description: "Present on recognition records: whether the action+resource is recognised.";
|
|
142
|
+
};
|
|
143
|
+
readonly authorized: {
|
|
144
|
+
readonly type: "boolean";
|
|
145
|
+
readonly description: "Present on authorization records: whether the action+resource authorization is confirmed.";
|
|
146
|
+
};
|
|
147
|
+
readonly context: {
|
|
148
|
+
readonly type: "object";
|
|
149
|
+
readonly description: "Opaque governance context attached to the record.";
|
|
150
|
+
readonly additionalProperties: true;
|
|
151
|
+
};
|
|
152
|
+
readonly recordType: {
|
|
153
|
+
readonly $ref: "#/$defs/RecordType";
|
|
154
|
+
};
|
|
155
|
+
readonly validFrom: {
|
|
156
|
+
readonly type: "string";
|
|
157
|
+
readonly format: "date-time";
|
|
158
|
+
readonly description: "The first instant at which the authority statement holds (inclusive). Absent: no lower bound.";
|
|
159
|
+
};
|
|
160
|
+
readonly validUntil: {
|
|
161
|
+
readonly type: "string";
|
|
162
|
+
readonly format: "date-time";
|
|
163
|
+
readonly description: "The instant at which the authority statement stops holding (exclusive). Absent: no upper bound. When both bounds are present, `validFrom` MUST be earlier than `validUntil`.";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly RecordType: {
|
|
168
|
+
readonly title: "RecordType";
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
readonly enum: readonly ["authorization", "recognition"];
|
|
171
|
+
readonly description: "Whether the record asserts an authorization or a recognition relationship.";
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
176
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
177
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
178
|
+
readonly $ref: "#/$defs/Response";
|
|
179
|
+
readonly $defs: {
|
|
180
|
+
readonly Response: {
|
|
181
|
+
readonly $anchor: "response";
|
|
182
|
+
readonly title: "Registry Record Put — response payload";
|
|
183
|
+
readonly type: "object";
|
|
184
|
+
readonly additionalProperties: false;
|
|
185
|
+
readonly required: readonly ["ok", "wasCreated"];
|
|
186
|
+
readonly properties: {
|
|
187
|
+
readonly ok: {
|
|
188
|
+
readonly type: "boolean";
|
|
189
|
+
readonly description: "Whether the record was stored.";
|
|
190
|
+
};
|
|
191
|
+
readonly wasCreated: {
|
|
192
|
+
readonly type: "boolean";
|
|
193
|
+
readonly description: "True when the put created a new record, false when it replaced an existing one.";
|
|
194
|
+
};
|
|
195
|
+
readonly message: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
readonly maxLength: 1024;
|
|
198
|
+
readonly description: "Optional human-readable detail.";
|
|
199
|
+
};
|
|
200
|
+
readonly ext: {
|
|
201
|
+
readonly $ref: "#/$defs/Ext";
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
readonly Ext: {
|
|
206
|
+
readonly title: "Ext";
|
|
207
|
+
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.";
|
|
208
|
+
readonly type: "object";
|
|
209
|
+
readonly minProperties: 1;
|
|
210
|
+
readonly additionalProperties: true;
|
|
211
|
+
readonly propertyNames: {
|
|
212
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
readonly TrustRecord: {
|
|
216
|
+
readonly title: "TrustRecord";
|
|
217
|
+
readonly type: "object";
|
|
218
|
+
readonly additionalProperties: false;
|
|
219
|
+
readonly required: readonly ["entityId", "authorityId", "action", "resource", "recordType"];
|
|
220
|
+
readonly properties: {
|
|
221
|
+
readonly entityId: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
};
|
|
224
|
+
readonly authorityId: {
|
|
225
|
+
readonly type: "string";
|
|
226
|
+
};
|
|
227
|
+
readonly action: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
};
|
|
230
|
+
readonly resource: {
|
|
231
|
+
readonly type: "string";
|
|
232
|
+
};
|
|
233
|
+
readonly recognized: {
|
|
234
|
+
readonly type: "boolean";
|
|
235
|
+
readonly description: "Present on recognition records: whether the action+resource is recognised.";
|
|
236
|
+
};
|
|
237
|
+
readonly authorized: {
|
|
238
|
+
readonly type: "boolean";
|
|
239
|
+
readonly description: "Present on authorization records: whether the action+resource authorization is confirmed.";
|
|
240
|
+
};
|
|
241
|
+
readonly context: {
|
|
242
|
+
readonly type: "object";
|
|
243
|
+
readonly description: "Opaque governance context attached to the record.";
|
|
244
|
+
readonly additionalProperties: true;
|
|
245
|
+
};
|
|
246
|
+
readonly recordType: {
|
|
247
|
+
readonly $ref: "#/$defs/RecordType";
|
|
248
|
+
};
|
|
249
|
+
readonly validFrom: {
|
|
250
|
+
readonly type: "string";
|
|
251
|
+
readonly format: "date-time";
|
|
252
|
+
readonly description: "The first instant at which the authority statement holds (inclusive). Absent: no lower bound.";
|
|
253
|
+
};
|
|
254
|
+
readonly validUntil: {
|
|
255
|
+
readonly type: "string";
|
|
256
|
+
readonly format: "date-time";
|
|
257
|
+
readonly description: "The instant at which the authority statement stops holding (exclusive). Absent: no upper bound. When both bounds are present, `validFrom` MUST be earlier than `validUntil`.";
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
readonly RecordType: {
|
|
262
|
+
readonly title: "RecordType";
|
|
263
|
+
readonly type: "string";
|
|
264
|
+
readonly enum: readonly ["authorization", "recognition"];
|
|
265
|
+
readonly description: "Whether the record asserts an authorization or a recognition relationship.";
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
271
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
272
|
+
* per-specification and cannot be derived from the document alone, and
|
|
273
|
+
* item 2 needs the schema this carries.
|
|
274
|
+
*/
|
|
275
|
+
export declare const SPEC: {
|
|
276
|
+
readonly typeUri: "https://trusttasks.org/spec/registry/record/put/0.3";
|
|
277
|
+
readonly isBearer: false;
|
|
278
|
+
readonly isProofRequired: true;
|
|
279
|
+
readonly isRecipientRequired: true;
|
|
280
|
+
readonly isIssuedAtRequired: true;
|
|
281
|
+
readonly payloadSchema: {
|
|
282
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
283
|
+
readonly $id: "https://trusttasks.org/spec/registry/record/put/0.3";
|
|
284
|
+
readonly title: "Registry Record Put — payload";
|
|
285
|
+
readonly description: "An administrator asks a trust registry to create or replace the trust record at its four-part key (entity+authority+action+resource). Create-or-update in one task, following the vault/upsert precedent; the optional `expectedExisting` assertion recovers the strict create-only / update-only semantics of the superseded registry/record/create and registry/record/update tasks.";
|
|
286
|
+
readonly type: "object";
|
|
287
|
+
readonly additionalProperties: false;
|
|
288
|
+
readonly required: readonly ["record"];
|
|
289
|
+
readonly properties: {
|
|
290
|
+
readonly record: {
|
|
291
|
+
readonly $ref: "#/$defs/TrustRecord";
|
|
292
|
+
};
|
|
293
|
+
readonly expectedExisting: {
|
|
294
|
+
readonly type: "boolean";
|
|
295
|
+
readonly description: "Optional existence assertion. When true, the registry MUST reject with `registry/record/put:notFound` if no record exists at the key (strict update). When false, the registry MUST reject with `registry/record/put:alreadyExists` if one does (strict create). Omitted: pure create-or-update.";
|
|
296
|
+
};
|
|
297
|
+
readonly ext: {
|
|
298
|
+
readonly $ref: "#/$defs/Ext";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly $defs: {
|
|
302
|
+
readonly Response: {
|
|
303
|
+
readonly $anchor: "response";
|
|
304
|
+
readonly title: "Registry Record Put — response payload";
|
|
305
|
+
readonly type: "object";
|
|
306
|
+
readonly additionalProperties: false;
|
|
307
|
+
readonly required: readonly ["ok", "wasCreated"];
|
|
308
|
+
readonly properties: {
|
|
309
|
+
readonly ok: {
|
|
310
|
+
readonly type: "boolean";
|
|
311
|
+
readonly description: "Whether the record was stored.";
|
|
312
|
+
};
|
|
313
|
+
readonly wasCreated: {
|
|
314
|
+
readonly type: "boolean";
|
|
315
|
+
readonly description: "True when the put created a new record, false when it replaced an existing one.";
|
|
316
|
+
};
|
|
317
|
+
readonly message: {
|
|
318
|
+
readonly type: "string";
|
|
319
|
+
readonly maxLength: 1024;
|
|
320
|
+
readonly description: "Optional human-readable detail.";
|
|
321
|
+
};
|
|
322
|
+
readonly ext: {
|
|
323
|
+
readonly $ref: "#/$defs/Ext";
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly Ext: {
|
|
328
|
+
readonly title: "Ext";
|
|
329
|
+
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.";
|
|
330
|
+
readonly type: "object";
|
|
331
|
+
readonly minProperties: 1;
|
|
332
|
+
readonly additionalProperties: true;
|
|
333
|
+
readonly propertyNames: {
|
|
334
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
readonly TrustRecord: {
|
|
338
|
+
readonly title: "TrustRecord";
|
|
339
|
+
readonly type: "object";
|
|
340
|
+
readonly additionalProperties: false;
|
|
341
|
+
readonly required: readonly ["entityId", "authorityId", "action", "resource", "recordType"];
|
|
342
|
+
readonly properties: {
|
|
343
|
+
readonly entityId: {
|
|
344
|
+
readonly type: "string";
|
|
345
|
+
};
|
|
346
|
+
readonly authorityId: {
|
|
347
|
+
readonly type: "string";
|
|
348
|
+
};
|
|
349
|
+
readonly action: {
|
|
350
|
+
readonly type: "string";
|
|
351
|
+
};
|
|
352
|
+
readonly resource: {
|
|
353
|
+
readonly type: "string";
|
|
354
|
+
};
|
|
355
|
+
readonly recognized: {
|
|
356
|
+
readonly type: "boolean";
|
|
357
|
+
readonly description: "Present on recognition records: whether the action+resource is recognised.";
|
|
358
|
+
};
|
|
359
|
+
readonly authorized: {
|
|
360
|
+
readonly type: "boolean";
|
|
361
|
+
readonly description: "Present on authorization records: whether the action+resource authorization is confirmed.";
|
|
362
|
+
};
|
|
363
|
+
readonly context: {
|
|
364
|
+
readonly type: "object";
|
|
365
|
+
readonly description: "Opaque governance context attached to the record.";
|
|
366
|
+
readonly additionalProperties: true;
|
|
367
|
+
};
|
|
368
|
+
readonly recordType: {
|
|
369
|
+
readonly $ref: "#/$defs/RecordType";
|
|
370
|
+
};
|
|
371
|
+
readonly validFrom: {
|
|
372
|
+
readonly type: "string";
|
|
373
|
+
readonly format: "date-time";
|
|
374
|
+
readonly description: "The first instant at which the authority statement holds (inclusive). Absent: no lower bound.";
|
|
375
|
+
};
|
|
376
|
+
readonly validUntil: {
|
|
377
|
+
readonly type: "string";
|
|
378
|
+
readonly format: "date-time";
|
|
379
|
+
readonly description: "The instant at which the authority statement stops holding (exclusive). Absent: no upper bound. When both bounds are present, `validFrom` MUST be earlier than `validUntil`.";
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
readonly RecordType: {
|
|
384
|
+
readonly title: "RecordType";
|
|
385
|
+
readonly type: "string";
|
|
386
|
+
readonly enum: readonly ["authorization", "recognition"];
|
|
387
|
+
readonly description: "Whether the record asserts an authorization or a recognition relationship.";
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
394
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
395
|
+
* parties (§7.3 item 5).
|
|
396
|
+
*/
|
|
397
|
+
export declare const RESPONSE_SPEC: {
|
|
398
|
+
readonly typeUri: "https://trusttasks.org/spec/registry/record/put/0.3#response";
|
|
399
|
+
readonly isBearer: false;
|
|
400
|
+
readonly isProofRequired: true;
|
|
401
|
+
readonly isRecipientRequired: true;
|
|
402
|
+
readonly isIssuedAtRequired: true;
|
|
403
|
+
readonly payloadSchema: {
|
|
404
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
405
|
+
readonly $ref: "#/$defs/Response";
|
|
406
|
+
readonly $defs: {
|
|
407
|
+
readonly Response: {
|
|
408
|
+
readonly $anchor: "response";
|
|
409
|
+
readonly title: "Registry Record Put — response payload";
|
|
410
|
+
readonly type: "object";
|
|
411
|
+
readonly additionalProperties: false;
|
|
412
|
+
readonly required: readonly ["ok", "wasCreated"];
|
|
413
|
+
readonly properties: {
|
|
414
|
+
readonly ok: {
|
|
415
|
+
readonly type: "boolean";
|
|
416
|
+
readonly description: "Whether the record was stored.";
|
|
417
|
+
};
|
|
418
|
+
readonly wasCreated: {
|
|
419
|
+
readonly type: "boolean";
|
|
420
|
+
readonly description: "True when the put created a new record, false when it replaced an existing one.";
|
|
421
|
+
};
|
|
422
|
+
readonly message: {
|
|
423
|
+
readonly type: "string";
|
|
424
|
+
readonly maxLength: 1024;
|
|
425
|
+
readonly description: "Optional human-readable detail.";
|
|
426
|
+
};
|
|
427
|
+
readonly ext: {
|
|
428
|
+
readonly $ref: "#/$defs/Ext";
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
readonly Ext: {
|
|
433
|
+
readonly title: "Ext";
|
|
434
|
+
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.";
|
|
435
|
+
readonly type: "object";
|
|
436
|
+
readonly minProperties: 1;
|
|
437
|
+
readonly additionalProperties: true;
|
|
438
|
+
readonly propertyNames: {
|
|
439
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
readonly TrustRecord: {
|
|
443
|
+
readonly title: "TrustRecord";
|
|
444
|
+
readonly type: "object";
|
|
445
|
+
readonly additionalProperties: false;
|
|
446
|
+
readonly required: readonly ["entityId", "authorityId", "action", "resource", "recordType"];
|
|
447
|
+
readonly properties: {
|
|
448
|
+
readonly entityId: {
|
|
449
|
+
readonly type: "string";
|
|
450
|
+
};
|
|
451
|
+
readonly authorityId: {
|
|
452
|
+
readonly type: "string";
|
|
453
|
+
};
|
|
454
|
+
readonly action: {
|
|
455
|
+
readonly type: "string";
|
|
456
|
+
};
|
|
457
|
+
readonly resource: {
|
|
458
|
+
readonly type: "string";
|
|
459
|
+
};
|
|
460
|
+
readonly recognized: {
|
|
461
|
+
readonly type: "boolean";
|
|
462
|
+
readonly description: "Present on recognition records: whether the action+resource is recognised.";
|
|
463
|
+
};
|
|
464
|
+
readonly authorized: {
|
|
465
|
+
readonly type: "boolean";
|
|
466
|
+
readonly description: "Present on authorization records: whether the action+resource authorization is confirmed.";
|
|
467
|
+
};
|
|
468
|
+
readonly context: {
|
|
469
|
+
readonly type: "object";
|
|
470
|
+
readonly description: "Opaque governance context attached to the record.";
|
|
471
|
+
readonly additionalProperties: true;
|
|
472
|
+
};
|
|
473
|
+
readonly recordType: {
|
|
474
|
+
readonly $ref: "#/$defs/RecordType";
|
|
475
|
+
};
|
|
476
|
+
readonly validFrom: {
|
|
477
|
+
readonly type: "string";
|
|
478
|
+
readonly format: "date-time";
|
|
479
|
+
readonly description: "The first instant at which the authority statement holds (inclusive). Absent: no lower bound.";
|
|
480
|
+
};
|
|
481
|
+
readonly validUntil: {
|
|
482
|
+
readonly type: "string";
|
|
483
|
+
readonly format: "date-time";
|
|
484
|
+
readonly description: "The instant at which the authority statement stops holding (exclusive). Absent: no upper bound. When both bounds are present, `validFrom` MUST be earlier than `validUntil`.";
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
readonly RecordType: {
|
|
489
|
+
readonly title: "RecordType";
|
|
490
|
+
readonly type: "string";
|
|
491
|
+
readonly enum: readonly ["authorization", "recognition"];
|
|
492
|
+
readonly description: "Whether the record asserts an authorization or a recognition relationship.";
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/registry/record/put/0.3/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,wBAAwB,IAAI,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGlH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD,MAAM,WAAW,gCAAgC;IAC/C;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;IACZ;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;AAE7C,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,qDAA8D,CAAC;AAEvF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,GAAG,IAAW,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,GAAG,IAAW,CAAC;AAE/C,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2HjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|