@oxyhq/crowdsource-contracts 0.2.0 → 0.3.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.
- package/dist/case-envelope.d.ts +56 -56
- package/dist/decisions.d.ts +2 -2
- package/dist/json-schema.d.ts +1 -1
- package/dist/json-schema.js +1 -1
- package/dist/primitives.d.ts +17 -0
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +22 -1
- package/dist/primitives.js.map +1 -1
- package/dist/resources.d.ts +56 -37
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +28 -19
- package/dist/resources.js.map +1 -1
- package/dist/reviews.d.ts +2 -2
- package/dist/webhooks.d.ts +3 -3
- package/package.json +1 -1
- package/src/json-schema.ts +1 -1
- package/src/primitives.ts +25 -0
- package/src/resources.ts +37 -27
package/dist/case-envelope.d.ts
CHANGED
|
@@ -287,13 +287,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
287
287
|
sha256: z.ZodString;
|
|
288
288
|
id: z.ZodString;
|
|
289
289
|
role: z.ZodEnum<{
|
|
290
|
-
|
|
290
|
+
metadata: "metadata";
|
|
291
291
|
subject: "subject";
|
|
292
292
|
attachment: "attachment";
|
|
293
|
+
context: "context";
|
|
293
294
|
parent: "parent";
|
|
294
295
|
quoted: "quoted";
|
|
295
296
|
evidence: "evidence";
|
|
296
|
-
metadata: "metadata";
|
|
297
297
|
policy_context: "policy_context";
|
|
298
298
|
}>;
|
|
299
299
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -303,7 +303,7 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
303
303
|
}, z.core.$strict>, z.ZodObject<{
|
|
304
304
|
type: z.ZodLiteral<"image">;
|
|
305
305
|
asset: z.ZodObject<{
|
|
306
|
-
|
|
306
|
+
fileId: z.ZodString;
|
|
307
307
|
url: z.ZodOptional<z.ZodURL>;
|
|
308
308
|
mimeType: z.ZodString;
|
|
309
309
|
sha256: z.ZodString;
|
|
@@ -315,13 +315,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
315
315
|
sha256: z.ZodOptional<z.ZodString>;
|
|
316
316
|
id: z.ZodString;
|
|
317
317
|
role: z.ZodEnum<{
|
|
318
|
-
|
|
318
|
+
metadata: "metadata";
|
|
319
319
|
subject: "subject";
|
|
320
320
|
attachment: "attachment";
|
|
321
|
+
context: "context";
|
|
321
322
|
parent: "parent";
|
|
322
323
|
quoted: "quoted";
|
|
323
324
|
evidence: "evidence";
|
|
324
|
-
metadata: "metadata";
|
|
325
325
|
policy_context: "policy_context";
|
|
326
326
|
}>;
|
|
327
327
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -331,7 +331,7 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
331
331
|
}, z.core.$strict>, z.ZodObject<{
|
|
332
332
|
type: z.ZodLiteral<"video">;
|
|
333
333
|
asset: z.ZodObject<{
|
|
334
|
-
|
|
334
|
+
fileId: z.ZodString;
|
|
335
335
|
url: z.ZodOptional<z.ZodURL>;
|
|
336
336
|
mimeType: z.ZodString;
|
|
337
337
|
sha256: z.ZodString;
|
|
@@ -349,13 +349,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
349
349
|
sha256: z.ZodOptional<z.ZodString>;
|
|
350
350
|
id: z.ZodString;
|
|
351
351
|
role: z.ZodEnum<{
|
|
352
|
-
|
|
352
|
+
metadata: "metadata";
|
|
353
353
|
subject: "subject";
|
|
354
354
|
attachment: "attachment";
|
|
355
|
+
context: "context";
|
|
355
356
|
parent: "parent";
|
|
356
357
|
quoted: "quoted";
|
|
357
358
|
evidence: "evidence";
|
|
358
|
-
metadata: "metadata";
|
|
359
359
|
policy_context: "policy_context";
|
|
360
360
|
}>;
|
|
361
361
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -365,7 +365,7 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
365
365
|
}, z.core.$strict>, z.ZodObject<{
|
|
366
366
|
type: z.ZodLiteral<"audio">;
|
|
367
367
|
asset: z.ZodObject<{
|
|
368
|
-
|
|
368
|
+
fileId: z.ZodString;
|
|
369
369
|
url: z.ZodOptional<z.ZodURL>;
|
|
370
370
|
mimeType: z.ZodString;
|
|
371
371
|
sha256: z.ZodString;
|
|
@@ -380,13 +380,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
380
380
|
sha256: z.ZodOptional<z.ZodString>;
|
|
381
381
|
id: z.ZodString;
|
|
382
382
|
role: z.ZodEnum<{
|
|
383
|
-
|
|
383
|
+
metadata: "metadata";
|
|
384
384
|
subject: "subject";
|
|
385
385
|
attachment: "attachment";
|
|
386
|
+
context: "context";
|
|
386
387
|
parent: "parent";
|
|
387
388
|
quoted: "quoted";
|
|
388
389
|
evidence: "evidence";
|
|
389
|
-
metadata: "metadata";
|
|
390
390
|
policy_context: "policy_context";
|
|
391
391
|
}>;
|
|
392
392
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -396,7 +396,7 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
396
396
|
}, z.core.$strict>, z.ZodObject<{
|
|
397
397
|
type: z.ZodLiteral<"document">;
|
|
398
398
|
asset: z.ZodObject<{
|
|
399
|
-
|
|
399
|
+
fileId: z.ZodString;
|
|
400
400
|
url: z.ZodOptional<z.ZodURL>;
|
|
401
401
|
mimeType: z.ZodString;
|
|
402
402
|
sha256: z.ZodString;
|
|
@@ -412,13 +412,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
412
412
|
sha256: z.ZodOptional<z.ZodString>;
|
|
413
413
|
id: z.ZodString;
|
|
414
414
|
role: z.ZodEnum<{
|
|
415
|
-
|
|
415
|
+
metadata: "metadata";
|
|
416
416
|
subject: "subject";
|
|
417
417
|
attachment: "attachment";
|
|
418
|
+
context: "context";
|
|
418
419
|
parent: "parent";
|
|
419
420
|
quoted: "quoted";
|
|
420
421
|
evidence: "evidence";
|
|
421
|
-
metadata: "metadata";
|
|
422
422
|
policy_context: "policy_context";
|
|
423
423
|
}>;
|
|
424
424
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -436,13 +436,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
436
436
|
sha256: z.ZodString;
|
|
437
437
|
id: z.ZodString;
|
|
438
438
|
role: z.ZodEnum<{
|
|
439
|
-
|
|
439
|
+
metadata: "metadata";
|
|
440
440
|
subject: "subject";
|
|
441
441
|
attachment: "attachment";
|
|
442
|
+
context: "context";
|
|
442
443
|
parent: "parent";
|
|
443
444
|
quoted: "quoted";
|
|
444
445
|
evidence: "evidence";
|
|
445
|
-
metadata: "metadata";
|
|
446
446
|
policy_context: "policy_context";
|
|
447
447
|
}>;
|
|
448
448
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -460,13 +460,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
460
460
|
sha256: z.ZodString;
|
|
461
461
|
id: z.ZodString;
|
|
462
462
|
role: z.ZodEnum<{
|
|
463
|
-
|
|
463
|
+
metadata: "metadata";
|
|
464
464
|
subject: "subject";
|
|
465
465
|
attachment: "attachment";
|
|
466
|
+
context: "context";
|
|
466
467
|
parent: "parent";
|
|
467
468
|
quoted: "quoted";
|
|
468
469
|
evidence: "evidence";
|
|
469
|
-
metadata: "metadata";
|
|
470
470
|
policy_context: "policy_context";
|
|
471
471
|
}>;
|
|
472
472
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -481,13 +481,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
481
481
|
sha256: z.ZodString;
|
|
482
482
|
id: z.ZodString;
|
|
483
483
|
role: z.ZodEnum<{
|
|
484
|
-
|
|
484
|
+
metadata: "metadata";
|
|
485
485
|
subject: "subject";
|
|
486
486
|
attachment: "attachment";
|
|
487
|
+
context: "context";
|
|
487
488
|
parent: "parent";
|
|
488
489
|
quoted: "quoted";
|
|
489
490
|
evidence: "evidence";
|
|
490
|
-
metadata: "metadata";
|
|
491
491
|
policy_context: "policy_context";
|
|
492
492
|
}>;
|
|
493
493
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -507,13 +507,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
507
507
|
sha256: z.ZodString;
|
|
508
508
|
id: z.ZodString;
|
|
509
509
|
role: z.ZodEnum<{
|
|
510
|
-
|
|
510
|
+
metadata: "metadata";
|
|
511
511
|
subject: "subject";
|
|
512
512
|
attachment: "attachment";
|
|
513
|
+
context: "context";
|
|
513
514
|
parent: "parent";
|
|
514
515
|
quoted: "quoted";
|
|
515
516
|
evidence: "evidence";
|
|
516
|
-
metadata: "metadata";
|
|
517
517
|
policy_context: "policy_context";
|
|
518
518
|
}>;
|
|
519
519
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -530,13 +530,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
530
530
|
sha256: z.ZodString;
|
|
531
531
|
id: z.ZodString;
|
|
532
532
|
role: z.ZodEnum<{
|
|
533
|
-
|
|
533
|
+
metadata: "metadata";
|
|
534
534
|
subject: "subject";
|
|
535
535
|
attachment: "attachment";
|
|
536
|
+
context: "context";
|
|
536
537
|
parent: "parent";
|
|
537
538
|
quoted: "quoted";
|
|
538
539
|
evidence: "evidence";
|
|
539
|
-
metadata: "metadata";
|
|
540
540
|
policy_context: "policy_context";
|
|
541
541
|
}>;
|
|
542
542
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -549,13 +549,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
549
549
|
sha256: z.ZodString;
|
|
550
550
|
id: z.ZodString;
|
|
551
551
|
role: z.ZodEnum<{
|
|
552
|
-
|
|
552
|
+
metadata: "metadata";
|
|
553
553
|
subject: "subject";
|
|
554
554
|
attachment: "attachment";
|
|
555
|
+
context: "context";
|
|
555
556
|
parent: "parent";
|
|
556
557
|
quoted: "quoted";
|
|
557
558
|
evidence: "evidence";
|
|
558
|
-
metadata: "metadata";
|
|
559
559
|
policy_context: "policy_context";
|
|
560
560
|
}>;
|
|
561
561
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -569,13 +569,13 @@ export declare const CaseEnvelopeSchema: z.ZodObject<{
|
|
|
569
569
|
sha256: z.ZodString;
|
|
570
570
|
id: z.ZodString;
|
|
571
571
|
role: z.ZodEnum<{
|
|
572
|
-
|
|
572
|
+
metadata: "metadata";
|
|
573
573
|
subject: "subject";
|
|
574
574
|
attachment: "attachment";
|
|
575
|
+
context: "context";
|
|
575
576
|
parent: "parent";
|
|
576
577
|
quoted: "quoted";
|
|
577
578
|
evidence: "evidence";
|
|
578
|
-
metadata: "metadata";
|
|
579
579
|
policy_context: "policy_context";
|
|
580
580
|
}>;
|
|
581
581
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -737,13 +737,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
737
737
|
sha256: z.ZodString;
|
|
738
738
|
id: z.ZodString;
|
|
739
739
|
role: z.ZodEnum<{
|
|
740
|
-
|
|
740
|
+
metadata: "metadata";
|
|
741
741
|
subject: "subject";
|
|
742
742
|
attachment: "attachment";
|
|
743
|
+
context: "context";
|
|
743
744
|
parent: "parent";
|
|
744
745
|
quoted: "quoted";
|
|
745
746
|
evidence: "evidence";
|
|
746
|
-
metadata: "metadata";
|
|
747
747
|
policy_context: "policy_context";
|
|
748
748
|
}>;
|
|
749
749
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -753,7 +753,7 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
753
753
|
}, z.core.$strict>, z.ZodObject<{
|
|
754
754
|
type: z.ZodLiteral<"image">;
|
|
755
755
|
asset: z.ZodObject<{
|
|
756
|
-
|
|
756
|
+
fileId: z.ZodString;
|
|
757
757
|
url: z.ZodOptional<z.ZodURL>;
|
|
758
758
|
mimeType: z.ZodString;
|
|
759
759
|
sha256: z.ZodString;
|
|
@@ -765,13 +765,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
765
765
|
sha256: z.ZodOptional<z.ZodString>;
|
|
766
766
|
id: z.ZodString;
|
|
767
767
|
role: z.ZodEnum<{
|
|
768
|
-
|
|
768
|
+
metadata: "metadata";
|
|
769
769
|
subject: "subject";
|
|
770
770
|
attachment: "attachment";
|
|
771
|
+
context: "context";
|
|
771
772
|
parent: "parent";
|
|
772
773
|
quoted: "quoted";
|
|
773
774
|
evidence: "evidence";
|
|
774
|
-
metadata: "metadata";
|
|
775
775
|
policy_context: "policy_context";
|
|
776
776
|
}>;
|
|
777
777
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -781,7 +781,7 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
781
781
|
}, z.core.$strict>, z.ZodObject<{
|
|
782
782
|
type: z.ZodLiteral<"video">;
|
|
783
783
|
asset: z.ZodObject<{
|
|
784
|
-
|
|
784
|
+
fileId: z.ZodString;
|
|
785
785
|
url: z.ZodOptional<z.ZodURL>;
|
|
786
786
|
mimeType: z.ZodString;
|
|
787
787
|
sha256: z.ZodString;
|
|
@@ -799,13 +799,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
799
799
|
sha256: z.ZodOptional<z.ZodString>;
|
|
800
800
|
id: z.ZodString;
|
|
801
801
|
role: z.ZodEnum<{
|
|
802
|
-
|
|
802
|
+
metadata: "metadata";
|
|
803
803
|
subject: "subject";
|
|
804
804
|
attachment: "attachment";
|
|
805
|
+
context: "context";
|
|
805
806
|
parent: "parent";
|
|
806
807
|
quoted: "quoted";
|
|
807
808
|
evidence: "evidence";
|
|
808
|
-
metadata: "metadata";
|
|
809
809
|
policy_context: "policy_context";
|
|
810
810
|
}>;
|
|
811
811
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -815,7 +815,7 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
815
815
|
}, z.core.$strict>, z.ZodObject<{
|
|
816
816
|
type: z.ZodLiteral<"audio">;
|
|
817
817
|
asset: z.ZodObject<{
|
|
818
|
-
|
|
818
|
+
fileId: z.ZodString;
|
|
819
819
|
url: z.ZodOptional<z.ZodURL>;
|
|
820
820
|
mimeType: z.ZodString;
|
|
821
821
|
sha256: z.ZodString;
|
|
@@ -830,13 +830,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
830
830
|
sha256: z.ZodOptional<z.ZodString>;
|
|
831
831
|
id: z.ZodString;
|
|
832
832
|
role: z.ZodEnum<{
|
|
833
|
-
|
|
833
|
+
metadata: "metadata";
|
|
834
834
|
subject: "subject";
|
|
835
835
|
attachment: "attachment";
|
|
836
|
+
context: "context";
|
|
836
837
|
parent: "parent";
|
|
837
838
|
quoted: "quoted";
|
|
838
839
|
evidence: "evidence";
|
|
839
|
-
metadata: "metadata";
|
|
840
840
|
policy_context: "policy_context";
|
|
841
841
|
}>;
|
|
842
842
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -846,7 +846,7 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
846
846
|
}, z.core.$strict>, z.ZodObject<{
|
|
847
847
|
type: z.ZodLiteral<"document">;
|
|
848
848
|
asset: z.ZodObject<{
|
|
849
|
-
|
|
849
|
+
fileId: z.ZodString;
|
|
850
850
|
url: z.ZodOptional<z.ZodURL>;
|
|
851
851
|
mimeType: z.ZodString;
|
|
852
852
|
sha256: z.ZodString;
|
|
@@ -862,13 +862,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
862
862
|
sha256: z.ZodOptional<z.ZodString>;
|
|
863
863
|
id: z.ZodString;
|
|
864
864
|
role: z.ZodEnum<{
|
|
865
|
-
|
|
865
|
+
metadata: "metadata";
|
|
866
866
|
subject: "subject";
|
|
867
867
|
attachment: "attachment";
|
|
868
|
+
context: "context";
|
|
868
869
|
parent: "parent";
|
|
869
870
|
quoted: "quoted";
|
|
870
871
|
evidence: "evidence";
|
|
871
|
-
metadata: "metadata";
|
|
872
872
|
policy_context: "policy_context";
|
|
873
873
|
}>;
|
|
874
874
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -886,13 +886,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
886
886
|
sha256: z.ZodString;
|
|
887
887
|
id: z.ZodString;
|
|
888
888
|
role: z.ZodEnum<{
|
|
889
|
-
|
|
889
|
+
metadata: "metadata";
|
|
890
890
|
subject: "subject";
|
|
891
891
|
attachment: "attachment";
|
|
892
|
+
context: "context";
|
|
892
893
|
parent: "parent";
|
|
893
894
|
quoted: "quoted";
|
|
894
895
|
evidence: "evidence";
|
|
895
|
-
metadata: "metadata";
|
|
896
896
|
policy_context: "policy_context";
|
|
897
897
|
}>;
|
|
898
898
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -910,13 +910,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
910
910
|
sha256: z.ZodString;
|
|
911
911
|
id: z.ZodString;
|
|
912
912
|
role: z.ZodEnum<{
|
|
913
|
-
|
|
913
|
+
metadata: "metadata";
|
|
914
914
|
subject: "subject";
|
|
915
915
|
attachment: "attachment";
|
|
916
|
+
context: "context";
|
|
916
917
|
parent: "parent";
|
|
917
918
|
quoted: "quoted";
|
|
918
919
|
evidence: "evidence";
|
|
919
|
-
metadata: "metadata";
|
|
920
920
|
policy_context: "policy_context";
|
|
921
921
|
}>;
|
|
922
922
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -931,13 +931,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
931
931
|
sha256: z.ZodString;
|
|
932
932
|
id: z.ZodString;
|
|
933
933
|
role: z.ZodEnum<{
|
|
934
|
-
|
|
934
|
+
metadata: "metadata";
|
|
935
935
|
subject: "subject";
|
|
936
936
|
attachment: "attachment";
|
|
937
|
+
context: "context";
|
|
937
938
|
parent: "parent";
|
|
938
939
|
quoted: "quoted";
|
|
939
940
|
evidence: "evidence";
|
|
940
|
-
metadata: "metadata";
|
|
941
941
|
policy_context: "policy_context";
|
|
942
942
|
}>;
|
|
943
943
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -957,13 +957,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
957
957
|
sha256: z.ZodString;
|
|
958
958
|
id: z.ZodString;
|
|
959
959
|
role: z.ZodEnum<{
|
|
960
|
-
|
|
960
|
+
metadata: "metadata";
|
|
961
961
|
subject: "subject";
|
|
962
962
|
attachment: "attachment";
|
|
963
|
+
context: "context";
|
|
963
964
|
parent: "parent";
|
|
964
965
|
quoted: "quoted";
|
|
965
966
|
evidence: "evidence";
|
|
966
|
-
metadata: "metadata";
|
|
967
967
|
policy_context: "policy_context";
|
|
968
968
|
}>;
|
|
969
969
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -980,13 +980,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
980
980
|
sha256: z.ZodString;
|
|
981
981
|
id: z.ZodString;
|
|
982
982
|
role: z.ZodEnum<{
|
|
983
|
-
|
|
983
|
+
metadata: "metadata";
|
|
984
984
|
subject: "subject";
|
|
985
985
|
attachment: "attachment";
|
|
986
|
+
context: "context";
|
|
986
987
|
parent: "parent";
|
|
987
988
|
quoted: "quoted";
|
|
988
989
|
evidence: "evidence";
|
|
989
|
-
metadata: "metadata";
|
|
990
990
|
policy_context: "policy_context";
|
|
991
991
|
}>;
|
|
992
992
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -999,13 +999,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
999
999
|
sha256: z.ZodString;
|
|
1000
1000
|
id: z.ZodString;
|
|
1001
1001
|
role: z.ZodEnum<{
|
|
1002
|
-
|
|
1002
|
+
metadata: "metadata";
|
|
1003
1003
|
subject: "subject";
|
|
1004
1004
|
attachment: "attachment";
|
|
1005
|
+
context: "context";
|
|
1005
1006
|
parent: "parent";
|
|
1006
1007
|
quoted: "quoted";
|
|
1007
1008
|
evidence: "evidence";
|
|
1008
|
-
metadata: "metadata";
|
|
1009
1009
|
policy_context: "policy_context";
|
|
1010
1010
|
}>;
|
|
1011
1011
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -1019,13 +1019,13 @@ export declare const CreateReportRequestSchema: z.ZodObject<{
|
|
|
1019
1019
|
sha256: z.ZodString;
|
|
1020
1020
|
id: z.ZodString;
|
|
1021
1021
|
role: z.ZodEnum<{
|
|
1022
|
-
|
|
1022
|
+
metadata: "metadata";
|
|
1023
1023
|
subject: "subject";
|
|
1024
1024
|
attachment: "attachment";
|
|
1025
|
+
context: "context";
|
|
1025
1026
|
parent: "parent";
|
|
1026
1027
|
quoted: "quoted";
|
|
1027
1028
|
evidence: "evidence";
|
|
1028
|
-
metadata: "metadata";
|
|
1029
1029
|
policy_context: "policy_context";
|
|
1030
1030
|
}>;
|
|
1031
1031
|
language: z.ZodOptional<z.ZodString>;
|
package/dist/decisions.d.ts
CHANGED
|
@@ -42,8 +42,8 @@ export declare const DecisionOutcomeSchema: z.ZodEnum<{
|
|
|
42
42
|
violation: "violation";
|
|
43
43
|
no_violation: "no_violation";
|
|
44
44
|
insufficient_context: "insufficient_context";
|
|
45
|
-
inconclusive: "inconclusive";
|
|
46
45
|
content_unavailable: "content_unavailable";
|
|
46
|
+
inconclusive: "inconclusive";
|
|
47
47
|
duplicate: "duplicate";
|
|
48
48
|
escalated: "escalated";
|
|
49
49
|
}>;
|
|
@@ -225,8 +225,8 @@ export declare const DecisionSchema: z.ZodObject<{
|
|
|
225
225
|
violation: "violation";
|
|
226
226
|
no_violation: "no_violation";
|
|
227
227
|
insufficient_context: "insufficient_context";
|
|
228
|
-
inconclusive: "inconclusive";
|
|
229
228
|
content_unavailable: "content_unavailable";
|
|
229
|
+
inconclusive: "inconclusive";
|
|
230
230
|
duplicate: "duplicate";
|
|
231
231
|
escalated: "escalated";
|
|
232
232
|
}>;
|
package/dist/json-schema.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* * §5.5 reference resolution (relations, `primaryResourceId`, allegation
|
|
14
14
|
* resource ids, author and seller refs, conversation members, avatars)
|
|
15
15
|
* * the `oxy_user` binding-proof requirement
|
|
16
|
-
* *
|
|
16
|
+
* * a required `fileId` on every asset, media type agreement, coarse coordinates,
|
|
17
17
|
* price-with-currency
|
|
18
18
|
* * `agreement = winningVotes / decisiveVotes` and the vote count nesting
|
|
19
19
|
* * revision 1 supersedes nothing / later revisions must
|
package/dist/json-schema.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* * §5.5 reference resolution (relations, `primaryResourceId`, allegation
|
|
15
15
|
* resource ids, author and seller refs, conversation members, avatars)
|
|
16
16
|
* * the `oxy_user` binding-proof requirement
|
|
17
|
-
* *
|
|
17
|
+
* * a required `fileId` on every asset, media type agreement, coarse coordinates,
|
|
18
18
|
* price-with-currency
|
|
19
19
|
* * `agreement = winningVotes / decisiveVotes` and the vote count nesting
|
|
20
20
|
* * revision 1 supersedes nothing / later revisions must
|
package/dist/primitives.d.ts
CHANGED
|
@@ -135,6 +135,23 @@ export declare const LanguageTagSchema: z.ZodString;
|
|
|
135
135
|
* to be an SSRF control would be the more dangerous of the two.
|
|
136
136
|
*/
|
|
137
137
|
export declare const HttpUrlSchema: z.ZodURL;
|
|
138
|
+
/**
|
|
139
|
+
* A bare Oxy file id — the one way bytes enter a case.
|
|
140
|
+
*
|
|
141
|
+
* Evidence goes through the Oxy media chokepoint (`getFileDownloadUrl`) rather
|
|
142
|
+
* than a presigned bucket, which is the §12.3 divergence recorded in
|
|
143
|
+
* `AGENTS.md`. A file id is what that chokepoint takes, so it is what an asset
|
|
144
|
+
* carries: never a URL, never a host, never a variant. The reviewer client
|
|
145
|
+
* resolves it once through Bloom's `ImageResolver`, so nothing downstream needs
|
|
146
|
+
* to know where `cloud.oxy.so` is.
|
|
147
|
+
*
|
|
148
|
+
* Deliberately opaque, for the same reason `IdentifierSchema` is: the format
|
|
149
|
+
* belongs to Oxy, not to CrowdSource, and pinning it here would make an Oxy
|
|
150
|
+
* change look like a CrowdSource contract violation. What is pinned is that it
|
|
151
|
+
* is a bounded, non-empty token with no separators that could smuggle a path or
|
|
152
|
+
* a scheme into a resolver — `..`, `/` and `:` are all excluded by the pattern.
|
|
153
|
+
*/
|
|
154
|
+
export declare const OxyFileIdSchema: z.ZodString;
|
|
138
155
|
/** A `type/subtype` media type, without parameters. */
|
|
139
156
|
export declare const MimeTypeSchema: z.ZodString;
|
|
140
157
|
/** A key in any caller-supplied open bag. */
|
package/dist/primitives.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/primitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;IAC1B,mEAAmE;;IAEnE,wEAAwE;;;;;;IAQxE,0EAA0E;;IAE1E,kDAAkD;;IAElD,4DAA4D;;IAE5D,gEAAgE;;;;;IAOhE,kEAAkE;;;;;;;;;;;IAclE,+EAA+E;;IAE/E,4EAA4E;;EAEnE,CAAC;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAIjD,CAAC;AAIH;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,aAO1B,CAAC;AAEJ,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,aAO1B,CAAC;AAEJ;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,aAE+D,CAAC;AAE/F;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,kBAAkD,CAAC;AAE/E;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,aAK3B,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,UAA6C,CAAC;AAExE,uDAAuD;AACvD,eAAO,MAAM,cAAc,aAMxB,CAAC;AAIJ,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F;AAChF,eAAO,MAAM,mBAAmB,yHAAsD,CAAC;AAEvF,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,aAA2B,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/primitives.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* job ids, so this also keeps identifiers usable as dispatch keys.)
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.UnitIntervalSchema = exports.CustomPayloadSchema = exports.CustomPayloadValueSchema = exports.MetadataBagSchema = exports.MetadataValueSchema = exports.ObjectKeySchema = exports.MimeTypeSchema = exports.HttpUrlSchema = exports.LanguageTagSchema = exports.TimestampSchema = exports.Sha256DigestSchema = exports.ExternalIdSchema = exports.IdentifierSchema = exports.FORBIDDEN_OBJECT_KEYS = exports.CONTRACT_LIMITS = void 0;
|
|
25
|
+
exports.UnitIntervalSchema = exports.CustomPayloadSchema = exports.CustomPayloadValueSchema = exports.MetadataBagSchema = exports.MetadataValueSchema = exports.ObjectKeySchema = exports.MimeTypeSchema = exports.OxyFileIdSchema = exports.HttpUrlSchema = exports.LanguageTagSchema = exports.TimestampSchema = exports.Sha256DigestSchema = exports.ExternalIdSchema = exports.IdentifierSchema = exports.FORBIDDEN_OBJECT_KEYS = exports.CONTRACT_LIMITS = void 0;
|
|
26
26
|
const zod_1 = require("zod");
|
|
27
27
|
/**
|
|
28
28
|
* Bounds applied across the contracts.
|
|
@@ -155,6 +155,27 @@ exports.LanguageTagSchema = zod_1.z
|
|
|
155
155
|
* to be an SSRF control would be the more dangerous of the two.
|
|
156
156
|
*/
|
|
157
157
|
exports.HttpUrlSchema = zod_1.z.url({ protocol: /^https?$/ }).max(2048);
|
|
158
|
+
/**
|
|
159
|
+
* A bare Oxy file id — the one way bytes enter a case.
|
|
160
|
+
*
|
|
161
|
+
* Evidence goes through the Oxy media chokepoint (`getFileDownloadUrl`) rather
|
|
162
|
+
* than a presigned bucket, which is the §12.3 divergence recorded in
|
|
163
|
+
* `AGENTS.md`. A file id is what that chokepoint takes, so it is what an asset
|
|
164
|
+
* carries: never a URL, never a host, never a variant. The reviewer client
|
|
165
|
+
* resolves it once through Bloom's `ImageResolver`, so nothing downstream needs
|
|
166
|
+
* to know where `cloud.oxy.so` is.
|
|
167
|
+
*
|
|
168
|
+
* Deliberately opaque, for the same reason `IdentifierSchema` is: the format
|
|
169
|
+
* belongs to Oxy, not to CrowdSource, and pinning it here would make an Oxy
|
|
170
|
+
* change look like a CrowdSource contract violation. What is pinned is that it
|
|
171
|
+
* is a bounded, non-empty token with no separators that could smuggle a path or
|
|
172
|
+
* a scheme into a resolver — `..`, `/` and `:` are all excluded by the pattern.
|
|
173
|
+
*/
|
|
174
|
+
exports.OxyFileIdSchema = zod_1.z
|
|
175
|
+
.string()
|
|
176
|
+
.min(1)
|
|
177
|
+
.max(exports.CONTRACT_LIMITS.IDENTIFIER_MAX_LENGTH)
|
|
178
|
+
.regex(/^[A-Za-z0-9][A-Za-z0-9_-]*$/, 'must be a bare Oxy file id: letters, digits, "_" or "-", starting with a letter or digit');
|
|
158
179
|
/** A `type/subtype` media type, without parameters. */
|
|
159
180
|
exports.MimeTypeSchema = zod_1.z
|
|
160
181
|
.string()
|
package/dist/primitives.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../src/primitives.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,6BAAwB;AAExB;;;;;;;;GAQG;AACU,QAAA,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,mEAAmE;IACnE,qBAAqB,EAAE,GAAG;IAC1B,wEAAwE;IACxE,sBAAsB,EAAE,GAAG;IAE3B,0BAA0B,EAAE,EAAE;IAC9B,0BAA0B,EAAE,GAAG;IAC/B,4BAA4B,EAAE,EAAE;IAChC,mCAAmC,EAAE,EAAE;IAEvC,0EAA0E;IAC1E,wBAAwB,EAAE,MAAO;IACjC,kDAAkD;IAClD,qBAAqB,EAAE,GAAG;IAC1B,4DAA4D;IAC5D,oBAAoB,EAAE,IAAK;IAC3B,gEAAgE;IAChE,yBAAyB,EAAE,MAAO;IAElC,iBAAiB,EAAE,EAAE;IACrB,uBAAuB,EAAE,EAAE;IAC3B,gCAAgC,EAAE,IAAK;IAEvC,kEAAkE;IAClE,wBAAwB,EAAE,CAAC;IAC3B,+BAA+B,EAAE,GAAG;IACpC,gCAAgC,EAAE,KAAM;IAExC,yBAAyB,EAAE,EAAE;IAC7B,sBAAsB,EAAE,EAAE;IAC1B,kBAAkB,EAAE,EAAE;IAEtB,YAAY,EAAE,EAAE;IAChB,6BAA6B,EAAE,EAAE;IACjC,mBAAmB,EAAE,EAAE;IACvB,uBAAuB,EAAE,EAAE;IAE3B,+EAA+E;IAC/E,kBAAkB,EAAE,IAAK;IACzB,4EAA4E;IAC5E,aAAa,EAAE,EAAE;CACT,CAAC,CAAC;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,qBAAqB,GAAsB,MAAM,CAAC,MAAM,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AAM,CAAC,uBAAe,EAAE,gCAAwB,CAAC,CAAC;AAEvF,6EAA6E;AAChE,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/resources.d.ts
CHANGED
|
@@ -43,13 +43,13 @@ export type PrincipalRef = z.infer<typeof PrincipalRefSchema>;
|
|
|
43
43
|
/** §5.2 `role`: why this resource is in the case. */
|
|
44
44
|
export declare const RESOURCE_ROLES: readonly ["subject", "attachment", "context", "parent", "quoted", "evidence", "metadata", "policy_context"];
|
|
45
45
|
export declare const ResourceRoleSchema: z.ZodEnum<{
|
|
46
|
-
|
|
46
|
+
metadata: "metadata";
|
|
47
47
|
subject: "subject";
|
|
48
48
|
attachment: "attachment";
|
|
49
|
+
context: "context";
|
|
49
50
|
parent: "parent";
|
|
50
51
|
quoted: "quoted";
|
|
51
52
|
evidence: "evidence";
|
|
52
|
-
metadata: "metadata";
|
|
53
53
|
policy_context: "policy_context";
|
|
54
54
|
}>;
|
|
55
55
|
export type ResourceRole = z.infer<typeof ResourceRoleSchema>;
|
|
@@ -58,12 +58,12 @@ export declare const RESOURCE_TYPES: readonly ["text", "image", "video", "audio"
|
|
|
58
58
|
export declare const ResourceTypeSchema: z.ZodEnum<{
|
|
59
59
|
custom: "custom";
|
|
60
60
|
metadata: "metadata";
|
|
61
|
+
link: "link";
|
|
61
62
|
text: "text";
|
|
62
63
|
image: "image";
|
|
63
64
|
video: "video";
|
|
64
65
|
audio: "audio";
|
|
65
66
|
document: "document";
|
|
66
|
-
link: "link";
|
|
67
67
|
profile: "profile";
|
|
68
68
|
conversation: "conversation";
|
|
69
69
|
listing: "listing";
|
|
@@ -80,14 +80,33 @@ export type TextFormatting = z.infer<typeof TextFormattingSchema>;
|
|
|
80
80
|
/**
|
|
81
81
|
* A reference to bytes held outside the envelope (§5.2 `asset`).
|
|
82
82
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
83
|
+
* **`fileId` is where the bytes are. `url` is where they came from.** Those are
|
|
84
|
+
* not alternatives, and the earlier contract encoding them as "exactly one of
|
|
85
|
+
* `uploadId` or `url`" is what left an integrator with no safe way to attach an
|
|
86
|
+
* image at all: the `uploadId` branch needed a presigned upload route that was
|
|
87
|
+
* superseded by the Oxy media chokepoint before it was ever built, and the `url`
|
|
88
|
+
* branch put a URL on the reporting application's own host in front of a
|
|
89
|
+
* reviewer — breaking §9.1's branding rule and the chokepoint rule at once.
|
|
90
|
+
*
|
|
91
|
+
* So `fileId` is required and `url` is optional provenance:
|
|
92
|
+
*
|
|
93
|
+
* * **`fileId`** — a bare Oxy file id. The application uploads the bytes
|
|
94
|
+
* through the Oxy media chokepoint with its own Oxy credentials and passes
|
|
95
|
+
* the id. That is why CrowdSource serves no upload route of its own.
|
|
96
|
+
* * **`url`** — a PROVENANCE RECORD, and never a fetch target. A third-party
|
|
97
|
+
* URL is not wrong the way a first-party one is (a federated post's image
|
|
98
|
+
* genuinely lives elsewhere), but no reviewer client may dereference it:
|
|
99
|
+
* fetching it would tell that host exactly when its content is under review,
|
|
100
|
+
* which lets the reported party correlate reviewer accesses, and it would
|
|
101
|
+
* deliver bytes live rather than the pinned ones §5.6 requires.
|
|
102
|
+
*
|
|
103
|
+
* `sha256` stays required, and requiring `fileId` alongside it costs an
|
|
104
|
+
* integrator nothing new — an application able to compute that digest already
|
|
105
|
+
* holds the bytes. What changes is that it puts bytes it already has somewhere a
|
|
106
|
+
* reviewer can read safely, instead of pointing at its own host.
|
|
88
107
|
*/
|
|
89
108
|
export declare const AssetRefSchema: z.ZodObject<{
|
|
90
|
-
|
|
109
|
+
fileId: z.ZodString;
|
|
91
110
|
url: z.ZodOptional<z.ZodURL>;
|
|
92
111
|
mimeType: z.ZodString;
|
|
93
112
|
sha256: z.ZodString;
|
|
@@ -116,13 +135,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
116
135
|
sha256: z.ZodString;
|
|
117
136
|
id: z.ZodString;
|
|
118
137
|
role: z.ZodEnum<{
|
|
119
|
-
|
|
138
|
+
metadata: "metadata";
|
|
120
139
|
subject: "subject";
|
|
121
140
|
attachment: "attachment";
|
|
141
|
+
context: "context";
|
|
122
142
|
parent: "parent";
|
|
123
143
|
quoted: "quoted";
|
|
124
144
|
evidence: "evidence";
|
|
125
|
-
metadata: "metadata";
|
|
126
145
|
policy_context: "policy_context";
|
|
127
146
|
}>;
|
|
128
147
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -132,7 +151,7 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
132
151
|
}, z.core.$strict>, z.ZodObject<{
|
|
133
152
|
type: z.ZodLiteral<"image">;
|
|
134
153
|
asset: z.ZodObject<{
|
|
135
|
-
|
|
154
|
+
fileId: z.ZodString;
|
|
136
155
|
url: z.ZodOptional<z.ZodURL>;
|
|
137
156
|
mimeType: z.ZodString;
|
|
138
157
|
sha256: z.ZodString;
|
|
@@ -144,13 +163,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
144
163
|
sha256: z.ZodOptional<z.ZodString>;
|
|
145
164
|
id: z.ZodString;
|
|
146
165
|
role: z.ZodEnum<{
|
|
147
|
-
|
|
166
|
+
metadata: "metadata";
|
|
148
167
|
subject: "subject";
|
|
149
168
|
attachment: "attachment";
|
|
169
|
+
context: "context";
|
|
150
170
|
parent: "parent";
|
|
151
171
|
quoted: "quoted";
|
|
152
172
|
evidence: "evidence";
|
|
153
|
-
metadata: "metadata";
|
|
154
173
|
policy_context: "policy_context";
|
|
155
174
|
}>;
|
|
156
175
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -160,7 +179,7 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
160
179
|
}, z.core.$strict>, z.ZodObject<{
|
|
161
180
|
type: z.ZodLiteral<"video">;
|
|
162
181
|
asset: z.ZodObject<{
|
|
163
|
-
|
|
182
|
+
fileId: z.ZodString;
|
|
164
183
|
url: z.ZodOptional<z.ZodURL>;
|
|
165
184
|
mimeType: z.ZodString;
|
|
166
185
|
sha256: z.ZodString;
|
|
@@ -178,13 +197,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
178
197
|
sha256: z.ZodOptional<z.ZodString>;
|
|
179
198
|
id: z.ZodString;
|
|
180
199
|
role: z.ZodEnum<{
|
|
181
|
-
|
|
200
|
+
metadata: "metadata";
|
|
182
201
|
subject: "subject";
|
|
183
202
|
attachment: "attachment";
|
|
203
|
+
context: "context";
|
|
184
204
|
parent: "parent";
|
|
185
205
|
quoted: "quoted";
|
|
186
206
|
evidence: "evidence";
|
|
187
|
-
metadata: "metadata";
|
|
188
207
|
policy_context: "policy_context";
|
|
189
208
|
}>;
|
|
190
209
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -194,7 +213,7 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
194
213
|
}, z.core.$strict>, z.ZodObject<{
|
|
195
214
|
type: z.ZodLiteral<"audio">;
|
|
196
215
|
asset: z.ZodObject<{
|
|
197
|
-
|
|
216
|
+
fileId: z.ZodString;
|
|
198
217
|
url: z.ZodOptional<z.ZodURL>;
|
|
199
218
|
mimeType: z.ZodString;
|
|
200
219
|
sha256: z.ZodString;
|
|
@@ -209,13 +228,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
209
228
|
sha256: z.ZodOptional<z.ZodString>;
|
|
210
229
|
id: z.ZodString;
|
|
211
230
|
role: z.ZodEnum<{
|
|
212
|
-
|
|
231
|
+
metadata: "metadata";
|
|
213
232
|
subject: "subject";
|
|
214
233
|
attachment: "attachment";
|
|
234
|
+
context: "context";
|
|
215
235
|
parent: "parent";
|
|
216
236
|
quoted: "quoted";
|
|
217
237
|
evidence: "evidence";
|
|
218
|
-
metadata: "metadata";
|
|
219
238
|
policy_context: "policy_context";
|
|
220
239
|
}>;
|
|
221
240
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -225,7 +244,7 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
225
244
|
}, z.core.$strict>, z.ZodObject<{
|
|
226
245
|
type: z.ZodLiteral<"document">;
|
|
227
246
|
asset: z.ZodObject<{
|
|
228
|
-
|
|
247
|
+
fileId: z.ZodString;
|
|
229
248
|
url: z.ZodOptional<z.ZodURL>;
|
|
230
249
|
mimeType: z.ZodString;
|
|
231
250
|
sha256: z.ZodString;
|
|
@@ -241,13 +260,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
241
260
|
sha256: z.ZodOptional<z.ZodString>;
|
|
242
261
|
id: z.ZodString;
|
|
243
262
|
role: z.ZodEnum<{
|
|
244
|
-
|
|
263
|
+
metadata: "metadata";
|
|
245
264
|
subject: "subject";
|
|
246
265
|
attachment: "attachment";
|
|
266
|
+
context: "context";
|
|
247
267
|
parent: "parent";
|
|
248
268
|
quoted: "quoted";
|
|
249
269
|
evidence: "evidence";
|
|
250
|
-
metadata: "metadata";
|
|
251
270
|
policy_context: "policy_context";
|
|
252
271
|
}>;
|
|
253
272
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -265,13 +284,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
265
284
|
sha256: z.ZodString;
|
|
266
285
|
id: z.ZodString;
|
|
267
286
|
role: z.ZodEnum<{
|
|
268
|
-
|
|
287
|
+
metadata: "metadata";
|
|
269
288
|
subject: "subject";
|
|
270
289
|
attachment: "attachment";
|
|
290
|
+
context: "context";
|
|
271
291
|
parent: "parent";
|
|
272
292
|
quoted: "quoted";
|
|
273
293
|
evidence: "evidence";
|
|
274
|
-
metadata: "metadata";
|
|
275
294
|
policy_context: "policy_context";
|
|
276
295
|
}>;
|
|
277
296
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -289,13 +308,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
289
308
|
sha256: z.ZodString;
|
|
290
309
|
id: z.ZodString;
|
|
291
310
|
role: z.ZodEnum<{
|
|
292
|
-
|
|
311
|
+
metadata: "metadata";
|
|
293
312
|
subject: "subject";
|
|
294
313
|
attachment: "attachment";
|
|
314
|
+
context: "context";
|
|
295
315
|
parent: "parent";
|
|
296
316
|
quoted: "quoted";
|
|
297
317
|
evidence: "evidence";
|
|
298
|
-
metadata: "metadata";
|
|
299
318
|
policy_context: "policy_context";
|
|
300
319
|
}>;
|
|
301
320
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -310,13 +329,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
310
329
|
sha256: z.ZodString;
|
|
311
330
|
id: z.ZodString;
|
|
312
331
|
role: z.ZodEnum<{
|
|
313
|
-
|
|
332
|
+
metadata: "metadata";
|
|
314
333
|
subject: "subject";
|
|
315
334
|
attachment: "attachment";
|
|
335
|
+
context: "context";
|
|
316
336
|
parent: "parent";
|
|
317
337
|
quoted: "quoted";
|
|
318
338
|
evidence: "evidence";
|
|
319
|
-
metadata: "metadata";
|
|
320
339
|
policy_context: "policy_context";
|
|
321
340
|
}>;
|
|
322
341
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -336,13 +355,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
336
355
|
sha256: z.ZodString;
|
|
337
356
|
id: z.ZodString;
|
|
338
357
|
role: z.ZodEnum<{
|
|
339
|
-
|
|
358
|
+
metadata: "metadata";
|
|
340
359
|
subject: "subject";
|
|
341
360
|
attachment: "attachment";
|
|
361
|
+
context: "context";
|
|
342
362
|
parent: "parent";
|
|
343
363
|
quoted: "quoted";
|
|
344
364
|
evidence: "evidence";
|
|
345
|
-
metadata: "metadata";
|
|
346
365
|
policy_context: "policy_context";
|
|
347
366
|
}>;
|
|
348
367
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -359,13 +378,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
359
378
|
sha256: z.ZodString;
|
|
360
379
|
id: z.ZodString;
|
|
361
380
|
role: z.ZodEnum<{
|
|
362
|
-
|
|
381
|
+
metadata: "metadata";
|
|
363
382
|
subject: "subject";
|
|
364
383
|
attachment: "attachment";
|
|
384
|
+
context: "context";
|
|
365
385
|
parent: "parent";
|
|
366
386
|
quoted: "quoted";
|
|
367
387
|
evidence: "evidence";
|
|
368
|
-
metadata: "metadata";
|
|
369
388
|
policy_context: "policy_context";
|
|
370
389
|
}>;
|
|
371
390
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -378,13 +397,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
378
397
|
sha256: z.ZodString;
|
|
379
398
|
id: z.ZodString;
|
|
380
399
|
role: z.ZodEnum<{
|
|
381
|
-
|
|
400
|
+
metadata: "metadata";
|
|
382
401
|
subject: "subject";
|
|
383
402
|
attachment: "attachment";
|
|
403
|
+
context: "context";
|
|
384
404
|
parent: "parent";
|
|
385
405
|
quoted: "quoted";
|
|
386
406
|
evidence: "evidence";
|
|
387
|
-
metadata: "metadata";
|
|
388
407
|
policy_context: "policy_context";
|
|
389
408
|
}>;
|
|
390
409
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -398,13 +417,13 @@ export declare const ResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
398
417
|
sha256: z.ZodString;
|
|
399
418
|
id: z.ZodString;
|
|
400
419
|
role: z.ZodEnum<{
|
|
401
|
-
|
|
420
|
+
metadata: "metadata";
|
|
402
421
|
subject: "subject";
|
|
403
422
|
attachment: "attachment";
|
|
423
|
+
context: "context";
|
|
404
424
|
parent: "parent";
|
|
405
425
|
quoted: "quoted";
|
|
406
426
|
evidence: "evidence";
|
|
407
|
-
metadata: "metadata";
|
|
408
427
|
policy_context: "policy_context";
|
|
409
428
|
}>;
|
|
410
429
|
language: z.ZodOptional<z.ZodString>;
|
package/dist/resources.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,aAAmB,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,aAAmB,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,qDAAqD;AACrD,eAAO,MAAM,cAAc,6GASjB,CAAC;AACX,eAAO,MAAM,kBAAkB;;;;;;;;;EAAyB,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,oCAAoC;AACpC,eAAO,MAAM,cAAc,0IAajB,CAAC;AACX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;EAAyB,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,oFAAoF;AACpF,eAAO,MAAM,gBAAg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G;AACH,eAAO,MAAM,gCAAgC;;;;;;kBAM3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
package/dist/resources.js
CHANGED
|
@@ -78,15 +78,35 @@ exports.TextFormattingSchema = zod_1.z.enum(exports.TEXT_FORMATTINGS);
|
|
|
78
78
|
/**
|
|
79
79
|
* A reference to bytes held outside the envelope (§5.2 `asset`).
|
|
80
80
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
81
|
+
* **`fileId` is where the bytes are. `url` is where they came from.** Those are
|
|
82
|
+
* not alternatives, and the earlier contract encoding them as "exactly one of
|
|
83
|
+
* `uploadId` or `url`" is what left an integrator with no safe way to attach an
|
|
84
|
+
* image at all: the `uploadId` branch needed a presigned upload route that was
|
|
85
|
+
* superseded by the Oxy media chokepoint before it was ever built, and the `url`
|
|
86
|
+
* branch put a URL on the reporting application's own host in front of a
|
|
87
|
+
* reviewer — breaking §9.1's branding rule and the chokepoint rule at once.
|
|
88
|
+
*
|
|
89
|
+
* So `fileId` is required and `url` is optional provenance:
|
|
90
|
+
*
|
|
91
|
+
* * **`fileId`** — a bare Oxy file id. The application uploads the bytes
|
|
92
|
+
* through the Oxy media chokepoint with its own Oxy credentials and passes
|
|
93
|
+
* the id. That is why CrowdSource serves no upload route of its own.
|
|
94
|
+
* * **`url`** — a PROVENANCE RECORD, and never a fetch target. A third-party
|
|
95
|
+
* URL is not wrong the way a first-party one is (a federated post's image
|
|
96
|
+
* genuinely lives elsewhere), but no reviewer client may dereference it:
|
|
97
|
+
* fetching it would tell that host exactly when its content is under review,
|
|
98
|
+
* which lets the reported party correlate reviewer accesses, and it would
|
|
99
|
+
* deliver bytes live rather than the pinned ones §5.6 requires.
|
|
100
|
+
*
|
|
101
|
+
* `sha256` stays required, and requiring `fileId` alongside it costs an
|
|
102
|
+
* integrator nothing new — an application able to compute that digest already
|
|
103
|
+
* holds the bytes. What changes is that it puts bytes it already has somewhere a
|
|
104
|
+
* reviewer can read safely, instead of pointing at its own host.
|
|
86
105
|
*/
|
|
87
|
-
exports.AssetRefSchema = zod_1.z
|
|
88
|
-
.
|
|
89
|
-
|
|
106
|
+
exports.AssetRefSchema = zod_1.z.strictObject({
|
|
107
|
+
/** Bare Oxy file id. The only source of the bytes a jury sees. */
|
|
108
|
+
fileId: primitives_1.OxyFileIdSchema,
|
|
109
|
+
/** Where the material was found. Recorded, never fetched — see above. */
|
|
90
110
|
url: primitives_1.HttpUrlSchema.optional(),
|
|
91
111
|
mimeType: primitives_1.MimeTypeSchema,
|
|
92
112
|
sha256: primitives_1.Sha256DigestSchema,
|
|
@@ -94,17 +114,6 @@ exports.AssetRefSchema = zod_1.z
|
|
|
94
114
|
width: zod_1.z.number().int().positive().optional(),
|
|
95
115
|
height: zod_1.z.number().int().positive().optional(),
|
|
96
116
|
durationSeconds: zod_1.z.number().positive().optional(),
|
|
97
|
-
})
|
|
98
|
-
.superRefine((asset, ctx) => {
|
|
99
|
-
const hasUpload = asset.uploadId !== undefined;
|
|
100
|
-
const hasUrl = asset.url !== undefined;
|
|
101
|
-
if (hasUpload === hasUrl) {
|
|
102
|
-
ctx.addIssue({
|
|
103
|
-
code: 'custom',
|
|
104
|
-
path: ['uploadId'],
|
|
105
|
-
message: 'an asset must reference exactly one of uploadId or url',
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
117
|
});
|
|
109
118
|
const mediaTypeMismatch = (ctx, mimeType, allowedPrefixes) => {
|
|
110
119
|
if (!allowedPrefixes.some((prefix) => mimeType.startsWith(prefix))) {
|
package/dist/resources.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;AAEH,6BAAwB;AAExB,6CAUsB;AACtB,yCAA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AAC;AACE,QAAA,kBAAkB,GAAG,OAAC,CAAC,IAAI,CAAC,sBAAc,CAAC,CAAC;AAGzD;;;;;;;;;GASG;AACU,QAAA,iCAAiC,GAAG,CAAC,aAAa,CAAU,CAAC;AAE1E;;;;;;GAMG;AACU,QAAA,cAAc,GAAG,OAAC,CAAC,YAAY,CAAC;IAC3C,IAAI,EAAE,wBAAgB;IACtB,IAAI,EAAE,0BAAkB;IACxB,EAAE,EAAE,6BAAgB;CACrB,CAAC,CAAC;AAGH;;;;;;;;;;;;;GAaG;AACU,QAAA,gCAAgC,GAAG,OAAC,CAAC,YAAY,CAAC;IAC7D,QAAQ,EAAE,6BAAgB;IAC1B,OAAO,EAAE,8BAAmB;IAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,4BAAe,CAAC,qBAAqB,CAAC;IACnE,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,4BAAe,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;IAC5E,UAAU,EAAE,gCAAmB;CAChC,CAAC,CAAC"}
|
package/dist/reviews.d.ts
CHANGED
|
@@ -249,8 +249,8 @@ export type ReviewSubmission = z.infer<typeof ReviewSubmissionSchema>;
|
|
|
249
249
|
*/
|
|
250
250
|
export declare const RECUSAL_REASONS: readonly ["conflict_of_interest", "language", "too_sensitive", "insufficient_context"];
|
|
251
251
|
export declare const RecusalReasonSchema: z.ZodEnum<{
|
|
252
|
-
insufficient_context: "insufficient_context";
|
|
253
252
|
language: "language";
|
|
253
|
+
insufficient_context: "insufficient_context";
|
|
254
254
|
conflict_of_interest: "conflict_of_interest";
|
|
255
255
|
too_sensitive: "too_sensitive";
|
|
256
256
|
}>;
|
|
@@ -265,8 +265,8 @@ export type RecusalReason = z.infer<typeof RecusalReasonSchema>;
|
|
|
265
265
|
*/
|
|
266
266
|
export declare const RecusalSubmissionSchema: z.ZodObject<{
|
|
267
267
|
reason: z.ZodEnum<{
|
|
268
|
-
insufficient_context: "insufficient_context";
|
|
269
268
|
language: "language";
|
|
269
|
+
insufficient_context: "insufficient_context";
|
|
270
270
|
conflict_of_interest: "conflict_of_interest";
|
|
271
271
|
too_sensitive: "too_sensitive";
|
|
272
272
|
}>;
|
package/dist/webhooks.d.ts
CHANGED
|
@@ -119,8 +119,8 @@ export declare const KnownWebhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
119
119
|
violation: "violation";
|
|
120
120
|
no_violation: "no_violation";
|
|
121
121
|
insufficient_context: "insufficient_context";
|
|
122
|
-
inconclusive: "inconclusive";
|
|
123
122
|
content_unavailable: "content_unavailable";
|
|
123
|
+
inconclusive: "inconclusive";
|
|
124
124
|
duplicate: "duplicate";
|
|
125
125
|
escalated: "escalated";
|
|
126
126
|
}>;
|
|
@@ -267,8 +267,8 @@ export declare const KnownWebhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
267
267
|
violation: "violation";
|
|
268
268
|
no_violation: "no_violation";
|
|
269
269
|
insufficient_context: "insufficient_context";
|
|
270
|
-
inconclusive: "inconclusive";
|
|
271
270
|
content_unavailable: "content_unavailable";
|
|
271
|
+
inconclusive: "inconclusive";
|
|
272
272
|
duplicate: "duplicate";
|
|
273
273
|
escalated: "escalated";
|
|
274
274
|
}>;
|
|
@@ -426,8 +426,8 @@ export declare const KnownWebhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
426
426
|
violation: "violation";
|
|
427
427
|
no_violation: "no_violation";
|
|
428
428
|
insufficient_context: "insufficient_context";
|
|
429
|
-
inconclusive: "inconclusive";
|
|
430
429
|
content_unavailable: "content_unavailable";
|
|
430
|
+
inconclusive: "inconclusive";
|
|
431
431
|
duplicate: "duplicate";
|
|
432
432
|
escalated: "escalated";
|
|
433
433
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/crowdsource-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Versioned CrowdSource contracts: case envelope, resources, taxonomy, policies, reviews, decisions, webhooks and reputation events",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
package/src/json-schema.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* * §5.5 reference resolution (relations, `primaryResourceId`, allegation
|
|
14
14
|
* resource ids, author and seller refs, conversation members, avatars)
|
|
15
15
|
* * the `oxy_user` binding-proof requirement
|
|
16
|
-
* *
|
|
16
|
+
* * a required `fileId` on every asset, media type agreement, coarse coordinates,
|
|
17
17
|
* price-with-currency
|
|
18
18
|
* * `agreement = winningVotes / decisiveVotes` and the vote count nesting
|
|
19
19
|
* * revision 1 supersedes nothing / later revisions must
|
package/src/primitives.ts
CHANGED
|
@@ -179,6 +179,31 @@ export const LanguageTagSchema = z
|
|
|
179
179
|
*/
|
|
180
180
|
export const HttpUrlSchema = z.url({ protocol: /^https?$/ }).max(2_048);
|
|
181
181
|
|
|
182
|
+
/**
|
|
183
|
+
* A bare Oxy file id — the one way bytes enter a case.
|
|
184
|
+
*
|
|
185
|
+
* Evidence goes through the Oxy media chokepoint (`getFileDownloadUrl`) rather
|
|
186
|
+
* than a presigned bucket, which is the §12.3 divergence recorded in
|
|
187
|
+
* `AGENTS.md`. A file id is what that chokepoint takes, so it is what an asset
|
|
188
|
+
* carries: never a URL, never a host, never a variant. The reviewer client
|
|
189
|
+
* resolves it once through Bloom's `ImageResolver`, so nothing downstream needs
|
|
190
|
+
* to know where `cloud.oxy.so` is.
|
|
191
|
+
*
|
|
192
|
+
* Deliberately opaque, for the same reason `IdentifierSchema` is: the format
|
|
193
|
+
* belongs to Oxy, not to CrowdSource, and pinning it here would make an Oxy
|
|
194
|
+
* change look like a CrowdSource contract violation. What is pinned is that it
|
|
195
|
+
* is a bounded, non-empty token with no separators that could smuggle a path or
|
|
196
|
+
* a scheme into a resolver — `..`, `/` and `:` are all excluded by the pattern.
|
|
197
|
+
*/
|
|
198
|
+
export const OxyFileIdSchema = z
|
|
199
|
+
.string()
|
|
200
|
+
.min(1)
|
|
201
|
+
.max(CONTRACT_LIMITS.IDENTIFIER_MAX_LENGTH)
|
|
202
|
+
.regex(
|
|
203
|
+
/^[A-Za-z0-9][A-Za-z0-9_-]*$/,
|
|
204
|
+
'must be a bare Oxy file id: letters, digits, "_" or "-", starting with a letter or digit',
|
|
205
|
+
);
|
|
206
|
+
|
|
182
207
|
/** A `type/subtype` media type, without parameters. */
|
|
183
208
|
export const MimeTypeSchema = z
|
|
184
209
|
.string()
|
package/src/resources.ts
CHANGED
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
LanguageTagSchema,
|
|
39
39
|
MetadataBagSchema,
|
|
40
40
|
MimeTypeSchema,
|
|
41
|
+
OxyFileIdSchema,
|
|
41
42
|
Sha256DigestSchema,
|
|
42
43
|
TimestampSchema,
|
|
43
44
|
} from './primitives';
|
|
@@ -98,34 +99,43 @@ export type TextFormatting = z.infer<typeof TextFormattingSchema>;
|
|
|
98
99
|
/**
|
|
99
100
|
* A reference to bytes held outside the envelope (§5.2 `asset`).
|
|
100
101
|
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
102
|
+
* **`fileId` is where the bytes are. `url` is where they came from.** Those are
|
|
103
|
+
* not alternatives, and the earlier contract encoding them as "exactly one of
|
|
104
|
+
* `uploadId` or `url`" is what left an integrator with no safe way to attach an
|
|
105
|
+
* image at all: the `uploadId` branch needed a presigned upload route that was
|
|
106
|
+
* superseded by the Oxy media chokepoint before it was ever built, and the `url`
|
|
107
|
+
* branch put a URL on the reporting application's own host in front of a
|
|
108
|
+
* reviewer — breaking §9.1's branding rule and the chokepoint rule at once.
|
|
109
|
+
*
|
|
110
|
+
* So `fileId` is required and `url` is optional provenance:
|
|
111
|
+
*
|
|
112
|
+
* * **`fileId`** — a bare Oxy file id. The application uploads the bytes
|
|
113
|
+
* through the Oxy media chokepoint with its own Oxy credentials and passes
|
|
114
|
+
* the id. That is why CrowdSource serves no upload route of its own.
|
|
115
|
+
* * **`url`** — a PROVENANCE RECORD, and never a fetch target. A third-party
|
|
116
|
+
* URL is not wrong the way a first-party one is (a federated post's image
|
|
117
|
+
* genuinely lives elsewhere), but no reviewer client may dereference it:
|
|
118
|
+
* fetching it would tell that host exactly when its content is under review,
|
|
119
|
+
* which lets the reported party correlate reviewer accesses, and it would
|
|
120
|
+
* deliver bytes live rather than the pinned ones §5.6 requires.
|
|
121
|
+
*
|
|
122
|
+
* `sha256` stays required, and requiring `fileId` alongside it costs an
|
|
123
|
+
* integrator nothing new — an application able to compute that digest already
|
|
124
|
+
* holds the bytes. What changes is that it puts bytes it already has somewhere a
|
|
125
|
+
* reviewer can read safely, instead of pointing at its own host.
|
|
106
126
|
*/
|
|
107
|
-
export const AssetRefSchema = z
|
|
108
|
-
.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const hasUpload = asset.uploadId !== undefined;
|
|
120
|
-
const hasUrl = asset.url !== undefined;
|
|
121
|
-
if (hasUpload === hasUrl) {
|
|
122
|
-
ctx.addIssue({
|
|
123
|
-
code: 'custom',
|
|
124
|
-
path: ['uploadId'],
|
|
125
|
-
message: 'an asset must reference exactly one of uploadId or url',
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
});
|
|
127
|
+
export const AssetRefSchema = z.strictObject({
|
|
128
|
+
/** Bare Oxy file id. The only source of the bytes a jury sees. */
|
|
129
|
+
fileId: OxyFileIdSchema,
|
|
130
|
+
/** Where the material was found. Recorded, never fetched — see above. */
|
|
131
|
+
url: HttpUrlSchema.optional(),
|
|
132
|
+
mimeType: MimeTypeSchema,
|
|
133
|
+
sha256: Sha256DigestSchema,
|
|
134
|
+
sizeBytes: z.number().int().positive().optional(),
|
|
135
|
+
width: z.number().int().positive().optional(),
|
|
136
|
+
height: z.number().int().positive().optional(),
|
|
137
|
+
durationSeconds: z.number().positive().optional(),
|
|
138
|
+
});
|
|
129
139
|
export type AssetRef = z.infer<typeof AssetRefSchema>;
|
|
130
140
|
|
|
131
141
|
const mediaTypeMismatch = (
|