@openvtc/trust-tasks 0.19.21 → 0.20.0

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 (83) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/_shared/components.d.ts +59 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +5 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +5 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/messaging/_shared/0.1/messaging.d.ts +1 -1
  9. package/dist/messaging/_shared/0.1/messaging.d.ts.map +1 -1
  10. package/dist/messaging/account/add/0.1/payload.d.ts +274 -2
  11. package/dist/messaging/account/add/0.1/payload.d.ts.map +1 -1
  12. package/dist/messaging/account/add/0.1/payload.js +136 -0
  13. package/dist/messaging/account/add/0.1/payload.js.map +1 -1
  14. package/dist/messaging/account/change-queue-limits/0.1/payload.d.ts +274 -2
  15. package/dist/messaging/account/change-queue-limits/0.1/payload.d.ts.map +1 -1
  16. package/dist/messaging/account/change-queue-limits/0.1/payload.js +136 -0
  17. package/dist/messaging/account/change-queue-limits/0.1/payload.js.map +1 -1
  18. package/dist/messaging/account/change-type/0.1/payload.d.ts +274 -2
  19. package/dist/messaging/account/change-type/0.1/payload.d.ts.map +1 -1
  20. package/dist/messaging/account/change-type/0.1/payload.js +136 -0
  21. package/dist/messaging/account/change-type/0.1/payload.js.map +1 -1
  22. package/dist/messaging/account/get/0.1/payload.d.ts +286 -2
  23. package/dist/messaging/account/get/0.1/payload.d.ts.map +1 -1
  24. package/dist/messaging/account/get/0.1/payload.js +140 -0
  25. package/dist/messaging/account/get/0.1/payload.js.map +1 -1
  26. package/dist/messaging/account/list/0.1/payload.d.ts +286 -2
  27. package/dist/messaging/account/list/0.1/payload.d.ts.map +1 -1
  28. package/dist/messaging/account/list/0.1/payload.js +140 -0
  29. package/dist/messaging/account/list/0.1/payload.js.map +1 -1
  30. package/dist/messaging/account/update/0.1/payload.d.ts +274 -2
  31. package/dist/messaging/account/update/0.1/payload.d.ts.map +1 -1
  32. package/dist/messaging/account/update/0.1/payload.js +136 -0
  33. package/dist/messaging/account/update/0.1/payload.js.map +1 -1
  34. package/dist/persona/_shared/0.1/persona-record.d.ts +1 -1
  35. package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -1
  36. package/dist/persona/correlation/analyze/1.1/payload.d.ts +730 -0
  37. package/dist/persona/correlation/analyze/1.1/payload.d.ts.map +1 -0
  38. package/dist/persona/correlation/analyze/1.1/payload.js +372 -0
  39. package/dist/persona/correlation/analyze/1.1/payload.js.map +1 -0
  40. package/dist/persona/facet/list/1.0/payload.d.ts +4 -4
  41. package/dist/persona/facet/list/1.0/payload.js +2 -2
  42. package/dist/persona/facet/list/1.0/payload.js.map +1 -1
  43. package/dist/persona/facet/put/1.0/payload.d.ts +4 -4
  44. package/dist/persona/facet/put/1.0/payload.js +2 -2
  45. package/dist/persona/facet/put/1.0/payload.js.map +1 -1
  46. package/dist/persona/local/profile/put/1.0/payload.d.ts +10 -10
  47. package/dist/persona/local/profile/put/1.0/payload.js +4 -4
  48. package/dist/persona/local/profile/put/1.0/payload.js.map +1 -1
  49. package/dist/persona/world/delete/1.0/payload.d.ts +310 -0
  50. package/dist/persona/world/delete/1.0/payload.d.ts.map +1 -0
  51. package/dist/persona/world/delete/1.0/payload.js +169 -0
  52. package/dist/persona/world/delete/1.0/payload.js.map +1 -0
  53. package/dist/persona/world/list/1.0/payload.d.ts +599 -0
  54. package/dist/persona/world/list/1.0/payload.d.ts.map +1 -0
  55. package/dist/persona/world/list/1.0/payload.js +332 -0
  56. package/dist/persona/world/list/1.0/payload.js.map +1 -0
  57. package/dist/persona/world/put/1.0/payload.d.ts +490 -0
  58. package/dist/persona/world/put/1.0/payload.d.ts.map +1 -0
  59. package/dist/persona/world/put/1.0/payload.js +272 -0
  60. package/dist/persona/world/put/1.0/payload.js.map +1 -0
  61. package/dist/vtc/vetting/vetters/show/0.1/payload.d.ts +378 -0
  62. package/dist/vtc/vetting/vetters/show/0.1/payload.d.ts.map +1 -0
  63. package/dist/vtc/vetting/vetters/show/0.1/payload.js +207 -0
  64. package/dist/vtc/vetting/vetters/show/0.1/payload.js.map +1 -0
  65. package/package.json +1 -1
  66. package/src/_shared/components.ts +59 -1
  67. package/src/index.ts +5 -0
  68. package/src/messaging/_shared/0.1/messaging.ts +1 -1
  69. package/src/messaging/account/add/0.1/payload.ts +138 -2
  70. package/src/messaging/account/change-queue-limits/0.1/payload.ts +138 -2
  71. package/src/messaging/account/change-type/0.1/payload.ts +138 -2
  72. package/src/messaging/account/get/0.1/payload.ts +146 -2
  73. package/src/messaging/account/list/0.1/payload.ts +146 -2
  74. package/src/messaging/account/update/0.1/payload.ts +138 -2
  75. package/src/persona/_shared/0.1/persona-record.ts +1 -1
  76. package/src/persona/correlation/analyze/1.1/payload.ts +514 -0
  77. package/src/persona/facet/list/1.0/payload.ts +2 -2
  78. package/src/persona/facet/put/1.0/payload.ts +2 -2
  79. package/src/persona/local/profile/put/1.0/payload.ts +6 -6
  80. package/src/persona/world/delete/1.0/payload.ts +212 -0
  81. package/src/persona/world/list/1.0/payload.ts +402 -0
  82. package/src/persona/world/put/1.0/payload.ts +339 -0
  83. package/src/vtc/vetting/vetters/show/0.1/payload.ts +267 -0
