@openvtc/trust-tasks 0.19.20 → 0.19.22

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 (58) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/_framework/0.4/framework.d.ts +18 -0
  3. package/dist/_framework/0.4/framework.d.ts.map +1 -0
  4. package/dist/_framework/0.4/framework.js +6 -0
  5. package/dist/_framework/0.4/framework.js.map +1 -0
  6. package/dist/_shared/components.d.ts +72 -0
  7. package/dist/_shared/components.d.ts.map +1 -1
  8. package/dist/index.d.ts +2 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/messaging/_shared/0.1/messaging.d.ts +1 -1
  13. package/dist/messaging/_shared/0.1/messaging.d.ts.map +1 -1
  14. package/dist/messaging/account/add/0.1/payload.d.ts +314 -2
  15. package/dist/messaging/account/add/0.1/payload.d.ts.map +1 -1
  16. package/dist/messaging/account/add/0.1/payload.js +156 -0
  17. package/dist/messaging/account/add/0.1/payload.js.map +1 -1
  18. package/dist/messaging/account/change-queue-limits/0.1/payload.d.ts +314 -2
  19. package/dist/messaging/account/change-queue-limits/0.1/payload.d.ts.map +1 -1
  20. package/dist/messaging/account/change-queue-limits/0.1/payload.js +156 -0
  21. package/dist/messaging/account/change-queue-limits/0.1/payload.js.map +1 -1
  22. package/dist/messaging/account/change-type/0.1/payload.d.ts +314 -2
  23. package/dist/messaging/account/change-type/0.1/payload.d.ts.map +1 -1
  24. package/dist/messaging/account/change-type/0.1/payload.js +156 -0
  25. package/dist/messaging/account/change-type/0.1/payload.js.map +1 -1
  26. package/dist/messaging/account/get/0.1/payload.d.ts +338 -2
  27. package/dist/messaging/account/get/0.1/payload.d.ts.map +1 -1
  28. package/dist/messaging/account/get/0.1/payload.js +164 -0
  29. package/dist/messaging/account/get/0.1/payload.js.map +1 -1
  30. package/dist/messaging/account/list/0.1/payload.d.ts +338 -2
  31. package/dist/messaging/account/list/0.1/payload.d.ts.map +1 -1
  32. package/dist/messaging/account/list/0.1/payload.js +164 -0
  33. package/dist/messaging/account/list/0.1/payload.js.map +1 -1
  34. package/dist/messaging/account/update/0.1/payload.d.ts +314 -2
  35. package/dist/messaging/account/update/0.1/payload.d.ts.map +1 -1
  36. package/dist/messaging/account/update/0.1/payload.js +156 -0
  37. package/dist/messaging/account/update/0.1/payload.js.map +1 -1
  38. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts +96 -2
  39. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts.map +1 -1
  40. package/dist/vtc/join-requests/manifest/0.2/payload.js +48 -0
  41. package/dist/vtc/join-requests/manifest/0.2/payload.js.map +1 -1
  42. package/dist/vtc/vetting/vetters/show/0.1/payload.d.ts +378 -0
  43. package/dist/vtc/vetting/vetters/show/0.1/payload.d.ts.map +1 -0
  44. package/dist/vtc/vetting/vetters/show/0.1/payload.js +207 -0
  45. package/dist/vtc/vetting/vetters/show/0.1/payload.js.map +1 -0
  46. package/package.json +1 -1
  47. package/src/_framework/0.4/framework.ts +19 -0
  48. package/src/_shared/components.ts +72 -0
  49. package/src/index.ts +2 -0
  50. package/src/messaging/_shared/0.1/messaging.ts +1 -1
  51. package/src/messaging/account/add/0.1/payload.ts +158 -2
  52. package/src/messaging/account/change-queue-limits/0.1/payload.ts +158 -2
  53. package/src/messaging/account/change-type/0.1/payload.ts +158 -2
  54. package/src/messaging/account/get/0.1/payload.ts +174 -2
  55. package/src/messaging/account/list/0.1/payload.ts +174 -2
  56. package/src/messaging/account/update/0.1/payload.ts +158 -2
  57. package/src/vtc/join-requests/manifest/0.2/payload.ts +64 -2
  58. package/src/vtc/vetting/vetters/show/0.1/payload.ts +267 -0
