@consent-kit/schema 0.0.0-stage → 0.1.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.
@@ -0,0 +1,1310 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "consent-kit privacy registry",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "version",
8
+ "controller",
9
+ "locales",
10
+ "defaultLocale",
11
+ "purposes",
12
+ "processors",
13
+ "artefacts",
14
+ "collectionPoints"
15
+ ],
16
+ "properties": {
17
+ "version": {
18
+ "description": "Registry file format version.",
19
+ "const": 1
20
+ },
21
+ "controller": {
22
+ "$ref": "#/definitions/controller"
23
+ },
24
+ "locales": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "uniqueItems": true,
28
+ "items": {
29
+ "type": "string",
30
+ "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
31
+ }
32
+ },
33
+ "defaultLocale": {
34
+ "type": "string",
35
+ "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
36
+ },
37
+ "purposes": {
38
+ "type": "array",
39
+ "items": {
40
+ "$ref": "#/definitions/purpose"
41
+ }
42
+ },
43
+ "processors": {
44
+ "type": "array",
45
+ "items": {
46
+ "$ref": "#/definitions/processor"
47
+ }
48
+ },
49
+ "artefacts": {
50
+ "type": "array",
51
+ "items": {
52
+ "$ref": "#/definitions/artefact"
53
+ }
54
+ },
55
+ "collectionPoints": {
56
+ "type": "array",
57
+ "items": {
58
+ "$ref": "#/definitions/collectionPoint"
59
+ }
60
+ },
61
+ "dataCategories": {
62
+ "description": "Data category id to its name. Once present, purposes may only use ids declared here.",
63
+ "type": "object",
64
+ "propertyNames": {
65
+ "pattern": "^[a-z][a-z0-9_-]*$"
66
+ },
67
+ "additionalProperties": {
68
+ "$ref": "#/definitions/dataCategory"
69
+ }
70
+ },
71
+ "dataSubjectCategories": {
72
+ "description": "Data subject category id to its name. Once present, purposes may only use ids declared here.",
73
+ "type": "object",
74
+ "propertyNames": {
75
+ "pattern": "^[a-z][a-z0-9_-]*$"
76
+ },
77
+ "additionalProperties": {
78
+ "$ref": "#/definitions/dataSubjectCategory"
79
+ }
80
+ },
81
+ "retentionEvents": {
82
+ "description": "Retention event id to what happens, worded to follow \"after\". Once present, retentions may only use events declared here.",
83
+ "type": "object",
84
+ "propertyNames": {
85
+ "pattern": "^[a-z][a-z0-9_-]*$"
86
+ },
87
+ "additionalProperties": {
88
+ "$ref": "#/definitions/localizedText"
89
+ }
90
+ },
91
+ "securityMeasures": {
92
+ "$ref": "#/definitions/localizedText",
93
+ "description": "General description of the technical and organisational security measures (Art. 30(1)(g) GDPR)."
94
+ },
95
+ "csp": {
96
+ "$ref": "#/definitions/csp"
97
+ },
98
+ "receipts": {
99
+ "$ref": "#/definitions/receipts"
100
+ },
101
+ "subjectRequests": {
102
+ "$ref": "#/definitions/subjectRequests"
103
+ },
104
+ "presets": {
105
+ "description": "Adopted provider presets. Each expands into a processor and its artefacts.",
106
+ "type": "array",
107
+ "items": {
108
+ "$ref": "#/definitions/presetUse"
109
+ }
110
+ }
111
+ },
112
+ "definitions": {
113
+ "localizedText": {
114
+ "description": "One string per locale declared in `locales`.",
115
+ "type": "object",
116
+ "minProperties": 1,
117
+ "propertyNames": {
118
+ "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
119
+ },
120
+ "additionalProperties": {
121
+ "type": "string",
122
+ "minLength": 1
123
+ }
124
+ },
125
+ "controller": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": [
129
+ "name",
130
+ "contact"
131
+ ],
132
+ "properties": {
133
+ "name": {
134
+ "type": "string",
135
+ "minLength": 1
136
+ },
137
+ "contact": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ },
141
+ "address": {
142
+ "type": "string",
143
+ "minLength": 1
144
+ },
145
+ "dpo": {
146
+ "description": "The data protection officer, or false: none is designated. One of the two is required.",
147
+ "oneOf": [
148
+ {
149
+ "const": false
150
+ },
151
+ {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": [
155
+ "contact"
156
+ ],
157
+ "properties": {
158
+ "name": {
159
+ "type": "string",
160
+ "minLength": 1
161
+ },
162
+ "contact": {
163
+ "type": "string",
164
+ "minLength": 1
165
+ }
166
+ }
167
+ }
168
+ ]
169
+ },
170
+ "supervisoryAuthority": {
171
+ "description": "The supervisory authority complaints go to. Required.",
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "name"
176
+ ],
177
+ "properties": {
178
+ "name": {
179
+ "type": "string",
180
+ "minLength": 1
181
+ },
182
+ "url": {
183
+ "type": "string",
184
+ "minLength": 1
185
+ },
186
+ "address": {
187
+ "type": "string",
188
+ "minLength": 1
189
+ }
190
+ }
191
+ },
192
+ "euRepresentative": {
193
+ "description": "Representative in the Union (Art. 27 GDPR), for controllers not established there.",
194
+ "type": "object",
195
+ "additionalProperties": false,
196
+ "required": [
197
+ "name",
198
+ "contact"
199
+ ],
200
+ "properties": {
201
+ "name": {
202
+ "type": "string",
203
+ "minLength": 1
204
+ },
205
+ "contact": {
206
+ "type": "string",
207
+ "minLength": 1
208
+ },
209
+ "address": {
210
+ "type": "string",
211
+ "minLength": 1
212
+ }
213
+ }
214
+ }
215
+ }
216
+ },
217
+ "dataCategory": {
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "required": [
221
+ "title"
222
+ ],
223
+ "properties": {
224
+ "title": {
225
+ "$ref": "#/definitions/localizedText"
226
+ },
227
+ "special": {
228
+ "description": "True for a special category of personal data (Art. 9 GDPR).",
229
+ "type": "boolean"
230
+ }
231
+ }
232
+ },
233
+ "dataSubjectCategory": {
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "required": [
237
+ "title"
238
+ ],
239
+ "properties": {
240
+ "title": {
241
+ "$ref": "#/definitions/localizedText"
242
+ }
243
+ }
244
+ },
245
+ "purpose": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": [
249
+ "id",
250
+ "version",
251
+ "basis",
252
+ "title",
253
+ "description",
254
+ "dataCategories",
255
+ "retention"
256
+ ],
257
+ "properties": {
258
+ "id": {
259
+ "type": "string",
260
+ "pattern": "^[a-z][a-z0-9_-]*$"
261
+ },
262
+ "version": {
263
+ "description": "Bumped on every material change to this purpose. Starts at 1.",
264
+ "type": "integer",
265
+ "minimum": 1
266
+ },
267
+ "basis": {
268
+ "enum": [
269
+ "consent",
270
+ "contract",
271
+ "legal_obligation",
272
+ "legitimate_interest",
273
+ "vital_interests",
274
+ "public_task"
275
+ ]
276
+ },
277
+ "title": {
278
+ "$ref": "#/definitions/localizedText"
279
+ },
280
+ "description": {
281
+ "$ref": "#/definitions/localizedText"
282
+ },
283
+ "dataCategories": {
284
+ "type": "array",
285
+ "uniqueItems": true,
286
+ "items": {
287
+ "type": "string",
288
+ "minLength": 1
289
+ }
290
+ },
291
+ "retention": {
292
+ "description": "\"session\", \"until-withdrawn\", \"<n>d\", \"<n>y\", \"<n>d-after-<event>\" or \"<n>y-after-<event>\".",
293
+ "type": "string",
294
+ "pattern": "^(session|until-withdrawn|[1-9][0-9]*[dy](-after-[a-z][a-z0-9_-]*)?)$"
295
+ },
296
+ "default": {
297
+ "description": "Only for basis \"consent\", where it must be \"denied\" (or omitted).",
298
+ "enum": [
299
+ "denied",
300
+ "granted"
301
+ ]
302
+ },
303
+ "legitimateInterest": {
304
+ "$ref": "#/definitions/localizedText",
305
+ "description": "The interest pursued. Required when basis is \"legitimate_interest\", and only allowed there."
306
+ },
307
+ "automatedDecisionMaking": {
308
+ "description": "Required: false (no automated decision-making or profiling, Art. 22 GDPR), or its logic and consequences.",
309
+ "oneOf": [
310
+ {
311
+ "const": false
312
+ },
313
+ {
314
+ "type": "object",
315
+ "additionalProperties": false,
316
+ "required": [
317
+ "logic",
318
+ "consequences"
319
+ ],
320
+ "properties": {
321
+ "logic": {
322
+ "$ref": "#/definitions/localizedText"
323
+ },
324
+ "consequences": {
325
+ "$ref": "#/definitions/localizedText"
326
+ }
327
+ }
328
+ }
329
+ ]
330
+ },
331
+ "dataSubjects": {
332
+ "description": "Required: ids of the categories of data subjects, e.g. \"visitors\". At least one.",
333
+ "type": "array",
334
+ "minItems": 1,
335
+ "uniqueItems": true,
336
+ "items": {
337
+ "type": "string",
338
+ "pattern": "^[a-z][a-z0-9_-]*$"
339
+ }
340
+ },
341
+ "processors": {
342
+ "description": "Processor ids that receive this purpose's data without an artefact. [] states that there are none.",
343
+ "type": "array",
344
+ "uniqueItems": true,
345
+ "items": {
346
+ "type": "string",
347
+ "pattern": "^[a-z][a-z0-9_-]*$"
348
+ }
349
+ }
350
+ }
351
+ },
352
+ "processor": {
353
+ "type": "object",
354
+ "additionalProperties": false,
355
+ "required": [
356
+ "id",
357
+ "name",
358
+ "country"
359
+ ],
360
+ "properties": {
361
+ "id": {
362
+ "type": "string",
363
+ "pattern": "^[a-z][a-z0-9_-]*$"
364
+ },
365
+ "name": {
366
+ "type": "string",
367
+ "minLength": 1
368
+ },
369
+ "role": {
370
+ "description": "Default: \"processor\".",
371
+ "enum": [
372
+ "processor",
373
+ "independent_controller",
374
+ "joint_controller"
375
+ ]
376
+ },
377
+ "legalEntity": {
378
+ "type": "string",
379
+ "minLength": 1
380
+ },
381
+ "country": {
382
+ "description": "ISO 3166-1 alpha-2 country code.",
383
+ "type": "string",
384
+ "pattern": "^[A-Z]{2}$"
385
+ },
386
+ "firstParty": {
387
+ "type": "boolean"
388
+ },
389
+ "transferMechanism": {
390
+ "description": "Required when `country` is outside the EU/EEA.",
391
+ "enum": [
392
+ "adequacy",
393
+ "scc",
394
+ "dpf",
395
+ "bcr"
396
+ ]
397
+ },
398
+ "dpaUrl": {
399
+ "type": "string",
400
+ "minLength": 1
401
+ },
402
+ "privacyUrl": {
403
+ "type": "string",
404
+ "minLength": 1
405
+ },
406
+ "subjectRequestProcess": {
407
+ "type": "string",
408
+ "minLength": 1
409
+ }
410
+ }
411
+ },
412
+ "artefact": {
413
+ "type": "object",
414
+ "required": [
415
+ "kind"
416
+ ],
417
+ "properties": {
418
+ "kind": {
419
+ "enum": [
420
+ "script",
421
+ "cookie",
422
+ "storage",
423
+ "iframe",
424
+ "pixel",
425
+ "endpoint",
426
+ "stylesheet",
427
+ "font",
428
+ "media"
429
+ ]
430
+ }
431
+ },
432
+ "allOf": [
433
+ {
434
+ "if": {
435
+ "properties": {
436
+ "kind": {
437
+ "const": "script"
438
+ }
439
+ },
440
+ "required": [
441
+ "kind"
442
+ ]
443
+ },
444
+ "then": {
445
+ "$ref": "#/definitions/scriptArtefact"
446
+ }
447
+ },
448
+ {
449
+ "if": {
450
+ "properties": {
451
+ "kind": {
452
+ "const": "cookie"
453
+ }
454
+ },
455
+ "required": [
456
+ "kind"
457
+ ]
458
+ },
459
+ "then": {
460
+ "$ref": "#/definitions/cookieArtefact"
461
+ }
462
+ },
463
+ {
464
+ "if": {
465
+ "properties": {
466
+ "kind": {
467
+ "const": "storage"
468
+ }
469
+ },
470
+ "required": [
471
+ "kind"
472
+ ]
473
+ },
474
+ "then": {
475
+ "$ref": "#/definitions/storageArtefact"
476
+ }
477
+ },
478
+ {
479
+ "if": {
480
+ "properties": {
481
+ "kind": {
482
+ "const": "iframe"
483
+ }
484
+ },
485
+ "required": [
486
+ "kind"
487
+ ]
488
+ },
489
+ "then": {
490
+ "$ref": "#/definitions/iframeArtefact"
491
+ }
492
+ },
493
+ {
494
+ "if": {
495
+ "properties": {
496
+ "kind": {
497
+ "const": "pixel"
498
+ }
499
+ },
500
+ "required": [
501
+ "kind"
502
+ ]
503
+ },
504
+ "then": {
505
+ "$ref": "#/definitions/pixelArtefact"
506
+ }
507
+ },
508
+ {
509
+ "if": {
510
+ "properties": {
511
+ "kind": {
512
+ "const": "endpoint"
513
+ }
514
+ },
515
+ "required": [
516
+ "kind"
517
+ ]
518
+ },
519
+ "then": {
520
+ "$ref": "#/definitions/endpointArtefact"
521
+ }
522
+ },
523
+ {
524
+ "if": {
525
+ "properties": {
526
+ "kind": {
527
+ "const": "stylesheet"
528
+ }
529
+ },
530
+ "required": [
531
+ "kind"
532
+ ]
533
+ },
534
+ "then": {
535
+ "$ref": "#/definitions/stylesheetArtefact"
536
+ }
537
+ },
538
+ {
539
+ "if": {
540
+ "properties": {
541
+ "kind": {
542
+ "const": "font"
543
+ }
544
+ },
545
+ "required": [
546
+ "kind"
547
+ ]
548
+ },
549
+ "then": {
550
+ "$ref": "#/definitions/fontArtefact"
551
+ }
552
+ },
553
+ {
554
+ "if": {
555
+ "properties": {
556
+ "kind": {
557
+ "const": "media"
558
+ }
559
+ },
560
+ "required": [
561
+ "kind"
562
+ ]
563
+ },
564
+ "then": {
565
+ "$ref": "#/definitions/mediaArtefact"
566
+ }
567
+ }
568
+ ]
569
+ },
570
+ "scriptArtefact": {
571
+ "type": "object",
572
+ "additionalProperties": false,
573
+ "required": [
574
+ "id",
575
+ "kind",
576
+ "purposes",
577
+ "src"
578
+ ],
579
+ "properties": {
580
+ "id": {
581
+ "type": "string",
582
+ "pattern": "^[a-z][a-z0-9_-]*$"
583
+ },
584
+ "kind": {
585
+ "const": "script"
586
+ },
587
+ "purposes": {
588
+ "description": "Purpose ids. At least one.",
589
+ "type": "array",
590
+ "minItems": 1,
591
+ "uniqueItems": true,
592
+ "items": {
593
+ "type": "string",
594
+ "pattern": "^[a-z][a-z0-9_-]*$"
595
+ }
596
+ },
597
+ "processor": {
598
+ "type": "string",
599
+ "pattern": "^[a-z][a-z0-9_-]*$",
600
+ "description": "Processor id. Required for anything third-party."
601
+ },
602
+ "description": {
603
+ "$ref": "#/definitions/localizedText"
604
+ },
605
+ "src": {
606
+ "type": "string",
607
+ "minLength": 1,
608
+ "description": "Absolute URL, or a site-relative path."
609
+ }
610
+ }
611
+ },
612
+ "cookieArtefact": {
613
+ "type": "object",
614
+ "additionalProperties": false,
615
+ "required": [
616
+ "id",
617
+ "kind",
618
+ "purposes",
619
+ "duration"
620
+ ],
621
+ "properties": {
622
+ "id": {
623
+ "type": "string",
624
+ "pattern": "^[a-z][a-z0-9_-]*$"
625
+ },
626
+ "kind": {
627
+ "const": "cookie"
628
+ },
629
+ "purposes": {
630
+ "description": "Purpose ids. At least one.",
631
+ "type": "array",
632
+ "minItems": 1,
633
+ "uniqueItems": true,
634
+ "items": {
635
+ "type": "string",
636
+ "pattern": "^[a-z][a-z0-9_-]*$"
637
+ }
638
+ },
639
+ "processor": {
640
+ "type": "string",
641
+ "pattern": "^[a-z][a-z0-9_-]*$",
642
+ "description": "Processor id. Required for anything third-party."
643
+ },
644
+ "description": {
645
+ "$ref": "#/definitions/localizedText"
646
+ },
647
+ "name": {
648
+ "type": "string",
649
+ "minLength": 1
650
+ },
651
+ "pattern": {
652
+ "type": "string",
653
+ "minLength": 1,
654
+ "description": "RegExp source, e.g. \"^_ga_\"."
655
+ },
656
+ "duration": {
657
+ "description": "\"session\" or a duration such as \"365d\".",
658
+ "type": "string",
659
+ "pattern": "^(session|[1-9][0-9]*d)$"
660
+ },
661
+ "domain": {
662
+ "type": "string",
663
+ "minLength": 1
664
+ },
665
+ "sameSite": {
666
+ "enum": [
667
+ "Strict",
668
+ "Lax",
669
+ "None"
670
+ ]
671
+ },
672
+ "secure": {
673
+ "type": "boolean"
674
+ },
675
+ "httpOnly": {
676
+ "type": "boolean"
677
+ }
678
+ },
679
+ "oneOf": [
680
+ {
681
+ "required": [
682
+ "name"
683
+ ]
684
+ },
685
+ {
686
+ "required": [
687
+ "pattern"
688
+ ]
689
+ }
690
+ ]
691
+ },
692
+ "storageArtefact": {
693
+ "type": "object",
694
+ "additionalProperties": false,
695
+ "required": [
696
+ "id",
697
+ "kind",
698
+ "purposes",
699
+ "area"
700
+ ],
701
+ "properties": {
702
+ "id": {
703
+ "type": "string",
704
+ "pattern": "^[a-z][a-z0-9_-]*$"
705
+ },
706
+ "kind": {
707
+ "const": "storage"
708
+ },
709
+ "purposes": {
710
+ "description": "Purpose ids. At least one.",
711
+ "type": "array",
712
+ "minItems": 1,
713
+ "uniqueItems": true,
714
+ "items": {
715
+ "type": "string",
716
+ "pattern": "^[a-z][a-z0-9_-]*$"
717
+ }
718
+ },
719
+ "processor": {
720
+ "type": "string",
721
+ "pattern": "^[a-z][a-z0-9_-]*$",
722
+ "description": "Processor id. Required for anything third-party."
723
+ },
724
+ "description": {
725
+ "$ref": "#/definitions/localizedText"
726
+ },
727
+ "area": {
728
+ "enum": [
729
+ "local",
730
+ "session",
731
+ "indexeddb"
732
+ ]
733
+ },
734
+ "key": {
735
+ "type": "string",
736
+ "minLength": 1,
737
+ "description": "For indexeddb: the database name."
738
+ },
739
+ "pattern": {
740
+ "type": "string",
741
+ "minLength": 1,
742
+ "description": "RegExp source."
743
+ },
744
+ "duration": {
745
+ "description": "\"persistent\" or a duration such as \"30d\".",
746
+ "type": "string",
747
+ "pattern": "^(persistent|[1-9][0-9]*d)$"
748
+ }
749
+ },
750
+ "oneOf": [
751
+ {
752
+ "required": [
753
+ "key"
754
+ ]
755
+ },
756
+ {
757
+ "required": [
758
+ "pattern"
759
+ ]
760
+ }
761
+ ]
762
+ },
763
+ "iframeArtefact": {
764
+ "type": "object",
765
+ "additionalProperties": false,
766
+ "required": [
767
+ "id",
768
+ "kind",
769
+ "purposes",
770
+ "src"
771
+ ],
772
+ "properties": {
773
+ "id": {
774
+ "type": "string",
775
+ "pattern": "^[a-z][a-z0-9_-]*$"
776
+ },
777
+ "kind": {
778
+ "const": "iframe"
779
+ },
780
+ "purposes": {
781
+ "description": "Purpose ids. At least one.",
782
+ "type": "array",
783
+ "minItems": 1,
784
+ "uniqueItems": true,
785
+ "items": {
786
+ "type": "string",
787
+ "pattern": "^[a-z][a-z0-9_-]*$"
788
+ }
789
+ },
790
+ "processor": {
791
+ "type": "string",
792
+ "pattern": "^[a-z][a-z0-9_-]*$",
793
+ "description": "Processor id. Required for anything third-party."
794
+ },
795
+ "description": {
796
+ "$ref": "#/definitions/localizedText"
797
+ },
798
+ "src": {
799
+ "type": "string",
800
+ "minLength": 1,
801
+ "description": "Origin or URL prefix the embed loads from."
802
+ }
803
+ }
804
+ },
805
+ "pixelArtefact": {
806
+ "type": "object",
807
+ "additionalProperties": false,
808
+ "required": [
809
+ "id",
810
+ "kind",
811
+ "purposes",
812
+ "url"
813
+ ],
814
+ "properties": {
815
+ "id": {
816
+ "type": "string",
817
+ "pattern": "^[a-z][a-z0-9_-]*$"
818
+ },
819
+ "kind": {
820
+ "const": "pixel"
821
+ },
822
+ "purposes": {
823
+ "description": "Purpose ids. At least one.",
824
+ "type": "array",
825
+ "minItems": 1,
826
+ "uniqueItems": true,
827
+ "items": {
828
+ "type": "string",
829
+ "pattern": "^[a-z][a-z0-9_-]*$"
830
+ }
831
+ },
832
+ "processor": {
833
+ "type": "string",
834
+ "pattern": "^[a-z][a-z0-9_-]*$",
835
+ "description": "Processor id. Required for anything third-party."
836
+ },
837
+ "description": {
838
+ "$ref": "#/definitions/localizedText"
839
+ },
840
+ "url": {
841
+ "type": "string",
842
+ "minLength": 1
843
+ }
844
+ }
845
+ },
846
+ "endpointArtefact": {
847
+ "type": "object",
848
+ "additionalProperties": false,
849
+ "required": [
850
+ "id",
851
+ "kind",
852
+ "purposes",
853
+ "url"
854
+ ],
855
+ "properties": {
856
+ "id": {
857
+ "type": "string",
858
+ "pattern": "^[a-z][a-z0-9_-]*$"
859
+ },
860
+ "kind": {
861
+ "const": "endpoint"
862
+ },
863
+ "purposes": {
864
+ "description": "Purpose ids. At least one.",
865
+ "type": "array",
866
+ "minItems": 1,
867
+ "uniqueItems": true,
868
+ "items": {
869
+ "type": "string",
870
+ "pattern": "^[a-z][a-z0-9_-]*$"
871
+ }
872
+ },
873
+ "processor": {
874
+ "type": "string",
875
+ "pattern": "^[a-z][a-z0-9_-]*$",
876
+ "description": "Processor id. Required for anything third-party."
877
+ },
878
+ "description": {
879
+ "$ref": "#/definitions/localizedText"
880
+ },
881
+ "url": {
882
+ "type": "string",
883
+ "minLength": 1,
884
+ "description": "Origin or URL prefix first-party code sends data to."
885
+ }
886
+ }
887
+ },
888
+ "stylesheetArtefact": {
889
+ "type": "object",
890
+ "additionalProperties": false,
891
+ "required": [
892
+ "id",
893
+ "kind",
894
+ "purposes",
895
+ "src"
896
+ ],
897
+ "properties": {
898
+ "id": {
899
+ "type": "string",
900
+ "pattern": "^[a-z][a-z0-9_-]*$"
901
+ },
902
+ "kind": {
903
+ "const": "stylesheet"
904
+ },
905
+ "purposes": {
906
+ "description": "Purpose ids. At least one.",
907
+ "type": "array",
908
+ "minItems": 1,
909
+ "uniqueItems": true,
910
+ "items": {
911
+ "type": "string",
912
+ "pattern": "^[a-z][a-z0-9_-]*$"
913
+ }
914
+ },
915
+ "processor": {
916
+ "type": "string",
917
+ "pattern": "^[a-z][a-z0-9_-]*$",
918
+ "description": "Processor id. Required for anything third-party."
919
+ },
920
+ "description": {
921
+ "$ref": "#/definitions/localizedText"
922
+ },
923
+ "src": {
924
+ "type": "string",
925
+ "minLength": 1,
926
+ "description": "Absolute URL of the stylesheet, or an origin or URL prefix."
927
+ }
928
+ }
929
+ },
930
+ "fontArtefact": {
931
+ "type": "object",
932
+ "additionalProperties": false,
933
+ "required": [
934
+ "id",
935
+ "kind",
936
+ "purposes",
937
+ "src"
938
+ ],
939
+ "properties": {
940
+ "id": {
941
+ "type": "string",
942
+ "pattern": "^[a-z][a-z0-9_-]*$"
943
+ },
944
+ "kind": {
945
+ "const": "font"
946
+ },
947
+ "purposes": {
948
+ "description": "Purpose ids. At least one.",
949
+ "type": "array",
950
+ "minItems": 1,
951
+ "uniqueItems": true,
952
+ "items": {
953
+ "type": "string",
954
+ "pattern": "^[a-z][a-z0-9_-]*$"
955
+ }
956
+ },
957
+ "processor": {
958
+ "type": "string",
959
+ "pattern": "^[a-z][a-z0-9_-]*$",
960
+ "description": "Processor id. Required for anything third-party."
961
+ },
962
+ "description": {
963
+ "$ref": "#/definitions/localizedText"
964
+ },
965
+ "src": {
966
+ "type": "string",
967
+ "minLength": 1,
968
+ "description": "Absolute URL of the font file, or an origin or URL prefix."
969
+ }
970
+ }
971
+ },
972
+ "mediaArtefact": {
973
+ "type": "object",
974
+ "additionalProperties": false,
975
+ "required": [
976
+ "id",
977
+ "kind",
978
+ "purposes",
979
+ "src"
980
+ ],
981
+ "properties": {
982
+ "id": {
983
+ "type": "string",
984
+ "pattern": "^[a-z][a-z0-9_-]*$"
985
+ },
986
+ "kind": {
987
+ "const": "media"
988
+ },
989
+ "purposes": {
990
+ "description": "Purpose ids. At least one.",
991
+ "type": "array",
992
+ "minItems": 1,
993
+ "uniqueItems": true,
994
+ "items": {
995
+ "type": "string",
996
+ "pattern": "^[a-z][a-z0-9_-]*$"
997
+ }
998
+ },
999
+ "processor": {
1000
+ "type": "string",
1001
+ "pattern": "^[a-z][a-z0-9_-]*$",
1002
+ "description": "Processor id. Required for anything third-party."
1003
+ },
1004
+ "description": {
1005
+ "$ref": "#/definitions/localizedText"
1006
+ },
1007
+ "src": {
1008
+ "type": "string",
1009
+ "minLength": 1,
1010
+ "description": "Absolute URL of the audio or video file, or an origin or URL prefix."
1011
+ }
1012
+ }
1013
+ },
1014
+ "csp": {
1015
+ "description": "Deviations from the strict Content-Security-Policy that consent-kit generates. Absent: strict and enforced.",
1016
+ "type": "object",
1017
+ "additionalProperties": false,
1018
+ "properties": {
1019
+ "allow": {
1020
+ "description": "Additional sources per directive, each with a reason.",
1021
+ "type": "array",
1022
+ "items": {
1023
+ "type": "object",
1024
+ "additionalProperties": false,
1025
+ "required": [
1026
+ "directive",
1027
+ "sources",
1028
+ "reason"
1029
+ ],
1030
+ "properties": {
1031
+ "directive": {
1032
+ "description": "One of: default-src, script-src, style-src, font-src, img-src, connect-src, frame-src, media-src, worker-src, manifest-src, object-src, base-uri, form-action, frame-ancestors.",
1033
+ "type": "string"
1034
+ },
1035
+ "sources": {
1036
+ "description": "Source expressions as written in the header, e.g. \"'unsafe-inline'\", \"data:\", \"https://cdn.example\".",
1037
+ "type": "array",
1038
+ "minItems": 1,
1039
+ "uniqueItems": true,
1040
+ "items": {
1041
+ "type": "string",
1042
+ "minLength": 1
1043
+ }
1044
+ },
1045
+ "reason": {
1046
+ "type": "string",
1047
+ "minLength": 1,
1048
+ "description": "Why the site needs it."
1049
+ }
1050
+ }
1051
+ }
1052
+ },
1053
+ "reportOnly": {
1054
+ "description": "Emit Content-Security-Policy-Report-Only: nothing is blocked.",
1055
+ "type": "boolean"
1056
+ },
1057
+ "reportUri": {
1058
+ "type": "string",
1059
+ "minLength": 1,
1060
+ "description": "report-uri. A third-party URL must be a declared endpoint artefact."
1061
+ },
1062
+ "reportTo": {
1063
+ "description": "report-to group name.",
1064
+ "type": "string",
1065
+ "pattern": "^[A-Za-z0-9_-]+$"
1066
+ },
1067
+ "upgradeInsecureRequests": {
1068
+ "description": "false leaves out upgrade-insecure-requests.",
1069
+ "type": "boolean"
1070
+ }
1071
+ }
1072
+ },
1073
+ "receipts": {
1074
+ "description": "Where proof of each consent decision goes: an endpoint, or an opt-out with a reason. Required once a purpose is based on consent.",
1075
+ "type": "object",
1076
+ "additionalProperties": false,
1077
+ "properties": {
1078
+ "endpoint": {
1079
+ "type": "string",
1080
+ "minLength": 1,
1081
+ "description": "Site-relative path or https URL that receives one JSON receipt per decision. A third-party URL must be a declared endpoint artefact."
1082
+ },
1083
+ "optOut": {
1084
+ "description": "No receipts are sent. Reported by consent-kit check and the audit.",
1085
+ "type": "object",
1086
+ "additionalProperties": false,
1087
+ "required": [
1088
+ "reason"
1089
+ ],
1090
+ "properties": {
1091
+ "reason": {
1092
+ "type": "string",
1093
+ "minLength": 1,
1094
+ "description": "Why this site keeps no receipts."
1095
+ }
1096
+ }
1097
+ }
1098
+ },
1099
+ "oneOf": [
1100
+ {
1101
+ "required": [
1102
+ "endpoint"
1103
+ ]
1104
+ },
1105
+ {
1106
+ "required": [
1107
+ "optOut"
1108
+ ]
1109
+ }
1110
+ ]
1111
+ },
1112
+ "subjectRequests": {
1113
+ "description": "Receiving data subject requests through a form on the site. consent-kit receives, records, notifies and reminds; a person answers. Adds the built-in purpose \"subject-requests\".",
1114
+ "type": "object",
1115
+ "additionalProperties": false,
1116
+ "required": [
1117
+ "endpoint",
1118
+ "notify",
1119
+ "types",
1120
+ "retention"
1121
+ ],
1122
+ "properties": {
1123
+ "endpoint": {
1124
+ "type": "string",
1125
+ "minLength": 1,
1126
+ "description": "Site-relative path the form posts to, e.g. \"/privacy/requests\". Never another origin."
1127
+ },
1128
+ "notify": {
1129
+ "type": "string",
1130
+ "minLength": 1,
1131
+ "description": "The mailbox every request is emailed to, e.g. \"privacy@example.com\"."
1132
+ },
1133
+ "types": {
1134
+ "description": "Which requests the form offers: access, erasure.",
1135
+ "type": "array",
1136
+ "minItems": 1,
1137
+ "uniqueItems": true,
1138
+ "items": {
1139
+ "type": "string",
1140
+ "minLength": 1
1141
+ }
1142
+ },
1143
+ "retention": {
1144
+ "type": "string",
1145
+ "minLength": 1,
1146
+ "description": "How long a closed request is kept: \"<n>d\" or \"<n>y\". Required, no default."
1147
+ },
1148
+ "requesterEmail": {
1149
+ "description": "Email the requester a confirmation link through this declared processor. Optional.",
1150
+ "type": "object",
1151
+ "additionalProperties": false,
1152
+ "required": [
1153
+ "processor"
1154
+ ],
1155
+ "properties": {
1156
+ "processor": {
1157
+ "type": "string",
1158
+ "pattern": "^[a-z][a-z0-9_-]*$",
1159
+ "description": "Processor id of the email provider."
1160
+ }
1161
+ }
1162
+ }
1163
+ }
1164
+ },
1165
+ "collectionPoint": {
1166
+ "type": "object",
1167
+ "additionalProperties": false,
1168
+ "required": [
1169
+ "id",
1170
+ "fields"
1171
+ ],
1172
+ "properties": {
1173
+ "id": {
1174
+ "type": "string",
1175
+ "pattern": "^[a-z][a-z0-9_-]*$"
1176
+ },
1177
+ "title": {
1178
+ "$ref": "#/definitions/localizedText"
1179
+ },
1180
+ "description": {
1181
+ "type": "string",
1182
+ "minLength": 1,
1183
+ "description": "Internal note; never printed in a document."
1184
+ },
1185
+ "fields": {
1186
+ "type": "array",
1187
+ "items": {
1188
+ "$ref": "#/definitions/collectionField"
1189
+ }
1190
+ }
1191
+ }
1192
+ },
1193
+ "presetUse": {
1194
+ "type": "object",
1195
+ "additionalProperties": false,
1196
+ "required": [
1197
+ "use",
1198
+ "version"
1199
+ ],
1200
+ "properties": {
1201
+ "use": {
1202
+ "type": "string",
1203
+ "pattern": "^[a-z][a-z0-9_-]*$",
1204
+ "description": "Preset id in the catalogue, e.g. \"plausible\"."
1205
+ },
1206
+ "version": {
1207
+ "description": "A major version (1) or an exact version (\"1.0.2\").",
1208
+ "type": [
1209
+ "integer",
1210
+ "string"
1211
+ ]
1212
+ },
1213
+ "purpose": {
1214
+ "type": "string",
1215
+ "pattern": "^[a-z][a-z0-9_-]*$",
1216
+ "description": "Purpose id, for presets with exactly one purpose slot."
1217
+ },
1218
+ "purposes": {
1219
+ "description": "Preset purpose slot to project purpose id.",
1220
+ "type": "object",
1221
+ "additionalProperties": {
1222
+ "type": "string",
1223
+ "pattern": "^[a-z][a-z0-9_-]*$"
1224
+ }
1225
+ },
1226
+ "with": {
1227
+ "description": "Values for the preset's parameters.",
1228
+ "type": "object",
1229
+ "additionalProperties": {
1230
+ "type": [
1231
+ "string",
1232
+ "number",
1233
+ "boolean"
1234
+ ]
1235
+ }
1236
+ },
1237
+ "ids": {
1238
+ "description": "Renames: default processor or artefact id to the id this project uses.",
1239
+ "type": "object",
1240
+ "additionalProperties": {
1241
+ "type": "string",
1242
+ "pattern": "^[a-z][a-z0-9_-]*$"
1243
+ }
1244
+ },
1245
+ "exclude": {
1246
+ "description": "Default ids of preset artefacts this project does not use.",
1247
+ "type": "array",
1248
+ "uniqueItems": true,
1249
+ "items": {
1250
+ "type": "string",
1251
+ "pattern": "^[a-z][a-z0-9_-]*$"
1252
+ }
1253
+ },
1254
+ "overrides": {
1255
+ "description": "Local deviations from the documented defaults, by default id. Always recorded.",
1256
+ "type": "object",
1257
+ "additionalProperties": false,
1258
+ "properties": {
1259
+ "processor": {
1260
+ "type": "object"
1261
+ },
1262
+ "artefacts": {
1263
+ "type": "object",
1264
+ "additionalProperties": {
1265
+ "type": "object"
1266
+ }
1267
+ }
1268
+ }
1269
+ }
1270
+ }
1271
+ },
1272
+ "collectionField": {
1273
+ "type": "object",
1274
+ "additionalProperties": false,
1275
+ "required": [
1276
+ "name",
1277
+ "purpose"
1278
+ ],
1279
+ "properties": {
1280
+ "name": {
1281
+ "type": "string",
1282
+ "minLength": 1
1283
+ },
1284
+ "purpose": {
1285
+ "type": "string",
1286
+ "pattern": "^[a-z][a-z0-9_-]*$",
1287
+ "description": "Purpose id this field is collected for."
1288
+ },
1289
+ "required": {
1290
+ "type": "boolean"
1291
+ },
1292
+ "notice": {
1293
+ "$ref": "#/definitions/localizedText"
1294
+ },
1295
+ "provision": {
1296
+ "description": "Required: whether the data must be provided (Art. 13(2)(e) GDPR).",
1297
+ "enum": [
1298
+ "statutory",
1299
+ "contractual",
1300
+ "voluntary"
1301
+ ]
1302
+ },
1303
+ "consequence": {
1304
+ "$ref": "#/definitions/localizedText",
1305
+ "description": "What happens if the data is not provided. Required unless provision is \"voluntary\"."
1306
+ }
1307
+ }
1308
+ }
1309
+ }
1310
+ }