@@ -243,7 +243,7 @@ export type FaceReach =
243
243
  contextIds: [string, ...string[]];
244
244
  };
245
245
  /**
246
- * A colour **name**, resolved by each consumer against its own palette — never a hex value or any other literal. Two reasons, and both are about the consumer rather than the holder. A literal cannot be legible in a terminal, in a light theme and in a dark one at once, so a stored `#8B0000` is a colour that is wrong somewhere and the holder has no way to know where. And a consumer that reserves colours to mean something — an error, a warning, an irreversible act — must be able to keep a holder's decorative choice out of that channel; it cannot do that with an arbitrary value, and it can do it trivially with a closed set it maps itself. The eight members are chosen to be distinguishable from one another and deliberately carry no status connotation: none is named for success, warning or danger.
246
+ * **Superseded by `WorldColour`** — the same set, under the name the rest of the family now uses. Retained because `persona/facet/*` is retired in favour of `persona/world/*`, and a retired specification's schema is frozen, so the definition it references has to stay. New work references `WorldColour`. A colour **name**, resolved by each consumer against its own palette — never a hex value or any other literal. Two reasons, and both are about the consumer rather than the holder. A literal cannot be legible in a terminal, in a light theme and in a dark one at once, so a stored `#8B0000` is a colour that is wrong somewhere and the holder has no way to know where. And a consumer that reserves colours to mean something — an error, a warning, an irreversible act — must be able to keep a holder's decorative choice out of that channel; it cannot do that with an arbitrary value, and it can do it trivially with a closed set it maps itself. The eight members are chosen to be distinguishable from one another and deliberately carry no status connotation: none is named for success, warning or danger.
247
247
  */
248
248
  export type FacetColour = "slate" | "indigo" | "teal" | "moss" | "sand" | "clay" | "rose" | "plum";