@@ -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;
@@ -161,6 +161,84 @@ export const PAYLOAD_SCHEMA = {
161
161
  "type": "integer",
162
162
  "minimum": 0,
163
163
  "description": "Number of entries in the account's access list."
164
+ },
165
+ "lastReceivedAt": {
166
+ "type": "integer",
167
+ "minimum": 0,
168
+ "description": "Unix epoch seconds at which the mediator last accepted a message addressed to this account. Present only when the request set `includeActivity` and the mediator has recorded such a message; MAY lag the true time by up to 60 seconds."
169
+ },
170
+ "lastAuthenticatedAt": {
171
+ "type": "integer",
172
+ "minimum": 0,
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."
164
242
  }
165
243
  }
166
244
  },
@@ -353,6 +431,84 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
353
431
  "type": "integer",
354
432
  "minimum": 0,
355
433
  "description": "Number of entries in the account's access list."
434
+ },
435
+ "lastReceivedAt": {
436
+ "type": "integer",
437
+ "minimum": 0,
438
+ "description": "Unix epoch seconds at which the mediator last accepted a message addressed to this account. Present only when the request set `includeActivity` and the mediator has recorded such a message; MAY lag the true time by up to 60 seconds."
439
+ },
440
+ "lastAuthenticatedAt": {
441
+ "type": "integer",
442
+ "minimum": 0,
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."
356
512
  }
357
513
  }
358
514
  },
@@ -3,7 +3,7 @@
3
3
  * Source: specs/messaging/account/get/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 MessagingGetAccountPayload {
@@ -11,6 +11,14 @@ export interface MessagingGetAccountPayload {
11
11
  * The DID of the account to fetch.
12
12
  */
13
13
  did: Vid;
14
+ /**
15
+ * When true, the mediator includes each returned account's `lastReceivedAt` and `lastAuthenticatedAt`, where recorded. Omitted or false = neither is returned.
16
+ */
17
+ includeActivity?: boolean;
18
+ /**
19
+ * When true, the mediator includes each returned account's `stats` — its lifetime counters — where it keeps them. Omitted or false = no stats are returned.
20
+ */
21
+ includeStats?: boolean;
14
22
  /**
15
23
  * Ecosystem-defined extension members per SPEC.md §4.5.1.
16
24
  */
@@ -31,7 +39,7 @@ export interface MessagingGetAccountResponsePayload {
31
39
  }
32
40
 
33
41
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
34
- export type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid };
42
+ export type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid };
35
43
 
36
44
  /** Trust Task type URI. */
37
45
  export const TYPE_URI = "https://trusttasks.org/spec/messaging/account/get/0.1" as const;
@@ -68,6 +76,14 @@ export const PAYLOAD_SCHEMA = {
68
76
  "$ref": "#/$defs/Vid",
69
77
  "description": "The DID of the account to fetch."
70
78
  },
