@oxyhq/crowdsource-contracts 0.3.0 → 0.4.0

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 (81) hide show
  1. package/dist/appeals.d.ts +323 -0
  2. package/dist/appeals.d.ts.map +1 -0
  3. package/dist/appeals.js +203 -0
  4. package/dist/appeals.js.map +1 -0
  5. package/dist/case-envelope.d.ts +3 -3
  6. package/dist/case-envelope.d.ts.map +1 -1
  7. package/dist/case-envelope.js +32 -32
  8. package/dist/case-envelope.js.map +1 -1
  9. package/dist/decisions.d.ts +1 -1
  10. package/dist/decisions.d.ts.map +1 -1
  11. package/dist/decisions.js +28 -28
  12. package/dist/decisions.js.map +1 -1
  13. package/dist/esm/appeals.js +200 -0
  14. package/dist/esm/appeals.js.map +1 -0
  15. package/dist/esm/case-envelope.js +380 -0
  16. package/dist/esm/case-envelope.js.map +1 -0
  17. package/dist/esm/closed.js +32 -0
  18. package/dist/esm/closed.js.map +1 -0
  19. package/dist/esm/decisions.js +195 -0
  20. package/dist/esm/decisions.js.map +1 -0
  21. package/dist/esm/index.js +48 -0
  22. package/dist/esm/index.js.map +1 -0
  23. package/dist/esm/json-schema.js +84 -0
  24. package/dist/esm/json-schema.js.map +1 -0
  25. package/dist/esm/package.json +1 -0
  26. package/dist/esm/policies.js +175 -0
  27. package/dist/esm/policies.js.map +1 -0
  28. package/dist/esm/primitives.js +249 -0
  29. package/dist/esm/primitives.js.map +1 -0
  30. package/dist/esm/reputation-events.js +125 -0
  31. package/dist/esm/reputation-events.js.map +1 -0
  32. package/dist/esm/resources.js +455 -0
  33. package/dist/esm/resources.js.map +1 -0
  34. package/dist/esm/reviewer-surface.js +612 -0
  35. package/dist/esm/reviewer-surface.js.map +1 -0
  36. package/dist/esm/reviews.js +141 -0
  37. package/dist/esm/reviews.js.map +1 -0
  38. package/dist/esm/taxonomy.js +278 -0
  39. package/dist/esm/taxonomy.js.map +1 -0
  40. package/dist/esm/webhooks.js +188 -0
  41. package/dist/esm/webhooks.js.map +1 -0
  42. package/dist/index.d.ts +13 -11
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +13 -11
  45. package/dist/index.js.map +1 -1
  46. package/dist/json-schema.d.ts +1 -1
  47. package/dist/json-schema.d.ts.map +1 -1
  48. package/dist/json-schema.js +25 -20
  49. package/dist/json-schema.js.map +1 -1
  50. package/dist/policies.d.ts +1 -1
  51. package/dist/policies.d.ts.map +1 -1
  52. package/dist/policies.js +14 -14
  53. package/dist/policies.js.map +1 -1
  54. package/dist/reputation-events.js +19 -19
  55. package/dist/reputation-events.js.map +1 -1
  56. package/dist/resources.d.ts +60 -2
  57. package/dist/resources.d.ts.map +1 -1
  58. package/dist/resources.js +116 -103
  59. package/dist/resources.js.map +1 -1
  60. package/dist/reviewer-surface.d.ts +1956 -0
  61. package/dist/reviewer-surface.d.ts.map +1 -0
  62. package/dist/reviewer-surface.js +615 -0
  63. package/dist/reviewer-surface.js.map +1 -0
  64. package/dist/reviews.js +15 -15
  65. package/dist/reviews.js.map +1 -1
  66. package/dist/webhooks.d.ts +1 -1
  67. package/dist/webhooks.d.ts.map +1 -1
  68. package/dist/webhooks.js +18 -18
  69. package/dist/webhooks.js.map +1 -1
  70. package/package.json +4 -4
  71. package/src/appeals.ts +229 -0
  72. package/src/case-envelope.ts +5 -5
  73. package/src/decisions.ts +6 -6
  74. package/src/index.ts +13 -11
  75. package/src/json-schema.ts +12 -7
  76. package/src/policies.ts +3 -3
  77. package/src/reputation-events.ts +4 -4
  78. package/src/resources.ts +99 -73
  79. package/src/reviewer-surface.ts +715 -0
  80. package/src/reviews.ts +4 -4
  81. package/src/webhooks.ts +4 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviewer-surface.d.ts","sourceRoot":"","sources":["../src/reviewer-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,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,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,kCAAkC;AAClC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB;;;kBAGnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,615 @@
