@openvtc/trust-tasks 0.17.8 → 0.17.10
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 +111 -0
- package/dist/_shared/components.d.ts +4 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -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/correlation/analyze/1.0/payload.d.ts +82 -0
- package/dist/persona/correlation/analyze/1.0/payload.d.ts.map +1 -1
- package/dist/persona/correlation/analyze/1.0/payload.js +34 -0
- package/dist/persona/correlation/analyze/1.0/payload.js.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/package.json +1 -1
- package/src/_shared/components.ts +4 -0
- package/src/index.ts +3 -0
- package/src/persona/_shared/0.1/persona-record.ts +1 -1
- package/src/persona/correlation/analyze/1.0/payload.ts +48 -0
- 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
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/facet/delete/1.0";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/facet/delete/1.0#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/persona/facet/delete/1.0",
|
|
21
|
+
"title": "Persona — Facet Delete — payload",
|
|
22
|
+
"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.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"facetId"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"facetId": {
|
|
30
|
+
"$ref": "#/$defs/Ulid"
|
|
31
|
+
},
|
|
32
|
+
"expectedVersion": {
|
|
33
|
+
"$ref": "#/$defs/ExpectedVersion",
|
|
34
|
+
"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."
|
|
35
|
+
},
|
|
36
|
+
"ext": {
|
|
37
|
+
"$ref": "#/$defs/Ext"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"$defs": {
|
|
41
|
+
"Response": {
|
|
42
|
+
"$anchor": "response",
|
|
43
|
+
"title": "Persona Facet Delete — response payload",
|
|
44
|
+
"description": "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.",
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": [
|
|
48
|
+
"existed"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"existed": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"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."
|
|
54
|
+
},
|
|
55
|
+
"releasedFaces": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"minimum": 0,
|
|
58
|
+
"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'."
|
|
59
|
+
},
|
|
60
|
+
"ext": {
|
|
61
|
+
"$ref": "#/$defs/Ext"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"Ext": {
|
|
66
|
+
"title": "Ext",
|
|
67
|
+
"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.",
|
|
68
|
+
"type": "object",
|
|
69
|
+
"minProperties": 1,
|
|
70
|
+
"additionalProperties": true,
|
|
71
|
+
"propertyNames": {
|
|
72
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"ExpectedVersion": {
|
|
76
|
+
"title": "ExpectedVersion",
|
|
77
|
+
"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.",
|
|
78
|
+
"type": "integer",
|
|
79
|
+
"minimum": 0
|
|
80
|
+
},
|
|
81
|
+
"Ulid": {
|
|
82
|
+
"title": "Ulid",
|
|
83
|
+
"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.",
|
|
84
|
+
"type": "string",
|
|
85
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
90
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
91
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
92
|
+
"$ref": "#/$defs/Response",
|
|
93
|
+
"$defs": {
|
|
94
|
+
"Response": {
|
|
95
|
+
"$anchor": "response",
|
|
96
|
+
"title": "Persona Facet Delete — response payload",
|
|
97
|
+
"description": "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.",
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": [
|
|
101
|
+
"existed"
|
|
102
|
+
],
|
|
103
|
+
"properties": {
|
|
104
|
+
"existed": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"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."
|
|
107
|
+
},
|
|
108
|
+
"releasedFaces": {
|
|
109
|
+
"type": "integer",
|
|
110
|
+
"minimum": 0,
|
|
111
|
+
"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'."
|
|
112
|
+
},
|
|
113
|
+
"ext": {
|
|
114
|
+
"$ref": "#/$defs/Ext"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"Ext": {
|
|
119
|
+
"title": "Ext",
|
|
120
|
+
"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.",
|
|
121
|
+
"type": "object",
|
|
122
|
+
"minProperties": 1,
|
|
123
|
+
"additionalProperties": true,
|
|
124
|
+
"propertyNames": {
|
|
125
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"ExpectedVersion": {
|
|
129
|
+
"title": "ExpectedVersion",
|
|
130
|
+
"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.",
|
|
131
|
+
"type": "integer",
|
|
132
|
+
"minimum": 0
|
|
133
|
+
},
|
|
134
|
+
"Ulid": {
|
|
135
|
+
"title": "Ulid",
|
|
136
|
+
"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.",
|
|
137
|
+
"type": "string",
|
|
138
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
144
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
145
|
+
* per-specification and cannot be derived from the document alone, and
|
|
146
|
+
* item 2 needs the schema this carries.
|
|
147
|
+
*/
|
|
148
|
+
export const SPEC = {
|
|
149
|
+
typeUri: TYPE_URI,
|
|
150
|
+
isBearer: false,
|
|
151
|
+
isProofRequired: true,
|
|
152
|
+
isRecipientRequired: true,
|
|
153
|
+
isIssuedAtRequired: true,
|
|
154
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
158
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
159
|
+
* parties (§7.3 item 5).
|
|
160
|
+
*/
|
|
161
|
+
export const RESPONSE_SPEC = {
|
|
162
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
163
|
+
isBearer: false,
|
|
164
|
+
isProofRequired: true,
|
|
165
|
+
isRecipientRequired: true,
|
|
166
|
+
isIssuedAtRequired: true,
|
|
167
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/persona/facet/delete/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,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,kCAAkC;IAC3C,aAAa,EAAE,+JAA+J;IAC9K,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,SAAS;KACV;IACD,YAAY,EAAE;QACZ,SAAS,EAAE;YACT,MAAM,EAAE,cAAc;SACvB;QACD,iBAAiB,EAAE;YACjB,MAAM,EAAE,yBAAyB;YACjC,aAAa,EAAE,6IAA6I;SAC7J;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;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