249
249
  /**
@@ -831,6 +831,10 @@ export type Visibility = "open" | "attributed" | "private";
831
831
  * The protocol a message travelled in, as the mediator detected it from the wire form. `didcomm` is DIDComm v2 (JWE/JWS); `didcommV1` is a DIDComm v1 envelope; `tsp` is a Trust Spanning Protocol message; `other` is anything the mediator could not classify.
832
832
  */
833
833
  export type WireProtocol = "didcomm" | "didcommV1" | "tsp" | "other";
834
+ /**
835
+ * A colour **name**, resolved by each consumer against its own palette — never a hex value or any other literal. Two reasons, and both are about the consumer rather than the holder. A literal cannot be legible in a terminal, in a light theme and in a dark one at once, so a stored `#8B0000` is a colour that is wrong somewhere and the holder has no way to know where. And a consumer that reserves colours to mean something — an error, a warning, an irreversible act — must be able to keep a holder's decorative choice out of that channel; it cannot do that with an arbitrary value, and it can do it trivially with a closed set it maps itself. The eight members are chosen to be distinguishable from one another and deliberately carry no status connotation: none is named for success, warning or danger.
836
+ */
837
+ export type WorldColour = "slate" | "indigo" | "teal" | "moss" | "sand" | "clay" | "rose" | "plum";
834
838
 
835
839
  /**
836
840
  * The mediator's view of one served account.
@@ -871,6 +875,39 @@ export interface Account {
871
875
  * Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication.
872
876
  */
873
877
  lastAuthenticatedAt?: number;
878
+ /**
879
+ * Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`.
880
+ */
881
+ stats?: AccountStats;
882
+ }
883
+ /**
884
+ * What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.
885
+ */
886
+ export interface AccountStats {
887
+ /**
888
+ * Messages the mediator accepted addressed to this account.
889
+ */
890
+ messagesReceived?: number;
891
+ /**
892
+ * Messages the mediator accepted from this account.
893
+ */
894
+ messagesSent?: number;
895
+ /**
896
+ * Total size of the messages counted by messagesReceived.
897
+ */
898
+ bytesReceived?: number;
899
+ /**
900
+ * Total size of the messages counted by messagesSent.
901
+ */
902
+ bytesSent?: number;
903
+ /**
904
+ * messagesReceived split by the wire protocol the message arrived in.
905
+ */
906
+ receivedByProtocol?: ProtocolCounts;
907
+ /**
908
+ * messagesSent split by the wire protocol the message was sent in.
909
+ */
910
+ sentByProtocol?: ProtocolCounts;
874
911
  }
