@amplitude/amp-semantic 0.2.0-codexsemantic-review-integration.0 → 0.2.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 (89) hide show
  1. package/README.md +8 -237
  2. package/lib/cjs/capture.d.ts +5 -5
  3. package/lib/cjs/capture.d.ts.map +1 -1
  4. package/lib/cjs/capture.js +48 -56
  5. package/lib/cjs/capture.js.map +1 -1
  6. package/lib/cjs/index.d.ts +4 -13
  7. package/lib/cjs/index.d.ts.map +1 -1
  8. package/lib/cjs/index.js +7 -32
  9. package/lib/cjs/index.js.map +1 -1
  10. package/lib/cjs/types.d.ts +33 -235
  11. package/lib/cjs/types.d.ts.map +1 -1
  12. package/lib/cjs/types.js.map +1 -1
  13. package/lib/esm/capture.d.ts +5 -5
  14. package/lib/esm/capture.d.ts.map +1 -1
  15. package/lib/esm/capture.js +47 -55
  16. package/lib/esm/capture.js.map +1 -1
  17. package/lib/esm/index.d.ts +4 -13
  18. package/lib/esm/index.d.ts.map +1 -1
  19. package/lib/esm/index.js +6 -22
  20. package/lib/esm/index.js.map +1 -1
  21. package/lib/esm/types.d.ts +33 -235
  22. package/lib/esm/types.d.ts.map +1 -1
  23. package/lib/esm/types.js.map +1 -1
  24. package/package.json +8 -10
  25. package/lib/cjs/helpers.d.ts +0 -9
  26. package/lib/cjs/helpers.d.ts.map +0 -1
  27. package/lib/cjs/helpers.js +0 -469
  28. package/lib/cjs/helpers.js.map +0 -1
  29. package/lib/cjs/recorders/analytics.d.ts +0 -7
  30. package/lib/cjs/recorders/analytics.d.ts.map +0 -1
  31. package/lib/cjs/recorders/analytics.js +0 -95
  32. package/lib/cjs/recorders/analytics.js.map +0 -1
  33. package/lib/cjs/recorders/feedback.d.ts +0 -4
  34. package/lib/cjs/recorders/feedback.d.ts.map +0 -1
  35. package/lib/cjs/recorders/feedback.js +0 -611
  36. package/lib/cjs/recorders/feedback.js.map +0 -1
  37. package/lib/cjs/recorders/interactions.d.ts +0 -4
  38. package/lib/cjs/recorders/interactions.d.ts.map +0 -1
  39. package/lib/cjs/recorders/interactions.js +0 -320
  40. package/lib/cjs/recorders/interactions.js.map +0 -1
  41. package/lib/cjs/recorders/keys.d.ts +0 -4
  42. package/lib/cjs/recorders/keys.d.ts.map +0 -1
  43. package/lib/cjs/recorders/keys.js +0 -64
  44. package/lib/cjs/recorders/keys.js.map +0 -1
  45. package/lib/cjs/recorders/lifecycle.d.ts +0 -4
  46. package/lib/cjs/recorders/lifecycle.d.ts.map +0 -1
  47. package/lib/cjs/recorders/lifecycle.js +0 -86
  48. package/lib/cjs/recorders/lifecycle.js.map +0 -1
  49. package/lib/cjs/recorders/navigation.d.ts +0 -4
  50. package/lib/cjs/recorders/navigation.d.ts.map +0 -1
  51. package/lib/cjs/recorders/navigation.js +0 -18
  52. package/lib/cjs/recorders/navigation.js.map +0 -1
  53. package/lib/cjs/recorders/resource-error.d.ts +0 -4
  54. package/lib/cjs/recorders/resource-error.d.ts.map +0 -1
  55. package/lib/cjs/recorders/resource-error.js +0 -159
  56. package/lib/cjs/recorders/resource-error.js.map +0 -1
  57. package/lib/esm/helpers.d.ts +0 -9
  58. package/lib/esm/helpers.d.ts.map +0 -1
  59. package/lib/esm/helpers.js +0 -461
  60. package/lib/esm/helpers.js.map +0 -1
  61. package/lib/esm/recorders/analytics.d.ts +0 -7
  62. package/lib/esm/recorders/analytics.d.ts.map +0 -1
  63. package/lib/esm/recorders/analytics.js +0 -92
  64. package/lib/esm/recorders/analytics.js.map +0 -1
  65. package/lib/esm/recorders/feedback.d.ts +0 -4
  66. package/lib/esm/recorders/feedback.d.ts.map +0 -1
  67. package/lib/esm/recorders/feedback.js +0 -608
  68. package/lib/esm/recorders/feedback.js.map +0 -1
  69. package/lib/esm/recorders/interactions.d.ts +0 -4
  70. package/lib/esm/recorders/interactions.d.ts.map +0 -1
  71. package/lib/esm/recorders/interactions.js +0 -317
  72. package/lib/esm/recorders/interactions.js.map +0 -1
  73. package/lib/esm/recorders/keys.d.ts +0 -4
  74. package/lib/esm/recorders/keys.d.ts.map +0 -1
  75. package/lib/esm/recorders/keys.js +0 -61
  76. package/lib/esm/recorders/keys.js.map +0 -1
  77. package/lib/esm/recorders/lifecycle.d.ts +0 -4
  78. package/lib/esm/recorders/lifecycle.d.ts.map +0 -1
  79. package/lib/esm/recorders/lifecycle.js +0 -83
  80. package/lib/esm/recorders/lifecycle.js.map +0 -1
  81. package/lib/esm/recorders/navigation.d.ts +0 -4
  82. package/lib/esm/recorders/navigation.d.ts.map +0 -1
  83. package/lib/esm/recorders/navigation.js +0 -15
  84. package/lib/esm/recorders/navigation.js.map +0 -1
  85. package/lib/esm/recorders/resource-error.d.ts +0 -4
  86. package/lib/esm/recorders/resource-error.d.ts.map +0 -1
  87. package/lib/esm/recorders/resource-error.js +0 -156
  88. package/lib/esm/recorders/resource-error.js.map +0 -1
  89. package/schema.json +0 -1110