79
+ "includeActivity": {
80
+ "type": "boolean",
81
+ "description": "When true, the mediator includes each returned account's `lastReceivedAt` and `lastAuthenticatedAt`, where recorded. Omitted or false = neither is returned."
82
+ },
83
+ "includeStats": {
84
+ "type": "boolean",
85
+ "description": "When true, the mediator includes each returned account's `stats` — its lifetime counters — where it keeps them. Omitted or false = no stats are returned."
86
+ },
71
87
  "ext": {
72
88
  "$ref": "#/$defs/Ext",
73
89
  "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
@@ -152,6 +168,84 @@ export const PAYLOAD_SCHEMA = {
152
168
  "type": "integer",
153
169
  "minimum": 0,
154
170
  "description": "Number of entries in the account's access list."
171
+ },
172
+ "lastReceivedAt": {
173
+ "type": "integer",
174
+ "minimum": 0,
175
+ "description": "Unix epoch seconds at which the mediator last accepted a message addressed to this account. Present only when the request set `includeActivity` and the mediator has recorded such a message; MAY lag the true time by up to 60 seconds."
176
+ },
177
+ "lastAuthenticatedAt": {
178
+ "type": "integer",
179
+ "minimum": 0,
180
+ "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."
181
+ },
182
+ "stats": {
183
+ "$ref": "#/$defs/AccountStats",
184
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
185
+ }
186
+ }
187
+ },
188
+ "AccountStats": {
189
+ "title": "AccountStats",
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "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.",
193
+ "properties": {
194
+ "messagesReceived": {
195
+ "type": "integer",
196
+ "minimum": 0,
197
+ "description": "Messages the mediator accepted addressed to this account."
198
+ },
199
+ "messagesSent": {
200
+ "type": "integer",
201
+ "minimum": 0,
202
+ "description": "Messages the mediator accepted from this account."
203
+ },
204
+ "bytesReceived": {
205
+ "type": "integer",
206
+ "minimum": 0,
207
+ "description": "Total size of the messages counted by messagesReceived."
208
+ },
209
+ "bytesSent": {
210
+ "type": "integer",
211
+ "minimum": 0,
212
+ "description": "Total size of the messages counted by messagesSent."
213
+ },
214
+ "receivedByProtocol": {
215
+ "$ref": "#/$defs/ProtocolCounts",
216
+ "description": "messagesReceived split by the wire protocol the message arrived in."
217
+ },
218
+ "sentByProtocol": {
219
+ "$ref": "#/$defs/ProtocolCounts",
220
+ "description": "messagesSent split by the wire protocol the message was sent in."
221
+ }
222
+ }
223
+ },
224
+ "ProtocolCounts": {
225
+ "title": "ProtocolCounts",
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "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.",
229
+ "properties": {
230
+ "didcomm": {
231
+ "type": "integer",
232
+ "minimum": 0,
233
+ "description": "DIDComm v2 (JWE/JWS)."
234
+ },
235
+ "didcommV1": {
236
+ "type": "integer",
237
+ "minimum": 0,
238
+ "description": "A DIDComm v1 envelope."
239
+ },
240
+ "tsp": {
241
+ "type": "integer",
242
+ "minimum": 0,
243
+ "description": "A Trust Spanning Protocol message."
244
+ },
245
+ "other": {
246
+ "type": "integer",
247
+ "minimum": 0,
248
+ "description": "Anything the mediator could not classify."
155
249
  }
156
250
  }
157
251
  },
@@ -344,6 +438,84 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
344
438
  "type": "integer",
345
439
  "minimum": 0,
346
440
  "description": "Number of entries in the account's access list."
441
+ },
442
+ "lastReceivedAt": {
443
+ "type": "integer",
444
+ "minimum": 0,
445
+ "description": "Unix epoch seconds at which the mediator last accepted a message addressed to this account. Present only when the request set `includeActivity` and the mediator has recorded such a message; MAY lag the true time by up to 60 seconds."
446
+ },
447
+ "lastAuthenticatedAt": {
448
+ "type": "integer",
449
+ "minimum": 0,
450
+ "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."
451
+ },
452
+ "stats": {
453
+ "$ref": "#/$defs/AccountStats",
454
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
455
+ }
456
+ }
457
+ },
458
+ "AccountStats": {
459
+ "title": "AccountStats",
460
+ "type": "object",
461
+ "additionalProperties": false,
462
+ "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.",
463
+ "properties": {
464
+ "messagesReceived": {
465
+ "type": "integer",
466
+ "minimum": 0,
467
+ "description": "Messages the mediator accepted addressed to this account."
468
+ },
469
+ "messagesSent": {
470
+ "type": "integer",
471
+ "minimum": 0,
472
+ "description": "Messages the mediator accepted from this account."
473
+ },
474
+ "bytesReceived": {
475
+ "type": "integer",
476
+ "minimum": 0,
477
+ "description": "Total size of the messages counted by messagesReceived."
478
+ },
479
+ "bytesSent": {
480
+ "type": "integer",
481
+ "minimum": 0,
482
+ "description": "Total size of the messages counted by messagesSent."
483
+ },
484
+ "receivedByProtocol": {
485
+ "$ref": "#/$defs/ProtocolCounts",
486
+ "description": "messagesReceived split by the wire protocol the message arrived in."
487
+ },
488
+ "sentByProtocol": {
489
+ "$ref": "#/$defs/ProtocolCounts",
490
+ "description": "messagesSent split by the wire protocol the message was sent in."
491
+ }
492
+ }
493
+ },
494
+ "ProtocolCounts": {
495
+ "title": "ProtocolCounts",
496
+ "type": "object",
497
+ "additionalProperties": false,
498
+ "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.",
499
+ "properties": {
500
+ "didcomm": {
501
+ "type": "integer",
502
+ "minimum": 0,
503
+ "description": "DIDComm v2 (JWE/JWS)."
504
+ },
505
+ "didcommV1": {
506
+ "type": "integer",
507
+ "minimum": 0,
508
+ "description": "A DIDComm v1 envelope."
509
+ },
510
+ "tsp": {
511
+ "type": "integer",
512
+ "minimum": 0,
513
+ "description": "A Trust Spanning Protocol message."
514
+ },
515
+ "other": {
516
+ "type": "integer",
517
+ "minimum": 0,
518
+ "description": "Anything the mediator could not classify."
347
519
  }
348
520
  }
349
521
  },
