@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,323 @@
1
+ /**
2
+ * Appeals (§9.8, §9.9, §10.2).
3
+ *
4
+ * §9.8 opens with the rule the rest of this module serves: "la apelación no
5
+ * edita la decisión original. Crea una nueva revisión del caso con un jurado
6
+ * distinto y una nueva Decision revision." So an appeal is not a mutation and it
7
+ * is not a request to reconsider — it is an OBJECT: a requester, a reason, the
8
+ * author's structured additional context, and the pair of revisions it sits
9
+ * between. Everything about the outcome belongs to the decision it opens.
10
+ *
11
+ * Two strictness directions meet here, and they are the same two the package
12
+ * uses everywhere else:
13
+ *
14
+ * * **`AppealSubmissionSchema` is strict.** It arrives from a tenant, over the
15
+ * application API, carrying text the SUBJECT of a moderation case wrote —
16
+ * which is to say attacker-controlled text, filed by somebody with a motive.
17
+ * A field this schema tolerated is a field nobody validated.
18
+ * * **`AppealSchema` is loose.** It travels outbound, in the response and in
19
+ * §10.6's `appeal.created` and `appeal.decided`, so §10.11's "unknown fields
20
+ * must not break clients" applies.
21
+ *
22
+ * What is deliberately NOT here: the appeal's outcome, the new jury, the votes,
23
+ * anything about the panel. An appeal that carried its own verdict would be a
24
+ * second place the outcome of a case is written down, and §9.9 is explicit that
25
+ * there is exactly one — the decision revision.
26
+ */
27
+ import { z } from 'zod';
28
+ import type { Closed } from './closed.js';
29
+ /**
30
+ * Why an appeal was filed.
31
+ *
32
+ * §9.8 requires a reason but never enumerates one, and a closed list is the only
33
+ * shape that works: the reason is carried into the appeal record, read by an
34
+ * operator, and counted in §15.9's overturn-rate metrics, so a free-text field
35
+ * would be both a channel for case content and a dimension nobody can aggregate.
36
+ *
37
+ * The six are derived from what the plan already says an appeal can be about.
38
+ * `context_missing` is §9.8's own "el autor puede aportar una explicación" and
39
+ * the remedy §9.6's `insufficient_context` asks for. `policy_misapplied` and
40
+ * `finding_incorrect` split §6.2's two layers — the rule that was applied
41
+ * against the classification of the material — because they want different
42
+ * remedies and conflating them would lose that. `exception_applies` is §6.2's
43
+ * `context` qualifier (artistic, documentary, satire) asserted by the person who
44
+ * made the material. `not_responsible` is §11.7.4's attribution being wrong,
45
+ * which matters most: an effect landing on the wrong principal is the one error
46
+ * a reversal cannot fully undo. `procedural_error` covers the process itself.
47
+ */
48
+ export declare const APPEAL_REASONS: readonly ["context_missing", "policy_misapplied", "finding_incorrect", "exception_applies", "not_responsible", "procedural_error"];
49
+ export declare const AppealReasonSchema: z.ZodEnum<{
50
+ context_missing: "context_missing";
51
+ policy_misapplied: "policy_misapplied";
52
+ finding_incorrect: "finding_incorrect";
53
+ exception_applies: "exception_applies";
54
+ not_responsible: "not_responsible";
55
+ procedural_error: "procedural_error";
56
+ }>;
57
+ export type AppealReason = z.infer<typeof AppealReasonSchema>;
58
+ /**
59
+ * The lifecycle of an appeal, which has exactly two states and no third.
60
+ *
61
+ * `open` from the moment it creates a revision until that revision publishes a
62
+ * decision, `decided` afterwards. There is no `rejected` state: an appeal that
63
+ * is not eligible is REFUSED at the boundary and never becomes an object at all
64
+ * (§10.5's 403 and 409), because an appeal row that exists without having opened
65
+ * a revision would be a case in `appealed` status with no jury owed to it — the
66
+ * one failure mode §9.8 cannot tolerate, since the author has been told their
67
+ * case is being looked at again.
68
+ *
69
+ * There is also no `upheld`/`overturned` pair, and that is the same rule as
70
+ * above: whether the outcome changed is a property of the two decisions, and
71
+ * `decision.corrected` (§10.6) is what says so.
72
+ */
73
+ export declare const APPEAL_STATUSES: readonly ["open", "decided"];
74
+ export declare const AppealStatusSchema: z.ZodEnum<{
75
+ open: "open";
76
+ decided: "decided";
77
+ }>;
78
+ export type AppealStatus = z.infer<typeof AppealStatusSchema>;
79
+ /**
80
+ * §9.8's "contexto adicional": what the author may add, "sujeta a validación y
81
+ * redacción".
82
+ *
83
+ * Three shapes, and each is bounded for a different reason. `statement` is the
84
+ * explanation in the author's own words and is the field the redaction in the
85
+ * backend's `appealContext.ts` exists for. `resourceIds` point at material
86
+ * ALREADY in the case snapshot — an appeal cannot introduce new evidence through
87
+ * this field, because evidence enters through §10.2's upload endpoints where it
88
+ * is hashed and scanned, and a URL or a blob here would be an unvalidated
89
+ * resource reaching a reviewer's screen. `fields` is §9.8's "evidencia
90
+ * estructurada" in the one shape the contract already trusts: a flat bag of
91
+ * scalars, key-restricted and prototype-safe.
92
+ */
93
+ export declare const AppealAuthorContextSchema: z.ZodObject<{
94
+ statement: z.ZodString;
95
+ resourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
96
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
97
+ }, z.core.$strict>;
98
+ export type AppealAuthorContext = z.infer<typeof AppealAuthorContextSchema>;
99
+ /**
100
+ * The body of `POST /v1/cases/{id}/appeals` (§10.2).
101
+ *
102
+ * Strict, and with no `caseId`, no `decisionId` and no `applicationId` — the
103
+ * case comes from the route, the revision under appeal is whichever one the case
104
+ * has decided, and the application comes from the credential. A schema that
105
+ * tolerated any of the three would let a caller appeal a decision of a case it
106
+ * was not handed, which is the same class of hole as a review submission that
107
+ * accepted a case id.
108
+ *
109
+ * `appellantExternalPrincipalId` is the application's own id for the person
110
+ * appealing, and the server checks it against the principals the CASE MATERIAL
111
+ * points at. That is what makes §9.8's "el autor" enforceable rather than
112
+ * declarative: a reporter is referenced by an allegation and never by the
113
+ * material, so a reporter's id is not in that set and cannot appeal a decision
114
+ * that went against somebody else.
115
+ */
116
+ export declare const AppealSubmissionSchema: z.ZodObject<{
117
+ appellantExternalPrincipalId: z.ZodString;
118
+ reason: z.ZodEnum<{
119
+ context_missing: "context_missing";
120
+ policy_misapplied: "policy_misapplied";
121
+ finding_incorrect: "finding_incorrect";
122
+ exception_applies: "exception_applies";
123
+ not_responsible: "not_responsible";
124
+ procedural_error: "procedural_error";
125
+ }>;
126
+ authorContext: z.ZodOptional<z.ZodObject<{
127
+ statement: z.ZodString;
128
+ resourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
129
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
130
+ }, z.core.$strict>>;
131
+ }, z.core.$strict>;
132
+ export type AppealSubmission = z.infer<typeof AppealSubmissionSchema>;
133
+ /**
134
+ * One appeal, as it travels back to the application (§10.2, §10.6).
135
+ *
136
+ * `supersededRevision` and `openedRevision` are both here because an appeal is
137
+ * exactly the link between them, and reading it is how an integrator follows
138
+ * §9.9's history: the decision it appealed is the one at `supersededRevision`,
139
+ * and the decision that answers it is the one at `openedRevision`.
140
+ *
141
+ * `requiredAgreeingVotes` is the bar the new panel must clear — §9.4's "umbral
142
+ * superior al de la primera decisión cuando la acción sea grave" — recorded on
143
+ * the appeal so it is auditable and fixed at filing time rather than recomputed
144
+ * later from a ladder that may have changed.
145
+ *
146
+ * The author's context is deliberately absent. The application supplied it, so
147
+ * echoing it back tells the tenant nothing it does not have, and §13.5's
148
+ * minimisation applies to every copy of case content — including the ones in a
149
+ * webhook body that will be retried, stored and logged by a receiver.
150
+ */
151
+ export declare const AppealSchema: z.ZodObject<{
152
+ id: z.ZodString;
153
+ caseId: z.ZodString;
154
+ status: z.ZodEnum<{
155
+ open: "open";
156
+ decided: "decided";
157
+ }>;
158
+ reason: z.ZodEnum<{
159
+ context_missing: "context_missing";
160
+ policy_misapplied: "policy_misapplied";
161
+ finding_incorrect: "finding_incorrect";
162
+ exception_applies: "exception_applies";
163
+ not_responsible: "not_responsible";
164
+ procedural_error: "procedural_error";
165
+ }>;
166
+ supersededRevision: z.ZodNumber;
167
+ supersededDecisionId: z.ZodString;
168
+ openedRevision: z.ZodNumber;
169
+ requiredAgreeingVotes: z.ZodNumber;
170
+ filedAt: z.ZodISODateTime;
171
+ decision: z.ZodOptional<z.ZodObject<{
172
+ id: z.ZodString;
173
+ caseId: z.ZodString;
174
+ revision: z.ZodNumber;
175
+ status: z.ZodEnum<{
176
+ provisional: "provisional";
177
+ final: "final";
178
+ superseded: "superseded";
179
+ corrected: "corrected";
180
+ }>;
181
+ outcome: z.ZodEnum<{
182
+ violation: "violation";
183
+ no_violation: "no_violation";
184
+ insufficient_context: "insufficient_context";
185
+ content_unavailable: "content_unavailable";
186
+ inconclusive: "inconclusive";
187
+ duplicate: "duplicate";
188
+ escalated: "escalated";
189
+ }>;
190
+ contextSufficiency: z.ZodEnum<{
191
+ sufficient: "sufficient";
192
+ insufficient: "insufficient";
193
+ }>;
194
+ confidence: z.ZodNumber;
195
+ findings: z.ZodArray<z.ZodObject<{
196
+ code: z.ZodEnum<{
197
+ "integrity.spam": "integrity.spam";
198
+ "integrity.scam": "integrity.scam";
199
+ "integrity.fraud": "integrity.fraud";
200
+ "integrity.impersonation": "integrity.impersonation";
201
+ "integrity.coordinated_manipulation": "integrity.coordinated_manipulation";
202
+ "harassment.insult": "harassment.insult";
203
+ "harassment.targeted_abuse": "harassment.targeted_abuse";
204
+ "harassment.sexual_harassment": "harassment.sexual_harassment";
205
+ "harassment.doxxing": "harassment.doxxing";
206
+ "harassment.credible_threat": "harassment.credible_threat";
207
+ "hate.dehumanization": "hate.dehumanization";
208
+ "hate.slur": "hate.slur";
209
+ "hate.incitement": "hate.incitement";
210
+ "hate.protected_targeting": "hate.protected_targeting";
211
+ "violence.graphic": "violence.graphic";
212
+ "violence.threat": "violence.threat";
213
+ "violence.instruction": "violence.instruction";
214
+ "violence.celebration": "violence.celebration";
215
+ "sexual_content.nudity": "sexual_content.nudity";
216
+ "sexual_content.explicit_activity": "sexual_content.explicit_activity";
217
+ "sexual_content.non_consensual": "sexual_content.non_consensual";
218
+ "sexual_content.exploitation": "sexual_content.exploitation";
219
+ "child_safety.sexualization": "child_safety.sexualization";
220
+ "child_safety.grooming": "child_safety.grooming";
221
+ "child_safety.exploitation": "child_safety.exploitation";
222
+ "self_harm.promotion": "self_harm.promotion";
223
+ "self_harm.instruction": "self_harm.instruction";
224
+ "self_harm.imminent_risk": "self_harm.imminent_risk";
225
+ "privacy.personal_information": "privacy.personal_information";
226
+ "privacy.intimate_media": "privacy.intimate_media";
227
+ "privacy.location_exposure": "privacy.location_exposure";
228
+ "commerce.prohibited_item": "commerce.prohibited_item";
229
+ "commerce.counterfeit": "commerce.counterfeit";
230
+ "commerce.misleading_listing": "commerce.misleading_listing";
231
+ "commerce.unsafe_product": "commerce.unsafe_product";
232
+ "platform_abuse.ban_evasion": "platform_abuse.ban_evasion";
233
+ "platform_abuse.report_abuse": "platform_abuse.report_abuse";
234
+ "platform_abuse.automation_abuse": "platform_abuse.automation_abuse";
235
+ "other.policy_specific": "other.policy_specific";
236
+ "other.unclassifiable": "other.unclassifiable";
237
+ }>;
238
+ resourceIds: z.ZodArray<z.ZodString>;
239
+ severity: z.ZodEnum<{
240
+ low: "low";
241
+ medium: "medium";
242
+ high: "high";
243
+ critical: "critical";
244
+ }>;
245
+ context: z.ZodOptional<z.ZodEnum<{
246
+ artistic: "artistic";
247
+ educational: "educational";
248
+ documentary: "documentary";
249
+ newsworthy: "newsworthy";
250
+ satire: "satire";
251
+ counter_speech: "counter_speech";
252
+ medical: "medical";
253
+ consensual: "consensual";
254
+ fictional: "fictional";
255
+ }>>;
256
+ scope: z.ZodEnum<{
257
+ application_local: "application_local";
258
+ oxy_network: "oxy_network";
259
+ identity_integrity: "identity_integrity";
260
+ }>;
261
+ attribution: z.ZodOptional<z.ZodEnum<{
262
+ author: "author";
263
+ reporter: "reporter";
264
+ reviewer: "reviewer";
265
+ }>>;
266
+ policyRuleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
+ }, z.core.$loose>>;
268
+ recommendedActions: z.ZodArray<z.ZodObject<{
269
+ action: z.ZodEnum<{
270
+ remove_or_restrict: "remove_or_restrict";
271
+ allow_with_label: "allow_with_label";
272
+ remove: "remove";
273
+ hide: "hide";
274
+ label: "label";
275
+ age_gate: "age_gate";
276
+ reduce_distribution: "reduce_distribution";
277
+ freeze_transaction: "freeze_transaction";
278
+ suspend_user: "suspend_user";
279
+ request_changes: "request_changes";
280
+ allow: "allow";
281
+ restore: "restore";
282
+ no_action: "no_action";
283
+ request_more_context: "request_more_context";
284
+ hold: "hold";
285
+ local_manual_review: "local_manual_review";
286
+ keep_restricted_temporarily: "keep_restricted_temporarily";
287
+ escalate: "escalate";
288
+ no_global_effect: "no_global_effect";
289
+ specialist_queue: "specialist_queue";
290
+ legal_queue: "legal_queue";
291
+ safety_queue: "safety_queue";
292
+ }>;
293
+ targetResourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
294
+ }, z.core.$loose>>;
295
+ jury: z.ZodObject<{
296
+ size: z.ZodNumber;
297
+ decisiveVotes: z.ZodNumber;
298
+ winningVotes: z.ZodNumber;
299
+ agreement: z.ZodNumber;
300
+ specialistPresent: z.ZodBoolean;
301
+ }, z.core.$loose>;
302
+ policyVersions: z.ZodObject<{
303
+ taxonomy: z.ZodString;
304
+ application: z.ZodString;
305
+ oxyConduct: z.ZodString;
306
+ }, z.core.$loose>;
307
+ supersedesDecisionId: z.ZodOptional<z.ZodString>;
308
+ publishedAt: z.ZodISODateTime;
309
+ }, z.core.$loose>>;
310
+ }, z.core.$loose>;
311
+ /**
312
+ * `Closed`, like every other outbound type in this package.
313
+ *
314
+ * The schema stays loose — §10.11 requires unknown fields to pass through — and
315
+ * the exported type drops the index signature that looseness contributes. This
316
+ * DTO is the one in the package most likely to be misnamed by an integrator:
317
+ * `appeal.appealId` reads naturally and the field is `id`, and the webhook
318
+ * payload carries `data.appealId` beside `data.appeal.id`, so the two spellings
319
+ * sit next to each other in the same body. With an index signature both compile
320
+ * and one is `undefined` at runtime; closed, only the real one does.
321
+ */
322
+ export type Appeal = Closed<z.infer<typeof AppealSchema>>;
323
+ //# sourceMappingURL=appeals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appeals.d.ts","sourceRoot":"","sources":["../src/appeals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAW1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,oIAOjB,CAAC;AACX,eAAO,MAAM,kBAAkB;;;;;;;EAAyB,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,8BAA+B,CAAC;AAC5D,eAAO,MAAM,kBAAkB;;;EAA0B,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB;;;;kBAapC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;kBAIjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuDrB,CAAC;AACL;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC"}
@@ -0,0 +1,203 @@
1
+ "use strict";
2
+ /**
3
+ * Appeals (§9.8, §9.9, §10.2).
4
+ *
5
+ * §9.8 opens with the rule the rest of this module serves: "la apelación no
6
+ * edita la decisión original. Crea una nueva revisión del caso con un jurado
7
+ * distinto y una nueva Decision revision." So an appeal is not a mutation and it
8
+ * is not a request to reconsider — it is an OBJECT: a requester, a reason, the
9
+ * author's structured additional context, and the pair of revisions it sits
10
+ * between. Everything about the outcome belongs to the decision it opens.
11
+ *
12
+ * Two strictness directions meet here, and they are the same two the package
13
+ * uses everywhere else:
14
+ *
15
+ * * **`AppealSubmissionSchema` is strict.** It arrives from a tenant, over the
16
+ * application API, carrying text the SUBJECT of a moderation case wrote —
17
+ * which is to say attacker-controlled text, filed by somebody with a motive.
18
+ * A field this schema tolerated is a field nobody validated.
19
+ * * **`AppealSchema` is loose.** It travels outbound, in the response and in
20
+ * §10.6's `appeal.created` and `appeal.decided`, so §10.11's "unknown fields
21
+ * must not break clients" applies.
22
+ *
23
+ * What is deliberately NOT here: the appeal's outcome, the new jury, the votes,
24
+ * anything about the panel. An appeal that carried its own verdict would be a
25
+ * second place the outcome of a case is written down, and §9.9 is explicit that
26
+ * there is exactly one — the decision revision.
27
+ */
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.AppealSchema = exports.AppealSubmissionSchema = exports.AppealAuthorContextSchema = exports.AppealStatusSchema = exports.APPEAL_STATUSES = exports.AppealReasonSchema = exports.APPEAL_REASONS = void 0;
30
+ const zod_1 = require("zod");
31
+ const decisions_js_1 = require("./decisions.js");
32
+ const primitives_js_1 = require("./primitives.js");
33
+ const resources_js_1 = require("./resources.js");
34
+ /**
35
+ * Why an appeal was filed.
36
+ *
37
+ * §9.8 requires a reason but never enumerates one, and a closed list is the only
38
+ * shape that works: the reason is carried into the appeal record, read by an
39
+ * operator, and counted in §15.9's overturn-rate metrics, so a free-text field
40
+ * would be both a channel for case content and a dimension nobody can aggregate.
41
+ *
42
+ * The six are derived from what the plan already says an appeal can be about.
43
+ * `context_missing` is §9.8's own "el autor puede aportar una explicación" and
44
+ * the remedy §9.6's `insufficient_context` asks for. `policy_misapplied` and
45
+ * `finding_incorrect` split §6.2's two layers — the rule that was applied
46
+ * against the classification of the material — because they want different
47
+ * remedies and conflating them would lose that. `exception_applies` is §6.2's
48
+ * `context` qualifier (artistic, documentary, satire) asserted by the person who
49
+ * made the material. `not_responsible` is §11.7.4's attribution being wrong,
50
+ * which matters most: an effect landing on the wrong principal is the one error
51
+ * a reversal cannot fully undo. `procedural_error` covers the process itself.
52
+ */
53
+ exports.APPEAL_REASONS = [
54
+ 'context_missing',
55
+ 'policy_misapplied',
56
+ 'finding_incorrect',
57
+ 'exception_applies',
58
+ 'not_responsible',
59
+ 'procedural_error',
60
+ ];
61
+ exports.AppealReasonSchema = zod_1.z.enum(exports.APPEAL_REASONS);
62
+ /**
63
+ * The lifecycle of an appeal, which has exactly two states and no third.
64
+ *
65
+ * `open` from the moment it creates a revision until that revision publishes a
66
+ * decision, `decided` afterwards. There is no `rejected` state: an appeal that
67
+ * is not eligible is REFUSED at the boundary and never becomes an object at all
68
+ * (§10.5's 403 and 409), because an appeal row that exists without having opened
69
+ * a revision would be a case in `appealed` status with no jury owed to it — the
70
+ * one failure mode §9.8 cannot tolerate, since the author has been told their
71
+ * case is being looked at again.
72
+ *
73
+ * There is also no `upheld`/`overturned` pair, and that is the same rule as
74
+ * above: whether the outcome changed is a property of the two decisions, and
75
+ * `decision.corrected` (§10.6) is what says so.
76
+ */
77
+ exports.APPEAL_STATUSES = ['open', 'decided'];
78
+ exports.AppealStatusSchema = zod_1.z.enum(exports.APPEAL_STATUSES);
79
+ /**
80
+ * §9.8's "contexto adicional": what the author may add, "sujeta a validación y
81
+ * redacción".
82
+ *
83
+ * Three shapes, and each is bounded for a different reason. `statement` is the
84
+ * explanation in the author's own words and is the field the redaction in the
85
+ * backend's `appealContext.ts` exists for. `resourceIds` point at material
86
+ * ALREADY in the case snapshot — an appeal cannot introduce new evidence through
87
+ * this field, because evidence enters through §10.2's upload endpoints where it
88
+ * is hashed and scanned, and a URL or a blob here would be an unvalidated
89
+ * resource reaching a reviewer's screen. `fields` is §9.8's "evidencia
90
+ * estructurada" in the one shape the contract already trusts: a flat bag of
91
+ * scalars, key-restricted and prototype-safe.
92
+ */
93
+ exports.AppealAuthorContextSchema = zod_1.z.strictObject({
94
+ /**
95
+ * Free text from the author. Case content everywhere downstream: never logged,
96
+ * never attested, redacted before a reviewer sees it (§9.8, §13.4, §13.5).
97
+ */
98
+ statement: zod_1.z.string().min(1).max(primitives_js_1.CONTRACT_LIMITS.LONG_TEXT_MAX_LENGTH),
99
+ /** Resources of the case this context is about. Validated against the case. */
100
+ resourceIds: zod_1.z
101
+ .array(resources_js_1.ResourceIdSchema)
102
+ .max(primitives_js_1.CONTRACT_LIMITS.RESOURCE_REFS_PER_FINDING_MAX)
103
+ .optional(),
104
+ /** §9.8's structured evidence: flat, scalar, bounded — never a document tree. */
105
+ fields: primitives_js_1.MetadataBagSchema.optional(),
106
+ });
107
+ /**
108
+ * The body of `POST /v1/cases/{id}/appeals` (§10.2).
109
+ *
110
+ * Strict, and with no `caseId`, no `decisionId` and no `applicationId` — the
111
+ * case comes from the route, the revision under appeal is whichever one the case
112
+ * has decided, and the application comes from the credential. A schema that
113
+ * tolerated any of the three would let a caller appeal a decision of a case it
114
+ * was not handed, which is the same class of hole as a review submission that
115
+ * accepted a case id.
116
+ *
117
+ * `appellantExternalPrincipalId` is the application's own id for the person
118
+ * appealing, and the server checks it against the principals the CASE MATERIAL
119
+ * points at. That is what makes §9.8's "el autor" enforceable rather than
120
+ * declarative: a reporter is referenced by an allegation and never by the
121
+ * material, so a reporter's id is not in that set and cannot appeal a decision
122
+ * that went against somebody else.
123
+ */
124
+ exports.AppealSubmissionSchema = zod_1.z.strictObject({
125
+ appellantExternalPrincipalId: primitives_js_1.ExternalIdSchema,
126
+ reason: exports.AppealReasonSchema,
127
+ authorContext: exports.AppealAuthorContextSchema.optional(),
128
+ });
129
+ /**
130
+ * One appeal, as it travels back to the application (§10.2, §10.6).
131
+ *
132
+ * `supersededRevision` and `openedRevision` are both here because an appeal is
133
+ * exactly the link between them, and reading it is how an integrator follows
134
+ * §9.9's history: the decision it appealed is the one at `supersededRevision`,
135
+ * and the decision that answers it is the one at `openedRevision`.
136
+ *
137
+ * `requiredAgreeingVotes` is the bar the new panel must clear — §9.4's "umbral
138
+ * superior al de la primera decisión cuando la acción sea grave" — recorded on
139
+ * the appeal so it is auditable and fixed at filing time rather than recomputed
140
+ * later from a ladder that may have changed.
141
+ *
142
+ * The author's context is deliberately absent. The application supplied it, so
143
+ * echoing it back tells the tenant nothing it does not have, and §13.5's
144
+ * minimisation applies to every copy of case content — including the ones in a
145
+ * webhook body that will be retried, stored and logged by a receiver.
146
+ */
147
+ exports.AppealSchema = zod_1.z
148
+ .looseObject({
149
+ id: primitives_js_1.IdentifierSchema,
150
+ caseId: primitives_js_1.IdentifierSchema,
151
+ status: exports.AppealStatusSchema,
152
+ reason: exports.AppealReasonSchema,
153
+ /** The revision whose decision was appealed, and which is now superseded. */
154
+ supersededRevision: zod_1.z.number().int().positive(),
155
+ supersededDecisionId: primitives_js_1.IdentifierSchema,
156
+ /** The revision this appeal opened. Always `supersededRevision + 1` (§9.9). */
157
+ openedRevision: zod_1.z.number().int().positive(),
158
+ requiredAgreeingVotes: zod_1.z.number().int().positive().max(primitives_js_1.CONTRACT_LIMITS.JURY_SIZE_MAX),
159
+ filedAt: primitives_js_1.TimestampSchema,
160
+ /** The decision that answered the appeal, once one exists. */
161
+ decision: decisions_js_1.DecisionSchema.optional(),
162
+ })
163
+ .superRefine((appeal, ctx) => {
164
+ /**
165
+ * §9.9's chain, checked rather than described: an appeal opens the revision
166
+ * immediately after the one it superseded. A gap would mean a revision
167
+ * nobody appealed and nobody decided.
168
+ */
169
+ if (appeal.openedRevision !== appeal.supersededRevision + 1) {
170
+ ctx.addIssue({
171
+ code: 'custom',
172
+ path: ['openedRevision'],
173
+ message: 'an appeal opens the revision immediately after the one it superseded',
174
+ });
175
+ }
176
+ /**
177
+ * The status is DERIVED from whether the revision it opened has published a
178
+ * decision, so the two cannot disagree — and asserting it here is what
179
+ * catches a serializer that started storing the status separately.
180
+ */
181
+ if (appeal.status === 'decided' && appeal.decision === undefined) {
182
+ ctx.addIssue({
183
+ code: 'custom',
184
+ path: ['decision'],
185
+ message: 'a decided appeal must carry the decision that answered it',
186
+ });
187
+ }
188
+ if (appeal.status === 'open' && appeal.decision !== undefined) {
189
+ ctx.addIssue({
190
+ code: 'custom',
191
+ path: ['status'],
192
+ message: 'an appeal that carries a decision is decided, not open',
193
+ });
194
+ }
195
+ if (appeal.decision !== undefined && appeal.decision.revision !== appeal.openedRevision) {
196
+ ctx.addIssue({
197
+ code: 'custom',
198
+ path: ['decision', 'revision'],
199
+ message: 'the decision answering an appeal is the one at the revision it opened',
200
+ });
201
+ }
202
+ });
203
+ //# sourceMappingURL=appeals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appeals.js","sourceRoot":"","sources":["../src/appeals.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;AAEH,6BAAwB;AAGxB,iDAAgD;AAChD,mDAMyB;AACzB,iDAAkD;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,cAAc,GAAG;IAC5B,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;CACV,CAAC;AACE,QAAA,kBAAkB,GAAG,OAAC,CAAC,IAAI,CAAC,sBAAc,CAAC,CAAC;AAGzD;;;;;;;;;;;;;;GAcG;AACU,QAAA,eAAe,GAAG,CAAC,MAAM,EAAE,SAAS,CAAU,CAAC;AAC/C,QAAA,kBAAkB,GAAG,OAAC,CAAC,IAAI,CAAC,uBAAe,CAAC,CAAC;AAG1D;;;;;;;;;;;;;GAaG;AACU,QAAA,yBAAyB,GAAG,OAAC,CAAC,YAAY,CAAC;IACtD;;;OAGG;IACH,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,+BAAe,CAAC,oBAAoB,CAAC;IACtE,+EAA+E;IAC/E,WAAW,EAAE,OAAC;SACX,KAAK,CAAC,+BAAgB,CAAC;SACvB,GAAG,CAAC,+BAAe,CAAC,6BAA6B,CAAC;SAClD,QAAQ,EAAE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,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACjE,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,UAAU,CAAC;YAClB,OAAO,EAAE,2DAA2D;SACrE,CAAC,CAAC;IACL,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC9D,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,QAAQ,CAAC;YAChB,OAAO,EAAE,wDAAwD;SAClE,CAAC,CAAC;IACL,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,MAAM,CAAC,cAAc,EAAE,CAAC;QACxF,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;YAC9B,OAAO,EAAE,uEAAuE;SACjF,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -26,7 +26,7 @@
26
26
  * avatar — since a dangling id is the same defect wherever it appears.