875
912
  export interface AclChangedEvent_SyncV0_1 {
876
913
  kind: "acl.changed";
@@ -3425,6 +3462,27 @@ export interface Profile {
3425
3462
  createdAt?: string;
3426
3463
  updatedAt: string;
3427
3464
  }
3465
+ /**
3466
+ * Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.
3467
+ */
3468
+ export interface ProtocolCounts {
3469
+ /**
3470
+ * DIDComm v2 (JWE/JWS).
3471
+ */
3472
+ didcomm?: number;
3473
+ /**
3474
+ * A DIDComm v1 envelope.
3475
+ */
3476
+ didcommV1?: number;
3477
+ /**
3478
+ * A Trust Spanning Protocol message.
3479
+ */
3480
+ tsp?: number;
3481
+ /**
3482
+ * Anything the mediator could not classify.
3483
+ */
3484
+ other?: number;
3485
+ }
3428
3486
  /**
3429
3487
  * Server-issued options for `navigator.credentials.create({ publicKey: ... })`. Mirrors the WebAuthn Level 2 `PublicKeyCredentialCreationOptions` dictionary; binary fields are base64url-encoded strings (rather than ArrayBuffers) so the value is JSON-safe over the wire.
3430
3488
  */
package/src/index.ts CHANGED
@@ -198,6 +198,7 @@ export * as PersonaContactGet_v1_0 from "./persona/contact/get/1.0/payload.js";
198
198
  export * as PersonaContactList_v1_0 from "./persona/contact/list/1.0/payload.js";
199
199
  export * as PersonaContactPut_v1_0 from "./persona/contact/put/1.0/payload.js";
200
200
  export * as PersonaCorrelationAnalyze_v1_0 from "./persona/correlation/analyze/1.0/payload.js";
201
+ export * as PersonaCorrelationAnalyze_v1_1 from "./persona/correlation/analyze/1.1/payload.js";
201
202
  export * as PersonaDisclosureHistory_v1_0 from "./persona/disclosure/history/1.0/payload.js";
202
203
  export * as PersonaDisclosurePresent_v1_0 from "./persona/disclosure/present/1.0/payload.js";
203
204
  export * as PersonaDisclosurePreview_v1_0 from "./persona/disclosure/preview/1.0/payload.js";
@@ -219,6 +220,9 @@ export * as PersonaProfileRetire_v1_0 from "./persona/profile/retire/1.0/payload
219
220
  export * as PersonaProfileTimeline_v1_0 from "./persona/profile/timeline/1.0/payload.js";
220
221
  export * as PersonaProfileUsage_v1_0 from "./persona/profile/usage/1.0/payload.js";
221
222
  export * as PersonaRenderersList_v1_0 from "./persona/renderers/list/1.0/payload.js";
223
+ export * as PersonaWorldDelete_v1_0 from "./persona/world/delete/1.0/payload.js";
224
+ export * as PersonaWorldList_v1_0 from "./persona/world/list/1.0/payload.js";
225
+ export * as PersonaWorldPut_v1_0 from "./persona/world/put/1.0/payload.js";
222
226
  export * as PolicyShared_v0_1 from "./policy/_shared/0.1/policy.js";
223
227
  export * as PolicyShared_v0_2 from "./policy/_shared/0.2/policy.js";
224
228
  export * as PolicyShared_v0_3 from "./policy/_shared/0.3/policy.js";
@@ -544,6 +548,7 @@ export * as VtcVettingVettersGrant_v0_1 from "./vtc/vetting/vetters/grant/0.1/pa
544
548
  export * as VtcVettingVettersList_v0_1 from "./vtc/vetting/vetters/list/0.1/payload.js";
545
549
  export * as VtcVettingVettersProfile_v0_1 from "./vtc/vetting/vetters/profile/0.1/payload.js";
546
550
  export * as VtcVettingVettersResend_v0_1 from "./vtc/vetting/vetters/resend/0.1/payload.js";
551
+ export * as VtcVettingVettersShow_v0_1 from "./vtc/vetting/vetters/show/0.1/payload.js";
547
552
  export * as VtcWebsiteFilesDelete_v0_1 from "./vtc/website/files/delete/0.1/payload.js";
548
553
  export * as VtcWebsiteFilesList_v0_1 from "./vtc/website/files/list/0.1/payload.js";
549
554
  export * as VtcWebsiteGenerationsList_v0_1 from "./vtc/website/generations/list/0.1/payload.js";
@@ -14,4 +14,4 @@ export interface MessagingAdministrationSharedDefinitionsForTheMessagingSpecFami
14
14
  * The definitions this shared schema publishes, hoisted to one declaration each.
15
15
  * See "../../../_shared/components.js".
16
16
  */
17
- export type { Account, AccountType, AdminAccount, AuditAction, AuditEntry, MediatorAcl, QueueLimits, Vid } from "../../../_shared/components.js";
17
+ export type { Account, AccountStats, AccountType, AdminAccount, AuditAction, AuditEntry, MediatorAcl, ProtocolCounts, QueueLimits, Vid } from "../../../_shared/components.js";
@@ -3,7 +3,7 @@
3
3
  * Source: specs/messaging/account/add/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid } from "../../../../_shared/components.js";
6
+ import type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid } from "../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  export interface MessagingAddAccountPayload {
@@ -43,7 +43,7 @@ export interface MessagingAddAccountResponsePayload {
43
43
  }
44
44
 
45
45
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
46
- export type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid };
46
+ export type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid };
47
47
 
48
48
  /** Trust Task type URI. */
