@openvtc/trust-tasks 0.16.8 → 0.16.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.
Files changed (206) hide show
  1. package/CHANGELOG.md +285 -0
  2. package/dist/_shared/components.d.ts +206 -7
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +6 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +6 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +6 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +6 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +31 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +31 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/persona/_shared/0.1/persona-record.d.ts +22 -0
  25. package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -0
  26. package/dist/persona/_shared/0.1/persona-record.js +6 -0
  27. package/dist/persona/_shared/0.1/persona-record.js.map +1 -0
  28. package/dist/persona/attribute/delete/1.0/payload.d.ts +351 -0
  29. package/dist/persona/attribute/delete/1.0/payload.d.ts.map +1 -0
  30. package/dist/persona/attribute/delete/1.0/payload.js +188 -0
  31. package/dist/persona/attribute/delete/1.0/payload.js.map +1 -0
  32. package/dist/persona/attribute/list/1.0/payload.d.ts +895 -0
  33. package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -0
  34. package/dist/persona/attribute/list/1.0/payload.js +532 -0
  35. package/dist/persona/attribute/list/1.0/payload.js.map +1 -0
  36. package/dist/persona/attribute/put/1.0/payload.d.ts +829 -0
  37. package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -0
  38. package/dist/persona/attribute/put/1.0/payload.js +487 -0
  39. package/dist/persona/attribute/put/1.0/payload.js.map +1 -0
  40. package/dist/persona/binding/get/1.0/payload.d.ts +382 -0
  41. package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -0
  42. package/dist/persona/binding/get/1.0/payload.js +206 -0
  43. package/dist/persona/binding/get/1.0/payload.js.map +1 -0
  44. package/dist/persona/binding/list/1.0/payload.d.ts +387 -0
  45. package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -0
  46. package/dist/persona/binding/list/1.0/payload.js +210 -0
  47. package/dist/persona/binding/list/1.0/payload.js.map +1 -0
  48. package/dist/persona/binding/set/1.0/payload.d.ts +545 -0
  49. package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -0
  50. package/dist/persona/binding/set/1.0/payload.js +302 -0
  51. package/dist/persona/binding/set/1.0/payload.js.map +1 -0
  52. package/dist/persona/contact/delete/1.0/payload.d.ts +313 -0
  53. package/dist/persona/contact/delete/1.0/payload.d.ts.map +1 -0
  54. package/dist/persona/contact/delete/1.0/payload.js +174 -0
  55. package/dist/persona/contact/delete/1.0/payload.js.map +1 -0
  56. package/dist/persona/contact/get/1.0/payload.d.ts +1027 -0
  57. package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -0
  58. package/dist/persona/contact/get/1.0/payload.js +606 -0
  59. package/dist/persona/contact/get/1.0/payload.js.map +1 -0
  60. package/dist/persona/contact/list/1.0/payload.d.ts +490 -0
  61. package/dist/persona/contact/list/1.0/payload.d.ts.map +1 -0
  62. package/dist/persona/contact/list/1.0/payload.js +262 -0
  63. package/dist/persona/contact/list/1.0/payload.js.map +1 -0
  64. package/dist/persona/contact/put/1.0/payload.d.ts +885 -0
  65. package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -0
  66. package/dist/persona/contact/put/1.0/payload.js +518 -0
  67. package/dist/persona/contact/put/1.0/payload.js.map +1 -0
  68. package/dist/persona/correlation/analyze/1.0/payload.d.ts +648 -0
  69. package/dist/persona/correlation/analyze/1.0/payload.d.ts.map +1 -0
  70. package/dist/persona/correlation/analyze/1.0/payload.js +338 -0
  71. package/dist/persona/correlation/analyze/1.0/payload.js.map +1 -0
  72. package/dist/persona/disclosure/history/1.0/payload.d.ts +639 -0
  73. package/dist/persona/disclosure/history/1.0/payload.d.ts.map +1 -0
  74. package/dist/persona/disclosure/history/1.0/payload.js +339 -0
  75. package/dist/persona/disclosure/history/1.0/payload.js.map +1 -0
  76. package/dist/persona/disclosure/present/1.0/payload.d.ts +400 -0
  77. package/dist/persona/disclosure/present/1.0/payload.d.ts.map +1 -0
  78. package/dist/persona/disclosure/present/1.0/payload.js +211 -0
  79. package/dist/persona/disclosure/present/1.0/payload.js.map +1 -0
  80. package/dist/persona/disclosure/preview/1.0/payload.d.ts +858 -0
  81. package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -0
  82. package/dist/persona/disclosure/preview/1.0/payload.js +480 -0
  83. package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -0
  84. package/dist/persona/local/binding/set/1.0/payload.d.ts +394 -0
  85. package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -0
  86. package/dist/persona/local/binding/set/1.0/payload.js +226 -0
  87. package/dist/persona/local/binding/set/1.0/payload.js.map +1 -0
  88. package/dist/persona/local/profile/delete/1.0/payload.d.ts +311 -0
  89. package/dist/persona/local/profile/delete/1.0/payload.d.ts.map +1 -0
  90. package/dist/persona/local/profile/delete/1.0/payload.js +173 -0
  91. package/dist/persona/local/profile/delete/1.0/payload.js.map +1 -0
  92. package/dist/persona/local/profile/get/1.0/payload.d.ts +368 -0
  93. package/dist/persona/local/profile/get/1.0/payload.d.ts.map +1 -0
  94. package/dist/persona/local/profile/get/1.0/payload.js +210 -0
  95. package/dist/persona/local/profile/get/1.0/payload.js.map +1 -0
  96. package/dist/persona/local/profile/list/1.0/payload.d.ts +387 -0
  97. package/dist/persona/local/profile/list/1.0/payload.d.ts.map +1 -0
  98. package/dist/persona/local/profile/list/1.0/payload.js +214 -0
  99. package/dist/persona/local/profile/list/1.0/payload.js.map +1 -0
  100. package/dist/persona/local/profile/put/1.0/payload.d.ts +545 -0
  101. package/dist/persona/local/profile/put/1.0/payload.d.ts.map +1 -0
  102. package/dist/persona/local/profile/put/1.0/payload.js +315 -0
  103. package/dist/persona/local/profile/put/1.0/payload.js.map +1 -0
  104. package/dist/persona/profile/delete/1.0/payload.d.ts +350 -0
  105. package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -0
  106. package/dist/persona/profile/delete/1.0/payload.js +189 -0
  107. package/dist/persona/profile/delete/1.0/payload.js.map +1 -0
  108. package/dist/persona/profile/get/1.0/payload.d.ts +1307 -0
  109. package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -0
  110. package/dist/persona/profile/get/1.0/payload.js +804 -0
  111. package/dist/persona/profile/get/1.0/payload.js.map +1 -0
  112. package/dist/persona/profile/list/1.0/payload.d.ts +1120 -0
  113. package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -0
  114. package/dist/persona/profile/list/1.0/payload.js +680 -0
  115. package/dist/persona/profile/list/1.0/payload.js.map +1 -0
  116. package/dist/persona/profile/put/1.0/payload.d.ts +1115 -0
  117. package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -0
  118. package/dist/persona/profile/put/1.0/payload.js +675 -0
  119. package/dist/persona/profile/put/1.0/payload.js.map +1 -0
  120. package/dist/persona/renderers/list/1.0/payload.d.ts +362 -0
  121. package/dist/persona/renderers/list/1.0/payload.d.ts.map +1 -0
  122. package/dist/persona/renderers/list/1.0/payload.js +197 -0
  123. package/dist/persona/renderers/list/1.0/payload.js.map +1 -0
  124. package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
  125. package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
  126. package/dist/rooms/keys/commit/0.1/payload.js +146 -0
  127. package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
  128. package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
  129. package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
  130. package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
  131. package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
  132. package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
  133. package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
  134. package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
  135. package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
  136. package/dist/rooms/owner/claim/0.1/payload.d.ts +391 -0
  137. package/dist/rooms/owner/claim/0.1/payload.d.ts.map +1 -0
  138. package/dist/rooms/owner/claim/0.1/payload.js +214 -0
  139. package/dist/rooms/owner/claim/0.1/payload.js.map +1 -0
  140. package/dist/rooms/owner/transfer/0.1/payload.d.ts +391 -0
  141. package/dist/rooms/owner/transfer/0.1/payload.d.ts.map +1 -0
  142. package/dist/rooms/owner/transfer/0.1/payload.js +214 -0
  143. package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -0
  144. package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
  145. package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
  146. package/dist/rooms/records/curate/0.1/payload.js +277 -0
  147. package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
  148. package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
  149. package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
  150. package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
  151. package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
  152. package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
  153. package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
  154. package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
  155. package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
  156. package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
  157. package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
  158. package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
  159. package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
  160. package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
  161. package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
  162. package/package.json +1 -1
  163. package/src/_shared/components.ts +217 -7
  164. package/src/device/list/0.1/payload.ts +6 -2
  165. package/src/device/list/0.2/payload.ts +6 -2
  166. package/src/device/register/0.1/payload.ts +6 -2
  167. package/src/device/register/0.2/payload.ts +6 -2
  168. package/src/index.ts +31 -0
  169. package/src/persona/_shared/0.1/persona-record.ts +23 -0
  170. package/src/persona/attribute/delete/1.0/payload.ts +238 -0
  171. package/src/persona/attribute/list/1.0/payload.ts +590 -0
  172. package/src/persona/attribute/put/1.0/payload.ts +559 -0
  173. package/src/persona/binding/get/1.0/payload.ts +257 -0
  174. package/src/persona/binding/list/1.0/payload.ts +260 -0
  175. package/src/persona/binding/set/1.0/payload.ts +370 -0
  176. package/src/persona/contact/delete/1.0/payload.ts +216 -0
  177. package/src/persona/contact/get/1.0/payload.ts +662 -0
  178. package/src/persona/contact/list/1.0/payload.ts +323 -0
  179. package/src/persona/contact/put/1.0/payload.ts +580 -0
  180. package/src/persona/correlation/analyze/1.0/payload.ts +466 -0
  181. package/src/persona/disclosure/history/1.0/payload.ts +415 -0
  182. package/src/persona/disclosure/present/1.0/payload.ts +274 -0
  183. package/src/persona/disclosure/preview/1.0/payload.ts +597 -0
  184. package/src/persona/local/binding/set/1.0/payload.ts +267 -0
  185. package/src/persona/local/profile/delete/1.0/payload.ts +215 -0
  186. package/src/persona/local/profile/get/1.0/payload.ts +251 -0
  187. package/src/persona/local/profile/list/1.0/payload.ts +260 -0
  188. package/src/persona/local/profile/put/1.0/payload.ts +373 -0
  189. package/src/persona/profile/delete/1.0/payload.ts +236 -0
  190. package/src/persona/profile/get/1.0/payload.ts +846 -0
  191. package/src/persona/profile/list/1.0/payload.ts +723 -0
  192. package/src/persona/profile/put/1.0/payload.ts +741 -0
  193. package/src/persona/renderers/list/1.0/payload.ts +248 -0
  194. package/src/rooms/keys/commit/0.1/payload.ts +195 -0
  195. package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
  196. package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
  197. package/src/rooms/owner/claim/0.1/payload.ts +268 -0
  198. package/src/rooms/owner/transfer/0.1/payload.ts +268 -0
  199. package/src/rooms/records/curate/0.1/payload.ts +357 -0
  200. package/src/vta/_shared/0.1/app-state-record.ts +1 -1
  201. package/src/vta/app-state/delete/1.0/payload.ts +1 -1
  202. package/src/vta/app-state/get/1.0/payload.ts +1 -1
  203. package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
  204. package/src/vta/app-state/list/1.0/payload.ts +1 -1
  205. package/src/vta/app-state/put/1.0/payload.ts +1 -1
  206. package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
