@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
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/badges/claims/withdraw/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/claims/withdraw/0.1";
|
|
7
|
+
/**
|
|
8
|
+
* The earlier version of this specification that this one declares it
|
|
9
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
10
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
11
|
+
* `extendsChain` / `readForSpec`.
|
|
12
|
+
*/
|
|
13
|
+
export const EXTENDS = null;
|
|
14
|
+
/**
|
|
15
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
16
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
17
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
18
|
+
* Versions").
|
|
19
|
+
*/
|
|
20
|
+
export const DEPRECATION = null;
|
|
21
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
22
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/badges/claims/withdraw/0.1#response";
|
|
23
|
+
/**
|
|
24
|
+
* This specification's payload schema, as a value.
|
|
25
|
+
*
|
|
26
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
27
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
28
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
29
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
30
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
31
|
+
*/
|
|
32
|
+
export const PAYLOAD_SCHEMA = {
|
|
33
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
34
|
+
"$id": "https://trusttasks.org/spec/vtc/badges/claims/withdraw/0.1",
|
|
35
|
+
"title": "VTC Badges — Claims — Withdraw — payload",
|
|
36
|
+
"description": "Withdraw a claim code: it admits no one from now on; claims already made stand. The outer document members are owned by the framework — SPEC §6.3.",
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": [
|
|
40
|
+
"claimId"
|
|
41
|
+
],
|
|
42
|
+
"properties": {
|
|
43
|
+
"claimId": {
|
|
44
|
+
"$ref": "#/$defs/ClaimId"
|
|
45
|
+
},
|
|
46
|
+
"ext": {
|
|
47
|
+
"$ref": "#/$defs/Ext"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"$defs": {
|
|
51
|
+
"Response": {
|
|
52
|
+
"$anchor": "response",
|
|
53
|
+
"title": "VTC Badges — Claims — Withdraw — response payload",
|
|
54
|
+
"description": "The success response to a vtc/badges/claims/withdraw/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/withdraw/0.1#response.",
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": [
|
|
58
|
+
"claim"
|
|
59
|
+
],
|
|
60
|
+
"properties": {
|
|
61
|
+
"claim": {
|
|
62
|
+
"$ref": "#/$defs/ClaimCode",
|
|
63
|
+
"description": "The code's record as it now stands, `withdrawn`."
|
|
64
|
+
},
|
|
65
|
+
"ext": {
|
|
66
|
+
"$ref": "#/$defs/Ext"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"Ext": {
|
|
71
|
+
"title": "Ext",
|
|
72
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
73
|
+
"type": "object",
|
|
74
|
+
"minProperties": 1,
|
|
75
|
+
"additionalProperties": true,
|
|
76
|
+
"propertyNames": {
|
|
77
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"ClaimCode": {
|
|
81
|
+
"title": "ClaimCode",
|
|
82
|
+
"description": "A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).",
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": [
|
|
86
|
+
"claimId",
|
|
87
|
+
"badgeId",
|
|
88
|
+
"label",
|
|
89
|
+
"validUntil",
|
|
90
|
+
"limit",
|
|
91
|
+
"claims",
|
|
92
|
+
"state",
|
|
93
|
+
"createdAt"
|
|
94
|
+
],
|
|
95
|
+
"properties": {
|
|
96
|
+
"claimId": {
|
|
97
|
+
"$ref": "#/$defs/ClaimId"
|
|
98
|
+
},
|
|
99
|
+
"badgeId": {
|
|
100
|
+
"$ref": "#/$defs/BadgeId"
|
|
101
|
+
},
|
|
102
|
+
"label": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"minLength": 1,
|
|
105
|
+
"maxLength": 120,
|
|
106
|
+
"description": "What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it."
|
|
107
|
+
},
|
|
108
|
+
"validUntil": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"format": "date-time",
|
|
111
|
+
"description": "After this the code admits no one."
|
|
112
|
+
},
|
|
113
|
+
"limit": {
|
|
114
|
+
"type": "integer",
|
|
115
|
+
"minimum": 1,
|
|
116
|
+
"maximum": 10000,
|
|
117
|
+
"description": "How many claims the code admits."
|
|
118
|
+
},
|
|
119
|
+
"claims": {
|
|
120
|
+
"type": "integer",
|
|
121
|
+
"minimum": 0,
|
|
122
|
+
"description": "How many members have redeemed it."
|
|
123
|
+
},
|
|
124
|
+
"state": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"enum": [
|
|
127
|
+
"active",
|
|
128
|
+
"withdrawn"
|
|
129
|
+
],
|
|
130
|
+
"description": "`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."
|
|
131
|
+
},
|
|
132
|
+
"createdAt": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"format": "date-time"
|
|
135
|
+
},
|
|
136
|
+
"createdBy": {
|
|
137
|
+
"$ref": "#/$defs/EntryId",
|
|
138
|
+
"description": "The issuer's entry, where they have one; the giver of every award the code admits."
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"BadgeId": {
|
|
143
|
+
"title": "BadgeId",
|
|
144
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
145
|
+
"type": "string",
|
|
146
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
147
|
+
},
|
|
148
|
+
"ClaimId": {
|
|
149
|
+
"title": "ClaimId",
|
|
150
|
+
"description": "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).",
|
|
151
|
+
"type": "string",
|
|
152
|
+
"pattern": "^bcl_[A-Za-z0-9_-]{16,64}$"
|
|
153
|
+
},
|
|
154
|
+
"EntryId": {
|
|
155
|
+
"title": "EntryId",
|
|
156
|
+
"description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
|
|
157
|
+
"type": "string",
|
|
158
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
163
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
164
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
165
|
+
"$ref": "#/$defs/Response",
|
|
166
|
+
"$defs": {
|
|
167
|
+
"Response": {
|
|
168
|
+
"$anchor": "response",
|
|
169
|
+
"title": "VTC Badges — Claims — Withdraw — response payload",
|
|
170
|
+
"description": "The success response to a vtc/badges/claims/withdraw/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/withdraw/0.1#response.",
|
|
171
|
+
"type": "object",
|
|
172
|
+
"additionalProperties": false,
|
|
173
|
+
"required": [
|
|
174
|
+
"claim"
|
|
175
|
+
],
|
|
176
|
+
"properties": {
|
|
177
|
+
"claim": {
|
|
178
|
+
"$ref": "#/$defs/ClaimCode",
|
|
179
|
+
"description": "The code's record as it now stands, `withdrawn`."
|
|
180
|
+
},
|
|
181
|
+
"ext": {
|
|
182
|
+
"$ref": "#/$defs/Ext"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"Ext": {
|
|
187
|
+
"title": "Ext",
|
|
188
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
189
|
+
"type": "object",
|
|
190
|
+
"minProperties": 1,
|
|
191
|
+
"additionalProperties": true,
|
|
192
|
+
"propertyNames": {
|
|
193
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"ClaimCode": {
|
|
197
|
+
"title": "ClaimCode",
|
|
198
|
+
"description": "A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).",
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"required": [
|
|
202
|
+
"claimId",
|
|
203
|
+
"badgeId",
|
|
204
|
+
"label",
|
|
205
|
+
"validUntil",
|
|
206
|
+
"limit",
|
|
207
|
+
"claims",
|
|
208
|
+
"state",
|
|
209
|
+
"createdAt"
|
|
210
|
+
],
|
|
211
|
+
"properties": {
|
|
212
|
+
"claimId": {
|
|
213
|
+
"$ref": "#/$defs/ClaimId"
|
|
214
|
+
},
|
|
215
|
+
"badgeId": {
|
|
216
|
+
"$ref": "#/$defs/BadgeId"
|
|
217
|
+
},
|
|
218
|
+
"label": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"minLength": 1,
|
|
221
|
+
"maxLength": 120,
|
|
222
|
+
"description": "What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it."
|
|
223
|
+
},
|
|
224
|
+
"validUntil": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"format": "date-time",
|
|
227
|
+
"description": "After this the code admits no one."
|
|
228
|
+
},
|
|
229
|
+
"limit": {
|
|
230
|
+
"type": "integer",
|
|
231
|
+
"minimum": 1,
|
|
232
|
+
"maximum": 10000,
|
|
233
|
+
"description": "How many claims the code admits."
|
|
234
|
+
},
|
|
235
|
+
"claims": {
|
|
236
|
+
"type": "integer",
|
|
237
|
+
"minimum": 0,
|
|
238
|
+
"description": "How many members have redeemed it."
|
|
239
|
+
},
|
|
240
|
+
"state": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"enum": [
|
|
243
|
+
"active",
|
|
244
|
+
"withdrawn"
|
|
245
|
+
],
|
|
246
|
+
"description": "`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."
|
|
247
|
+
},
|
|
248
|
+
"createdAt": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"format": "date-time"
|
|
251
|
+
},
|
|
252
|
+
"createdBy": {
|
|
253
|
+
"$ref": "#/$defs/EntryId",
|
|
254
|
+
"description": "The issuer's entry, where they have one; the giver of every award the code admits."
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"BadgeId": {
|
|
259
|
+
"title": "BadgeId",
|
|
260
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
261
|
+
"type": "string",
|
|
262
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
263
|
+
},
|
|
264
|
+
"ClaimId": {
|
|
265
|
+
"title": "ClaimId",
|
|
266
|
+
"description": "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).",
|
|
267
|
+
"type": "string",
|
|
268
|
+
"pattern": "^bcl_[A-Za-z0-9_-]{16,64}$"
|
|
269
|
+
},
|
|
270
|
+
"EntryId": {
|
|
271
|
+
"title": "EntryId",
|
|
272
|
+
"description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
|
|
273
|
+
"type": "string",
|
|
274
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
280
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
281
|
+
* per-specification and cannot be derived from the document alone, and
|
|
282
|
+
* item 2 needs the schema this carries.
|
|
283
|
+
*/
|
|
284
|
+
export const SPEC = {
|
|
285
|
+
typeUri: TYPE_URI,
|
|
286
|
+
isBearer: false,
|
|
287
|
+
isProofRequired: true,
|
|
288
|
+
isRecipientRequired: true,
|
|
289
|
+
isIssuedAtRequired: true,
|
|
290
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
294
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
295
|
+
* parties (§7.3 item 5).
|
|
296
|
+
*/
|
|
297
|
+
export const RESPONSE_SPEC = {
|
|
298
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
299
|
+
isBearer: false,
|
|
300
|
+
isProofRequired: true,
|
|
301
|
+
isRecipientRequired: true,
|
|
302
|
+
isIssuedAtRequired: true,
|
|
303
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
304
|
+
};
|
|
305
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vtc/badges/claims/withdraw/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0BH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,4DAAqE,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB,IAAI,CAAC;AAK/C,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,qEAA8E,CAAC;AAKhH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,4DAA4D;IACnE,OAAO,EAAE,0CAA0C;IACnD,aAAa,EAAE,oJAAoJ;IACnK,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,SAAS;KACV;IACD,YAAY,EAAE;QACZ,SAAS,EAAE;YACT,MAAM,EAAE,iBAAiB;SAC1B;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;SACtB;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,mDAAmD;YAC5D,aAAa,EAAE,uLAAuL;YACtM,MAAM,EAAE,QAAQ;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E,oFAAoF;iBACpG;aACF;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,aAAa,EAAE,uIAAuI;YACtJ,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,4BAA4B;SACxC;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,aAAa,EAAE,wLAAwL;YACvM,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,4BAA4B;SACxC;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,aAAa,EAAE,6bAA6b;YAC5c,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,4BAA4B;SACxC;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -338,14 +338,14 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
338
338
|
};
|
|
339
339
|
readonly RuleCondition: {
|
|
340
340
|
readonly title: "RuleCondition";
|
|
341
|
-
readonly 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.";
|
|
341
|
+
readonly 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`.";
|
|
342
342
|
readonly type: "object";
|
|
343
343
|
readonly additionalProperties: false;
|
|
344
344
|
readonly required: readonly ["fact", "op"];
|
|
345
345
|
readonly properties: {
|
|
346
346
|
readonly fact: {
|
|
347
347
|
readonly type: "string";
|
|
348
|
-
readonly enum: readonly ["role", "field", "personhood", "joinedAt"];
|
|
348
|
+
readonly enum: readonly ["role", "field", "personhood", "joinedAt", "kudosReceived", "ideasSelected", "electionTickets"];
|
|
349
349
|
};
|
|
350
350
|
readonly field: {
|
|
351
351
|
readonly $ref: "#/$defs/FieldKey";
|
|
@@ -353,8 +353,8 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
353
353
|
};
|
|
354
354
|
readonly op: {
|
|
355
355
|
readonly type: "string";
|
|
356
|
-
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after"];
|
|
357
|
-
readonly description: "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.";
|
|
356
|
+
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after", "atLeast"];
|
|
357
|
+
readonly 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`.";
|
|
358
358
|
};
|
|
359
359
|
readonly value: {
|
|
360
360
|
readonly anyOf: readonly [{
|
|
@@ -373,6 +373,12 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
373
373
|
readonly maxLength: 256;
|
|
374
374
|
};
|
|
375
375
|
};
|
|
376
|
+
readonly count: {
|
|
377
|
+
readonly type: "integer";
|
|
378
|
+
readonly minimum: 1;
|
|
379
|
+
readonly maximum: 100000;
|
|
380
|
+
readonly description: "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`.";
|
|
381
|
+
};
|
|
376
382
|
};
|
|
377
383
|
};
|
|
378
384
|
readonly FieldKey: {
|
|
@@ -723,14 +729,14 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
723
729
|
};
|
|
724
730
|
readonly RuleCondition: {
|
|
725
731
|
readonly title: "RuleCondition";
|
|
726
|
-
readonly 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.";
|
|
732
|
+
readonly 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`.";
|
|
727
733
|
readonly type: "object";
|
|
728
734
|
readonly additionalProperties: false;
|
|
729
735
|
readonly required: readonly ["fact", "op"];
|
|
730
736
|
readonly properties: {
|
|
731
737
|
readonly fact: {
|
|
732
738
|
readonly type: "string";
|
|
733
|
-
readonly enum: readonly ["role", "field", "personhood", "joinedAt"];
|
|
739
|
+
readonly enum: readonly ["role", "field", "personhood", "joinedAt", "kudosReceived", "ideasSelected", "electionTickets"];
|
|
734
740
|
};
|
|
735
741
|
readonly field: {
|
|
736
742
|
readonly $ref: "#/$defs/FieldKey";
|
|
@@ -738,8 +744,8 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
738
744
|
};
|
|
739
745
|
readonly op: {
|
|
740
746
|
readonly type: "string";
|
|
741
|
-
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after"];
|
|
742
|
-
readonly description: "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.";
|
|
747
|
+
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after", "atLeast"];
|
|
748
|
+
readonly 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`.";
|
|
743
749
|
};
|
|
744
750
|
readonly value: {
|
|
745
751
|
readonly anyOf: readonly [{
|
|
@@ -758,6 +764,12 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
758
764
|
readonly maxLength: 256;
|
|
759
765
|
};
|
|
760
766
|
};
|
|
767
|
+
readonly count: {
|
|
768
|
+
readonly type: "integer";
|
|
769
|
+
readonly minimum: 1;
|
|
770
|
+
readonly maximum: 100000;
|
|
771
|
+
readonly description: "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`.";
|
|
772
|
+
};
|
|
761
773
|
};
|
|
762
774
|
};
|
|
763
775
|
readonly FieldKey: {
|
|
@@ -1200,14 +1212,14 @@ export declare const SPEC: {
|
|
|
1200
1212
|
};
|
|
1201
1213
|
readonly RuleCondition: {
|
|
1202
1214
|
readonly title: "RuleCondition";
|
|
1203
|
-
readonly 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.";
|
|
1215
|
+
readonly 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`.";
|
|
1204
1216
|
readonly type: "object";
|
|
1205
1217
|
readonly additionalProperties: false;
|
|
1206
1218
|
readonly required: readonly ["fact", "op"];
|
|
1207
1219
|
readonly properties: {
|
|
1208
1220
|
readonly fact: {
|
|
1209
1221
|
readonly type: "string";
|
|
1210
|
-
readonly enum: readonly ["role", "field", "personhood", "joinedAt"];
|
|
1222
|
+
readonly enum: readonly ["role", "field", "personhood", "joinedAt", "kudosReceived", "ideasSelected", "electionTickets"];
|
|
1211
1223
|
};
|
|
1212
1224
|
readonly field: {
|
|
1213
1225
|
readonly $ref: "#/$defs/FieldKey";
|
|
@@ -1215,8 +1227,8 @@ export declare const SPEC: {
|
|
|
1215
1227
|
};
|
|
1216
1228
|
readonly op: {
|
|
1217
1229
|
readonly type: "string";
|
|
1218
|
-
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after"];
|
|
1219
|
-
readonly description: "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.";
|
|
1230
|
+
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after", "atLeast"];
|
|
1231
|
+
readonly 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`.";
|
|
1220
1232
|
};
|
|
1221
1233
|
readonly value: {
|
|
1222
1234
|
readonly anyOf: readonly [{
|
|
@@ -1235,6 +1247,12 @@ export declare const SPEC: {
|
|
|
1235
1247
|
readonly maxLength: 256;
|
|
1236
1248
|
};
|
|
1237
1249
|
};
|
|
1250
|
+
readonly count: {
|
|
1251
|
+
readonly type: "integer";
|
|
1252
|
+
readonly minimum: 1;
|
|
1253
|
+
readonly maximum: 100000;
|
|
1254
|
+
readonly description: "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`.";
|
|
1255
|
+
};
|
|
1238
1256
|
};
|
|
1239
1257
|
};
|
|
1240
1258
|
readonly FieldKey: {
|
|
@@ -1596,14 +1614,14 @@ export declare const RESPONSE_SPEC: {
|
|
|
1596
1614
|
};
|
|
1597
1615
|
readonly RuleCondition: {
|
|
1598
1616
|
readonly title: "RuleCondition";
|
|
1599
|
-
readonly 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.";
|
|
1617
|
+
readonly 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`.";
|
|
1600
1618
|
readonly type: "object";
|
|
1601
1619
|
readonly additionalProperties: false;
|
|
1602
1620
|
readonly required: readonly ["fact", "op"];
|
|
1603
1621
|
readonly properties: {
|
|
1604
1622
|
readonly fact: {
|
|
1605
1623
|
readonly type: "string";
|
|
1606
|
-
readonly enum: readonly ["role", "field", "personhood", "joinedAt"];
|
|
1624
|
+
readonly enum: readonly ["role", "field", "personhood", "joinedAt", "kudosReceived", "ideasSelected", "electionTickets"];
|
|
1607
1625
|
};
|
|
1608
1626
|
readonly field: {
|
|
1609
1627
|
readonly $ref: "#/$defs/FieldKey";
|
|
@@ -1611,8 +1629,8 @@ export declare const RESPONSE_SPEC: {
|
|
|
1611
1629
|
};
|
|
1612
1630
|
readonly op: {
|
|
1613
1631
|
readonly type: "string";
|
|
1614
|
-
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after"];
|
|
1615
|
-
readonly description: "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.";
|
|
1632
|
+
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after", "atLeast"];
|
|
1633
|
+
readonly 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`.";
|
|
1616
1634
|
};
|
|
1617
1635
|
readonly value: {
|
|
1618
1636
|
readonly anyOf: readonly [{
|
|
@@ -1631,6 +1649,12 @@ export declare const RESPONSE_SPEC: {
|
|
|
1631
1649
|
readonly maxLength: 256;
|
|
1632
1650
|
};
|
|
1633
1651
|
};
|
|
1652
|
+
readonly count: {
|
|
1653
|
+
readonly type: "integer";
|
|
1654
|
+
readonly minimum: 1;
|
|
1655
|
+
readonly maximum: 100000;
|
|
1656
|
+
readonly description: "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`.";
|
|
1657
|
+
};
|
|
1634
1658
|
};
|
|
1635
1659
|
};
|
|
1636
1660
|
readonly FieldKey: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vtc/badges/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|
|
@@ -297,7 +297,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
297
297
|
},
|
|
298
298
|
"RuleCondition": {
|
|
299
299
|
"title": "RuleCondition",
|
|
300
|
-
"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.",
|
|
300
|
+
"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`.",
|
|
301
301
|
"type": "object",
|
|
302
302
|
"additionalProperties": false,
|
|
303
303
|
"required": [
|
|
@@ -311,7 +311,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
311
311
|
"role",
|
|
312
312
|
"field",
|
|
313
313
|
"personhood",
|
|
314
|
-
"joinedAt"
|
|
314
|
+
"joinedAt",
|
|
315
|
+
"kudosReceived",
|
|
316
|
+
"ideasSelected",
|
|
317
|
+
"electionTickets"
|
|
315
318
|
]
|
|
316
319
|
},
|
|
317
320
|
"field": {
|
|
@@ -325,9 +328,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
325
328
|
"oneOf",
|
|
326
329
|
"exists",
|
|
327
330
|
"before",
|
|
328
|
-
"after"
|
|
331
|
+
"after",
|
|
332
|
+
"atLeast"
|
|
329
333
|
],
|
|
330
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
334
|
+
"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`."
|
|
331
335
|
},
|
|
332
336
|
"value": {
|
|
333
337
|
"anyOf": [
|
|
@@ -348,6 +352,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
348
352
|
"type": "string",
|
|
349
353
|
"maxLength": 256
|
|
350
354
|
}
|
|
355
|
+
},
|
|
356
|
+
"count": {
|
|
357
|
+
"type": "integer",
|
|
358
|
+
"minimum": 1,
|
|
359
|
+
"maximum": 100000,
|
|
360
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
351
361
|
}
|
|
352
362
|
}
|
|
353
363
|
},
|
|
@@ -748,7 +758,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
748
758
|
},
|
|
749
759
|
"RuleCondition": {
|
|
750
760
|
"title": "RuleCondition",
|
|
751
|
-
"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.",
|
|
761
|
+
"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`.",
|
|
752
762
|
"type": "object",
|
|
753
763
|
"additionalProperties": false,
|
|
754
764
|
"required": [
|
|
@@ -762,7 +772,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
762
772
|
"role",
|
|
763
773
|
"field",
|
|
764
774
|
"personhood",
|
|
765
|
-
"joinedAt"
|
|
775
|
+
"joinedAt",
|
|
776
|
+
"kudosReceived",
|
|
777
|
+
"ideasSelected",
|
|
778
|
+
"electionTickets"
|
|
766
779
|
]
|
|
767
780
|
},
|
|
768
781
|
"field": {
|
|
@@ -776,9 +789,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
776
789
|
"oneOf",
|
|
777
790
|
"exists",
|
|
778
791
|
"before",
|
|
779
|
-
"after"
|
|
792
|
+
"after",
|
|
793
|
+
"atLeast"
|
|
780
794
|
],
|
|
781
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
795
|
+
"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`."
|
|
782
796
|
},
|
|
783
797
|
"value": {
|
|
784
798
|
"anyOf": [
|
|
@@ -799,6 +813,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
799
813
|
"type": "string",
|
|
800
814
|
"maxLength": 256
|
|
801
815
|
}
|
|
816
|
+
},
|
|
817
|
+
"count": {
|
|
818
|
+
"type": "integer",
|
|
819
|
+
"minimum": 1,
|
|
820
|
+
"maximum": 100000,
|
|
821
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
802
822
|
}
|
|
803
823
|
}
|
|
804
824
|
},
|