@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
@@ -213,6 +213,16 @@ export type ExpectedVersion_VtaV0_1 = number;
213
213
  * After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.
214
214
  */
215
215
  export type ExpiresAt = string;
216
+ /**
217
+ * Names the `ext` namespaces a consumer MUST understand or refuse, per SPEC.md §4.5.1.
218
+ *
219
+ * Every entry MUST be an immediate key of the sibling `ext` object at the same level; an entry naming an absent namespace is non-conforming and the consumer rejects the document with `malformedRequest`. A consumer that does not recognize a namespace named here MUST NOT process the document as though the namespace were absent, and rejects it with `unsupportedExtension` — the exception to the rule that unrecognized namespaces are ignored.
220
+ *
221
+ * A producer marks a namespace only where the document's meaning depends on it. Marking one that merely carries a hint or an annotation turns every consumer that has not implemented it into a failure where it would otherwise have interoperated. JSON Schema cannot check either of those rules: that an entry names a present namespace is checkable only against the sibling `ext`, and whether a namespace is load-bearing is not a schema question at all. Both are consumer-side checks.
222
+ *
223
+ * @minItems 1
224
+ */
225
+ export type ExtCritical = [string, ...string[]];
216
226
  /**
217
227
  * Where a pool face may be worn. `anywhere` is the default and what an absent member means. `only` names the contexts it may be worn in, and a maintainer MUST refuse to wear it in any other (persona/binding/set `outsideReach`).
218
228
  *
@@ -853,6 +863,47 @@ export interface Account {
853
863
  * Number of entries in the account's access list.
854
864
  */
855
865
  accessListCount?: number;
866
+ /**
867
+ * 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.
868
+ */
869
+ lastReceivedAt?: number;
870
+ /**
871
+ * 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
+ */
873
+ lastAuthenticatedAt?: number;
874
+ /**
875
+ * Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`.
876
+ */
877
+ stats?: AccountStats;
878
+ }
879
+ /**
880
+ * 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.
881
+ */
882
+ export interface AccountStats {
883
+ /**
884
+ * Messages the mediator accepted addressed to this account.
885
+ */
886
+ messagesReceived?: number;
887
+ /**
888
+ * Messages the mediator accepted from this account.
889
+ */
890
+ messagesSent?: number;
891
+ /**
892
+ * Total size of the messages counted by messagesReceived.
893
+ */
894
+ bytesReceived?: number;
895
+ /**
896
+ * Total size of the messages counted by messagesSent.
897
+ */
898
+ bytesSent?: number;
899
+ /**
900
+ * messagesReceived split by the wire protocol the message arrived in.
901
+ */
902
+ receivedByProtocol?: ProtocolCounts;
903
+ /**
904
+ * messagesSent split by the wire protocol the message was sent in.
905
+ */
906
+ sentByProtocol?: ProtocolCounts;
856
907
  }
857
908
  export interface AclChangedEvent_SyncV0_1 {
858
909
  kind: "acl.changed";
@@ -3407,6 +3458,27 @@ export interface Profile {
3407
3458
  createdAt?: string;
3408
3459
  updatedAt: string;
3409
3460
  }
3461
+ /**
3462
+ * 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.
3463
+ */
3464
+ export interface ProtocolCounts {
3465
+ /**
3466
+ * DIDComm v2 (JWE/JWS).
3467
+ */
3468
+ didcomm?: number;
3469
+ /**
3470
+ * A DIDComm v1 envelope.
3471
+ */
3472
+ didcommV1?: number;
3473
+ /**
3474
+ * A Trust Spanning Protocol message.
3475
+ */
3476
+ tsp?: number;
3477
+ /**
3478
+ * Anything the mediator could not classify.
3479
+ */
3480
+ other?: number;
3481
+ }
3410
3482
  /**
3411
3483
  * 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.
3412
3484
  */
package/src/index.ts CHANGED
@@ -13,6 +13,7 @@ export * as SharedComponents from "./_shared/components.js";
13
13
  export * as FrameworkShared_v0_1 from "./_framework/0.1/framework.js";
14
14
  export * as FrameworkShared_v0_2 from "./_framework/0.2/framework.js";
15
15
  export * as FrameworkShared_v0_3 from "./_framework/0.3/framework.js";
16
+ export * as FrameworkShared_v0_4 from "./_framework/0.4/framework.js";
16
17
  export * as AclEntryShared_v0_1 from "./acl/_shared/0.1/acl-entry.js";
17
18
  export * as AclChangeRole_v0_1 from "./acl/change-role/0.1/payload.js";
18
19
  export * as AclGrant_v0_1 from "./acl/grant/0.1/payload.js";
@@ -543,6 +544,7 @@ export * as VtcVettingVettersGrant_v0_1 from "./vtc/vetting/vetters/grant/0.1/pa
543
544
  export * as VtcVettingVettersList_v0_1 from "./vtc/vetting/vetters/list/0.1/payload.js";
544
545
  export * as VtcVettingVettersProfile_v0_1 from "./vtc/vetting/vetters/profile/0.1/payload.js";
545
546
  export * as VtcVettingVettersResend_v0_1 from "./vtc/vetting/vetters/resend/0.1/payload.js";
547
+ export * as VtcVettingVettersShow_v0_1 from "./vtc/vetting/vetters/show/0.1/payload.js";
546
548
  export * as VtcWebsiteFilesDelete_v0_1 from "./vtc/website/files/delete/0.1/payload.js";
547
549
  export * as VtcWebsiteFilesList_v0_1 from "./vtc/website/files/list/0.1/payload.js";
548
550
  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;
@@ -177,6 +177,84 @@ export const PAYLOAD_SCHEMA = {
177
177
  "type": "integer",
178
178
  "minimum": 0,
179
179
  "description": "Number of entries in the account's access list."
180
+ },
181
+ "lastReceivedAt": {
182
+ "type": "integer",
183
+ "minimum": 0,
184
+ "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."
185
+ },
186
+ "lastAuthenticatedAt": {
187
+ "type": "integer",
188
+ "minimum": 0,
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."
180
258
  }
181
259
  }
182
260
  },
@@ -369,6 +447,84 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
369
447
  "type": "integer",
370
448
  "minimum": 0,
371
449
  "description": "Number of entries in the account's access list."
450
+ },
451
+ "lastReceivedAt": {
452
+ "type": "integer",
453
+ "minimum": 0,
454
+ "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."
455
+ },
456
+ "lastAuthenticatedAt": {
457
+ "type": "integer",
458
+ "minimum": 0,
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."
372
528
  }
373
529
  }
374
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;
@@ -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
  },