49
49
  export const TYPE_URI = "https://trusttasks.org/spec/messaging/account/add/0.1" as const;
@@ -187,6 +187,74 @@ export const PAYLOAD_SCHEMA = {
187
187
  "type": "integer",
188
188
  "minimum": 0,
189
189
  "description": "Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication."
190
+ },
191
+ "stats": {
192
+ "$ref": "#/$defs/AccountStats",
193
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
194
+ }
195
+ }
196
+ },
197
+ "AccountStats": {
198
+ "title": "AccountStats",
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "description": "What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.",
202
+ "properties": {
203
+ "messagesReceived": {
204
+ "type": "integer",
205
+ "minimum": 0,
206
+ "description": "Messages the mediator accepted addressed to this account."
207
+ },
208
+ "messagesSent": {
209
+ "type": "integer",
210
+ "minimum": 0,
211
+ "description": "Messages the mediator accepted from this account."
212
+ },
213
+ "bytesReceived": {
214
+ "type": "integer",
215
+ "minimum": 0,
216
+ "description": "Total size of the messages counted by messagesReceived."
217
+ },
218
+ "bytesSent": {
219
+ "type": "integer",
220
+ "minimum": 0,
221
+ "description": "Total size of the messages counted by messagesSent."
222
+ },
223
+ "receivedByProtocol": {
224
+ "$ref": "#/$defs/ProtocolCounts",
225
+ "description": "messagesReceived split by the wire protocol the message arrived in."
226
+ },
227
+ "sentByProtocol": {
228
+ "$ref": "#/$defs/ProtocolCounts",
229
+ "description": "messagesSent split by the wire protocol the message was sent in."
230
+ }
231
+ }
232
+ },
233
+ "ProtocolCounts": {
234
+ "title": "ProtocolCounts",
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "description": "Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.",
238
+ "properties": {
239
+ "didcomm": {
240
+ "type": "integer",
241
+ "minimum": 0,
242
+ "description": "DIDComm v2 (JWE/JWS)."
243
+ },
244
+ "didcommV1": {
245
+ "type": "integer",
246
+ "minimum": 0,
247
+ "description": "A DIDComm v1 envelope."
248
+ },
249
+ "tsp": {
250
+ "type": "integer",
251
+ "minimum": 0,
252
+ "description": "A Trust Spanning Protocol message."
253
+ },
254
+ "other": {
255
+ "type": "integer",
256
+ "minimum": 0,
257
+ "description": "Anything the mediator could not classify."
190
258
  }
191
259
  }
192
260
  },
@@ -389,6 +457,74 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
389
457
  "type": "integer",
390
458
  "minimum": 0,
391
459
  "description": "Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication."
460
+ },
461
+ "stats": {
462
+ "$ref": "#/$defs/AccountStats",
463
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
464
+ }
465
+ }
466
+ },
467
+ "AccountStats": {
468
+ "title": "AccountStats",
469
+ "type": "object",
470
+ "additionalProperties": false,
471
+ "description": "What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.",
472
+ "properties": {
473
+ "messagesReceived": {
474
+ "type": "integer",
475
+ "minimum": 0,
476
+ "description": "Messages the mediator accepted addressed to this account."
477
+ },
478
+ "messagesSent": {
479
+ "type": "integer",
480
+ "minimum": 0,
481
+ "description": "Messages the mediator accepted from this account."
482
+ },
483
+ "bytesReceived": {
484
+ "type": "integer",
485
+ "minimum": 0,
486
+ "description": "Total size of the messages counted by messagesReceived."
487
+ },
488
+ "bytesSent": {
489
+ "type": "integer",
490
+ "minimum": 0,
491
+ "description": "Total size of the messages counted by messagesSent."
492
+ },
493
+ "receivedByProtocol": {
494
+ "$ref": "#/$defs/ProtocolCounts",
495
+ "description": "messagesReceived split by the wire protocol the message arrived in."
496
+ },
497
+ "sentByProtocol": {
498
+ "$ref": "#/$defs/ProtocolCounts",
499
+ "description": "messagesSent split by the wire protocol the message was sent in."
500
+ }
501
+ }
502
+ },
503
+ "ProtocolCounts": {
504
+ "title": "ProtocolCounts",
505
+ "type": "object",
506
+ "additionalProperties": false,
507
+ "description": "Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.",
508
+ "properties": {
509
+ "didcomm": {
510
+ "type": "integer",
511
+ "minimum": 0,
512
+ "description": "DIDComm v2 (JWE/JWS)."
513
+ },
514
+ "didcommV1": {
515
+ "type": "integer",
516
+ "minimum": 0,
517
+ "description": "A DIDComm v1 envelope."
518
+ },
519
+ "tsp": {
520
+ "type": "integer",
521
+ "minimum": 0,
522
+ "description": "A Trust Spanning Protocol message."
523
+ },
524
+ "other": {
525
+ "type": "integer",
526
+ "minimum": 0,
527
+ "description": "Anything the mediator could not classify."
392
528
  }
393
529
  }
394
530
  },
