| 1 | { |
| 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | "$id": "https://codewhale.net/schemas/cwc-product-telemetry-v2.json", |
| 4 | "title": "Codewhale CWC aggregate telemetry v2, consent v4", |
| 5 | "description": "Generated from telemetry-ingest/src/schema.ts; do not edit the JSON artifact. No content or identity fields.", |
| 6 | "type": "object", |
| 7 | "additionalProperties": false, |
| 8 | "required": [ |
| 9 | "schema_version", |
| 10 | "consent_version", |
| 11 | "sent_at", |
| 12 | "install_id", |
| 13 | "app_version", |
| 14 | "git_sha", |
| 15 | "surface", |
| 16 | "os", |
| 17 | "arch", |
| 18 | "libc", |
| 19 | "tty", |
| 20 | "events" |
| 21 | ], |
| 22 | "properties": { |
| 23 | "schema_version": { |
| 24 | "const": 2 |
| 25 | }, |
| 26 | "consent_version": { |
| 27 | "const": 4 |
| 28 | }, |
| 29 | "sent_at": { |
| 30 | "type": "string", |
| 31 | "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$" |
| 32 | }, |
| 33 | "install_id": { |
| 34 | "type": "string", |
| 35 | "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" |
| 36 | }, |
| 37 | "app_version": { |
| 38 | "type": "string", |
| 39 | "maxLength": 64, |
| 40 | "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.]+)?$" |
| 41 | }, |
| 42 | "git_sha": { |
| 43 | "const": null |
| 44 | }, |
| 45 | "surface": { |
| 46 | "enum": [ |
| 47 | "web-app", |
| 48 | "desktop" |
| 49 | ] |
| 50 | }, |
| 51 | "os": { |
| 52 | "const": "other" |
| 53 | }, |
| 54 | "arch": { |
| 55 | "const": "other" |
| 56 | }, |
| 57 | "libc": { |
| 58 | "const": "none" |
| 59 | }, |
| 60 | "tty": { |
| 61 | "const": false |
| 62 | }, |
| 63 | "events": { |
| 64 | "type": "array", |
| 65 | "minItems": 1, |
| 66 | "maxItems": 1, |
| 67 | "items": { |
| 68 | "type": "object", |
| 69 | "additionalProperties": false, |
| 70 | "required": [ |
| 71 | "event", |
| 72 | "counters" |
| 73 | ], |
| 74 | "properties": { |
| 75 | "event": { |
| 76 | "const": "product_usage" |
| 77 | }, |
| 78 | "counters": { |
| 79 | "type": "object", |
| 80 | "additionalProperties": false, |
| 81 | "required": [ |
| 82 | "page_view", |
| 83 | "docs_view", |
| 84 | "install_copy", |
| 85 | "download", |
| 86 | "signup", |
| 87 | "login", |
| 88 | "session_create", |
| 89 | "session_resume", |
| 90 | "turn_submit", |
| 91 | "turn_complete", |
| 92 | "settings_open", |
| 93 | "integration_connect", |
| 94 | "error_shown" |
| 95 | ], |
| 96 | "properties": { |
| 97 | "page_view": { |
| 98 | "type": "integer", |
| 99 | "minimum": 0, |
| 100 | "maximum": 4294967295 |
| 101 | }, |
| 102 | "docs_view": { |
| 103 | "type": "integer", |
| 104 | "minimum": 0, |
| 105 | "maximum": 4294967295 |
| 106 | }, |
| 107 | "install_copy": { |
| 108 | "type": "integer", |
| 109 | "minimum": 0, |
| 110 | "maximum": 4294967295 |
| 111 | }, |
| 112 | "download": { |
| 113 | "type": "integer", |
| 114 | "minimum": 0, |
| 115 | "maximum": 4294967295 |
| 116 | }, |
| 117 | "signup": { |
| 118 | "type": "integer", |
| 119 | "minimum": 0, |
| 120 | "maximum": 4294967295 |
| 121 | }, |
| 122 | "login": { |
| 123 | "type": "integer", |
| 124 | "minimum": 0, |
| 125 | "maximum": 4294967295 |
| 126 | }, |
| 127 | "session_create": { |
| 128 | "type": "integer", |
| 129 | "minimum": 0, |
| 130 | "maximum": 4294967295 |
| 131 | }, |
| 132 | "session_resume": { |
| 133 | "type": "integer", |
| 134 | "minimum": 0, |
| 135 | "maximum": 4294967295 |
| 136 | }, |
| 137 | "turn_submit": { |
| 138 | "type": "integer", |
| 139 | "minimum": 0, |
| 140 | "maximum": 4294967295 |
| 141 | }, |
| 142 | "turn_complete": { |
| 143 | "type": "integer", |
| 144 | "minimum": 0, |
| 145 | "maximum": 4294967295 |
| 146 | }, |
| 147 | "settings_open": { |
| 148 | "type": "integer", |
| 149 | "minimum": 0, |
| 150 | "maximum": 4294967295 |
| 151 | }, |
| 152 | "integration_connect": { |
| 153 | "type": "integer", |
| 154 | "minimum": 0, |
| 155 | "maximum": 4294967295 |
| 156 | }, |
| 157 | "error_shown": { |
| 158 | "type": "integer", |
| 159 | "minimum": 0, |
| 160 | "maximum": 4294967295 |
| 161 | } |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 |