@@ -3,7 +3,7 @@
3
3
  * Source: specs/messaging/account/list/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 MessagingListAccountsPayload {
@@ -19,6 +19,14 @@ export interface MessagingListAccountsPayload {
19
19
  * Maximum number of accounts to return in this page. The mediator chooses a default when omitted.
20
20
  */
21
21
  limit?: number;
22
+ /**
23
+ * When true, the mediator includes each returned account's `lastReceivedAt` and `lastAuthenticatedAt`, where recorded. Omitted or false = neither is returned.
24
+ */
25
+ includeActivity?: boolean;
26
+ /**
27
+ * When true, the mediator includes each returned account's `stats` — its lifetime counters — where it keeps them. Omitted or false = no stats are returned.
28
+ */
29
+ includeStats?: boolean;
22
30
  /**
23
31
  * Ecosystem-defined extension members per SPEC.md §4.5.1.
24
32
  */
@@ -43,7 +51,7 @@ export interface MessagingListAccountsResponsePayload {
43
51
  }
44
52
 
45
53
  /** 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 };
54
+ export type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid };
47
55
 
48
56
  /** Trust Task type URI. */
49
57
  export const TYPE_URI = "https://trusttasks.org/spec/messaging/account/list/0.1" as const;
@@ -88,6 +96,14 @@ export const PAYLOAD_SCHEMA = {
88
96
  "maximum": 1000,
89
97
  "description": "Maximum number of accounts to return in this page. The mediator chooses a default when omitted."
90
98
  },
99
+ "includeActivity": {
100
+ "type": "boolean",
101
+ "description": "When true, the mediator includes each returned account's `lastReceivedAt` and `lastAuthenticatedAt`, where recorded. Omitted or false = neither is returned."
102
+ },
103
+ "includeStats": {
104
+ "type": "boolean",
105
+ "description": "When true, the mediator includes each returned account's `stats` — its lifetime counters — where it keeps them. Omitted or false = no stats are returned."
106
+ },
91
107
  "ext": {
92
108
  "$ref": "#/$defs/Ext",
93
109
  "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
@@ -180,6 +196,84 @@ export const PAYLOAD_SCHEMA = {
180
196
  "type": "integer",
181
197
  "minimum": 0,
182
198
  "description": "Number of entries in the account's access list."
199
+ },
200
+ "lastReceivedAt": {
201
+ "type": "integer",
202
+ "minimum": 0,
203
+ "description": "Unix epoch seconds at which the mediator last accepted a message addressed to this account. Present only when the request set `includeActivity` and the mediator has recorded such a message; MAY lag the true time by up to 60 seconds."
204
+ },
205
+ "lastAuthenticatedAt": {
206
+ "type": "integer",
207
+ "minimum": 0,
208
+ "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."
209
+ },
210
+ "stats": {
211
+ "$ref": "#/$defs/AccountStats",
212
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
213
+ }
214
+ }
215
+ },
216
+ "AccountStats": {
217
+ "title": "AccountStats",
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "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.",
221
+ "properties": {
222
+ "messagesReceived": {
223
+ "type": "integer",
224
+ "minimum": 0,
225
+ "description": "Messages the mediator accepted addressed to this account."
226
+ },
227
+ "messagesSent": {
228
+ "type": "integer",
229
+ "minimum": 0,
230
+ "description": "Messages the mediator accepted from this account."
231
+ },
232
+ "bytesReceived": {
233
+ "type": "integer",
234
+ "minimum": 0,
235
+ "description": "Total size of the messages counted by messagesReceived."
236
+ },
237
+ "bytesSent": {
238
+ "type": "integer",
239
+ "minimum": 0,
240
+ "description": "Total size of the messages counted by messagesSent."
241
+ },
242
+ "receivedByProtocol": {
243
+ "$ref": "#/$defs/ProtocolCounts",
244
+ "description": "messagesReceived split by the wire protocol the message arrived in."
245
+ },
246
+ "sentByProtocol": {
247
+ "$ref": "#/$defs/ProtocolCounts",
248
+ "description": "messagesSent split by the wire protocol the message was sent in."
249
+ }
250
+ }
251
+ },
252
+ "ProtocolCounts": {
253
+ "title": "ProtocolCounts",
254
+ "type": "object",
255
+ "additionalProperties": false,
256
+ "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.",
257
+ "properties": {
258
+ "didcomm": {
259
+ "type": "integer",
260
+ "minimum": 0,
261
+ "description": "DIDComm v2 (JWE/JWS)."
262
+ },
263
+ "didcommV1": {
264
+ "type": "integer",
265
+ "minimum": 0,
266
+ "description": "A DIDComm v1 envelope."
267
+ },
268
+ "tsp": {
269
+ "type": "integer",
270
+ "minimum": 0,
271
+ "description": "A Trust Spanning Protocol message."
272
+ },
273
+ "other": {
274
+ "type": "integer",
275
+ "minimum": 0,
276
+ "description": "Anything the mediator could not classify."
183
277
  }
184
278
  }
185
279
  },
@@ -380,6 +474,84 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
380
474
  "type": "integer",
381
475
  "minimum": 0,
382
476
  "description": "Number of entries in the account's access list."
477
+ },
478
+ "lastReceivedAt": {
479
+ "type": "integer",
480
+ "minimum": 0,
481
+ "description": "Unix epoch seconds at which the mediator last accepted a message addressed to this account. Present only when the request set `includeActivity` and the mediator has recorded such a message; MAY lag the true time by up to 60 seconds."
482
+ },
483
+ "lastAuthenticatedAt": {
484
+ "type": "integer",
485
+ "minimum": 0,
486
+ "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."
487
+ },
488
+ "stats": {
489
+ "$ref": "#/$defs/AccountStats",
490
+ "description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
491
+ }
492
+ }
493
+ },
494
+ "AccountStats": {
495
+ "title": "AccountStats",
496
+ "type": "object",
497
+ "additionalProperties": false,
498
+ "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.",
499
+ "properties": {
500
+ "messagesReceived": {
501
+ "type": "integer",
502
+ "minimum": 0,
503
+ "description": "Messages the mediator accepted addressed to this account."
504
+ },
505
+ "messagesSent": {
506
+ "type": "integer",
507
+ "minimum": 0,
508
+ "description": "Messages the mediator accepted from this account."
509
+ },
510
+ "bytesReceived": {
511
+ "type": "integer",
512
+ "minimum": 0,
513
+ "description": "Total size of the messages counted by messagesReceived."
514
+ },
515
+ "bytesSent": {
516
+ "type": "integer",
517
+ "minimum": 0,
518
+ "description": "Total size of the messages counted by messagesSent."
519
+ },
520
+ "receivedByProtocol": {
521
+ "$ref": "#/$defs/ProtocolCounts",
522
+ "description": "messagesReceived split by the wire protocol the message arrived in."
523
+ },
524
+ "sentByProtocol": {
525
+ "$ref": "#/$defs/ProtocolCounts",
526
+ "description": "messagesSent split by the wire protocol the message was sent in."
527
+ }
528
+ }
529
+ },
530
+ "ProtocolCounts": {
531
+ "title": "ProtocolCounts",
532
+ "type": "object",
533
+ "additionalProperties": false,
534
+ "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.",
535
+ "properties": {
536
+ "didcomm": {
537
+ "type": "integer",
538
+ "minimum": 0,
539
+ "description": "DIDComm v2 (JWE/JWS)."
540
+ },
541
+ "didcommV1": {
542
+ "type": "integer",
543
+ "minimum": 0,
544
+ "description": "A DIDComm v1 envelope."
545
+ },
546
+ "tsp": {
547
+ "type": "integer",
548
+ "minimum": 0,
549
+ "description": "A Trust Spanning Protocol message."
550
+ },
551
+ "other": {
552
+ "type": "integer",
553
+ "minimum": 0,
554
+ "description": "Anything the mediator could not classify."
383
555
  }
384
556
  }
385
557
  },