@@ -0,0 +1,829 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/attribute/put/1.0/payload.schema.json
4
+ */
5
+ import type { ClaimType, ExpectedVersion_PersonaV0_1 as ExpectedVersion, Ext, ProofRung, Provenance, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
6
+ /**
7
+ * Create or replace one attribute in the holder's pool. Omit `attributeId` to create; supply it to replace. `expectedVersion` makes the write conditional.
8
+ */
9
+ export interface PersonaAttributePutPayload {
10
+ /**
11
+ * Omit to create — the maintainer assigns one and returns it. Supply to replace an existing attribute, or to make a create idempotent under retry; a supplied id that already exists is a replacement, and a producer that meant to create MUST pair it with `expectedVersion: 0`.
12
+ */
13
+ attributeId?: Ulid;
14
+ type: ClaimType;
15
+ valueType: ValueType;
16
+ /**
17
+ * The fact itself. MUST agree with `valueType`; a maintainer MUST refuse a document where it does not. For a `credentialBacked` provenance this is the initial display cache — the maintainer re-derives it from the credential and MAY overwrite what was supplied.
18
+ */
19
+ value: {
20
+ [k: string]: unknown | undefined;
21
+ };
22
+ /**
23
+ * The holder's own words, for their own picker. Never disclosed to a verifier.
24
+ */
25
+ label?: string;
26
+ provenance: Provenance;
27
+ /**
28
+ * Optional precondition. Omit for last-writer-wins. Supply the version a prior read returned to make the write conditional; supply 0 to create only.
29
+ */
30
+ expectedVersion?: ExpectedVersion;
31
+ /**
32
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
33
+ */
34
+ ext?: Ext;
35
+ }
36
+ /**
37
+ * Success response to persona/attribute/put. Type https://trusttasks.org/spec/persona/attribute/put/1.0#response. A failed precondition is not a success: it is a trust-task-error carrying persona/attribute/put:versionConflict, whose details carry the maintainer's current version and value.
38
+ */
39
+ export interface PersonaAttributePutResponsePayload {
40
+ attributeId: Ulid;
41
+ version: Version;
42
+ /**
43
+ * True when this write created the attribute, false when it replaced one. A producer that omitted `attributeId` can still be told which happened, because a retried create with a supplied id is a replacement.
44
+ */
45
+ created: boolean;
46
+ /**
47
+ * Advisory result of the correlation check the maintainer runs over the new value (see persona/correlation/analyze). Returned on the write so a producer's builder can warn at the moment of composition rather than requiring a second round trip. Advisory only: the write has already applied, and a maintainer MUST NOT refuse a write on correlation grounds — the holder decides.
48
+ */
49
+ correlation?: {
50
+ severity: "none" | "low" | "high";
51
+ /**
52
+ * How many other profiles already present this exact value. A count, not identifiers — the identifiers are available from the analyze task, which is where a producer should go to render remedies.
53
+ */
54
+ sharedWithProfileCount?: number;
55
+ };
56
+ createdAt?: string;
57
+ updatedAt: string;
58
+ ext?: Ext;
59
+ }
60
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
61
+ export type { ClaimType, ExpectedVersion, Ext, ProofRung, Provenance, Ulid, ValueType, Version };
62
+ /** Trust Task type URI. */
63
+ export declare const TYPE_URI: "https://trusttasks.org/spec/persona/attribute/put/1.0";
64
+ /** Stable alias for this specification's request payload shape. */
65
+ export type Payload = PersonaAttributePutPayload;
66
+ /** Trust Task response type URI (request type URI + "#response"). */
67
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/persona/attribute/put/1.0#response";
68
+ /** Stable alias for this specification's success-response payload shape. */
69
+ export type Response = PersonaAttributePutResponsePayload;
70
+ /**
71
+ * This specification's payload schema, as a value.
72
+ *
73
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
74
+ * rather than only as a `.json` file because TypeScript types are erased
75
+ * at runtime: without a schema a consumer has nothing to validate, and
76
+ * every REQUIRED payload member is optional in practice. Cross-file
77
+ * `$ref`s are already inlined, so it needs no resolver.
78
+ */
79
+ export declare const PAYLOAD_SCHEMA: {
80
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
81
+ readonly $id: "https://trusttasks.org/spec/persona/attribute/put/1.0";
82
+ readonly title: "Persona Attribute Put — payload";
83
+ readonly description: "Create or replace one attribute in the holder's pool. Omit `attributeId` to create; supply it to replace. `expectedVersion` makes the write conditional.";
84
+ readonly type: "object";
85
+ readonly additionalProperties: false;
86
+ readonly required: readonly ["type", "valueType", "value", "provenance"];
87
+ readonly properties: {
88
+ readonly attributeId: {
89
+ readonly $ref: "#/$defs/Ulid";
90
+ readonly description: "Omit to create — the maintainer assigns one and returns it. Supply to replace an existing attribute, or to make a create idempotent under retry; a supplied id that already exists is a replacement, and a producer that meant to create MUST pair it with `expectedVersion: 0`.";
91
+ };
92
+ readonly type: {
93
+ readonly $ref: "#/$defs/ClaimType";
94
+ };
95
+ readonly valueType: {
96
+ readonly $ref: "#/$defs/ValueType";
97
+ };
98
+ readonly value: {
99
+ readonly description: "The fact itself. MUST agree with `valueType`; a maintainer MUST refuse a document where it does not. For a `credentialBacked` provenance this is the initial display cache — the maintainer re-derives it from the credential and MAY overwrite what was supplied.";
100
+ };
101
+ readonly label: {
102
+ readonly type: "string";
103
+ readonly maxLength: 128;
104
+ readonly description: "The holder's own words, for their own picker. Never disclosed to a verifier.";
105
+ };
106
+ readonly provenance: {
107
+ readonly $ref: "#/$defs/Provenance";
108
+ };
109
+ readonly expectedVersion: {
110
+ readonly $ref: "#/$defs/ExpectedVersion";
111
+ readonly description: "Optional precondition. Omit for last-writer-wins. Supply the version a prior read returned to make the write conditional; supply 0 to create only.";
112
+ };
113
+ readonly ext: {
114
+ readonly $ref: "#/$defs/Ext";
115
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
116
+ };
117
+ };
118
+ readonly $defs: {
119
+ readonly Response: {
120
+ readonly $anchor: "response";
121
+ readonly title: "Persona Attribute Put — response payload";
122
+ readonly description: "Success response to persona/attribute/put. Type https://trusttasks.org/spec/persona/attribute/put/1.0#response. A failed precondition is not a success: it is a trust-task-error carrying persona/attribute/put:versionConflict, whose details carry the maintainer's current version and value.";
123
+ readonly type: "object";
124
+ readonly additionalProperties: false;
125
+ readonly required: readonly ["attributeId", "version", "created", "updatedAt"];
126
+ readonly properties: {
127
+ readonly attributeId: {
128
+ readonly $ref: "#/$defs/Ulid";
129
+ };
130
+ readonly version: {
131
+ readonly $ref: "#/$defs/Version";
132
+ };
133
+ readonly created: {
134
+ readonly type: "boolean";
135
+ readonly description: "True when this write created the attribute, false when it replaced one. A producer that omitted `attributeId` can still be told which happened, because a retried create with a supplied id is a replacement.";
136
+ };
137
+ readonly correlation: {
138
+ readonly type: "object";
139
+ readonly additionalProperties: false;
140
+ readonly required: readonly ["severity"];
141
+ readonly description: "Advisory result of the correlation check the maintainer runs over the new value (see persona/correlation/analyze). Returned on the write so a producer's builder can warn at the moment of composition rather than requiring a second round trip. Advisory only: the write has already applied, and a maintainer MUST NOT refuse a write on correlation grounds — the holder decides.";
142
+ readonly properties: {
143
+ readonly severity: {
144
+ readonly type: "string";
145
+ readonly enum: readonly ["none", "low", "high"];
146
+ };
147
+ readonly sharedWithProfileCount: {
148
+ readonly type: "integer";
149
+ readonly minimum: 0;
150
+ readonly description: "How many other profiles already present this exact value. A count, not identifiers — the identifiers are available from the analyze task, which is where a producer should go to render remedies.";
151
+ };
152
+ };
153
+ };
154
+ readonly createdAt: {
155
+ readonly type: "string";
156
+ readonly format: "date-time";
157
+ };
158
+ readonly updatedAt: {
159
+ readonly type: "string";
160
+ readonly format: "date-time";
161
+ };
162
+ readonly ext: {
163
+ readonly $ref: "#/$defs/Ext";
164
+ };
165
+ };
166
+ };
167
+ readonly Ext: {
168
+ readonly title: "Ext";
169
+ 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.";
170
+ readonly type: "object";
171
+ readonly minProperties: 1;
172
+ readonly additionalProperties: true;
173
+ readonly propertyNames: {
174
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
175
+ };
176
+ };
177
+ readonly Version: {
178
+ readonly title: "Version";
179
+ readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
180
+ readonly type: "integer";
181
+ readonly minimum: 1;
182
+ };
183
+ readonly Ulid: {
184
+ readonly title: "Ulid";
185
+ readonly 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.";
186
+ readonly type: "string";
187
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
188
+ };
189
+ readonly ExpectedVersion: {
190
+ readonly title: "ExpectedVersion";
191
+ readonly 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.";
192
+ readonly type: "integer";
193
+ readonly minimum: 0;
194
+ };
195
+ readonly Provenance: {
196
+ readonly title: "Provenance";
197
+ readonly description: "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.";
198
+ readonly type: "object";
199
+ readonly required: readonly ["kind"];
200
+ readonly oneOf: readonly [{
201
+ readonly additionalProperties: false;
202
+ readonly required: readonly ["kind"];
203
+ readonly properties: {
204
+ readonly kind: {
205
+ readonly const: "selfAsserted";
206
+ };
207
+ };
208
+ }, {
209
+ readonly additionalProperties: false;
210
+ readonly required: readonly ["kind", "credentialId", "claimPath"];
211
+ readonly properties: {
212
+ readonly kind: {
213
+ readonly const: "credentialBacked";
214
+ };
215
+ readonly credentialId: {
216
+ readonly type: "string";
217
+ readonly minLength: 1;
218
+ readonly description: "Vault identifier of the backing credential.";
219
+ };
220
+ readonly claimPath: {
221
+ readonly type: "string";
222
+ readonly pattern: "^(/[^/~]*(~[01][^/~]*)*)*$";
223
+ readonly description: "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`.";
224
+ };
225
+ readonly issuerDid: {
226
+ readonly type: "string";
227
+ readonly minLength: 1;
228
+ readonly description: "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member.";
229
+ };
230
+ readonly proof: {
231
+ readonly $ref: "#/$defs/ProofRung";
232
+ readonly description: "The disclosure rung this claim was, or will be, presented at.";
233
+ };
234
+ };
235
+ }, {
236
+ readonly additionalProperties: false;
237
+ readonly required: readonly ["kind", "generator"];
238
+ readonly properties: {
239
+ readonly kind: {
240
+ readonly const: "generated";
241
+ };
242
+ readonly generator: {
243
+ readonly type: "string";
244
+ readonly minLength: 1;
245
+ readonly maxLength: 64;
246
+ readonly description: "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined.";
247
+ };
248
+ readonly perVerifier: {
249
+ readonly type: "boolean";
250
+ readonly default: true;
251
+ readonly description: "When true (the default and the only useful setting), a distinct value is minted for each verifier.";
252
+ };
253
+ };
254
+ }];
255
+ };
256
+ readonly ProofRung: {
257
+ readonly title: "ProofRung";
258
+ readonly description: "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.";
259
+ readonly type: "string";
260
+ readonly enum: readonly ["predicate", "derived", "selectiveDisclosure", "whole"];
261
+ };
262
+ readonly ValueType: {
263
+ readonly title: "ValueType";
264
+ readonly description: "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.";
265
+ readonly type: "string";
266
+ readonly enum: readonly ["string", "number", "boolean", "date", "object"];
267
+ };
268
+ readonly ClaimType: {
269
+ readonly title: "ClaimType";
270
+ readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
271
+ readonly type: "string";
272
+ readonly minLength: 1;
273
+ readonly maxLength: 128;
274
+ readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
275
+ };
276
+ };
277
+ };
278
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
279
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
280
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
281
+ readonly $ref: "#/$defs/Response";
282
+ readonly $defs: {
283
+ readonly Response: {
284
+ readonly $anchor: "response";
285
+ readonly title: "Persona Attribute Put — response payload";
286
+ readonly description: "Success response to persona/attribute/put. Type https://trusttasks.org/spec/persona/attribute/put/1.0#response. A failed precondition is not a success: it is a trust-task-error carrying persona/attribute/put:versionConflict, whose details carry the maintainer's current version and value.";
287
+ readonly type: "object";
288
+ readonly additionalProperties: false;
289
+ readonly required: readonly ["attributeId", "version", "created", "updatedAt"];
290
+ readonly properties: {
291
+ readonly attributeId: {
292
+ readonly $ref: "#/$defs/Ulid";
293
+ };
294
+ readonly version: {
295
+ readonly $ref: "#/$defs/Version";
296
+ };
297
+ readonly created: {
298
+ readonly type: "boolean";
299
+ readonly description: "True when this write created the attribute, false when it replaced one. A producer that omitted `attributeId` can still be told which happened, because a retried create with a supplied id is a replacement.";
300
+ };
301
+ readonly correlation: {
302
+ readonly type: "object";
303
+ readonly additionalProperties: false;
304
+ readonly required: readonly ["severity"];
305
+ readonly description: "Advisory result of the correlation check the maintainer runs over the new value (see persona/correlation/analyze). Returned on the write so a producer's builder can warn at the moment of composition rather than requiring a second round trip. Advisory only: the write has already applied, and a maintainer MUST NOT refuse a write on correlation grounds — the holder decides.";
306
+ readonly properties: {
307
+ readonly severity: {
308
+ readonly type: "string";
309
+ readonly enum: readonly ["none", "low", "high"];
310
+ };
311
+ readonly sharedWithProfileCount: {
312
+ readonly type: "integer";
313
+ readonly minimum: 0;
314
+ readonly description: "How many other profiles already present this exact value. A count, not identifiers — the identifiers are available from the analyze task, which is where a producer should go to render remedies.";
315
+ };
316
+ };
317
+ };
318
+ readonly createdAt: {
319
+ readonly type: "string";
320
+ readonly format: "date-time";
321
+ };
322
+ readonly updatedAt: {
323
+ readonly type: "string";
324
+ readonly format: "date-time";
325
+ };
326
+ readonly ext: {
327
+ readonly $ref: "#/$defs/Ext";
328
+ };
329
+ };
330
+ };
331
+ readonly Ext: {
332
+ readonly title: "Ext";
333
+ 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.";
334
+ readonly type: "object";
335
+ readonly minProperties: 1;
336
+ readonly additionalProperties: true;
337
+ readonly propertyNames: {
338
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
339
+ };
340
+ };
341
+ readonly Version: {
342
+ readonly title: "Version";
343
+ readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
344
+ readonly type: "integer";
345
+ readonly minimum: 1;
346
+ };
347
+ readonly Ulid: {
348
+ readonly title: "Ulid";
349
+ readonly 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.";
350
+ readonly type: "string";
351
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
352
+ };
353
+ readonly ExpectedVersion: {
354
+ readonly title: "ExpectedVersion";
355
+ readonly 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.";
356
+ readonly type: "integer";
357
+ readonly minimum: 0;
358
+ };
359
+ readonly Provenance: {
360
+ readonly title: "Provenance";
361
+ readonly description: "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.";
362
+ readonly type: "object";
363
+ readonly required: readonly ["kind"];
364
+ readonly oneOf: readonly [{
365
+ readonly additionalProperties: false;
366
+ readonly required: readonly ["kind"];
367
+ readonly properties: {
368
+ readonly kind: {
369
+ readonly const: "selfAsserted";
370
+ };
371
+ };
372
+ }, {
373
+ readonly additionalProperties: false;
374
+ readonly required: readonly ["kind", "credentialId", "claimPath"];
375
+ readonly properties: {
376
+ readonly kind: {
377
+ readonly const: "credentialBacked";
378
+ };
379
+ readonly credentialId: {
380
+ readonly type: "string";
381
+ readonly minLength: 1;
382
+ readonly description: "Vault identifier of the backing credential.";
383
+ };
384
+ readonly claimPath: {
385
+ readonly type: "string";
386
+ readonly pattern: "^(/[^/~]*(~[01][^/~]*)*)*$";
387
+ readonly description: "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`.";
388
+ };
389
+ readonly issuerDid: {
390
+ readonly type: "string";
391
+ readonly minLength: 1;
392
+ readonly description: "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member.";
393
+ };
394
+ readonly proof: {
395
+ readonly $ref: "#/$defs/ProofRung";
396
+ readonly description: "The disclosure rung this claim was, or will be, presented at.";
397
+ };
398
+ };
399
+ }, {
400
+ readonly additionalProperties: false;
401
+ readonly required: readonly ["kind", "generator"];
402
+ readonly properties: {
403
+ readonly kind: {
404
+ readonly const: "generated";
405
+ };
406
+ readonly generator: {
407
+ readonly type: "string";
408
+ readonly minLength: 1;
409
+ readonly maxLength: 64;
410
+ readonly description: "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined.";
411
+ };
412
+ readonly perVerifier: {
413
+ readonly type: "boolean";
414
+ readonly default: true;
415
+ readonly description: "When true (the default and the only useful setting), a distinct value is minted for each verifier.";
416
+ };
417
+ };
418
+ }];
419
+ };
420
+ readonly ProofRung: {
421
+ readonly title: "ProofRung";
422
+ readonly description: "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.";
423
+ readonly type: "string";
424
+ readonly enum: readonly ["predicate", "derived", "selectiveDisclosure", "whole"];
425
+ };
426
+ readonly ValueType: {
427
+ readonly title: "ValueType";
428
+ readonly description: "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.";
429
+ readonly type: "string";
430
+ readonly enum: readonly ["string", "number", "boolean", "date", "object"];
431
+ };
432
+ readonly ClaimType: {
433
+ readonly title: "ClaimType";
434
+ readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
435
+ readonly type: "string";
436
+ readonly minLength: 1;
437
+ readonly maxLength: 128;
438
+ readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
439
+ };
440
+ };
441
+ };
442
+ /**
443
+ * SPEC.md §7.2 policy for the request variant, from this specification's
444
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
445
+ * per-specification and cannot be derived from the document alone, and
446
+ * item 2 needs the schema this carries.
447
+ */
448
+ export declare const SPEC: {
449
+ readonly typeUri: "https://trusttasks.org/spec/persona/attribute/put/1.0";
450
+ readonly isBearer: false;
451
+ readonly isProofRequired: true;
452
+ readonly isRecipientRequired: true;
453
+ readonly isIssuedAtRequired: true;
454
+ readonly payloadSchema: {
455
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
456
+ readonly $id: "https://trusttasks.org/spec/persona/attribute/put/1.0";
457
+ readonly title: "Persona Attribute Put — payload";
458
+ readonly description: "Create or replace one attribute in the holder's pool. Omit `attributeId` to create; supply it to replace. `expectedVersion` makes the write conditional.";
459
+ readonly type: "object";
460
+ readonly additionalProperties: false;
461
+ readonly required: readonly ["type", "valueType", "value", "provenance"];
462
+ readonly properties: {
463
+ readonly attributeId: {
464
+ readonly $ref: "#/$defs/Ulid";
465
+ readonly description: "Omit to create — the maintainer assigns one and returns it. Supply to replace an existing attribute, or to make a create idempotent under retry; a supplied id that already exists is a replacement, and a producer that meant to create MUST pair it with `expectedVersion: 0`.";
466
+ };
467
+ readonly type: {
468
+ readonly $ref: "#/$defs/ClaimType";
469
+ };
470
+ readonly valueType: {
471
+ readonly $ref: "#/$defs/ValueType";
472
+ };
473
+ readonly value: {
474
+ readonly description: "The fact itself. MUST agree with `valueType`; a maintainer MUST refuse a document where it does not. For a `credentialBacked` provenance this is the initial display cache — the maintainer re-derives it from the credential and MAY overwrite what was supplied.";
475
+ };
476
+ readonly label: {
477
+ readonly type: "string";
478
+ readonly maxLength: 128;
479
+ readonly description: "The holder's own words, for their own picker. Never disclosed to a verifier.";
480
+ };
481
+ readonly provenance: {
482
+ readonly $ref: "#/$defs/Provenance";
483
+ };
484
+ readonly expectedVersion: {
485
+ readonly $ref: "#/$defs/ExpectedVersion";
486
+ readonly description: "Optional precondition. Omit for last-writer-wins. Supply the version a prior read returned to make the write conditional; supply 0 to create only.";
487
+ };
488
+ readonly ext: {
489
+ readonly $ref: "#/$defs/Ext";
490
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
491
+ };
492
+ };
493
+ readonly $defs: {
494
+ readonly Response: {
495
+ readonly $anchor: "response";
496
+ readonly title: "Persona Attribute Put — response payload";
497
+ readonly description: "Success response to persona/attribute/put. Type https://trusttasks.org/spec/persona/attribute/put/1.0#response. A failed precondition is not a success: it is a trust-task-error carrying persona/attribute/put:versionConflict, whose details carry the maintainer's current version and value.";
498
+ readonly type: "object";
499
+ readonly additionalProperties: false;
500
+ readonly required: readonly ["attributeId", "version", "created", "updatedAt"];
501
+ readonly properties: {
502
+ readonly attributeId: {
503
+ readonly $ref: "#/$defs/Ulid";
504
+ };
505
+ readonly version: {
506
+ readonly $ref: "#/$defs/Version";
507
+ };
508
+ readonly created: {
509
+ readonly type: "boolean";
510
+ readonly description: "True when this write created the attribute, false when it replaced one. A producer that omitted `attributeId` can still be told which happened, because a retried create with a supplied id is a replacement.";
511
+ };
512
+ readonly correlation: {
513
+ readonly type: "object";
514
+ readonly additionalProperties: false;
515
+ readonly required: readonly ["severity"];
516
+ readonly description: "Advisory result of the correlation check the maintainer runs over the new value (see persona/correlation/analyze). Returned on the write so a producer's builder can warn at the moment of composition rather than requiring a second round trip. Advisory only: the write has already applied, and a maintainer MUST NOT refuse a write on correlation grounds — the holder decides.";
517
+ readonly properties: {
518
+ readonly severity: {
519
+ readonly type: "string";
520
+ readonly enum: readonly ["none", "low", "high"];
521
+ };
522
+ readonly sharedWithProfileCount: {
523
+ readonly type: "integer";
524
+ readonly minimum: 0;
525
+ readonly description: "How many other profiles already present this exact value. A count, not identifiers — the identifiers are available from the analyze task, which is where a producer should go to render remedies.";
526
+ };
527
+ };
528
+ };
529
+ readonly createdAt: {
530
+ readonly type: "string";
531
+ readonly format: "date-time";
532
+ };
533
+ readonly updatedAt: {
534
+ readonly type: "string";
535
+ readonly format: "date-time";
536
+ };
537
+ readonly ext: {
538
+ readonly $ref: "#/$defs/Ext";
539
+ };
540
+ };
541
+ };
542
+ readonly Ext: {
543
+ readonly title: "Ext";
544
+ 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.";
545
+ readonly type: "object";
546
+ readonly minProperties: 1;
547
+ readonly additionalProperties: true;
548
+ readonly propertyNames: {
549
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
550
+ };
551
+ };
552
+ readonly Version: {
553
+ readonly title: "Version";
554
+ readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
555
+ readonly type: "integer";
556
+ readonly minimum: 1;
557
+ };
558
+ readonly Ulid: {
559
+ readonly title: "Ulid";
560
+ readonly 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.";
561
+ readonly type: "string";
562
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
563
+ };
564
+ readonly ExpectedVersion: {
565
+ readonly title: "ExpectedVersion";
566
+ readonly 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.";
567
+ readonly type: "integer";
568
+ readonly minimum: 0;
569
+ };
570
+ readonly Provenance: {
571
+ readonly title: "Provenance";
572
+ readonly description: "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.";
573
+ readonly type: "object";
574
+ readonly required: readonly ["kind"];
575
+ readonly oneOf: readonly [{
576
+ readonly additionalProperties: false;
577
+ readonly required: readonly ["kind"];
578
+ readonly properties: {
579
+ readonly kind: {
580
+ readonly const: "selfAsserted";
581
+ };
582
+ };
583
+ }, {
584
+ readonly additionalProperties: false;
585
+ readonly required: readonly ["kind", "credentialId", "claimPath"];
586
+ readonly properties: {
587
+ readonly kind: {
588
+ readonly const: "credentialBacked";
589
+ };
590
+ readonly credentialId: {
591
+ readonly type: "string";
592
+ readonly minLength: 1;
593
+ readonly description: "Vault identifier of the backing credential.";
594
+ };
595
+ readonly claimPath: {
596
+ readonly type: "string";
597
+ readonly pattern: "^(/[^/~]*(~[01][^/~]*)*)*$";
598
+ readonly description: "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`.";
599
+ };
600
+ readonly issuerDid: {
601
+ readonly type: "string";
602
+ readonly minLength: 1;
603
+ readonly description: "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member.";
604
+ };
605
+ readonly proof: {
606
+ readonly $ref: "#/$defs/ProofRung";
607
+ readonly description: "The disclosure rung this claim was, or will be, presented at.";
608
+ };
609
+ };
610
+ }, {
611
+ readonly additionalProperties: false;
612
+ readonly required: readonly ["kind", "generator"];
613
+ readonly properties: {
614
+ readonly kind: {
615
+ readonly const: "generated";
616
+ };
617
+ readonly generator: {
618
+ readonly type: "string";
619
+ readonly minLength: 1;
620
+ readonly maxLength: 64;
621
+ readonly description: "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined.";
622
+ };
623
+ readonly perVerifier: {
624
+ readonly type: "boolean";
625
+ readonly default: true;
626
+ readonly description: "When true (the default and the only useful setting), a distinct value is minted for each verifier.";
627
+ };
628
+ };
629
+ }];
630
+ };
631
+ readonly ProofRung: {
632
+ readonly title: "ProofRung";
633
+ readonly description: "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.";
634
+ readonly type: "string";
635
+ readonly enum: readonly ["predicate", "derived", "selectiveDisclosure", "whole"];
636
+ };
637
+ readonly ValueType: {
638
+ readonly title: "ValueType";
639
+ readonly description: "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.";
640
+ readonly type: "string";
641
+ readonly enum: readonly ["string", "number", "boolean", "date", "object"];
642
+ };
643
+ readonly ClaimType: {
644
+ readonly title: "ClaimType";
645
+ readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
646
+ readonly type: "string";
647
+ readonly minLength: 1;
648
+ readonly maxLength: 128;
649
+ readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
650
+ };
651
+ };
652
+ };
653
+ };
654
+ /**
655
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
656
+ * tracks the *issuer* party's requirement because a response swaps the
657
+ * parties (§7.3 item 5).
658
+ */
659
+ export declare const RESPONSE_SPEC: {
660
+ readonly typeUri: "https://trusttasks.org/spec/persona/attribute/put/1.0#response";
661
+ readonly isBearer: false;
662
+ readonly isProofRequired: true;
663
+ readonly isRecipientRequired: true;
664
+ readonly isIssuedAtRequired: true;
665
+ readonly payloadSchema: {
666
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
667
+ readonly $ref: "#/$defs/Response";
668
+ readonly $defs: {
669
+ readonly Response: {
670
+ readonly $anchor: "response";
671
+ readonly title: "Persona Attribute Put — response payload";
672
+ readonly description: "Success response to persona/attribute/put. Type https://trusttasks.org/spec/persona/attribute/put/1.0#response. A failed precondition is not a success: it is a trust-task-error carrying persona/attribute/put:versionConflict, whose details carry the maintainer's current version and value.";
673
+ readonly type: "object";
674
+ readonly additionalProperties: false;
675
+ readonly required: readonly ["attributeId", "version", "created", "updatedAt"];
676
+ readonly properties: {
677
+ readonly attributeId: {
678
+ readonly $ref: "#/$defs/Ulid";
679
+ };
680
+ readonly version: {
681
+ readonly $ref: "#/$defs/Version";
682
+ };
683
+ readonly created: {
684
+ readonly type: "boolean";
685
+ readonly description: "True when this write created the attribute, false when it replaced one. A producer that omitted `attributeId` can still be told which happened, because a retried create with a supplied id is a replacement.";
686
+ };
687
+ readonly correlation: {
688
+ readonly type: "object";
689
+ readonly additionalProperties: false;
690
+ readonly required: readonly ["severity"];
691
+ readonly description: "Advisory result of the correlation check the maintainer runs over the new value (see persona/correlation/analyze). Returned on the write so a producer's builder can warn at the moment of composition rather than requiring a second round trip. Advisory only: the write has already applied, and a maintainer MUST NOT refuse a write on correlation grounds — the holder decides.";
692
+ readonly properties: {
693
+ readonly severity: {
694
+ readonly type: "string";
695
+ readonly enum: readonly ["none", "low", "high"];
696
+ };
697
+ readonly sharedWithProfileCount: {
698
+ readonly type: "integer";
699
+ readonly minimum: 0;
700
+ readonly description: "How many other profiles already present this exact value. A count, not identifiers — the identifiers are available from the analyze task, which is where a producer should go to render remedies.";
701
+ };
702
+ };
703
+ };
704
+ readonly createdAt: {
705
+ readonly type: "string";
706
+ readonly format: "date-time";
707
+ };
708
+ readonly updatedAt: {
709
+ readonly type: "string";
710
+ readonly format: "date-time";
711
+ };
712
+ readonly ext: {
713
+ readonly $ref: "#/$defs/Ext";
714
+ };
715
+ };
716
+ };
717
+ readonly Ext: {
718
+ readonly title: "Ext";
719
+ 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.";
720
+ readonly type: "object";
721
+ readonly minProperties: 1;
722
+ readonly additionalProperties: true;
723
+ readonly propertyNames: {
724
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
725
+ };
726
+ };
727
+ readonly Version: {
728
+ readonly title: "Version";
729
+ readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
730
+ readonly type: "integer";
731
+ readonly minimum: 1;
732
+ };
733
+ readonly Ulid: {
734
+ readonly title: "Ulid";
735
+ readonly 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.";
736
+ readonly type: "string";
737
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
738
+ };
739
+ readonly ExpectedVersion: {
740
+ readonly title: "ExpectedVersion";
741
+ readonly 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.";
742
+ readonly type: "integer";
743
+ readonly minimum: 0;
744
+ };
745
+ readonly Provenance: {
746
+ readonly title: "Provenance";
747
+ readonly description: "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.";
748
+ readonly type: "object";
749
+ readonly required: readonly ["kind"];
750
+ readonly oneOf: readonly [{
751
+ readonly additionalProperties: false;
752
+ readonly required: readonly ["kind"];
753
+ readonly properties: {
754
+ readonly kind: {
755
+ readonly const: "selfAsserted";
756
+ };
757
+ };
758
+ }, {
759
+ readonly additionalProperties: false;
760
+ readonly required: readonly ["kind", "credentialId", "claimPath"];
761
+ readonly properties: {
762
+ readonly kind: {
763
+ readonly const: "credentialBacked";
764
+ };
765
+ readonly credentialId: {
766
+ readonly type: "string";
767
+ readonly minLength: 1;
768
+ readonly description: "Vault identifier of the backing credential.";
769
+ };
770
+ readonly claimPath: {
771
+ readonly type: "string";
772
+ readonly pattern: "^(/[^/~]*(~[01][^/~]*)*)*$";
773
+ readonly description: "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`.";
774
+ };
775
+ readonly issuerDid: {
776
+ readonly type: "string";
777
+ readonly minLength: 1;
778
+ readonly description: "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member.";
779
+ };
780
+ readonly proof: {
781
+ readonly $ref: "#/$defs/ProofRung";
782
+ readonly description: "The disclosure rung this claim was, or will be, presented at.";
783
+ };
784
+ };
785
+ }, {
786
+ readonly additionalProperties: false;
787
+ readonly required: readonly ["kind", "generator"];
788
+ readonly properties: {
789
+ readonly kind: {
790
+ readonly const: "generated";
791
+ };
792
+ readonly generator: {
793
+ readonly type: "string";
794
+ readonly minLength: 1;
795
+ readonly maxLength: 64;
796
+ readonly description: "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined.";
797
+ };
798
+ readonly perVerifier: {
799
+ readonly type: "boolean";
800
+ readonly default: true;
801
+ readonly description: "When true (the default and the only useful setting), a distinct value is minted for each verifier.";
802
+ };
803
+ };
804
+ }];
805
+ };
806
+ readonly ProofRung: {
807
+ readonly title: "ProofRung";
808
+ readonly description: "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.";
809
+ readonly type: "string";
810
+ readonly enum: readonly ["predicate", "derived", "selectiveDisclosure", "whole"];
811
+ };
812
+ readonly ValueType: {
813
+ readonly title: "ValueType";
814
+ readonly description: "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.";
815
+ readonly type: "string";
816
+ readonly enum: readonly ["string", "number", "boolean", "date", "object"];
817
+ };
818
+ readonly ClaimType: {
819
+ readonly title: "ClaimType";
820
+ readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
821
+ readonly type: "string";
822
+ readonly minLength: 1;
823
+ readonly maxLength: 128;
824
+ readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
825
+ };
826
+ };
827
+ };
828
+ };
829
+ //# sourceMappingURL=payload.d.ts.map