@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.
- package/CHANGELOG.md +9 -0
- package/dist/_shared/components.d.ts +48 -4
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -1
- package/dist/vtc/badges/claims/create/0.1/payload.d.ts +595 -0
- package/dist/vtc/badges/claims/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/create/0.1/payload.js +345 -0
- package/dist/vtc/badges/claims/create/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/list/0.1/payload.d.ts +586 -0
- package/dist/vtc/badges/claims/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/list/0.1/payload.js +335 -0
- package/dist/vtc/badges/claims/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts +720 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.js +417 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts +512 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.js +305 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts +40 -16
- package/dist/vtc/badges/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/create/0.1/payload.js +28 -8
- package/dist/vtc/badges/create/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/promote/0.1/payload.d.ts +40 -16
- package/dist/vtc/badges/promote/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/promote/0.1/payload.js +28 -8
- package/dist/vtc/badges/promote/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.js +28 -8
- package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.js +28 -8
- package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.d.ts +40 -16
- package/dist/vtc/groups/list/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.js +28 -8
- package/dist/vtc/groups/list/0.2/payload.js.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.js +28 -8
- package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.js +28 -8
- package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +48 -4
- package/src/index.ts +12 -0
- package/src/vtc/badges/_shared/0.1/badge.ts +1 -1
- package/src/vtc/badges/claims/create/0.1/payload.ts +395 -0
- package/src/vtc/badges/claims/list/0.1/payload.ts +386 -0
- package/src/vtc/badges/claims/redeem/0.1/payload.ts +454 -0
- package/src/vtc/badges/claims/withdraw/0.1/payload.ts +342 -0
- package/src/vtc/badges/create/0.1/payload.ts +28 -8
- package/src/vtc/badges/promote/0.1/payload.ts +28 -8
- package/src/vtc/groups/create/0.1/payload.ts +28 -8
- package/src/vtc/groups/list/0.1/payload.ts +28 -8
- package/src/vtc/groups/list/0.2/payload.ts +28 -8
- package/src/vtc/groups/show/0.1/payload.ts +28 -8
- package/src/vtc/groups/update/0.1/payload.ts +28 -8
|
@@ -328,7 +328,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
328
328
|
},
|
|
329
329
|
"RuleCondition": {
|
|
330
330
|
"title": "RuleCondition",
|
|
331
|
-
"description": "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.",
|
|
331
|
+
"description": "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`.",
|
|
332
332
|
"type": "object",
|
|
333
333
|
"additionalProperties": false,
|
|
334
334
|
"required": [
|
|
@@ -342,7 +342,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
342
342
|
"role",
|
|
343
343
|
"field",
|
|
344
344
|
"personhood",
|
|
345
|
-
"joinedAt"
|
|
345
|
+
"joinedAt",
|
|
346
|
+
"kudosReceived",
|
|
347
|
+
"ideasSelected",
|
|
348
|
+
"electionTickets"
|
|
346
349
|
]
|
|
347
350
|
},
|
|
348
351
|
"field": {
|
|
@@ -356,9 +359,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
356
359
|
"oneOf",
|
|
357
360
|
"exists",
|
|
358
361
|
"before",
|
|
359
|
-
"after"
|
|
362
|
+
"after",
|
|
363
|
+
"atLeast"
|
|
360
364
|
],
|
|
361
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
365
|
+
"description": "`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`."
|
|
362
366
|
},
|
|
363
367
|
"value": {
|
|
364
368
|
"anyOf": [
|
|
@@ -379,6 +383,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
379
383
|
"type": "string",
|
|
380
384
|
"maxLength": 256
|
|
381
385
|
}
|
|
386
|
+
},
|
|
387
|
+
"count": {
|
|
388
|
+
"type": "integer",
|
|
389
|
+
"minimum": 1,
|
|
390
|
+
"maximum": 100000,
|
|
391
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
382
392
|
}
|
|
383
393
|
}
|
|
384
394
|
},
|
|
@@ -640,7 +650,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
640
650
|
},
|
|
641
651
|
"RuleCondition": {
|
|
642
652
|
"title": "RuleCondition",
|
|
643
|
-
"description": "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.",
|
|
653
|
+
"description": "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`.",
|
|
644
654
|
"type": "object",
|
|
645
655
|
"additionalProperties": false,
|
|
646
656
|
"required": [
|
|
@@ -654,7 +664,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
654
664
|
"role",
|
|
655
665
|
"field",
|
|
656
666
|
"personhood",
|
|
657
|
-
"joinedAt"
|
|
667
|
+
"joinedAt",
|
|
668
|
+
"kudosReceived",
|
|
669
|
+
"ideasSelected",
|
|
670
|
+
"electionTickets"
|
|
658
671
|
]
|
|
659
672
|
},
|
|
660
673
|
"field": {
|
|
@@ -668,9 +681,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
668
681
|
"oneOf",
|
|
669
682
|
"exists",
|
|
670
683
|
"before",
|
|
671
|
-
"after"
|
|
684
|
+
"after",
|
|
685
|
+
"atLeast"
|
|
672
686
|
],
|
|
673
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
687
|
+
"description": "`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`."
|
|
674
688
|
},
|
|
675
689
|
"value": {
|
|
676
690
|
"anyOf": [
|
|
@@ -691,6 +705,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
691
705
|
"type": "string",
|
|
692
706
|
"maxLength": 256
|
|
693
707
|
}
|
|
708
|
+
},
|
|
709
|
+
"count": {
|
|
710
|
+
"type": "integer",
|
|
711
|
+
"minimum": 1,
|
|
712
|
+
"maximum": 100000,
|
|
713
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
694
714
|
}
|
|
695
715
|
}
|
|
696
716
|
},
|
|
@@ -321,7 +321,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
321
321
|
},
|
|
322
322
|
"RuleCondition": {
|
|
323
323
|
"title": "RuleCondition",
|
|
324
|
-
"description": "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.",
|
|
324
|
+
"description": "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`.",
|
|
325
325
|
"type": "object",
|
|
326
326
|
"additionalProperties": false,
|
|
327
327
|
"required": [
|
|
@@ -335,7 +335,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
335
335
|
"role",
|
|
336
336
|
"field",
|
|
337
337
|
"personhood",
|
|
338
|
-
"joinedAt"
|
|
338
|
+
"joinedAt",
|
|
339
|
+
"kudosReceived",
|
|
340
|
+
"ideasSelected",
|
|
341
|
+
"electionTickets"
|
|
339
342
|
]
|
|
340
343
|
},
|
|
341
344
|
"field": {
|
|
@@ -349,9 +352,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
349
352
|
"oneOf",
|
|
350
353
|
"exists",
|
|
351
354
|
"before",
|
|
352
|
-
"after"
|
|
355
|
+
"after",
|
|
356
|
+
"atLeast"
|
|
353
357
|
],
|
|
354
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
358
|
+
"description": "`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`."
|
|
355
359
|
},
|
|
356
360
|
"value": {
|
|
357
361
|
"anyOf": [
|
|
@@ -372,6 +376,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
372
376
|
"type": "string",
|
|
373
377
|
"maxLength": 256
|
|
374
378
|
}
|
|
379
|
+
},
|
|
380
|
+
"count": {
|
|
381
|
+
"type": "integer",
|
|
382
|
+
"minimum": 1,
|
|
383
|
+
"maximum": 100000,
|
|
384
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
375
385
|
}
|
|
376
386
|
}
|
|
377
387
|
},
|
|
@@ -631,7 +641,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
631
641
|
},
|
|
632
642
|
"RuleCondition": {
|
|
633
643
|
"title": "RuleCondition",
|
|
634
|
-
"description": "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.",
|
|
644
|
+
"description": "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`.",
|
|
635
645
|
"type": "object",
|
|
636
646
|
"additionalProperties": false,
|
|
637
647
|
"required": [
|
|
@@ -645,7 +655,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
645
655
|
"role",
|
|
646
656
|
"field",
|
|
647
657
|
"personhood",
|
|
648
|
-
"joinedAt"
|
|
658
|
+
"joinedAt",
|
|
659
|
+
"kudosReceived",
|
|
660
|
+
"ideasSelected",
|
|
661
|
+
"electionTickets"
|
|
649
662
|
]
|
|
650
663
|
},
|
|
651
664
|
"field": {
|
|
@@ -659,9 +672,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
659
672
|
"oneOf",
|
|
660
673
|
"exists",
|
|
661
674
|
"before",
|
|
662
|
-
"after"
|
|
675
|
+
"after",
|
|
676
|
+
"atLeast"
|
|
663
677
|
],
|
|
664
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
678
|
+
"description": "`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`."
|
|
665
679
|
},
|
|
666
680
|
"value": {
|
|
667
681
|
"anyOf": [
|
|
@@ -682,6 +696,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
682
696
|
"type": "string",
|
|
683
697
|
"maxLength": 256
|
|
684
698
|
}
|
|
699
|
+
},
|
|
700
|
+
"count": {
|
|
701
|
+
"type": "integer",
|
|
702
|
+
"minimum": 1,
|
|
703
|
+
"maximum": 100000,
|
|
704
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
685
705
|
}
|
|
686
706
|
}
|
|
687
707
|
},
|
|
@@ -261,7 +261,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
261
261
|
},
|
|
262
262
|
"RuleCondition": {
|
|
263
263
|
"title": "RuleCondition",
|
|
264
|
-
"description": "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.",
|
|
264
|
+
"description": "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`.",
|
|
265
265
|
"type": "object",
|
|
266
266
|
"additionalProperties": false,
|
|
267
267
|
"required": [
|
|
@@ -275,7 +275,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
275
275
|
"role",
|
|
276
276
|
"field",
|
|
277
277
|
"personhood",
|
|
278
|
-
"joinedAt"
|
|
278
|
+
"joinedAt",
|
|
279
|
+
"kudosReceived",
|
|
280
|
+
"ideasSelected",
|
|
281
|
+
"electionTickets"
|
|
279
282
|
]
|
|
280
283
|
},
|
|
281
284
|
"field": {
|
|
@@ -289,9 +292,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
289
292
|
"oneOf",
|
|
290
293
|
"exists",
|
|
291
294
|
"before",
|
|
292
|
-
"after"
|
|
295
|
+
"after",
|
|
296
|
+
"atLeast"
|
|
293
297
|
],
|
|
294
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
298
|
+
"description": "`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`."
|
|
295
299
|
},
|
|
296
300
|
"value": {
|
|
297
301
|
"anyOf": [
|
|
@@ -312,6 +316,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
312
316
|
"type": "string",
|
|
313
317
|
"maxLength": 256
|
|
314
318
|
}
|
|
319
|
+
},
|
|
320
|
+
"count": {
|
|
321
|
+
"type": "integer",
|
|
322
|
+
"minimum": 1,
|
|
323
|
+
"maximum": 100000,
|
|
324
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
315
325
|
}
|
|
316
326
|
}
|
|
317
327
|
},
|
|
@@ -552,7 +562,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
552
562
|
},
|
|
553
563
|
"RuleCondition": {
|
|
554
564
|
"title": "RuleCondition",
|
|
555
|
-
"description": "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.",
|
|
565
|
+
"description": "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`.",
|
|
556
566
|
"type": "object",
|
|
557
567
|
"additionalProperties": false,
|
|
558
568
|
"required": [
|
|
@@ -566,7 +576,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
566
576
|
"role",
|
|
567
577
|
"field",
|
|
568
578
|
"personhood",
|
|
569
|
-
"joinedAt"
|
|
579
|
+
"joinedAt",
|
|
580
|
+
"kudosReceived",
|
|
581
|
+
"ideasSelected",
|
|
582
|
+
"electionTickets"
|
|
570
583
|
]
|
|
571
584
|
},
|
|
572
585
|
"field": {
|
|
@@ -580,9 +593,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
580
593
|
"oneOf",
|
|
581
594
|
"exists",
|
|
582
595
|
"before",
|
|
583
|
-
"after"
|
|
596
|
+
"after",
|
|
597
|
+
"atLeast"
|
|
584
598
|
],
|
|
585
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
599
|
+
"description": "`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`."
|
|
586
600
|
},
|
|
587
601
|
"value": {
|
|
588
602
|
"anyOf": [
|
|
@@ -603,6 +617,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
603
617
|
"type": "string",
|
|
604
618
|
"maxLength": 256
|
|
605
619
|
}
|
|
620
|
+
},
|
|
621
|
+
"count": {
|
|
622
|
+
"type": "integer",
|
|
623
|
+
"minimum": 1,
|
|
624
|
+
"maximum": 100000,
|
|
625
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
606
626
|
}
|
|
607
627
|
}
|
|
608
628
|
},
|
|
@@ -302,7 +302,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
302
302
|
},
|
|
303
303
|
"RuleCondition": {
|
|
304
304
|
"title": "RuleCondition",
|
|
305
|
-
"description": "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.",
|
|
305
|
+
"description": "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`.",
|
|
306
306
|
"type": "object",
|
|
307
307
|
"additionalProperties": false,
|
|
308
308
|
"required": [
|
|
@@ -316,7 +316,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
316
316
|
"role",
|
|
317
317
|
"field",
|
|
318
318
|
"personhood",
|
|
319
|
-
"joinedAt"
|
|
319
|
+
"joinedAt",
|
|
320
|
+
"kudosReceived",
|
|
321
|
+
"ideasSelected",
|
|
322
|
+
"electionTickets"
|
|
320
323
|
]
|
|
321
324
|
},
|
|
322
325
|
"field": {
|
|
@@ -330,9 +333,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
330
333
|
"oneOf",
|
|
331
334
|
"exists",
|
|
332
335
|
"before",
|
|
333
|
-
"after"
|
|
336
|
+
"after",
|
|
337
|
+
"atLeast"
|
|
334
338
|
],
|
|
335
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
339
|
+
"description": "`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`."
|
|
336
340
|
},
|
|
337
341
|
"value": {
|
|
338
342
|
"anyOf": [
|
|
@@ -353,6 +357,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
353
357
|
"type": "string",
|
|
354
358
|
"maxLength": 256
|
|
355
359
|
}
|
|
360
|
+
},
|
|
361
|
+
"count": {
|
|
362
|
+
"type": "integer",
|
|
363
|
+
"minimum": 1,
|
|
364
|
+
"maximum": 100000,
|
|
365
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
356
366
|
}
|
|
357
367
|
}
|
|
358
368
|
},
|
|
@@ -582,7 +592,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
582
592
|
},
|
|
583
593
|
"RuleCondition": {
|
|
584
594
|
"title": "RuleCondition",
|
|
585
|
-
"description": "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.",
|
|
595
|
+
"description": "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`.",
|
|
586
596
|
"type": "object",
|
|
587
597
|
"additionalProperties": false,
|
|
588
598
|
"required": [
|
|
@@ -596,7 +606,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
596
606
|
"role",
|
|
597
607
|
"field",
|
|
598
608
|
"personhood",
|
|
599
|
-
"joinedAt"
|
|
609
|
+
"joinedAt",
|
|
610
|
+
"kudosReceived",
|
|
611
|
+
"ideasSelected",
|
|
612
|
+
"electionTickets"
|
|
600
613
|
]
|
|
601
614
|
},
|
|
602
615
|
"field": {
|
|
@@ -610,9 +623,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
610
623
|
"oneOf",
|
|
611
624
|
"exists",
|
|
612
625
|
"before",
|
|
613
|
-
"after"
|
|
626
|
+
"after",
|
|
627
|
+
"atLeast"
|
|
614
628
|
],
|
|
615
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
629
|
+
"description": "`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`."
|
|
616
630
|
},
|
|
617
631
|
"value": {
|
|
618
632
|
"anyOf": [
|
|
@@ -633,6 +647,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
633
647
|
"type": "string",
|
|
634
648
|
"maxLength": 256
|
|
635
649
|
}
|
|
650
|
+
},
|
|
651
|
+
"count": {
|
|
652
|
+
"type": "integer",
|
|
653
|
+
"minimum": 1,
|
|
654
|
+
"maximum": 100000,
|
|
655
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
636
656
|
}
|
|
637
657
|
}
|
|
638
658
|
},
|