1
+ "use strict";
2
+ /**
3
+ * The Reviewer API wire contract (§10.3) — what the backend sends and the
4
+ * reviewer app receives, declared once.
5
+ *
6
+ * ## Why this module exists at all
7
+ *
8
+ * It exists because the alternative was tried and failed silently. The backend
9
+ * and the reviewer app each wrote their own version of these shapes, and they
10
+ * agreed on almost nothing: the state vocabularies differed outright
11
+ * (`community` against `community_reviewer`), so did the sensitivity classes
12
+ * (`standard`/`sensitive`/`restricted` against an invented
13
+ * `none`/`low`/`high`/`critical`); the assignment package disagreed on
14
+ * `allegation` against `allegations`, on `policyVersion` against `version`, and
15
+ * on five fields that existed on one side only. Nothing caught it, because there
16
+ * was no shared declaration for anything to be checked against.
17
+ *
18
+ * So the rule this module encodes: **a field that crosses the reviewer boundary
19
+ * is declared here and nowhere else.**
20
+ *
21
+ * ## Schemas, and types inferred from them
22
+ *
23
+ * Every shape is a Zod schema, and its TypeScript type is `z.infer` of that
24
+ * schema. One declaration, so the two cannot disagree — which is a property worth
25
+ * more here than the hand-written interfaces it replaces, since "two declarations
26
+ * of one shape drifted apart" is the exact bug this file was written to end.
27
+ *
28
+ * Both halves are load-bearing and they catch different failures:
29
+ *
30
+ * - The **type** is what the backend's builders return and what the app's
31
+ * projections return, so a renamed field is a compile error on BOTH sides at
32
+ * once — the check that would have caught every drift listed above on the day
33
+ * it appeared.
34
+ * - The **schema** is what the app parses the response WITH, and it is
35
+ * `.strict()` at every level. §9.1's hidden column has no field on any shape
36
+ * here, so a server that starts sending a report count or an author's
37
+ * reputation is REFUSED rather than having it quietly reach a screen. A type
38
+ * cannot do that: types are gone at runtime, and the wire is where an
39
+ * unexpected field actually arrives.
40
+ *
41
+ * Strict is the right direction for this surface specifically. A reviewer seeing
42
+ * a blank screen is a bug somebody fixes today; a reviewer seeing an author's
43
+ * reputation is a bug nobody notices.
44
+ *
45
+ * ## What is deliberately NOT here
46
+ *
47
+ * No case id, on any shape. §8.7 pseudonymises what a reviewer does not need and
48
+ * a case id is not needed to judge material; more to the point, a case id on the
49
+ * wire is a case id in a URL, and "nobody chooses the case they review" holds
50
+ * because the assignment is the only handle. No reporter, no report count, no
51
+ * reputation, no juror identity, no partial tally.
52
+ */
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.ReviewHistoryQuerySchema = exports.ReviewHistoryPageSchema = exports.ReviewHistoryEntrySchema = exports.REVIEW_HISTORY_PAGE_SIZE_DEFAULT = exports.REVIEW_HISTORY_PAGE_SIZE_MAX = exports.ReviewerCalibrationResultViewSchema = exports.ReviewerCalibrationSubmissionSchema = exports.ReviewerTrainingViewSchema = exports.ReviewerPreferencesUpdateSchema = exports.ReviewerProfileViewSchema = exports.ReviewerPreferencesViewSchema = exports.ReviewerConsentViewSchema = exports.ReviewerExposureViewSchema = exports.ReviewerCategoryStandingSchema = exports.ReviewerEligibilityRequirementSchema = exports.IssuedAssignmentPackageSchema = exports.AssignmentPackageSchema = exports.ReviewerResourceSchema = exports.ReviewerAssetSchema = exports.ASSIGNMENT_TOKEN_HEADER = exports.REVIEWER_DAILY_LIMIT_MAX = exports.ReviewerEligibilityRequirementIdSchema = exports.REVIEWER_ELIGIBILITY_REQUIREMENTS = exports.ReviewerSensitivityClassSchema = exports.REVIEWER_SENSITIVITY_CLASSES = exports.ReviewerStateSchema = exports.REVIEWER_STATES = void 0;
55
+ const zod_1 = require("zod");
56
+ const decisions_js_1 = require("./decisions.js");
57
+ const policies_js_1 = require("./policies.js");
58
+ const primitives_js_1 = require("./primitives.js");
59
+ const resources_js_1 = require("./resources.js");
60
+ const reviews_js_1 = require("./reviews.js");
61
+ const taxonomy_js_1 = require("./taxonomy.js");
62
+ // --- vocabularies ------------------------------------------------------------
63
+ /**
64
+ * §8.1's seven onboarding states, ordered from least to most capable.
65
+ *
66
+ * §8.1 writes them as English prose labels ("Community Reviewer", "Category
67
+ * Specialist"). These are the identifiers, and they are the SHORT forms on
68
+ * purpose: the `_reviewer` suffix says nothing a `ReviewerState` type does not
69
+ * already say, and `specialist` pairs with a separate `specialistCategories`
70
+ * field, so `category_specialist` would name the category twice.
71
+ *
72
+ * `suspended` is apart from the ordering rather than at the bottom of it — see
73
+ * the backend's `REVIEWER_STATE_RANK`, which gives it -1 so every capability
74
+ * comparison fails for it, including one against `applicant`.
75
+ */
76
+ exports.REVIEWER_STATES = [
77
+ 'applicant',
78
+ 'calibrating',
79
+ 'community',
80
+ 'trusted',
81
+ 'specialist',
82
+ 'appeals',
83
+ 'suspended',
84
+ ];
85
+ exports.ReviewerStateSchema = zod_1.z.enum(exports.REVIEWER_STATES);
86
+ /**
87
+ * The sensitivity classes a jury can be shown, ranked (§7.5, §13.7).
88
+ *
89
+ * Triage computes a fourth, `prohibited`, and it is absent here on purpose: §7.5
90
+ * routes that material to a specialist team under legal protocol and never to a
91
+ * jury, so a reviewer-facing type that could express it would eventually be
92
+ * handed it. The backend's `sensitivityRank` throws rather than returning a
93
+ * number for it, for the same reason.
94
+ *
95
+ * This is also the vocabulary a reviewer's own consent is stored in, as a rank —
96
+ * which is why it could never have been the app's invented
97
+ * `none`/`low`/`high`/`critical`: those four map onto nothing the server computes
98
+ * or the reviewer consented to.
99
+ */
100
+ exports.REVIEWER_SENSITIVITY_CLASSES = ['standard', 'sensitive', 'restricted'];
101
+ exports.ReviewerSensitivityClassSchema = zod_1.z.enum(exports.REVIEWER_SENSITIVITY_CLASSES);
102
+ /**
103
+ * The eligibility requirements a reviewer may be TOLD about (§8.2).
104
+ *
105
+ * §8.2 lists ten conditions and this list is eight, which is the interesting
106
+ * part. Two groups are missing and neither is an oversight:
107
+ *
108
+ * - **Relative to a case.** Conflict with a party, prior participation in the
109
+ * case or incident, and coordination-cluster overlap are properties of a
110
+ * candidate against a specific case's parties — they live in
111
+ * `sortition/exclusions.ts` where the parties are known, and outside a draw
112
+ * there is no answer to give.
113
+ * - **Anti-abuse signals.** A sock-puppet suspicion is deliberately not
114
+ * disclosed. Telling somebody they are flagged tells them what to change,
115
+ * which is the same reasoning that keeps `suspectedSockPuppet` and
116
+ * `riskClusterId` out of the profile projection entirely.
117
+ *
118
+ * Exposure is absent too, but only because it has a richer home of its own:
119
+ * `ReviewerExposureView` gives the numbers rather than a boolean.
120
+ *
121
+ * Every id here maps to a check the server actually performs, so the app can
122
+ * never display a requirement nobody enforces. There is no server-authored
123
+ * explanation string: the app is translated (`locales/*.json`) and a sentence
124
+ * composed by a backend with no locale would arrive in the wrong language.
125
+ */
126
+ exports.REVIEWER_ELIGIBILITY_REQUIREMENTS = [
127
+ /** §8.2: "an active and authenticated Oxy account". */
128
+ 'oxy_account',
129
+ /** §8.2: personhood sufficient for real decisions. */
130
+ 'personhood',
131
+ /** §8.2: an age compatible with the chosen categories. */
132
+ 'age',
133
+ /** §13.7: the reviewing rules were accepted. */
134
+ 'rules_accepted',
135
+ /** §8.2: at least one language, or no case can ever match. */
136
+ 'languages_selected',
137
+ /** §8.2: at least one category, likewise. */
138
+ 'categories_selected',
139
+ /** §8.1: every training module complete. */
140
+ 'training_current',
141
+ /** §8.2: calibration passed and not lapsed. */
142
+ 'calibration_current',
143
+ ];
144
+ exports.ReviewerEligibilityRequirementIdSchema = zod_1.z.enum(exports.REVIEWER_ELIGIBILITY_REQUIREMENTS);
145
+ /**
146
+ * §13.7's ceiling on a self-chosen daily limit.
147
+ *
148
+ * Declared here because the request schema below bounds the body with it and the
149
+ * app's control has to offer the same range — two numbers that must agree, so
150
+ * there is one.
151
+ */
152
+ exports.REVIEWER_DAILY_LIMIT_MAX = 40;
153
+ /** The header §8.7's assignment token travels in. One spelling, both sides. */
154
+ exports.ASSIGNMENT_TOKEN_HEADER = 'x-assignment-token';
155
+ // --- case material -----------------------------------------------------------
156
+ /**
157
+ * A resource asset as a reviewer receives it (§8.7, §9.1).
158
+ *
159
+ * The envelope's `AssetRef` carries `uploadId` OR `url`, plus a `sha256`. None of
160
+ * the three reaches a reviewer:
161
+ *
162
+ * - `url` is a location on the REPORTING APPLICATION's own host, so sending it
163
+ * puts that application's brand in front of the jury — §9.1's last hidden row
164
+ * — and it bypasses the media chokepoint every Oxy surface resolves files
165
+ * through.
166
+ * - `sha256` is what pins a case to the exact bytes reported. A reviewer does
167
+ * not verify that; the case does.
168
+ *
169
+ * What replaces them is `fileId`, a bare Oxy file id resolved through
170
+ * `getFileDownloadUrl` at the app root, and `retrievable`, which is the honest
171
+ * answer when there is nothing a reviewer can be shown. A reviewer facing an
172
+ * unretrievable resource has an outcome for exactly that (`content_unavailable`),
173
+ * which is why this is a flag rather than an omission: dropping the resource
174
+ * would hide from the jury that material existed at all.
175
+ */
176
+ exports.ReviewerAssetSchema = zod_1.z.strictObject({
177
+ mediaType: primitives_js_1.MimeTypeSchema,
178
+ /** Bare Oxy file id. Absent whenever `retrievable` is false. */
179
+ fileId: primitives_js_1.IdentifierSchema.optional(),
180
+ /** False when CrowdSource cannot serve these bytes to a reviewer. */
181
+ retrievable: zod_1.z.boolean(),
182
+ sizeBytes: zod_1.z.number().int().positive().optional(),
183
+ width: zod_1.z.number().int().positive().optional(),
184
+ height: zod_1.z.number().int().positive().optional(),
185
+ durationSeconds: zod_1.z.number().positive().optional(),
186
+ });
187
+ /**
188
+ * The envelope fields every reviewer-facing resource carries.
189
+ *
190
+ * `sha256` is absent, as above. `authorPrincipalRef` is PRESENT, and that is a
191
+ * decision rather than an oversight: §9.1 hides the author's IDENTITY and
192
+ * REPUTATION, and an envelope-scoped pseudonym (§13.5's "a pseudonymous
193
+ * principal wherever one suffices") is neither. It resolves to nothing outside
194
+ * this one case, and which resources share an author is exactly the context a
195
+ * harassment allegation cannot be judged without.
196
+ */
197
+ const reviewerResourceShape = {
198
+ id: resources_js_1.ResourceIdSchema,
199
+ role: resources_js_1.ResourceRoleSchema,
200
+ language: primitives_js_1.LanguageTagSchema.optional(),
201
+ createdAt: primitives_js_1.TimestampSchema.optional(),
202
+ authorPrincipalRef: resources_js_1.PrincipalRefSchema.optional(),
203
+ sensitivity: taxonomy_js_1.SensitivityHintSchema.optional(),
204
+ };
205
+ /**
206
+ * One resource of case material, as a reviewer receives it.
207
+ *
208
+ * Built from the same `*DataSchema` exports the envelope's own resources are
209
+ * built from, so the twelve content shapes exist once. What differs is exactly
210
+ * the two things the reviewer projection changes: no `sha256`, and `asset` is a
211
+ * media handle rather than a locator.
212
+ *
213
+ * A strict parse rather than a hand-written field-by-field copy, and the reason
214
+ * is the direction each fails in. A copy can only drop what somebody thought to
215
+ * drop, and it can also DROP MATERIAL by accident — a jury shown less than the
216
+ * application sent is the worse failure of the two. A strict parse against a
217
+ * closed union refuses an unknown field outright and cannot silently lose a known
218
+ * one.
219
+ *
220
+ * `__tests__/reviewer-surface.test.ts` asserts this union still covers every
221
+ * `RESOURCE_TYPES` member and every base field of an envelope resource, so a new
222
+ * resource type or field in `resources.ts` cannot quietly stop reaching a jury.
223
+ */
224
+ exports.ReviewerResourceSchema = zod_1.z.discriminatedUnion('type', [
225
+ zod_1.z.strictObject({
226
+ ...reviewerResourceShape,
227
+ type: zod_1.z.literal('text'),
228
+ data: resources_js_1.TextResourceDataSchema,
229
+ }),
230
+ zod_1.z.strictObject({
231
+ ...reviewerResourceShape,
232
+ type: zod_1.z.literal('link'),
233
+ data: resources_js_1.LinkResourceDataSchema,
234
+ }),
235
+ zod_1.z.strictObject({
236
+ ...reviewerResourceShape,
237
+ type: zod_1.z.literal('profile'),
238
+ data: resources_js_1.ProfileResourceDataSchema,
239
+ }),
240
+ zod_1.z.strictObject({
241
+ ...reviewerResourceShape,
242
+ type: zod_1.z.literal('conversation'),
243
+ data: resources_js_1.ConversationResourceDataSchema,
244
+ }),
245
+ zod_1.z.strictObject({
246
+ ...reviewerResourceShape,
247
+ type: zod_1.z.literal('listing'),
248
+ data: resources_js_1.ListingResourceDataSchema,
249
+ }),
250
+ zod_1.z.strictObject({
251
+ ...reviewerResourceShape,
252
+ type: zod_1.z.literal('location'),
253
+ data: resources_js_1.LocationResourceDataSchema,
254
+ }),
255
+ zod_1.z.strictObject({
256
+ ...reviewerResourceShape,
257
+ type: zod_1.z.literal('metadata'),
258
+ data: resources_js_1.MetadataResourceDataSchema,
259
+ }),
260
+ zod_1.z.strictObject({
261
+ ...reviewerResourceShape,
262
+ type: zod_1.z.literal('custom'),
263
+ schemaId: primitives_js_1.IdentifierSchema,
264
+ payload: primitives_js_1.CustomPayloadSchema,
265
+ }),
266
+ zod_1.z.strictObject({
267
+ ...reviewerResourceShape,
268
+ type: zod_1.z.literal('image'),
269
+ asset: exports.ReviewerAssetSchema,
270
+ }),
271
+ zod_1.z.strictObject({
272
+ ...reviewerResourceShape,
273
+ type: zod_1.z.literal('video'),
274
+ asset: exports.ReviewerAssetSchema,
275
+ data: resources_js_1.VideoResourceDataSchema.optional(),
276
+ }),
277
+ zod_1.z.strictObject({
278
+ ...reviewerResourceShape,
279
+ type: zod_1.z.literal('audio'),
280
+ asset: exports.ReviewerAssetSchema,
281
+ data: resources_js_1.AudioResourceDataSchema.optional(),
282
+ }),
283
+ zod_1.z.strictObject({
284
+ ...reviewerResourceShape,
285
+ type: zod_1.z.literal('document'),
286
+ asset: exports.ReviewerAssetSchema,
287
+ data: resources_js_1.DocumentResourceDataSchema,
288
+ }),
289
+ ]);
290
+ // --- the assignment package --------------------------------------------------
291
+ /**
292
+ * The renderable package for ONE assignment (§8.7, §9.1).
293
+ *
294
+ * `language` is nullable because an envelope's resources may declare none, and
295
+ * `families` is plural because a case can allege several: a reviewer is only
296
+ * drawn when they accept ALL of them (§8.2), so naming one would misdescribe what
297
+ * they were asked to judge.
298
+ *
299
+ * `allegations.unverified` is a constant `true` on the wire. It is redundant to a
300
+ * reader of this file and it is not redundant to a screen: §9.1's requirement is
301
+ * that the claim is presented AS a claim, and a flag that must be read to render
302
+ * the label cannot be forgotten the way a comment can. `codes` is plural because
303
+ * a case is the union of every report about the same material (§7.3) and
304
+ * reporters do not all choose the same code — a singular field would silently
305
+ * show a jury one allegation out of several.
306
+ *
307
+ * `watermark` is §13.8's pseudonymous per-assignment mark. Server-issued so a
308
+ * leaked screenshot is traceable to one assignment; never synthesised on the
309
+ * device, because a watermark the client composes is one the client can also omit
310
+ * or forge, leaving a reviewer with the impression of a sealed screen and no
311
+ * actual trace.
312
+ */
313
+ exports.AssignmentPackageSchema = zod_1.z.strictObject({
314
+ assignmentId: primitives_js_1.IdentifierSchema,
315
+ /** The case revision this assignment is bound to (§8.7, §9.9). */
316
+ caseRevision: zod_1.z.number().int().positive(),
317
+ /** ISO instant. After this the assignment is gone and a replacement is drawn. */
318
+ expiresAt: primitives_js_1.TimestampSchema,
319
+ language: primitives_js_1.LanguageTagSchema.nullable(),
320
+ families: zod_1.z.array(taxonomy_js_1.TaxonomyFamilySchema).max(taxonomy_js_1.TAXONOMY_FAMILIES.length),
321
+ allegations: zod_1.z.strictObject({
322
+ unverified: zod_1.z.literal(true),
323
+ codes: zod_1.z.array(taxonomy_js_1.TaxonomyCodeSchema),
324
+ }),
325
+ /** §9.1's "applicable policy and its rules", in full and at one version (§6.4). */
326
+ policy: zod_1.z.strictObject({
327
+ policySetId: policies_js_1.PolicySetIdSchema,
328
+ version: policies_js_1.PolicyVersionSchema,
329
+ taxonomyVersion: zod_1.z.string().min(1).max(32),
330
+ rules: zod_1.z.array(policies_js_1.PolicyRuleSchema),
331
+ }),
332
+ /** §9.1's warnings and sensitivity, plus §13.7's blur decision. */
333
+ presentation: zod_1.z.strictObject({
334
+ sensitivityClass: exports.ReviewerSensitivityClassSchema,
335
+ requiresRedaction: zod_1.z.boolean(),
336
+ blurBeforeReveal: zod_1.z.boolean(),
337
+ }),
338
+ resources: zod_1.z.array(exports.ReviewerResourceSchema),
339
+ /** §5.5 — which resource replies to, quotes or contextualises which. */
340
+ relations: zod_1.z.array(resources_js_1.RelationSchema),
341
+ watermark: zod_1.z.string().min(1).max(64).nullable(),
342
+ /**
343
+ * §9.8's "contexto adicional" — the author's own words, present ONLY when this
344
+ * assignment belongs to an appeal revision and the author supplied any. Optional
345
+ * rather than nullable so a first-instance panel receives no such key at all: a
346
+ * `null` would let a screen infer "this is an appeal" from the field existing.
347
+ *
348
+ * `unverified` is a constant `true` for the same reason it is on an allegation —
349
+ * this is a claim by an interested party, not a finding, and the flag is what
350
+ * makes a screen say so.
351
+ *
352
+ * What this shape deliberately CANNOT carry is everything else about the appeal.
353
+ * Not the reason code, which is an argument about the verdict and would anchor
354
+ * the panel against §9.1's list. Not the superseded decision, its outcome, its
355
+ * findings or its jury — that is §9.8's blindness rule. Not the threshold this
356
+ * panel is held to, which is a property of the count and not of the material. A
357
+ * reviewer can tell they are looking at a contested case, because somebody is
358
+ * contesting it in their own words; they cannot tell what anybody concluded. The
359
+ * absence of those fields is the enforcement, and `.strict()` is what makes a
360
+ * server that starts sending one a refusal rather than a screen.
361
+ */
362
+ authorContext: zod_1.z
363
+ .strictObject({
364
+ unverified: zod_1.z.literal(true),
365
+ statement: zod_1.z.string().min(1),
366
+ /**
367
+ * The same shapes `AppealAuthorContextSchema` stores, reused rather than
368
+ * restated: `resourceIds` point at material already in the case snapshot,
369
+ * and `fields` is §9.8's "evidencia estructurada" as a flat bag of scalars.
370
+ * Restating them as some reviewer-shaped variant would need a translation
371
+ * step, and a translation step between two declarations of one shape is how
372
+ * the drift this file exists to end got started.
373
+ */
374
+ resourceIds: zod_1.z.array(resources_js_1.ResourceIdSchema).optional(),
375
+ fields: primitives_js_1.MetadataBagSchema.optional(),
376
+ })
377
+ .optional(),
378
+ });
379
+ /**
380
+ * What `POST /v1/reviewer/assignments/next` returns.
381
+ *
382
+ * The token is here and on no other response, because it is handed over exactly
383
+ * once and only its hash is stored (§8.7). Every later call on this assignment
384
+ * presents it in `x-assignment-token`.
385
+ */
386
+ exports.IssuedAssignmentPackageSchema = exports.AssignmentPackageSchema.extend({
387
+ token: zod_1.z.string().min(1).max(128),
388
+ });
389
+ // --- the reviewer's own profile ----------------------------------------------
390
+ exports.ReviewerEligibilityRequirementSchema = zod_1.z.strictObject({
391
+ id: exports.ReviewerEligibilityRequirementIdSchema,
392
+ met: zod_1.z.boolean(),
393
+ });
394
+ /**
395
+ * §4.1's "Fiabilidad" — the reviewer's OWN standing in one category.
396
+ *
397
+ * Per category and not per (category, language): reliability is seeded by
398
+ * calibration and moved by gold cases and audits, none of which are measured per
399
+ * language, so a per-language figure would be the same number repeated. §4.1 asks
400
+ * for both axes and this is the honest half of it.
401
+ *
402
+ * It is never anybody else's figure. §9.1 forbids a reviewer seeing another
403
+ * person's reputation, and no shape on this surface could carry one.
404
+ */
405
+ exports.ReviewerCategoryStandingSchema = zod_1.z.strictObject({
406
+ category: taxonomy_js_1.TaxonomyFamilySchema,
407
+ reliability: primitives_js_1.UnitIntervalSchema,
408
+ specialist: zod_1.z.boolean(),
409
+ });
410
+ /**
411
+ * §13.7's exposure and rest, as numbers rather than as a verdict.
412
+ *
413
+ * `breakRequiredUntil` is the sensitive-material rest of the backend's
414
+ * `eligibility.ts`: after `SENSITIVE_EXPOSURE_MAX` sensitive cases inside
415
+ * `SENSITIVE_EXPOSURE_WINDOW_HOURS`, the oldest of them leaving the window is
416
+ * when the reviewer may be drawn for sensitive material again. It rests only the
417
+ * SENSITIVE route — somebody who has worked through several distressing cases can
418
+ * still judge a spam report — so it is not a blanket block, and a screen showing
419
+ * it has to say which route it applies to.
420
+ */
421
+ exports.ReviewerExposureViewSchema = zod_1.z.strictObject({
422
+ reviewedToday: zod_1.z.number().int().nonnegative(),
423
+ dailyLimit: zod_1.z.number().int().positive(),
424
+ openAssignments: zod_1.z.number().int().nonnegative(),
425
+ maxOpenAssignments: zod_1.z.number().int().positive(),
426
+ /** ISO instant, or null when no rest is being enforced. */
427
+ breakRequiredUntil: primitives_js_1.TimestampSchema.nullable(),
428
+ });
429
+ /**
430
+ * §13.7 — consent, per category and revocable at any moment.
431
+ *
432
+ * `maxSensitivity` lives here rather than in preferences because it IS consent:
433
+ * the ceiling of what this person agreed to be shown. Keeping a second copy of
434
+ * `sensitiveCategories` under preferences — which is what the app used to declare
435
+ * — guarantees two fields that can disagree about the same fact.
436
+ */
437
+ exports.ReviewerConsentViewSchema = zod_1.z.strictObject({
438
+ /** ISO instant the reviewer accepted the reviewing rules, or null. */
439
+ rulesAcceptedAt: primitives_js_1.TimestampSchema.nullable(),
440
+ /** §8.2's age compatibility, as the one bit the routing needs (§13.5). */
441
+ ageConfirmed: zod_1.z.boolean(),
442
+ maxSensitivity: exports.ReviewerSensitivityClassSchema,
443
+ sensitiveCategories: zod_1.z.array(taxonomy_js_1.TaxonomyFamilySchema),
444
+ });
445
+ exports.ReviewerPreferencesViewSchema = zod_1.z.strictObject({
446
+ /** BCP-47 primary subtags the reviewer reads. */
447
+ languages: zod_1.z.array(zod_1.z.string().min(2).max(16)),
448
+ categories: zod_1.z.array(taxonomy_js_1.TaxonomyFamilySchema),
449
+ dailyLimit: zod_1.z.number().int().positive(),
450
+ /** False means this reviewer is in no draw at all — §4.1's immediate exit. */
451
+ availableForAssignment: zod_1.z.boolean(),
452
+ });
453
+ /**
454
+ * `GET /v1/reviewer/profile` (§10.3: "eligibility, categories and PRIVATE
455
+ * reliability").
456
+ *
457
+ * Private meaning shown to its owner and to nobody else. What the document holds
458
+ * and this does not: `oxyUserId` (§8.7 keeps the identity and the reviewer id
459
+ * apart), `samplingKey` (publishing it would let somebody reason about when they
460
+ * are likely to be considered), `personhoodConfidence` (the threshold is what
461
+ * matters; a bare number invites optimising a figure whose inputs are invisible),
462
+ * and the anti-abuse signals.
463
+ */
464
+ exports.ReviewerProfileViewSchema = zod_1.z.strictObject({
465
+ reviewerId: primitives_js_1.IdentifierSchema,
466
+ state: exports.ReviewerStateSchema,
467
+ eligibility: zod_1.z.array(exports.ReviewerEligibilityRequirementSchema),
468
+ standings: zod_1.z.array(exports.ReviewerCategoryStandingSchema),
469
+ completedReviewCount: zod_1.z.number().int().nonnegative(),
470
+ preferences: exports.ReviewerPreferencesViewSchema,
471
+ consent: exports.ReviewerConsentViewSchema,
472
+ exposure: exports.ReviewerExposureViewSchema,
473
+ });
474
+ /**
475
+ * The body of `POST /v1/reviewer/preferences` (§10.3).
476
+ *
477
+ * This is also §4.1's onboarding submission. There is no
478
+ * `POST /v1/reviewer/onboarding`: §10.3's route table has no such endpoint, and
479
+ * everything the onboarding screen collects — languages, categories, sensitive
480
+ * consent, age — is precisely what §10.3 says this route updates. Rules
481
+ * acceptance is the one thing that had no home, so it is a field here.
482
+ *
483
+ * `.strict()` matters more here than anywhere else on this surface. `state`,
484
+ * `personhoodConfidence`, `reliabilityByCategory` and `completedReviewCount` are
485
+ * the fields that decide who sits on a jury, and a lenient schema plus a
486
+ * spread-based update is exactly how a reviewer would promote themselves. The
487
+ * schema refuses unknown keys and the service takes named arguments, so there are
488
+ * two independent reasons it cannot happen.
489
+ *
490
+ * Every field is optional and at least one must be present: a partial update is
491
+ * the normal case (the wellbeing screen changes one toggle), and an empty body is
492
+ * a mistake worth naming rather than a no-op worth accepting.
493
+ */
494
+ exports.ReviewerPreferencesUpdateSchema = zod_1.z
495
+ .strictObject({
496
+ languages: zod_1.z.array(zod_1.z.string().min(2).max(16)).max(20).optional(),
497
+ categories: zod_1.z.array(taxonomy_js_1.TaxonomyFamilySchema).max(taxonomy_js_1.TAXONOMY_FAMILIES.length).optional(),
498
+ /** §13.7: acceptance is recorded once and is never revoked to `false` here. */
499
+ rulesAccepted: zod_1.z.literal(true).optional(),
500
+ isAdult: zod_1.z.boolean().optional(),
501
+ available: zod_1.z.boolean().optional(),
502
+ dailyReviewLimit: zod_1.z.number().int().min(1).max(exports.REVIEWER_DAILY_LIMIT_MAX).optional(),
503
+ maxSensitivity: exports.ReviewerSensitivityClassSchema.optional(),
504
+ consentedSensitiveCategories: zod_1.z
505
+ .array(taxonomy_js_1.TaxonomyFamilySchema)
506
+ .max(taxonomy_js_1.TAXONOMY_FAMILIES.length)
507
+ .optional(),
508
+ declaredConflictApplications: zod_1.z.array(zod_1.z.string().min(1).max(64)).max(50).optional(),
509
+ principalLinks: zod_1.z
510
+ .array(zod_1.z.strictObject({
511
+ applicationId: zod_1.z.string().min(1).max(64),
512
+ externalPrincipalId: zod_1.z.string().min(1).max(256),
513
+ }))
514
+ .max(50)
515
+ .optional(),
516
+ })
517
+ .refine((value) => Object.keys(value).length > 0, {
518
+ message: 'a preferences update must change at least one field',
519
+ });
520
+ // --- training and calibration ------------------------------------------------
521
+ /** `GET /v1/reviewer/training` (§10.3: "list modules and calibration"). */
522
+ exports.ReviewerTrainingViewSchema = zod_1.z.strictObject({
523
+ modules: zod_1.z.array(zod_1.z.strictObject({
524
+ moduleId: zod_1.z.string().min(1).max(64),
525
+ title: zod_1.z.string().min(1).max(200),
526
+ families: zod_1.z.array(taxonomy_js_1.TaxonomyFamilySchema),
527
+ completed: zod_1.z.boolean(),
528
+ })),
529
+ trainingComplete: zod_1.z.boolean(),
530
+ /**
531
+ * The items to answer: `itemId` and `text`, and nothing else.
532
+ *
533
+ * A calibration that hands back `expectedViolation` or `expectedCode` is one
534
+ * everybody passes on the second attempt, which measures attendance rather than
535
+ * judgement.
536
+ */
537
+ calibrationItems: zod_1.z.array(zod_1.z.strictObject({ itemId: zod_1.z.string().min(1).max(64), text: zod_1.z.string().min(1) })),
538
+ calibrationOpen: zod_1.z.boolean(),
539
+ /** ISO instant, or null when never passed. */
540
+ calibrationPassedAt: primitives_js_1.TimestampSchema.nullable(),
541
+ /** ISO instant after which calibration lapses (§8.2), or null. */
542
+ calibrationCurrentUntil: primitives_js_1.TimestampSchema.nullable(),
543
+ calibrationScore: primitives_js_1.UnitIntervalSchema.nullable(),
544
+ calibrationAttempts: zod_1.z.number().int().nonnegative(),
545
+ /** The score a pass requires, so the app does not restate it. */
546
+ calibrationPassScore: primitives_js_1.UnitIntervalSchema,
547
+ });
548
+ /** The body of `POST /v1/reviewer/training/calibration`. */
549
+ exports.ReviewerCalibrationSubmissionSchema = zod_1.z.strictObject({
550
+ answers: zod_1.z
551
+ .array(zod_1.z.strictObject({
552
+ itemId: zod_1.z.string().min(1).max(64),
553
+ violation: zod_1.z.boolean(),
554
+ code: taxonomy_js_1.TaxonomyCodeSchema.optional(),
555
+ }))
556
+ .min(1)
557
+ .max(64),
558
+ });
559
+ /**
560
+ * What a graded attempt reports back.
561
+ *
562
+ * The score and which items were wrong, never which answer was right — see
563
+ * `calibrationItems` above.
564
+ */
565
+ exports.ReviewerCalibrationResultViewSchema = zod_1.z.strictObject({
566
+ passed: zod_1.z.boolean(),
567
+ score: primitives_js_1.UnitIntervalSchema,
568
+ incorrectItemIds: zod_1.z.array(zod_1.z.string().min(1).max(64)),
569
+ state: exports.ReviewerStateSchema,
570
+ });
571
+ // --- history -----------------------------------------------------------------
572
+ exports.REVIEW_HISTORY_PAGE_SIZE_MAX = 50;
573
+ exports.REVIEW_HISTORY_PAGE_SIZE_DEFAULT = 20;
574
+ /**
575
+ * §4.1's "Historial" — one completed review as its author may see it back.
576
+ *
577
+ * `outcome` is the reviewer's OWN submitted outcome. `decision` is populated only
578
+ * once a decision has been PUBLISHED for the revision this reviewer judged, and
579
+ * carries the outcome and the moment and nothing else — no agreement figure, no
580
+ * jury size, no vote count, no findings. §4.1 asks the history to show "results
581
+ * that may already be revealed"; §9.1 forbids previous votes and partial results.
582
+ * Both hold: a published decision is not partial, and an agreement ratio IS a
583
+ * tally, so it has no field here rather than merely being left unset.
584
+ */
585
+ exports.ReviewHistoryEntrySchema = zod_1.z.strictObject({
586
+ reviewId: primitives_js_1.IdentifierSchema,
587
+ /** ISO instant. */
588
+ submittedAt: primitives_js_1.TimestampSchema,
589
+ families: zod_1.z.array(taxonomy_js_1.TaxonomyFamilySchema),
590
+ language: primitives_js_1.LanguageTagSchema.nullable(),
591
+ outcome: reviews_js_1.ReviewOutcomeSchema,
592
+ decision: zod_1.z
593
+ .strictObject({ outcome: decisions_js_1.DecisionOutcomeSchema, publishedAt: primitives_js_1.TimestampSchema })
594
+ .nullable(),
595
+ });
596
+ /** `GET /v1/reviewer/reviews`. */
597
+ exports.ReviewHistoryPageSchema = zod_1.z.strictObject({
598
+ entries: zod_1.z.array(exports.ReviewHistoryEntrySchema),
599
+ /** Opaque cursor for the next page, or null when the list is exhausted. */
600
+ nextCursor: zod_1.z.string().min(1).max(64).nullable(),
601
+ });
602
+ /**
603
+ * The query of `GET /v1/reviewer/reviews`.
604
+ *
605
+ * The cursor is opaque to the client and meaningful to the server, which is what
606
+ * lets the pagination change without a client change. It is not an offset: a
607
+ * reviewer submitting a review between two pages would shift every offset by one
608
+ * and silently skip an entry — in a list whose only purpose is somebody checking
609
+ * their own record.
610
+ */
611
+ exports.ReviewHistoryQuerySchema = zod_1.z.strictObject({
612
+ cursor: zod_1.z.string().min(1).max(64).optional(),
613
+ limit: zod_1.z.coerce.number().int().min(1).max(exports.REVIEW_HISTORY_PAGE_SIZE_MAX).optional(),
614
+ });
615
+ //# sourceMappingURL=reviewer-surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviewer-surface.js","sourceRoot":"","sources":["../src/reviewer-surface.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;;;AAEH,6BAAwB;AAExB,iDAAuD;AACvD,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