@@ -3,7 +3,7 @@
3
3
  * Source: specs/messaging/account/change-queue-limits/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid } from "../../../../_shared/components.js";
6
+ import type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid } from "../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  export interface MessagingChangeAccountQueueLimitsPayload {
@@ -35,7 +35,7 @@ export interface MessagingChangeAccountQueueLimitsResponsePayload {
35
35
  }
36
36
 
37
37
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
38
- export type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid };
38
+ export type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid };
39
39
 
40
40
  /** Trust Task type URI. */
41
41
  export const TYPE_URI = "https://trusttasks.org/spec/messaging/account/change-queue-limits/0.1" as const;
@@ -171,6 +171,74 @@ export const PAYLOAD_SCHEMA = {
171
171
  "type": "integer",
172
172
  "minimum": 0,
173
173
  "description": "Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication."
174
+ },
175
+ "stats": {
176
+ "$ref": "#/$defs/AccountStats",
177
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
178
+ }
179
+ }
180
+ },
181
+ "AccountStats": {
182
+ "title": "AccountStats",
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "description": "What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.",
186
+ "properties": {
187
+ "messagesReceived": {
188
+ "type": "integer",
189
+ "minimum": 0,
190
+ "description": "Messages the mediator accepted addressed to this account."
191
+ },
192
+ "messagesSent": {
193
+ "type": "integer",
194
+ "minimum": 0,
195
+ "description": "Messages the mediator accepted from this account."
196
+ },
197
+ "bytesReceived": {
198
+ "type": "integer",
199
+ "minimum": 0,
200
+ "description": "Total size of the messages counted by messagesReceived."
201
+ },
202
+ "bytesSent": {
203
+ "type": "integer",
204
+ "minimum": 0,
205
+ "description": "Total size of the messages counted by messagesSent."
206
+ },
207
+ "receivedByProtocol": {
208
+ "$ref": "#/$defs/ProtocolCounts",
209
+ "description": "messagesReceived split by the wire protocol the message arrived in."
210
+ },
211
+ "sentByProtocol": {
212
+ "$ref": "#/$defs/ProtocolCounts",
213
+ "description": "messagesSent split by the wire protocol the message was sent in."
214
+ }
215
+ }
216
+ },
217
+ "ProtocolCounts": {
218
+ "title": "ProtocolCounts",
219
+ "type": "object",
220
+ "additionalProperties": false,
221
+ "description": "Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.",
222
+ "properties": {
223
+ "didcomm": {
224
+ "type": "integer",
225
+ "minimum": 0,
226
+ "description": "DIDComm v2 (JWE/JWS)."
227
+ },
228
+ "didcommV1": {
229
+ "type": "integer",
230
+ "minimum": 0,
231
+ "description": "A DIDComm v1 envelope."
232
+ },
233
+ "tsp": {
234
+ "type": "integer",
235
+ "minimum": 0,
236
+ "description": "A Trust Spanning Protocol message."
237
+ },
238
+ "other": {
239
+ "type": "integer",
240
+ "minimum": 0,
241
+ "description": "Anything the mediator could not classify."
174
242
  }
175
243
  }
176
244
  },
