@openvtc/trust-tasks 0.28.21 → 0.28.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 (68) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/_shared/components.d.ts +48 -4
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +12 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +12 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/vtc/badges/_shared/0.1/badge.d.ts +1 -1
  9. package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -1
  10. package/dist/vtc/badges/claims/create/0.1/payload.d.ts +595 -0
  11. package/dist/vtc/badges/claims/create/0.1/payload.d.ts.map +1 -0
  12. package/dist/vtc/badges/claims/create/0.1/payload.js +345 -0
  13. package/dist/vtc/badges/claims/create/0.1/payload.js.map +1 -0
  14. package/dist/vtc/badges/claims/list/0.1/payload.d.ts +586 -0
  15. package/dist/vtc/badges/claims/list/0.1/payload.d.ts.map +1 -0
  16. package/dist/vtc/badges/claims/list/0.1/payload.js +335 -0
  17. package/dist/vtc/badges/claims/list/0.1/payload.js.map +1 -0
  18. package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts +720 -0
  19. package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts.map +1 -0
  20. package/dist/vtc/badges/claims/redeem/0.1/payload.js +417 -0
  21. package/dist/vtc/badges/claims/redeem/0.1/payload.js.map +1 -0
  22. package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts +512 -0
  23. package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts.map +1 -0
  24. package/dist/vtc/badges/claims/withdraw/0.1/payload.js +305 -0
  25. package/dist/vtc/badges/claims/withdraw/0.1/payload.js.map +1 -0
  26. package/dist/vtc/badges/create/0.1/payload.d.ts +40 -16
  27. package/dist/vtc/badges/create/0.1/payload.d.ts.map +1 -1
  28. package/dist/vtc/badges/create/0.1/payload.js +28 -8
  29. package/dist/vtc/badges/create/0.1/payload.js.map +1 -1
  30. package/dist/vtc/badges/promote/0.1/payload.d.ts +40 -16
  31. package/dist/vtc/badges/promote/0.1/payload.d.ts.map +1 -1
  32. package/dist/vtc/badges/promote/0.1/payload.js +28 -8
  33. package/dist/vtc/badges/promote/0.1/payload.js.map +1 -1
  34. package/dist/vtc/groups/create/0.1/payload.d.ts +40 -16
  35. package/dist/vtc/groups/create/0.1/payload.d.ts.map +1 -1
  36. package/dist/vtc/groups/create/0.1/payload.js +28 -8
  37. package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
  38. package/dist/vtc/groups/list/0.1/payload.d.ts +40 -16
  39. package/dist/vtc/groups/list/0.1/payload.d.ts.map +1 -1
  40. package/dist/vtc/groups/list/0.1/payload.js +28 -8
  41. package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
  42. package/dist/vtc/groups/list/0.2/payload.d.ts +40 -16
  43. package/dist/vtc/groups/list/0.2/payload.d.ts.map +1 -1
  44. package/dist/vtc/groups/list/0.2/payload.js +28 -8
  45. package/dist/vtc/groups/list/0.2/payload.js.map +1 -1
  46. package/dist/vtc/groups/show/0.1/payload.d.ts +40 -16
  47. package/dist/vtc/groups/show/0.1/payload.d.ts.map +1 -1
  48. package/dist/vtc/groups/show/0.1/payload.js +28 -8
  49. package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
  50. package/dist/vtc/groups/update/0.1/payload.d.ts +40 -16
  51. package/dist/vtc/groups/update/0.1/payload.d.ts.map +1 -1
  52. package/dist/vtc/groups/update/0.1/payload.js +28 -8
  53. package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
  54. package/package.json +1 -1
  55. package/src/_shared/components.ts +48 -4
  56. package/src/index.ts +12 -0
  57. package/src/vtc/badges/_shared/0.1/badge.ts +1 -1
  58. package/src/vtc/badges/claims/create/0.1/payload.ts +395 -0
  59. package/src/vtc/badges/claims/list/0.1/payload.ts +386 -0
  60. package/src/vtc/badges/claims/redeem/0.1/payload.ts +454 -0
  61. package/src/vtc/badges/claims/withdraw/0.1/payload.ts +342 -0
  62. package/src/vtc/badges/create/0.1/payload.ts +28 -8
  63. package/src/vtc/badges/promote/0.1/payload.ts +28 -8
  64. package/src/vtc/groups/create/0.1/payload.ts +28 -8
  65. package/src/vtc/groups/list/0.1/payload.ts +28 -8
  66. package/src/vtc/groups/list/0.2/payload.ts +28 -8
  67. package/src/vtc/groups/show/0.1/payload.ts +28 -8
  68. package/src/vtc/groups/update/0.1/payload.ts +28 -8
package/CHANGELOG.md CHANGED
@@ -11,6 +11,15 @@ The package versions over **its own API** — what a consumer compiles against
11
11
  not over `SPEC.md`. Below 1.0 a breaking change bumps the leading non-zero
