@openvtc/trust-tasks 0.12.3 → 0.12.5

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 (31) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/vtc/community/profile/show/0.1/payload.d.ts +24 -0
  6. package/dist/vtc/community/profile/show/0.1/payload.d.ts.map +1 -1
  7. package/dist/vtc/community/profile/show/0.1/payload.js +16 -0
  8. package/dist/vtc/community/profile/show/0.1/payload.js.map +1 -1
  9. package/dist/vtc/community/profile/update/0.1/payload.d.ts +70 -0
  10. package/dist/vtc/community/profile/update/0.1/payload.d.ts.map +1 -1
  11. package/dist/vtc/community/profile/update/0.1/payload.js +38 -0
  12. package/dist/vtc/community/profile/update/0.1/payload.js.map +1 -1
  13. package/dist/vtc/config/export/0.1/payload.d.ts +24 -0
  14. package/dist/vtc/config/export/0.1/payload.d.ts.map +1 -1
  15. package/dist/vtc/config/export/0.1/payload.js +16 -0
  16. package/dist/vtc/config/export/0.1/payload.js.map +1 -1
  17. package/dist/vtc/config/import/0.1/payload.d.ts +24 -0
  18. package/dist/vtc/config/import/0.1/payload.d.ts.map +1 -1
  19. package/dist/vtc/config/import/0.1/payload.js +16 -0
  20. package/dist/vtc/config/import/0.1/payload.js.map +1 -1
  21. package/dist/vtc/members/removal-notice/0.1/payload.d.ts +178 -0
  22. package/dist/vtc/members/removal-notice/0.1/payload.d.ts.map +1 -0
  23. package/dist/vtc/members/removal-notice/0.1/payload.js +98 -0
  24. package/dist/vtc/members/removal-notice/0.1/payload.js.map +1 -0
  25. package/package.json +1 -1
  26. package/src/index.ts +1 -0
  27. package/src/vtc/community/profile/show/0.1/payload.ts +20 -0
  28. package/src/vtc/community/profile/update/0.1/payload.ts +50 -0
  29. package/src/vtc/config/export/0.1/payload.ts +20 -0
  30. package/src/vtc/config/import/0.1/payload.ts +20 -0
  31. package/src/vtc/members/removal-notice/0.1/payload.ts +140 -0