@@ -373,6 +441,74 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
373
441
  "type": "integer",
374
442
  "minimum": 0,
375
443
  "description": "Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication."
444
+ },
445
+ "stats": {
446
+ "$ref": "#/$defs/AccountStats",
447
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
448
+ }
449
+ }
450
+ },
451
+ "AccountStats": {
452
+ "title": "AccountStats",
453
+ "type": "object",
454
+ "additionalProperties": false,
455
+ "description": "What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.",
456
+ "properties": {
457
+ "messagesReceived": {
458
+ "type": "integer",
459
+ "minimum": 0,
460
+ "description": "Messages the mediator accepted addressed to this account."
461
+ },
462
+ "messagesSent": {
463
+ "type": "integer",
464
+ "minimum": 0,
465
+ "description": "Messages the mediator accepted from this account."
466
+ },
467
+ "bytesReceived": {
468
+ "type": "integer",
469
+ "minimum": 0,
470
+ "description": "Total size of the messages counted by messagesReceived."
471
+ },
472
+ "bytesSent": {
473
+ "type": "integer",
474
+ "minimum": 0,
475
+ "description": "Total size of the messages counted by messagesSent."
476
+ },
477
+ "receivedByProtocol": {
478
+ "$ref": "#/$defs/ProtocolCounts",
479
+ "description": "messagesReceived split by the wire protocol the message arrived in."
480
+ },
481
+ "sentByProtocol": {
482
+ "$ref": "#/$defs/ProtocolCounts",
483
+ "description": "messagesSent split by the wire protocol the message was sent in."
484
+ }
485
+ }
486
+ },
487
+ "ProtocolCounts": {
488
+ "title": "ProtocolCounts",
489
+ "type": "object",
490
+ "additionalProperties": false,
491
+ "description": "Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.",
492
+ "properties": {
493
+ "didcomm": {
494
+ "type": "integer",
495
+ "minimum": 0,
496
+ "description": "DIDComm v2 (JWE/JWS)."
497
+ },
498
+ "didcommV1": {
499
+ "type": "integer",
500
+ "minimum": 0,
501
+ "description": "A DIDComm v1 envelope."
502
+ },
503
+ "tsp": {
504
+ "type": "integer",
505
+ "minimum": 0,
506
+ "description": "A Trust Spanning Protocol message."
507
+ },
508
+ "other": {
509
+ "type": "integer",
510
+ "minimum": 0,
511
+ "description": "Anything the mediator could not classify."
376
512
  }
377
513
  }
378
514
  },
@@ -3,7 +3,7 @@
3
3
  * Source: specs/messaging/account/change-type/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid } from "../../../../_shared/components.js";
6
+ import type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid } from "../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  export interface MessagingChangeAccountTypePayload {
@@ -35,7 +35,7 @@ export interface MessagingChangeAccountTypeResponsePayload {
35
35
  }
36
36
 
37
37
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
38
- export type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid };
38
+ export type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid };
39
39
 
40
40
  /** Trust Task type URI. */
41
41
  export const TYPE_URI = "https://trusttasks.org/spec/messaging/account/change-type/0.1" as const;