12
12
  component.
13
13
 
14
+ ## 0.28.22 — 2026-11-08
15
+
16
+
17
+ ### Added
18
+
19
+ - **vtc/badges**: Claim codes and the badge rule counts (VTI-BDG-015, VTI-BDG-025 – 027) (#1059)
20
+
21
+ * feat(vtc/badges): claim codes and the badge rule counts (VTI-BDG-015, VTI-BDG-025 – 027)
22
+
14
23
  ## 0.28.21 — 2026-11-08
15
24
 
16
25
 
@@ -514,6 +514,14 @@ export type ChunkIndex = number;
514
514
  * Size in bytes of every chunk except the last, which carries the remainder and is between 1 and this value inclusive. The ceiling of 262144 (256 KiB) is normative and is derived in `vta/backup/initiate-export/1.1` under Chunked transfer: it is the largest power of two whose `get-chunk` or `put-chunk` document still fits a 1 MiB mediator message after base64url encoding of `data`, DIDComm authcrypt encoding, and two nested forward wrappers. The floor of 16384 keeps a 1 GiB bundle within `ChunkCount`'s ceiling at sizes a constrained transport can still choose.
515
515
  */
516
516
  export type ChunkSize = number;
517
+ /**
518
+ * Opaque identifier of a claim code's record: `bcl_` followed by 16 to 64 base64url characters. Random; never the code itself, which the community keeps only as a digest (VTI-BDG-025).
519
+ */
520
+ export type ClaimId = string;
521
+ /**
522
+ * A claim code itself: at least 128 random bits the community generated, base64url (22 to 64 characters). A bearer secret: shown to its issuer once, redeemed by a member, never stored or answered again (VTI-BDG-025).
523
+ */
524
+ export type ClaimSecret = string;
517
525
  /**
518
526
  * The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.
519
527
  *
@@ -6478,6 +6486,38 @@ export interface Claim {
6478
6486
  */
6479
6487
  renewable: boolean;
6480
6488
  }
6489
+ /**
6490
+ * A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).
6491
+ */
6492
+ export interface ClaimCode {
6493
+ claimId: ClaimId;
6494
+ badgeId: BadgeId;
6495
+ /**
6496
+ * What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it.
6497
+ */
6498
+ label: string;
6499
+ /**
6500
+ * After this the code admits no one.
6501
+ */
6502
+ validUntil: string;
6503
+ /**
6504
+ * How many claims the code admits.
6505
+ */
6506
+ limit: number;
6507
+ /**
6508
+ * How many members have redeemed it.
6509
+ */
6510
+ claims: number;
6511
+ /**
6512
+ * `withdrawn` once its issuer withdrew it or the badge was retired. A code past `validUntil` or out of claims stays `active` and admits no one.
6513
+ */
6514
+ state: "active" | "withdrawn";
6515
+ createdAt: string;
6516
+ /**
6517
+ * The issuer's entry, where they have one; the giver of every award the code admits.
6518
+ */
6519
+ createdBy?: EntryId;
6520
+ }
6481
6521
  /**
6482
6522
  * Which claim a `claim` field accepts, from which credentials and issuers.
6483
6523
  */
@@ -13968,24 +14008,28 @@ export interface RotationRecord {
13968
14008
  cacheHorizonAt?: string;
13969
14009
  }
13970
14010
  /**
13971
- * One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.
14011
+ * One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card. `kudosReceived`, `ideasSelected` and `electionTickets` are counts the community keeps of its own records (kudos the member accepted, ideas of theirs a board selected, elections it issued them a ticket in), compared with `atLeast`; only a badge's group reads them (VTI-BDG-015), and any other group refuses them with `ruleInvalid`.
13972
14012
  */
13973
14013
  export interface RuleCondition {
13974
- fact: "role" | "field" | "personhood" | "joinedAt";
14014
+ fact: "role" | "field" | "personhood" | "joinedAt" | "kudosReceived" | "ideasSelected" | "electionTickets";
13975
14015
  /**
13976
14016
  * Present exactly when `fact` is `field`.
13977
14017
  */
13978
14018
  field?: FieldKey;
13979
14019
  /**
13980
- * `equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.
14020
+ * `equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`; `atLeast` compares a count fact with `count`.
13981
14021
  */
13982
- op: "equals" | "oneOf" | "exists" | "before" | "after";
14022
+ op: "equals" | "oneOf" | "exists" | "before" | "after" | "atLeast";
13983
14023
  value?: string | boolean;
13984
14024
  /**
13985
14025
  * @minItems 1
13986
14026
  * @maxItems 64
13987
14027
  */
13988
14028
  values?: [string, ...string[]];
14029
+ /**
14030
+ * With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`.
14031
+ */
14032
+ count?: number;
13989
14033
  }
13990
14034
  export interface S3Settings {
13991
14035
  kind: "s3";