@@ -10,6 +10,10 @@ export interface VTCCommunityProfileUpdatePayload {
10
10
  publicUrl?: string | null;
11
11
  contactEmail?: string | null;
12
12
  language?: string;
13
+ /**
14
+ * Set the community's declared relationship-identifier default. See `CommunityProfile.relationshipIdentifierDefault` in the `vtc/_shared/0.1/community` schema. Omit to leave it unchanged.
15
+ */
16
+ relationshipIdentifierDefault?: "attributed" | "pairwise";
13
17
  /**
14
18
  * Opaque community-defined extension bag (maintainer-capped).
15
19
  */
@@ -24,6 +28,10 @@ export interface Ext {
24
28
  }
25
29
  export interface VTCCommunityProfileUpdateResponsePayload {
26
30
  profile: CommunityProfile;
31
+ /**
32
+ * Names of the profile members this update actually changed, in the wire spelling. Empty when the submitted values all matched what was already stored. Lets a caller distinguish a no-op from an applied change without diffing the returned profile against the one it sent.
33
+ */
34
+ fieldsChanged?: string[];
27
35
  ext?: Ext;
28
36
  }
29
37
  export interface CommunityProfile {
@@ -33,6 +41,10 @@ export interface CommunityProfile {
33
41
  publicUrl?: string | null;
34
42
  contactEmail?: string | null;
35
43
  language: string;
44
+ /**
45
+ * Which identifier form the community expects members to issue relationship credentials under. `attributed` means the member's membership DID, so an edge names them; `pairwise` means a relationship DID unique to each counterparty. A declaration, not an enforcement: the member still chooses per relationship, and a community that wants to require one form does so in its own policy. Absent means the community has not declared one; implementations default to `pairwise`, matching the DTG Credentials recommendation.
46
+ */
47
+ relationshipIdentifierDefault?: "attributed" | "pairwise";
36
48
  /**
37
49
  * Opaque community-defined extension bag.
38
50
  */
@@ -100,6 +112,14 @@ export const PAYLOAD_SCHEMA = {
100
112
  "type": "string",
101
113
  "minLength": 1
102
114
  },
115
+ "relationshipIdentifierDefault": {
116
+ "type": "string",
117
+ "enum": [
118
+ "attributed",
119
+ "pairwise"
120
+ ],
121
+ "description": "Set the community's declared relationship-identifier default. See `CommunityProfile.relationshipIdentifierDefault` in the `vtc/_shared/0.1/community` schema. Omit to leave it unchanged."
122
+ },
103
123
  "extensions": {
104
124
  "type": "object",
105
125
  "description": "Opaque community-defined extension bag (maintainer-capped)."
@@ -121,6 +141,13 @@ export const PAYLOAD_SCHEMA = {
121
141
  "profile": {
122
142
  "$ref": "#/$defs/CommunityProfile"
123
143
  },
144
+ "fieldsChanged": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "string"
148
+ },
149
+ "description": "Names of the profile members this update actually changed, in the wire spelling. Empty when the submitted values all matched what was already stored. Lets a caller distinguish a no-op from an applied change without diffing the returned profile against the one it sent."
150
+ },
124
151
  "ext": {
125
152
  "$ref": "#/$defs/Ext"
126
153
  }
@@ -175,6 +202,14 @@ export const PAYLOAD_SCHEMA = {
175
202
  "type": "string",
176
203
  "minLength": 1
177
204
  },
205
+ "relationshipIdentifierDefault": {
206
+ "type": "string",
207
+ "enum": [
208
+ "attributed",
209
+ "pairwise"
210
+ ],
211
+ "description": "Which identifier form the community expects members to issue relationship credentials under. `attributed` means the member's membership DID, so an edge names them; `pairwise` means a relationship DID unique to each counterparty. A declaration, not an enforcement: the member still chooses per relationship, and a community that wants to require one form does so in its own policy. Absent means the community has not declared one; implementations default to `pairwise`, matching the DTG Credentials recommendation."
212
+ },
178
213
  "extensions": {
179
214
  "type": "object",
180
215
  "description": "Opaque community-defined extension bag."
@@ -209,6 +244,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
209
244
  "profile": {
210
245
  "$ref": "#/$defs/CommunityProfile"
211
246
  },
247
+ "fieldsChanged": {
248
+ "type": "array",
249
+ "items": {
250
+ "type": "string"
251
+ },
252
+ "description": "Names of the profile members this update actually changed, in the wire spelling. Empty when the submitted values all matched what was already stored. Lets a caller distinguish a no-op from an applied change without diffing the returned profile against the one it sent."
253
+ },
212
254
  "ext": {
213
255
  "$ref": "#/$defs/Ext"
214
256
  }
@@ -263,6 +305,14 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
263
305
  "type": "string",
264
306
  "minLength": 1
265
307
  },
308
+ "relationshipIdentifierDefault": {
309
+ "type": "string",
310
+ "enum": [
311
+ "attributed",
312
+ "pairwise"
313
+ ],
314
+ "description": "Which identifier form the community expects members to issue relationship credentials under. `attributed` means the member's membership DID, so an edge names them; `pairwise` means a relationship DID unique to each counterparty. A declaration, not an enforcement: the member still chooses per relationship, and a community that wants to require one form does so in its own policy. Absent means the community has not declared one; implementations default to `pairwise`, matching the DTG Credentials recommendation."
315
+ },
266
316
  "extensions": {
267
317
  "type": "object",
268
318
  "description": "Opaque community-defined extension bag."
@@ -57,6 +57,10 @@ export interface CommunityProfileSnapshot {
57
57
  * BCP 47 language tag.
58
58
  */
59
59
  language: string;
60
+ /**
61
+ * The community's declared relationship-identifier default, as defined on `CommunityProfile` in the `vtc/_shared/0.1/community` schema. Carried in a config export so a restore reproduces the declaration rather than silently reverting it to the implementation default.
62
+ */
63
+ relationshipIdentifierDefault?: "attributed" | "pairwise";
60
64
  /**
61
65
  * Opaque community-defined extension bag.
62
66
  */
@@ -212,6 +216,14 @@ export const PAYLOAD_SCHEMA = {
212
216
  "minLength": 1,
213
217
  "description": "BCP 47 language tag."
214
218
  },
219
+ "relationshipIdentifierDefault": {
220
+ "type": "string",
221
+ "enum": [
222
+ "attributed",
223
+ "pairwise"
224
+ ],
225
+ "description": "The community's declared relationship-identifier default, as defined on `CommunityProfile` in the `vtc/_shared/0.1/community` schema. Carried in a config export so a restore reproduces the declaration rather than silently reverting it to the implementation default."
226
+ },
215
227
  "extensions": {
216
228
  "type": "object",
217
229
  "description": "Opaque community-defined extension bag."
@@ -342,6 +354,14 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
342
354
  "minLength": 1,
343
355
  "description": "BCP 47 language tag."
344
356
  },
357
+ "relationshipIdentifierDefault": {
358
+ "type": "string",
359
+ "enum": [
360
+ "attributed",
361
+ "pairwise"
362
+ ],
363
+ "description": "The community's declared relationship-identifier default, as defined on `CommunityProfile` in the `vtc/_shared/0.1/community` schema. Carried in a config export so a restore reproduces the declaration rather than silently reverting it to the implementation default."
364
+ },
345
365
  "extensions": {
346
366
  "type": "object",
347
367
  "description": "Opaque community-defined extension bag."
@@ -52,6 +52,10 @@ export interface CommunityProfileSnapshot {
52
52
  * BCP 47 language tag.
53
53
  */
54
54
  language: string;
55
+ /**
56
+ * The community's declared relationship-identifier default, as defined on `CommunityProfile` in the `vtc/_shared/0.1/community` schema. Carried in a config export so a restore reproduces the declaration rather than silently reverting it to the implementation default.
57
+ */
58
+ relationshipIdentifierDefault?: "attributed" | "pairwise";
55
59
  /**
56
60
  * Opaque community-defined extension bag.
57
61
  */
@@ -363,6 +367,14 @@ export const PAYLOAD_SCHEMA = {
363
367
  "minLength": 1,
364
368
  "description": "BCP 47 language tag."
365
369
  },
370
+ "relationshipIdentifierDefault": {
371
+ "type": "string",
372
+ "enum": [
373
+ "attributed",
374
+ "pairwise"
375
+ ],
376
+ "description": "The community's declared relationship-identifier default, as defined on `CommunityProfile` in the `vtc/_shared/0.1/community` schema. Carried in a config export so a restore reproduces the declaration rather than silently reverting it to the implementation default."
377
+ },
366
378
  "extensions": {
367
379
  "type": "object",
368
380
  "description": "Opaque community-defined extension bag."
@@ -575,6 +587,14 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
575
587
  "minLength": 1,
576
588
  "description": "BCP 47 language tag."
577
589
  },
590
+ "relationshipIdentifierDefault": {
591
+ "type": "string",
592
+ "enum": [
593
+ "attributed",
594
+ "pairwise"
595
+ ],
596
+ "description": "The community's declared relationship-identifier default, as defined on `CommunityProfile` in the `vtc/_shared/0.1/community` schema. Carried in a config export so a restore reproduces the declaration rather than silently reverting it to the implementation default."
597
+ },
578
598
  "extensions": {
579
599
  "type": "object",
580
600
  "description": "Opaque community-defined extension bag."
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/members/removal-notice/0.1/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * A community tells a member it removed them, on whose authority, when, and why. Unsolicited: unlike vtc/members/self-remove-receipt this answers no request from the member, because the member did not ask.
8
+ */
9
+ export interface VTCMembersRemovalNoticePayload {
10
+ /**
11
+ * The removed member's DID — the notice's recipient. Carried in the payload as well as the envelope so that a forwarded notice, detached from its transport, still names its subject.
12
+ */
13
+ did: string;
14
+ /**
15
+ * Which removal happened. `adminRemoved` is a policy-governed removal by an administrator; `purged` is a forceful super-administrator deletion that skips the removal policy. The two differ in what recourse a member has, which is why they are distinguishable rather than a single `removed`.
16
+ */
17
+ code: "adminRemoved" | "purged";
18
+ /**
19
+ * How the member's published record was handled. Always concrete — a community resolves any `policydefault` preference before sending, since a notice naming an unresolved default tells the member nothing about their own record.
20
+ */
21
+ disposition: "purge" | "tombstone" | "historical";
22
+ /**
23
+ * The operator's stated reason, verbatim. OPTIONAL because a community may remove without giving one — but omitting it and sending an empty string are different claims, and a community that has a reason SHOULD send it. This is the member's only account of why.
24
+ */
25
+ reason?: string;
26
+ /**
27
+ * When the removal took effect. Distinct from the notice's own `issuedAt`, which may be much later if the member was offline — and it is the decision, not the delivery, that a member or a third party needs to place in time.
28
+ */
29
+ decidedAt: string;
30
+ /**
31
+ * DID of the administrator who decided. Names the deciding authority rather than the community, because 'the community removed me' is not answerable and 'this administrator removed me' is. The community itself is the document's `issuer`.
32
+ */
33
+ decidedBy: string;
34
+ ext?: Ext;
35
+ }
36
+ /**
37
+ * 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.
38
+ */
39
+ export interface Ext {
40
+ [k: string]: unknown | undefined;
41
+ }
42
+
43
+ /** Trust Task type URI. */
44
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/members/removal-notice/0.1" as const;
45
+
46
+ /** Stable alias for this specification's request payload shape. */
47
+ export type Payload = VTCMembersRemovalNoticePayload;
48
+
49
+ /**
50
+ * This specification's payload schema, as a value.
51
+ *
52
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
53
+ * rather than only as a `.json` file because TypeScript types are erased
54
+ * at runtime: without a schema a consumer has nothing to validate, and
55
+ * every REQUIRED payload member is optional in practice. Cross-file
56
+ * `$ref`s are already inlined, so it needs no resolver.
57
+ */
58
+ export const PAYLOAD_SCHEMA = {
59
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
60
+ "$id": "https://trusttasks.org/spec/vtc/members/removal-notice/0.1",
61
+ "title": "VTC Members Removal Notice — payload",
62
+ "description": "A community tells a member it removed them, on whose authority, when, and why. Unsolicited: unlike vtc/members/self-remove-receipt this answers no request from the member, because the member did not ask.",
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "did",
67
+ "code",
68
+ "disposition",
69
+ "decidedAt",
70
+ "decidedBy"
71
+ ],
72
+ "properties": {
73
+ "did": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "description": "The removed member's DID — the notice's recipient. Carried in the payload as well as the envelope so that a forwarded notice, detached from its transport, still names its subject."
77
+ },
78
+ "code": {
79
+ "type": "string",
80
+ "enum": [
81
+ "adminRemoved",
82
+ "purged"
83
+ ],
84
+ "description": "Which removal happened. `adminRemoved` is a policy-governed removal by an administrator; `purged` is a forceful super-administrator deletion that skips the removal policy. The two differ in what recourse a member has, which is why they are distinguishable rather than a single `removed`."
85
+ },
86
+ "disposition": {
87
+ "type": "string",
88
+ "enum": [
89
+ "purge",
90
+ "tombstone",
91
+ "historical"
92
+ ],
93
+ "description": "How the member's published record was handled. Always concrete — a community resolves any `policydefault` preference before sending, since a notice naming an unresolved default tells the member nothing about their own record."
94
+ },
95
+ "reason": {
96
+ "type": "string",
97
+ "maxLength": 1024,
98
+ "description": "The operator's stated reason, verbatim. OPTIONAL because a community may remove without giving one — but omitting it and sending an empty string are different claims, and a community that has a reason SHOULD send it. This is the member's only account of why."
99
+ },
100
+ "decidedAt": {
101
+ "type": "string",
102
+ "format": "date-time",
103
+ "description": "When the removal took effect. Distinct from the notice's own `issuedAt`, which may be much later if the member was offline — and it is the decision, not the delivery, that a member or a third party needs to place in time."
104
+ },
105
+ "decidedBy": {
106
+ "type": "string",
107
+ "minLength": 1,
108
+ "description": "DID of the administrator who decided. Names the deciding authority rather than the community, because 'the community removed me' is not answerable and 'this administrator removed me' is. The community itself is the document's `issuer`."
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext"
112
+ }
113
+ },
114
+ "$defs": {
115
+ "Ext": {
116
+ "title": "Ext",
117
+ "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.",
118
+ "type": "object",
119
+ "minProperties": 1,
120
+ "additionalProperties": true,
121
+ "propertyNames": {
122
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
123
+ }
124
+ }
125
+ }
126
+ } as const;
127
+
128
+ /**
129
+ * SPEC.md §7.2 policy for the request variant, from this specification's
130
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
131
+ * per-specification and cannot be derived from the document alone, and
132
+ * item 2 needs the schema this carries.
133
+ */
134
+ export const SPEC = {
135
+ typeUri: TYPE_URI,
136
+ isBearer: false,
137
+ isProofRequired: true,
138
+ isRecipientRequired: true,
139
+ payloadSchema: PAYLOAD_SCHEMA,
140
+ } as const;