@@ -171,6 +171,74 @@ export const PAYLOAD_SCHEMA = {
171
171
  "type": "integer",
172
172
  "minimum": 0,
173
173
  "description": "Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication."
174
+ },
175
+ "stats": {
176
+ "$ref": "#/$defs/AccountStats",
177
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
178
+ }
179
+ }
180
+ },
181
+ "AccountStats": {
182
+ "title": "AccountStats",
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "description": "What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.",
186
+ "properties": {
187
+ "messagesReceived": {
188
+ "type": "integer",
189
+ "minimum": 0,
190
+ "description": "Messages the mediator accepted addressed to this account."
191
+ },
192
+ "messagesSent": {
193
+ "type": "integer",
194
+ "minimum": 0,
195
+ "description": "Messages the mediator accepted from this account."
196
+ },
197
+ "bytesReceived": {
198
+ "type": "integer",
199
+ "minimum": 0,
200
+ "description": "Total size of the messages counted by messagesReceived."
201
+ },
202
+ "bytesSent": {
203
+ "type": "integer",
204
+ "minimum": 0,
205
+ "description": "Total size of the messages counted by messagesSent."
206
+ },
207
+ "receivedByProtocol": {
208
+ "$ref": "#/$defs/ProtocolCounts",
209
+ "description": "messagesReceived split by the wire protocol the message arrived in."
210
+ },
211
+ "sentByProtocol": {
212
+ "$ref": "#/$defs/ProtocolCounts",
213
+ "description": "messagesSent split by the wire protocol the message was sent in."
214
+ }
215
+ }
216
+ },
217
+ "ProtocolCounts": {
218
+ "title": "ProtocolCounts",
219
+ "type": "object",
220
+ "additionalProperties": false,
221
+ "description": "Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.",
222
+ "properties": {
223
+ "didcomm": {
224
+ "type": "integer",
225
+ "minimum": 0,
226
+ "description": "DIDComm v2 (JWE/JWS)."
227
+ },
228
+ "didcommV1": {
229
+ "type": "integer",
230
+ "minimum": 0,
231
+ "description": "A DIDComm v1 envelope."
232
+ },
233
+ "tsp": {
234
+ "type": "integer",
235
+ "minimum": 0,
236
+ "description": "A Trust Spanning Protocol message."
237
+ },
238
+ "other": {
239
+ "type": "integer",
240
+ "minimum": 0,
241
+ "description": "Anything the mediator could not classify."
174
242
  }
175
243
  }
176
244
  },
@@ -373,6 +441,74 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
373
441
  "type": "integer",
374
442
  "minimum": 0,
375
443
  "description": "Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication."
444
+ },
445
+ "stats": {
446
+ "$ref": "#/$defs/AccountStats",
447
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
448
+ }
449
+ }
450
+ },
451
+ "AccountStats": {
452
+ "title": "AccountStats",
453
+ "type": "object",
454
+ "additionalProperties": false,
455
+ "description": "What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.",
456
+ "properties": {
457
+ "messagesReceived": {
458
+ "type": "integer",
459
+ "minimum": 0,
460
+ "description": "Messages the mediator accepted addressed to this account."
461
+ },
462
+ "messagesSent": {
463
+ "type": "integer",
464
+ "minimum": 0,
465
+ "description": "Messages the mediator accepted from this account."
466
+ },
467
+ "bytesReceived": {
468
+ "type": "integer",
469
+ "minimum": 0,
470
+ "description": "Total size of the messages counted by messagesReceived."
471
+ },
472
+ "bytesSent": {
473
+ "type": "integer",
474
+ "minimum": 0,
475
+ "description": "Total size of the messages counted by messagesSent."
476
+ },
477
+ "receivedByProtocol": {
478
+ "$ref": "#/$defs/ProtocolCounts",
479
+ "description": "messagesReceived split by the wire protocol the message arrived in."
480
+ },
481
+ "sentByProtocol": {
482
+ "$ref": "#/$defs/ProtocolCounts",
483
+ "description": "messagesSent split by the wire protocol the message was sent in."
484
+ }
485
+ }
486
+ },
487
+ "ProtocolCounts": {
488
+ "title": "ProtocolCounts",
489
+ "type": "object",
490
+ "additionalProperties": false,
491
+ "description": "Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.",
492
+ "properties": {
493
+ "didcomm": {
494
+ "type": "integer",
495
+ "minimum": 0,
496
+ "description": "DIDComm v2 (JWE/JWS)."
497
+ },
498
+ "didcommV1": {
499
+ "type": "integer",
500
+ "minimum": 0,
501
+ "description": "A DIDComm v1 envelope."
502
+ },
503
+ "tsp": {
504
+ "type": "integer",
505
+ "minimum": 0,
506
+ "description": "A Trust Spanning Protocol message."
507
+ },
508
+ "other": {
509
+ "type": "integer",
510
+ "minimum": 0,
511
+ "description": "Anything the mediator could not classify."
376
512
  }
377
513
  }
378
514
  },