package/schema.json DELETED
@@ -1,1110 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "Amplitude semantic capture v1 events",
4
- "oneOf": [
5
- {
6
- "type": "object",
7
- "properties": {
8
- "type": { "const": 5 },
9
- "timestamp": { "type": "number" },
10
- "data": {
11
- "type": "object",
12
- "properties": {
13
- "tag": { "const": "amp-semantic/navigation" },
14
- "payload": {
15
- "type": "object",
16
- "properties": {
17
- "v": { "const": 1 },
18
- "url": { "type": "string" },
19
- "tab_id": { "type": "string", "minLength": 1 },
20
- "document_id": { "type": "string", "minLength": 1 }
21
- },
22
- "required": ["v", "url"],
23
- "additionalProperties": false
24
- }
25
- },
26
- "required": ["tag", "payload"],
27
- "additionalProperties": false
28
- }
29
- },
30
- "required": ["type", "timestamp", "data"],
31
- "additionalProperties": false
32
- },
33
- {
34
- "type": "object",
35
- "properties": {
36
- "type": {
37
- "const": 5
38
- },
39
- "timestamp": {
40
- "type": "number"
41
- },
42
- "data": {
43
- "type": "object",
44
- "properties": {
45
- "tag": {
46
- "const": "amp-semantic/context"
47
- },
48
- "payload": {
49
- "type": "object",
50
- "properties": {
51
- "sdk": {
52
- "type": "string"
53
- },
54
- "mask": {
55
- "enum": ["light", "medium", "conservative"]
56
- },
57
- "css": {
58
- "type": "object",
59
- "properties": {
60
- "total": {
61
- "type": "integer",
62
- "minimum": 0
63
- },
64
- "inlined": {
65
- "type": "integer",
66
- "minimum": 0
67
- },
68
- "unreadable": {
69
- "type": "integer",
70
- "minimum": 0
71
- }
72
- },
73
- "required": ["total", "inlined", "unreadable"],
74
- "additionalProperties": false
75
- },
76
- "viewport": {
77
- "type": "object",
78
- "properties": {
79
- "w": {
80
- "type": "number"
81
- },
82
- "h": {
83
- "type": "number"
84
- }
85
- },
86
- "required": ["w", "h"],
87
- "additionalProperties": false
88
- },
89
- "device": {
90
- "enum": ["desktop", "tablet", "mobile"]
91
- },
92
- "language": {
93
- "type": "string"
94
- },
95
- "visibility_state": {
96
- "enum": ["hidden", "visible"]
97
- },
98
- "focused": { "type": "boolean" },
99
- "user_agent": {
100
- "type": "string"
101
- },
102
- "analytics_sdk": {
103
- "type": "object",
104
- "properties": {
105
- "present": {
106
- "type": "boolean"
107
- },
108
- "autocapture": {
109
- "type": "array",
110
- "items": {
111
- "type": "string"
112
- }
113
- }
114
- },
115
- "required": ["present", "autocapture"],
116
- "additionalProperties": false
117
- },
118
- "caps_hit": {
119
- "type": "object",
120
- "additionalProperties": {
121
- "type": "integer",
122
- "minimum": 1
123
- }
124
- },
125
- "tab_id": { "type": "string", "minLength": 1 },
126
- "document_id": { "type": "string", "minLength": 1 },
127
- "v": {
128
- "const": 1
129
- }
130
- },
131
- "required": ["sdk", "mask", "css", "viewport", "device", "language", "analytics_sdk", "v"],
132
- "additionalProperties": false
133
- }
134
- },
135
- "required": ["tag", "payload"],
136
- "additionalProperties": false
137
- }
138
- },
139
- "required": ["type", "timestamp", "data"],
140
- "additionalProperties": false
141
- },
142
- {
143
- "type": "object",
144
- "properties": {
145
- "type": {
146
- "const": 5
147
- },
148
- "timestamp": {
149
- "type": "number"
150
- },
151
- "data": {
152
- "type": "object",
153
- "properties": {
154
- "tag": {
155
- "const": "amp-semantic/click"
156
- },
157
- "payload": {
158
- "type": "object",
159
- "properties": {
160
- "id": {
161
- "type": ["integer", "null"],
162
- "minimum": 0
163
- },
164
- "role": {
165
- "type": "string"
166
- },
167
- "name": {
168
- "type": ["string", "null"],
169
- "maxLength": 80
170
- },
171
- "name_source": {
172
- "enum": [
173
- "aria-labelledby",
174
- "aria-label",
175
- "label-for",
176
- "label-wrap",
177
- "alt",
178
- "value",
179
- "title",
180
- "text",
181
- "placeholder",
182
- "masked",
183
- "unnamed"
184
- ]
185
- },
186
- "container": {
187
- "anyOf": [
188
- {
189
- "type": "object",
190
- "properties": {
191
- "id": {
192
- "type": ["integer", "null"],
193
- "minimum": 0
194
- },
195
- "role": {
196
- "type": "string"
197
- },
198
- "name": {
199
- "type": ["string", "null"],
200
- "maxLength": 80
201
- }
202
- },
203
- "required": ["id", "role", "name"],
204
- "additionalProperties": false
205
- },
206
- {
207
- "type": "null"
208
- }
209
- ]
210
- },
211
- "states": {
212
- "type": "array",
213
- "items": {
214
- "enum": [
215
- "disabled",
216
- "required",
217
- "invalid",
218
- "checked",
219
- "mixed",
220
- "busy",
221
- "open",
222
- "expanded",
223
- "collapsed",
224
- "selected",
225
- "current",
226
- "pressed",
227
- "readonly"
228
- ]
229
- }
230
- },
231
- "visible": {
232
- "type": "boolean"
233
- },
234
- "key": {
235
- "type": ["string", "null"]
236
- },
237
- "selector": {
238
- "type": ["string", "null"]
239
- },
240
- "attrs": {
241
- "type": "object",
242
- "properties": {
243
- "type": {
244
- "type": "string",
245
- "maxLength": 60
246
- },
247
- "name": {
248
- "type": "string",
249
- "maxLength": 60
250
- },
251
- "href": {
252
- "type": "string",
253
- "maxLength": 60
254
- },
255
- "target": {
256
- "type": "string",
257
- "maxLength": 60
258
- },
259
- "aria-controls": {
260
- "type": "string",
261
- "maxLength": 60
262
- },
263
- "aria-haspopup": {
264
- "type": "string",
265
- "maxLength": 60
266
- },
267
- "data-testid": {
268
- "type": "string",
269
- "maxLength": 60
270
- }
271
- },
272
- "required": [],
273
- "additionalProperties": false
274
- },
275
- "url": {
276
- "type": "string"
277
- },
278
- "heading": {
279
- "type": ["string", "null"],
280
- "maxLength": 80
281
- },
282
- "keyboard": {
283
- "type": "boolean"
284
- },
285
- "modifiers": {
286
- "type": "array",
287
- "items": {
288
- "enum": ["alt", "ctrl", "meta", "shift"]
289
- }
290
- },
291
- "trusted": {
292
- "type": "boolean"
293
- },
294
- "tab_id": { "type": "string", "minLength": 1 },
295
- "document_id": { "type": "string", "minLength": 1 },
296
- "v": {
297
- "const": 1
298
- }
299
- },
300
- "required": [
301
- "id",
302
- "role",
303
- "name",
304
- "name_source",
305
- "container",
306
- "states",
307
- "visible",
308
- "key",
309
- "attrs",
310
- "url",
311
- "heading",
312
- "keyboard",
313
- "modifiers",
314
- "trusted",
315
- "v"
316
- ],
317
- "additionalProperties": false
318
- }
319
- },
320
- "required": ["tag", "payload"],
321
- "additionalProperties": false
322
- }
323
- },
324
- "required": ["type", "timestamp", "data"],
325
- "additionalProperties": false
326
- },
327
- {
328
- "type": "object",
329
- "properties": {
330
- "type": {
331
- "const": 5
332
- },
333
- "timestamp": {
334
- "type": "number"
335
- },
336
- "data": {
337
- "type": "object",
338
- "properties": {
339
- "tag": {
340
- "const": "amp-semantic/field"
341
- },
342
- "payload": {
343
- "type": "object",
344
- "properties": {
345
- "name_source": {
346
- "enum": [
347
- "aria-labelledby",
348
- "aria-label",
349
- "label-for",
350
- "label-wrap",
351
- "alt",
352
- "value",
353
- "title",
354
- "text",
355
- "placeholder",
356
- "masked",
357
- "unnamed"
358
- ]
359
- },
360
- "states": {
361
- "type": "array",
362
- "items": {
363
- "enum": [
364
- "disabled",
365
- "required",
366
- "invalid",
367
- "checked",
368
- "mixed",
369
- "busy",
370
- "open",
371
- "expanded",
372
- "collapsed",
373
- "selected",
374
- "current",
375
- "pressed",
376
- "readonly"
377
- ]
378
- }
379
- },
380
- "id": {
381
- "type": ["integer", "null"],
382
- "minimum": 0
383
- },
384
- "role": {
385
- "type": "string"
386
- },
387
- "name": {
388
- "type": ["string", "null"],
389
- "maxLength": 80
390
- },
391
- "kind": {
392
- "type": "string"
393
- },
394
- "value": { "type": "string" },
395
- "value_state": {
396
- "enum": ["empty", "filled"]
397
- },
398
- "checked": {
399
- "type": "boolean"
400
- },
401
- "valid": {
402
- "type": "boolean"
403
- },
404
- "validity": {
405
- "type": "array",
406
- "items": {
407
- "enum": [
408
- "valueMissing",
409
- "typeMismatch",
410
- "patternMismatch",
411
- "tooShort",
412
- "tooLong",
413
- "rangeUnderflow",
414
- "rangeOverflow",
415
- "stepMismatch",
416
- "badInput",
417
- "customError",
418
- "ariaInvalid"
419
- ]
420
- }
421
- },
422
- "masked": {
423
- "type": "boolean"
424
- },
425
- "option_label": {
426
- "type": ["string", "null"],
427
- "maxLength": 80
428
- },
429
- "tab_id": { "type": "string", "minLength": 1 },
430
- "document_id": { "type": "string", "minLength": 1 },
431
- "v": {
432
- "const": 1
433
- }
434
- },
435
- "required": [
436
- "id",
437
- "role",
438
- "name",
439
- "kind",
440
- "value_state",
441
- "valid",
442
- "validity",
443
- "masked",
444
- "option_label",
445
- "v"
446
- ],
447
- "allOf": [
448
- {
449
- "if": { "properties": { "masked": { "const": true } }, "required": ["masked"] },
450
- "then": { "properties": { "value": false } }
451
- }
452
- ],
453
- "additionalProperties": false
454
- }
455
- },
456
- "required": ["tag", "payload"],
457
- "additionalProperties": false
458
- }
459
- },
460
- "required": ["type", "timestamp", "data"],
461
- "additionalProperties": false
462
- },
463
- {
464
- "type": "object",
465
- "properties": {
466
- "type": {
467
- "const": 5
468
- },
469
- "timestamp": {
470
- "type": "number"
471
- },
472
- "data": {
473
- "type": "object",
474
- "properties": {
475
- "tag": {
476
- "const": "amp-semantic/submit"
477
- },
478
- "payload": {
479
- "type": "object",
480
- "properties": {
481
- "form": {
482
- "type": "object",
483
- "properties": {
484
- "id": {
485
- "type": ["integer", "null"],
486
- "minimum": 0
487
- },
488
- "role": {
489
- "type": "string"
490
- },
491
- "name": {
492
- "type": ["string", "null"],
493
- "maxLength": 80
494
- }
495
- },
496
- "required": ["id", "role", "name"],
497
- "additionalProperties": false
498
- },
499
- "submitter": {
500
- "anyOf": [
501
- {
502
- "type": "object",
503
- "properties": {
504
- "id": {
505
- "type": ["integer", "null"],
506
- "minimum": 0
507
- },
508
- "role": {
509
- "type": "string"
510
- },
511
- "name": {
512
- "type": ["string", "null"],
513
- "maxLength": 80
514
- }
515
- },
516
- "required": ["id", "role", "name"],
517
- "additionalProperties": false
518
- },
519
- {
520
- "type": "null"
521
- }
522
- ]
523
- },
524
- "valid": {
525
- "type": "boolean"
526
- },
527
- "invalid_fields": {
528
- "type": "array",
529
- "items": {
530
- "type": "object",
531
- "properties": {
532
- "id": {
533
- "type": ["integer", "null"],
534
- "minimum": 0
535
- },
536
- "name": {
537
- "type": ["string", "null"],
538
- "maxLength": 80
539
- },
540
- "validity": {
541
- "type": "array",
542
- "items": {
543
- "enum": [
544
- "valueMissing",
545
- "typeMismatch",
546
- "patternMismatch",
547
- "tooShort",
548
- "tooLong",
549
- "rangeUnderflow",
550
- "rangeOverflow",
551
- "stepMismatch",
552
- "badInput",
553
- "customError",
554
- "ariaInvalid"
555
- ]
556
- }
557
- }
558
- },
559
- "required": ["id", "name", "validity"],
560
- "additionalProperties": false
561
- },
562
- "maxItems": 10
563
- },
564
- "prevented": {
565
- "type": "boolean"
566
- },
567
- "tab_id": { "type": "string", "minLength": 1 },
568
- "document_id": { "type": "string", "minLength": 1 },
569
- "v": {
570
- "const": 1
571
- }
572
- },
573
- "required": ["form", "submitter", "valid", "invalid_fields", "prevented", "v"],
574
- "additionalProperties": false
575
- }
576
- },
577
- "required": ["tag", "payload"],
578
- "additionalProperties": false
579
- }
580
- },
581
- "required": ["type", "timestamp", "data"],
582
- "additionalProperties": false
583
- },
584
- {
585
- "type": "object",
586
- "properties": {
587
- "type": {
588
- "const": 5
589
- },
590
- "timestamp": {
591
- "type": "number"
592
- },
593
- "data": {
594
- "type": "object",
595
- "properties": {
596
- "tag": {
597
- "const": "amp-semantic/notice"
598
- },
599
- "payload": {
600
- "type": "object",
601
- "properties": {
602
- "id": {
603
- "type": ["integer", "null"],
604
- "minimum": 0
605
- },
606
- "role": {
607
- "enum": ["alert", "status", "log", "live"]
608
- },
609
- "text": {
610
- "type": ["string", "null"],
611
- "maxLength": 200
612
- },
613
- "visible": {
614
- "type": "boolean"
615
- },
616
- "region": {
617
- "anyOf": [
618
- {
619
- "type": "object",
620
- "properties": {
621
- "role": {
622
- "type": "string"
623
- },
624
- "name": {
625
- "type": ["string", "null"],
626
- "maxLength": 80
627
- }
628
- },
629
- "required": ["role", "name"],
630
- "additionalProperties": false
631
- },
632
- {
633
- "type": "null"
634
- }
635
- ]
636
- },
637
- "cause_click_ts": {
638
- "type": ["number", "null"]
639
- },
640
- "tab_id": { "type": "string", "minLength": 1 },
641
- "document_id": { "type": "string", "minLength": 1 },
642
- "v": {
643
- "const": 1
644
- }
645
- },
646
- "required": ["id", "role", "text", "visible", "region", "cause_click_ts", "v"],
647
- "additionalProperties": false
648
- }
649
- },
650
- "required": ["tag", "payload"],
651
- "additionalProperties": false
652
- }
653
- },
654
- "required": ["type", "timestamp", "data"],
655
- "additionalProperties": false
656
- },
657
- {
658
- "type": "object",
659
- "properties": {
660
- "type": {
661
- "const": 5
662
- },
663
- "timestamp": {
664
- "type": "number"
665
- },
666
- "data": {
667
- "type": "object",
668
- "properties": {
669
- "tag": {
670
- "const": "amp-semantic/dialog"
671
- },
672
- "payload": {
673
- "type": "object",
674
- "properties": {
675
- "name_source": {
676
- "enum": [
677
- "aria-labelledby",
678
- "aria-label",
679
- "label-for",
680
- "label-wrap",
681
- "alt",
682
- "value",
683
- "title",
684
- "text",
685
- "placeholder",
686
- "masked",
687
- "unnamed"
688
- ]
689
- },
690
- "id": {
691
- "type": ["integer", "null"],
692
- "minimum": 0
693
- },
694
- "role": {
695
- "enum": ["dialog", "alertdialog"]
696
- },
697
- "name": {
698
- "type": ["string", "null"],
699
- "maxLength": 80
700
- },
701
- "state": {
702
- "enum": ["open", "closed"]
703
- },
704
- "modal": {
705
- "type": "boolean"
706
- },
707
- "visible": {
708
- "type": "boolean"
709
- },
710
- "cause_click_ts": {
711
- "type": ["number", "null"]
712
- },
713
- "tab_id": { "type": "string", "minLength": 1 },
714
- "document_id": { "type": "string", "minLength": 1 },
715
- "v": {
716
- "const": 1
717
- }
718
- },
719
- "required": ["id", "role", "name", "state", "modal", "visible", "cause_click_ts", "v"],
720
- "additionalProperties": false
721
- }
722
- },
723
- "required": ["tag", "payload"],
724
- "additionalProperties": false
725
- }
726
- },
727
- "required": ["type", "timestamp", "data"],
728
- "additionalProperties": false
729
- },
730
- {
731
- "type": "object",
732
- "properties": {
733
- "type": {
734
- "const": 5
735
- },
736
- "timestamp": {
737
- "type": "number"
738
- },
739
- "data": {
740
- "type": "object",
741
- "properties": {
742
- "tag": {
743
- "const": "amp-semantic/recording"
744
- },
745
- "payload": {
746
- "type": "object",
747
- "properties": {
748
- "state": {
749
- "enum": ["start", "stop", "pause", "resume"]
750
- },
751
- "reason": {
752
- "enum": [
753
- "init",
754
- "new_session",
755
- "customer_stop",
756
- "sampled_out",
757
- "opt_out",
758
- "targeting",
759
- "focus",
760
- "error"
761
- ]
762
- },
763
- "tab_id": { "type": "string", "minLength": 1 },
764
- "document_id": { "type": "string", "minLength": 1 },
765
- "v": {
766
- "const": 1
767
- }
768
- },
769
- "required": ["state", "reason", "v"],
770
- "additionalProperties": false
771
- }
772
- },
773
- "required": ["tag", "payload"],
774
- "additionalProperties": false
775
- }
776
- },
777
- "required": ["type", "timestamp", "data"],
778
- "additionalProperties": false
779
- },
780
- {
781
- "type": "object",
782
- "properties": {
783
- "type": {
784
- "const": 5
785
- },
786
- "timestamp": {
787
- "type": "number"
788
- },
789
- "data": {
790
- "type": "object",
791
- "properties": {
792
- "tag": {
793
- "const": "amp-semantic/visibility"
794
- },
795
- "payload": {
796
- "type": "object",
797
- "properties": {
798
- "state": {
799
- "enum": ["hidden", "visible"]
800
- },
801
- "focused": {
802
- "type": "boolean",
803
- "description": "Legacy observation-time focus snapshot; no longer emitted by visibility producers."
804
- },
805
- "trigger": {
806
- "enum": ["visibilitychange", "focus", "blur"],
807
- "description": "Legacy trigger; new visibility events emit only state plus version and identity."
808
- },
809
- "tab_id": { "type": "string", "minLength": 1 },
810
- "document_id": { "type": "string", "minLength": 1 },
811
- "v": {
812
- "const": 1
813
- }
814
- },
815
- "required": ["state", "v"],
816
- "additionalProperties": false
817
- }
818
- },
819
- "required": ["tag", "payload"],
820
- "additionalProperties": false
821
- }
822
- },
823
- "required": ["type", "timestamp", "data"],
824
- "additionalProperties": false
825
- },
826
- {
827
- "type": "object",
828
- "properties": {
829
- "type": {
830
- "const": 5
831
- },
832
- "timestamp": {
833
- "type": "number"
834
- },
835
- "data": {
836
- "type": "object",
837
- "properties": {
838
- "tag": {
839
- "const": "amp-semantic/lifecycle"
840
- },
841
- "payload": {
842
- "type": "object",
843
- "properties": {
844
- "type": {
845
- "enum": ["pagehide", "pageshow", "pageshow_bfcache", "freeze", "resume"]
846
- },
847
- "tab_id": { "type": "string", "minLength": 1 },
848
- "document_id": { "type": "string", "minLength": 1 },
849
- "v": {
850
- "const": 1
851
- }
852
- },
853
- "required": ["type", "v"],
854
- "additionalProperties": false
855
- }
856
- },
857
- "required": ["tag", "payload"],
858
- "additionalProperties": false
859
- }
860
- },
861
- "required": ["type", "timestamp", "data"],
862
- "additionalProperties": false
863
- },
864
- {
865
- "type": "object",
866
- "properties": {
867
- "type": {
868
- "const": 5
869
- },
870
- "timestamp": {
871
- "type": "number"
872
- },
873
- "data": {
874
- "type": "object",
875
- "properties": {
876
- "tag": {
877
- "const": "amp-semantic/amp-event"
878
- },
879
- "payload": {
880
- "type": "object",
881
- "properties": {
882
- "event_type": {
883
- "enum": [
884
- "[Amplitude] Dead Click",
885
- "[Amplitude] Rage Click",
886
- "[Amplitude] Error Click",
887
- "[Amplitude] Thrashed Cursor"
888
- ]
889
- },
890
- "insert_id": {
891
- "type": ["string", "null"]
892
- },
893
- "id": {
894
- "type": ["integer", "null"],
895
- "minimum": 0
896
- },
897
- "props": {
898
- "type": "object",
899
- "properties": {
900
- "[Amplitude] Element Text": {
901
- "type": ["string", "null"],
902
- "maxLength": 80
903
- },
904
- "[Amplitude] Element Tag": {
905
- "type": "string"
906
- },
907
- "[Amplitude] Clicks": {
908
- "type": "number"
909
- },
910
- "[Amplitude] Begin Time": {
911
- "type": "number"
912
- },
913
- "[Amplitude] End Time": {
914
- "type": "number"
915
- },
916
- "[Amplitude] Page Path": {
917
- "type": "string"
918
- }
919
- },
920
- "required": [],
921
- "additionalProperties": false
922
- },
923
- "tab_id": { "type": "string", "minLength": 1 },
924
- "document_id": { "type": "string", "minLength": 1 },
925
- "v": {
926
- "const": 1
927
- }
928
- },
929
- "required": ["event_type", "insert_id", "id", "props", "v"],
930
- "additionalProperties": false
931
- }
932
- },
933
- "required": ["tag", "payload"],
934
- "additionalProperties": false
935
- }
936
- },
937
- "required": ["type", "timestamp", "data"],
938
- "additionalProperties": false
939
- },
940
- {
941
- "type": "object",
942
- "properties": {
943
- "type": {
944
- "const": 5
945
- },
946
- "timestamp": {
947
- "type": "number"
948
- },
949
- "data": {
950
- "type": "object",
951
- "properties": {
952
- "tag": {
953
- "const": "amp-semantic/keys"
954
- },
955
- "payload": {
956
- "type": "object",
957
- "properties": {
958
- "key": {
959
- "type": "string",
960
- "pattern": "^((Ctrl\\+)?(Meta\\+)?(Alt\\+)?(Shift\\+)?(Escape|Enter|Tab|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Home|End|PageUp|PageDown|F[1-9]|F1[0-2])|(Ctrl|Meta)\\+(Shift\\+)?[KPF])$",
961
- "maxLength": 48
962
- },
963
- "target": {
964
- "type": "object",
965
- "properties": {
966
- "name_source": {
967
- "enum": [
968
- "aria-labelledby",
969
- "aria-label",
970
- "label-for",
971
- "label-wrap",
972
- "alt",
973
- "value",
974
- "title",
975
- "text",
976
- "placeholder",
977
- "masked",
978
- "unnamed"
979
- ]
980
- },
981
- "states": {
982
- "type": "array",
983
- "items": {
984
- "enum": [
985
- "disabled",
986
- "required",
987
- "invalid",
988
- "checked",
989
- "mixed",
990
- "busy",
991
- "open",
992
- "expanded",
993
- "collapsed",
994
- "selected",
995
- "current",
996
- "pressed",
997
- "readonly"
998
- ]
999
- }
1000
- },
1001
- "id": {
1002
- "type": ["integer", "null"]
1003
- },
1004
- "role": {
1005
- "type": "string"
1006
- },
1007
- "name": {
1008
- "type": ["string", "null"],
1009
- "maxLength": 80
1010
- }
1011
- },
1012
- "required": ["id", "role", "name"],
1013
- "additionalProperties": false
1014
- },
1015
- "v": {
1016
- "const": 1
1017
- },
1018
- "tab_id": {
1019
- "type": "string",
1020
- "minLength": 1
1021
- },
1022
- "document_id": {
1023
- "type": "string",
1024
- "minLength": 1
1025
- }
1026
- },
1027
- "required": ["v", "key", "target"],
1028
- "additionalProperties": false
1029
- }
1030
- },
1031
- "required": ["tag", "payload"],
1032
- "additionalProperties": false
1033
- }
1034
- },
1035
- "required": ["type", "timestamp", "data"],
1036
- "additionalProperties": false
1037
- },
1038
- {
1039
- "type": "object",
1040
- "properties": {
1041
- "type": {
1042
- "const": 5
1043
- },
1044
- "timestamp": {
1045
- "type": "number"
1046
- },
1047
- "data": {
1048
- "type": "object",
1049
- "properties": {
1050
- "tag": {
1051
- "const": "amp-semantic/resource-error"
1052
- },
1053
- "payload": {
1054
- "type": "object",
1055
- "properties": {
1056
- "rt": {
1057
- "enum": ["img", "css", "font", "script"]
1058
- },
1059
- "count": {
1060
- "type": "integer",
1061
- "minimum": 1,
1062
- "maximum": 65535
1063
- },
1064
- "container": {
1065
- "type": "object",
1066
- "properties": {
1067
- "id": {
1068
- "type": ["integer", "null"]
1069
- },
1070
- "role": {
1071
- "type": "string"
1072
- },
1073
- "name": {
1074
- "type": ["string", "null"],
1075
- "maxLength": 80
1076
- }
1077
- },
1078
- "required": ["id", "role", "name"],
1079
- "additionalProperties": false
1080
- },
1081
- "path": {
1082
- "type": "string",
1083
- "maxLength": 200,
1084
- "pattern": "^/[^?#]*$"
1085
- },
1086
- "v": {
1087
- "const": 1
1088
- },
1089
- "tab_id": {
1090
- "type": "string",
1091
- "minLength": 1
1092
- },
1093
- "document_id": {
1094
- "type": "string",
1095
- "minLength": 1
1096
- }
1097
- },
1098
- "required": ["v", "rt", "count"],
1099
- "additionalProperties": false
1100
- }
1101
- },
1102
- "required": ["tag", "payload"],
1103
- "additionalProperties": false
1104
- }
1105
- },
1106
- "required": ["type", "timestamp", "data"],
1107
- "additionalProperties": false
1108
- }
1109
- ]
1110
- }