27
27
  */
28
28
  import { z } from 'zod';
29
- import type { Closed } from './closed';
29
+ import type { Closed } from './closed.js';
30
30
  /**
31
31
  * The contract version carried inside the payload.
32
32
  *
@@ -565,7 +565,7 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
565
565
  }, z.core.$strict>, z.ZodObject<{
566
566
  type: z.ZodLiteral<"custom">;
567
567
  schemaId: z.ZodString;
568
- payload: z.ZodRecord<z.ZodString, z.ZodType<import("./primitives").CustomPayloadValue, unknown, z.core.$ZodTypeInternals<import("./primitives").CustomPayloadValue, unknown>>>;
568
+ payload: z.ZodRecord<z.ZodString, z.ZodType<import("./primitives.js").CustomPayloadValue, unknown, z.core.$ZodTypeInternals<import("./primitives.js").CustomPayloadValue, unknown>>>;
569
569
  sha256: z.ZodString;
570
570
  id: z.ZodString;
571
571
  role: z.ZodEnum<{
@@ -1015,7 +1015,7 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
1015
1015
  }, z.core.$strict>, z.ZodObject<{
1016
1016
  type: z.ZodLiteral<"custom">;
1017
1017
  schemaId: z.ZodString;
1018
- payload: z.ZodRecord<z.ZodString, z.ZodType<import("./primitives").CustomPayloadValue, unknown, z.core.$ZodTypeInternals<import("./primitives").CustomPayloadValue, unknown>>>;
1018
+ payload: z.ZodRecord<z.ZodString, z.ZodType<import("./primitives.js").CustomPayloadValue, unknown, z.core.$ZodTypeInternals<import("./primitives.js").CustomPayloadValue, unknown>>>;
1019
1019
  sha256: z.ZodString;
1020
1020
  id: z.ZodString;
1021
1021
  role: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"case-envelope.d.ts","sourceRoot":"","sources":["../src/case-envelope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,wBAAwB,CAAC;AAElE,eAAO,MAAM,+BAA+B,qCAA0C,CAAC;AAEvF,qCAAqC;AACrC,eAAO,MAAM,sBAAsB,sNAYzB,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;iBAS5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,mCAAmC;AACnC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;kBAM5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,i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