analytics_ops 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.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +108 -0
  3. data/CONTRIBUTING.md +1 -0
  4. data/README.md +141 -13
  5. data/SECURITY.md +11 -2
  6. data/docs/ai-connections.md +192 -0
  7. data/docs/api-support-matrix.md +25 -8
  8. data/docs/architecture.md +78 -17
  9. data/docs/authentication.md +53 -3
  10. data/docs/bigquery.md +128 -0
  11. data/docs/commands.md +133 -12
  12. data/docs/configuration-schema-v1.json +608 -50
  13. data/docs/configuration.md +118 -5
  14. data/docs/google-client-compatibility.md +21 -1
  15. data/docs/governance.md +93 -0
  16. data/docs/health.md +82 -0
  17. data/docs/live-smoke-test.md +13 -10
  18. data/docs/rails.md +25 -9
  19. data/docs/reports.md +165 -3
  20. data/docs/safety.md +37 -5
  21. data/docs/troubleshooting.md +81 -7
  22. data/lib/analytics_ops/bigquery/definition.rb +173 -0
  23. data/lib/analytics_ops/bigquery.rb +4 -0
  24. data/lib/analytics_ops/cli/local_commands.rb +80 -0
  25. data/lib/analytics_ops/cli/options.rb +282 -9
  26. data/lib/analytics_ops/cli/presenter.rb +263 -28
  27. data/lib/analytics_ops/cli/presenter_csv.rb +92 -0
  28. data/lib/analytics_ops/cli/reporting_commands.rb +129 -0
  29. data/lib/analytics_ops/cli/setup_commands.rb +91 -0
  30. data/lib/analytics_ops/cli.rb +121 -44
  31. data/lib/analytics_ops/clients/admin.rb +28 -2
  32. data/lib/analytics_ops/clients/admin_governance.rb +95 -0
  33. data/lib/analytics_ops/clients/admin_governance_normalization.rb +90 -0
  34. data/lib/analytics_ops/clients/admin_resource_normalization.rb +61 -0
  35. data/lib/analytics_ops/clients/bigquery.rb +313 -0
  36. data/lib/analytics_ops/clients/data.rb +147 -54
  37. data/lib/analytics_ops/clients/data_result_normalization.rb +55 -0
  38. data/lib/analytics_ops/clients/error_translation.rb +13 -1
  39. data/lib/analytics_ops/configuration/schema.rb +175 -1
  40. data/lib/analytics_ops/configuration/validator.rb +45 -7
  41. data/lib/analytics_ops/configuration/validator_experimental.rb +136 -0
  42. data/lib/analytics_ops/configuration/validator_reporting.rb +93 -0
  43. data/lib/analytics_ops/configuration/writer.rb +112 -7
  44. data/lib/analytics_ops/desired_state.rb +28 -3
  45. data/lib/analytics_ops/errors.rb +33 -1
  46. data/lib/analytics_ops/funnels.rb +58 -0
  47. data/lib/analytics_ops/governance.rb +363 -0
  48. data/lib/analytics_ops/health.rb +310 -0
  49. data/lib/analytics_ops/mcp_server/custom_report_tool.rb +101 -0
  50. data/lib/analytics_ops/mcp_server/discovery_tools.rb +79 -0
  51. data/lib/analytics_ops/mcp_server/experimental_tools.rb +89 -0
  52. data/lib/analytics_ops/mcp_server/health_tools.rb +80 -0
  53. data/lib/analytics_ops/mcp_server/overview_tools.rb +49 -0
  54. data/lib/analytics_ops/mcp_server/standard_report_tool.rb +53 -0
  55. data/lib/analytics_ops/mcp_server.rb +402 -0
  56. data/lib/analytics_ops/portfolio.rb +216 -0
  57. data/lib/analytics_ops/rails/railtie.rb +19 -8
  58. data/lib/analytics_ops/redaction.rb +10 -6
  59. data/lib/analytics_ops/reports/csv_export.rb +91 -0
  60. data/lib/analytics_ops/reports/definition.rb +152 -14
  61. data/lib/analytics_ops/reports/metadata.rb +158 -0
  62. data/lib/analytics_ops/reports/period.rb +104 -0
  63. data/lib/analytics_ops/reports/result.rb +8 -3
  64. data/lib/analytics_ops/reports.rb +3 -0
  65. data/lib/analytics_ops/service_account.rb +321 -29
  66. data/lib/analytics_ops/setup.rb +31 -7
  67. data/lib/analytics_ops/version.rb +1 -1
  68. data/lib/analytics_ops/workspace.rb +222 -10
  69. data/lib/analytics_ops.rb +7 -2
  70. data/lib/generators/analytics_ops/templates/analytics_ops.yml +1 -1
  71. data/sig/analytics_ops.rbs +494 -9
  72. metadata +60 -1
@@ -4,14 +4,23 @@
4
4
  "title": "Analytics Ops configuration version 1",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "required": ["version", "profiles"],
7
+ "required": [
8
+ "version",
9
+ "profiles"
10
+ ],
8
11
  "properties": {
9
- "version": { "const": 1 },
12
+ "version": {
13
+ "const": 1
14
+ },
10
15
  "profiles": {
11
16
  "type": "object",
12
17
  "minProperties": 1,
13
- "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$" },
14
- "additionalProperties": { "$ref": "#/$defs/profile" }
18
+ "propertyNames": {
19
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
20
+ },
21
+ "additionalProperties": {
22
+ "$ref": "#/$defs/profile"
23
+ }
15
24
  }
16
25
  },
17
26
  "$defs": {
@@ -22,42 +31,86 @@
22
31
  "profile": {
23
32
  "type": "object",
24
33
  "additionalProperties": false,
25
- "required": ["property_id"],
34
+ "required": [
35
+ "property_id"
36
+ ],
26
37
  "properties": {
27
- "property_id": { "$ref": "#/$defs/id" },
38
+ "property_id": {
39
+ "$ref": "#/$defs/id"
40
+ },
28
41
  "streams": {
29
42
  "type": "object",
30
- "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$" },
31
- "additionalProperties": { "$ref": "#/$defs/stream" }
43
+ "propertyNames": {
44
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
45
+ },
46
+ "additionalProperties": {
47
+ "$ref": "#/$defs/stream"
48
+ }
49
+ },
50
+ "retention": {
51
+ "$ref": "#/$defs/retention"
52
+ },
53
+ "google_signals": {
54
+ "$ref": "#/$defs/googleSignals"
32
55
  },
33
- "retention": { "$ref": "#/$defs/retention" },
34
- "google_signals": { "$ref": "#/$defs/googleSignals" },
35
56
  "key_events": {
36
57
  "type": "array",
37
58
  "uniqueItems": true,
38
- "items": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$" }
59
+ "items": {
60
+ "type": "string",
61
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
62
+ }
39
63
  },
40
64
  "custom_dimensions": {
41
65
  "type": "array",
42
- "items": { "$ref": "#/$defs/customDimension" }
66
+ "items": {
67
+ "$ref": "#/$defs/customDimension"
68
+ }
43
69
  },
44
70
  "custom_metrics": {
45
71
  "type": "array",
46
- "items": { "$ref": "#/$defs/customMetric" }
72
+ "items": {
73
+ "$ref": "#/$defs/customMetric"
74
+ }
47
75
  },
48
76
  "manual_requirements": {
49
77
  "type": "array",
50
78
  "uniqueItems": true,
51
- "items": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$" }
79
+ "items": {
80
+ "type": "string",
81
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
82
+ }
83
+ },
84
+ "labels": {
85
+ "$ref": "#/$defs/labels"
86
+ },
87
+ "reports": {
88
+ "$ref": "#/$defs/reports"
89
+ },
90
+ "health": {
91
+ "$ref": "#/$defs/health"
92
+ },
93
+ "governance": {
94
+ "$ref": "#/$defs/governance"
95
+ },
96
+ "bigquery": {
97
+ "$ref": "#/$defs/bigquery"
98
+ },
99
+ "funnels": {
100
+ "$ref": "#/$defs/funnels"
52
101
  }
53
102
  }
54
103
  },
55
104
  "stream": {
56
105
  "type": "object",
57
106
  "additionalProperties": false,
58
- "required": ["stream_id"],
107
+ "required": [
108
+ "stream_id"
109
+ ],
59
110
  "properties": {
60
- "stream_id": { "$ref": "#/$defs/id" },
111
+ "stream_id": {
112
+ "$ref": "#/$defs/id"
113
+ },
61
114
  "default_uri": {
62
115
  "type": "string",
63
116
  "maxLength": 2048,
@@ -66,10 +119,17 @@
66
119
  "enhanced_measurement": {
67
120
  "type": "object",
68
121
  "additionalProperties": false,
69
- "required": ["enabled", "experimental"],
122
+ "required": [
123
+ "enabled",
124
+ "experimental"
125
+ ],
70
126
  "properties": {
71
- "enabled": { "type": "boolean" },
72
- "experimental": { "const": true }
127
+ "enabled": {
128
+ "type": "boolean"
129
+ },
130
+ "experimental": {
131
+ "const": true
132
+ }
73
133
  }
74
134
  }
75
135
  }
@@ -77,99 +137,597 @@
77
137
  "retention": {
78
138
  "type": "object",
79
139
  "additionalProperties": false,
80
- "required": ["event_data", "user_data", "reset_on_new_activity"],
140
+ "required": [
141
+ "event_data",
142
+ "user_data",
143
+ "reset_on_new_activity"
144
+ ],
81
145
  "properties": {
82
- "event_data": { "$ref": "#/$defs/retentionValue" },
83
- "user_data": { "$ref": "#/$defs/userRetentionValue" },
84
- "reset_on_new_activity": { "type": "boolean" }
146
+ "event_data": {
147
+ "$ref": "#/$defs/retentionValue"
148
+ },
149
+ "user_data": {
150
+ "$ref": "#/$defs/userRetentionValue"
151
+ },
152
+ "reset_on_new_activity": {
153
+ "type": "boolean"
154
+ }
85
155
  }
86
156
  },
87
157
  "retentionValue": {
88
- "enum": ["2_months", "14_months", "26_months", "38_months", "50_months"]
158
+ "enum": [
159
+ "2_months",
160
+ "14_months",
161
+ "26_months",
162
+ "38_months",
163
+ "50_months"
164
+ ]
89
165
  },
90
166
  "userRetentionValue": {
91
- "enum": ["2_months", "14_months"]
167
+ "enum": [
168
+ "2_months",
169
+ "14_months"
170
+ ]
92
171
  },
93
172
  "googleSignals": {
94
173
  "type": "object",
95
174
  "additionalProperties": false,
96
- "required": ["state", "experimental"],
175
+ "required": [
176
+ "state",
177
+ "experimental"
178
+ ],
97
179
  "properties": {
98
- "state": { "enum": ["enabled", "disabled"] },
99
- "experimental": { "const": true }
180
+ "state": {
181
+ "enum": [
182
+ "enabled",
183
+ "disabled"
184
+ ]
185
+ },
186
+ "experimental": {
187
+ "const": true
188
+ }
100
189
  }
101
190
  },
102
191
  "customDimension": {
103
192
  "type": "object",
104
193
  "additionalProperties": false,
105
- "required": ["parameter_name", "display_name", "scope"],
194
+ "required": [
195
+ "parameter_name",
196
+ "display_name",
197
+ "scope"
198
+ ],
106
199
  "properties": {
107
- "parameter_name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$" },
108
- "display_name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_ ]{0,81}$" },
200
+ "parameter_name": {
201
+ "type": "string",
202
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
203
+ },
204
+ "display_name": {
205
+ "type": "string",
206
+ "pattern": "^[A-Za-z][A-Za-z0-9_ ]{0,81}$"
207
+ },
109
208
  "description": {
110
209
  "type": "string",
111
210
  "maxLength": 150,
112
211
  "pattern": "^[^\\u0000-\\u001F\\u007F]*$"
113
212
  },
114
- "scope": { "enum": ["event", "user", "item"] },
115
- "disallow_ads_personalization": { "type": "boolean" }
213
+ "scope": {
214
+ "enum": [
215
+ "event",
216
+ "user",
217
+ "item"
218
+ ]
219
+ },
220
+ "disallow_ads_personalization": {
221
+ "type": "boolean"
222
+ }
116
223
  },
117
224
  "allOf": [
118
225
  {
119
- "if": { "properties": { "scope": { "const": "user" } } },
226
+ "if": {
227
+ "properties": {
228
+ "scope": {
229
+ "const": "user"
230
+ }
231
+ }
232
+ },
120
233
  "then": {
121
234
  "properties": {
122
- "parameter_name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]{0,23}$" }
235
+ "parameter_name": {
236
+ "type": "string",
237
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,23}$"
238
+ }
123
239
  }
124
240
  }
125
241
  },
126
242
  {
127
243
  "if": {
128
- "required": ["disallow_ads_personalization"],
129
- "properties": { "disallow_ads_personalization": { "const": true } }
244
+ "required": [
245
+ "disallow_ads_personalization"
246
+ ],
247
+ "properties": {
248
+ "disallow_ads_personalization": {
249
+ "const": true
250
+ }
251
+ }
130
252
  },
131
- "then": { "properties": { "scope": { "const": "user" } } }
253
+ "then": {
254
+ "properties": {
255
+ "scope": {
256
+ "const": "user"
257
+ }
258
+ }
259
+ }
132
260
  }
133
261
  ]
134
262
  },
135
263
  "customMetric": {
136
264
  "type": "object",
137
265
  "additionalProperties": false,
138
- "required": ["parameter_name", "display_name", "scope"],
266
+ "required": [
267
+ "parameter_name",
268
+ "display_name",
269
+ "scope"
270
+ ],
139
271
  "properties": {
140
- "parameter_name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$" },
141
- "display_name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_ ]{0,81}$" },
272
+ "parameter_name": {
273
+ "type": "string",
274
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
275
+ },
276
+ "display_name": {
277
+ "type": "string",
278
+ "pattern": "^[A-Za-z][A-Za-z0-9_ ]{0,81}$"
279
+ },
142
280
  "description": {
143
281
  "type": "string",
144
282
  "maxLength": 150,
145
283
  "pattern": "^[^\\u0000-\\u001F\\u007F]*$"
146
284
  },
147
- "scope": { "const": "event" },
285
+ "scope": {
286
+ "const": "event"
287
+ },
148
288
  "measurement_unit": {
149
289
  "enum": [
150
- "standard", "currency", "feet", "meters", "kilometers", "miles",
151
- "milliseconds", "seconds", "minutes", "hours"
290
+ "standard",
291
+ "currency",
292
+ "feet",
293
+ "meters",
294
+ "kilometers",
295
+ "miles",
296
+ "milliseconds",
297
+ "seconds",
298
+ "minutes",
299
+ "hours"
152
300
  ]
153
301
  },
154
302
  "restricted_metric_types": {
155
303
  "type": "array",
156
304
  "uniqueItems": true,
157
- "items": { "enum": ["cost_data", "revenue_data"] }
305
+ "items": {
306
+ "enum": [
307
+ "cost_data",
308
+ "revenue_data"
309
+ ]
310
+ }
158
311
  }
159
312
  },
160
313
  "allOf": [
161
314
  {
162
315
  "if": {
163
- "required": ["measurement_unit"],
164
- "properties": { "measurement_unit": { "const": "currency" } }
316
+ "required": [
317
+ "measurement_unit"
318
+ ],
319
+ "properties": {
320
+ "measurement_unit": {
321
+ "const": "currency"
322
+ }
323
+ }
165
324
  },
166
325
  "then": {
167
- "required": ["restricted_metric_types"],
168
- "properties": { "restricted_metric_types": { "minItems": 1 } }
326
+ "required": [
327
+ "restricted_metric_types"
328
+ ],
329
+ "properties": {
330
+ "restricted_metric_types": {
331
+ "minItems": 1
332
+ }
333
+ }
169
334
  },
170
- "else": { "properties": { "restricted_metric_types": { "maxItems": 0 } } }
335
+ "else": {
336
+ "properties": {
337
+ "restricted_metric_types": {
338
+ "maxItems": 0
339
+ }
340
+ }
341
+ }
171
342
  }
172
343
  ]
344
+ },
345
+ "labels": {
346
+ "type": "object",
347
+ "maxProperties": 16,
348
+ "propertyNames": {
349
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
350
+ },
351
+ "additionalProperties": {
352
+ "type": "string",
353
+ "minLength": 1,
354
+ "maxLength": 64,
355
+ "pattern": "^[^\\u0000-\\u001F\\u007F]+$"
356
+ }
357
+ },
358
+ "apiName": {
359
+ "type": "string",
360
+ "pattern": "^[a-z][a-zA-Z0-9_]*(?::[a-zA-Z][a-zA-Z0-9_]*)?$"
361
+ },
362
+ "dateRange": {
363
+ "type": "object",
364
+ "additionalProperties": false,
365
+ "required": [
366
+ "start_date",
367
+ "end_date"
368
+ ],
369
+ "properties": {
370
+ "start_date": {
371
+ "type": "string"
372
+ },
373
+ "end_date": {
374
+ "type": "string"
375
+ },
376
+ "name": {
377
+ "type": "string",
378
+ "pattern": "^[a-z][a-z0-9_]{0,39}$"
379
+ }
380
+ }
381
+ },
382
+ "filterExpression": {
383
+ "oneOf": [
384
+ {
385
+ "type": "object",
386
+ "additionalProperties": false,
387
+ "required": [
388
+ "and"
389
+ ],
390
+ "properties": {
391
+ "and": {
392
+ "type": "array",
393
+ "minItems": 2,
394
+ "maxItems": 20,
395
+ "items": {
396
+ "$ref": "#/$defs/filterExpression"
397
+ }
398
+ }
399
+ }
400
+ },
401
+ {
402
+ "type": "object",
403
+ "additionalProperties": false,
404
+ "required": [
405
+ "or"
406
+ ],
407
+ "properties": {
408
+ "or": {
409
+ "type": "array",
410
+ "minItems": 2,
411
+ "maxItems": 20,
412
+ "items": {
413
+ "$ref": "#/$defs/filterExpression"
414
+ }
415
+ }
416
+ }
417
+ },
418
+ {
419
+ "type": "object",
420
+ "additionalProperties": false,
421
+ "required": [
422
+ "not"
423
+ ],
424
+ "properties": {
425
+ "not": {
426
+ "$ref": "#/$defs/filterExpression"
427
+ }
428
+ }
429
+ },
430
+ {
431
+ "type": "object",
432
+ "required": [
433
+ "field"
434
+ ],
435
+ "properties": {
436
+ "field": {
437
+ "$ref": "#/$defs/apiName"
438
+ },
439
+ "match_type": {
440
+ "enum": [
441
+ "exact",
442
+ "begins_with",
443
+ "ends_with",
444
+ "contains",
445
+ "full_regexp",
446
+ "partial_regexp"
447
+ ]
448
+ },
449
+ "value": {
450
+ "type": [
451
+ "string",
452
+ "number"
453
+ ]
454
+ },
455
+ "case_sensitive": {
456
+ "type": "boolean"
457
+ },
458
+ "in_list": {
459
+ "type": "array",
460
+ "minItems": 1,
461
+ "maxItems": 100,
462
+ "uniqueItems": true,
463
+ "items": {
464
+ "type": "string"
465
+ }
466
+ },
467
+ "operation": {
468
+ "enum": [
469
+ "equal",
470
+ "less_than",
471
+ "less_than_or_equal",
472
+ "greater_than",
473
+ "greater_than_or_equal"
474
+ ]
475
+ },
476
+ "between": {
477
+ "type": "array",
478
+ "minItems": 2,
479
+ "maxItems": 2,
480
+ "items": {
481
+ "type": "number"
482
+ }
483
+ },
484
+ "null": {
485
+ "const": true
486
+ }
487
+ },
488
+ "additionalProperties": false
489
+ }
490
+ ]
491
+ },
492
+ "report": {
493
+ "type": "object",
494
+ "additionalProperties": false,
495
+ "required": [
496
+ "metrics"
497
+ ],
498
+ "properties": {
499
+ "kind": {
500
+ "enum": [
501
+ "standard",
502
+ "realtime"
503
+ ]
504
+ },
505
+ "dimensions": {
506
+ "type": "array",
507
+ "maxItems": 9,
508
+ "uniqueItems": true,
509
+ "items": {
510
+ "$ref": "#/$defs/apiName"
511
+ }
512
+ },
513
+ "metrics": {
514
+ "type": "array",
515
+ "minItems": 1,
516
+ "maxItems": 10,
517
+ "uniqueItems": true,
518
+ "items": {
519
+ "$ref": "#/$defs/apiName"
520
+ }
521
+ },
522
+ "date_ranges": {
523
+ "type": "array",
524
+ "maxItems": 4,
525
+ "items": {
526
+ "$ref": "#/$defs/dateRange"
527
+ }
528
+ },
529
+ "dimension_filter": {
530
+ "$ref": "#/$defs/filterExpression"
531
+ },
532
+ "metric_filter": {
533
+ "$ref": "#/$defs/filterExpression"
534
+ },
535
+ "order_bys": {
536
+ "type": "array",
537
+ "maxItems": 10,
538
+ "items": {
539
+ "type": "object"
540
+ }
541
+ },
542
+ "limit": {
543
+ "type": "integer",
544
+ "minimum": 1,
545
+ "maximum": 250000
546
+ }
547
+ }
548
+ },
549
+ "reports": {
550
+ "type": "object",
551
+ "maxProperties": 50,
552
+ "propertyNames": {
553
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
554
+ },
555
+ "additionalProperties": {
556
+ "$ref": "#/$defs/report"
557
+ }
558
+ },
559
+ "health": {
560
+ "type": "object",
561
+ "additionalProperties": false,
562
+ "properties": {
563
+ "expected_events": {
564
+ "type": "array",
565
+ "uniqueItems": true,
566
+ "items": {
567
+ "type": "string",
568
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
569
+ }
570
+ },
571
+ "minimum_sessions": {
572
+ "type": "integer",
573
+ "minimum": 0,
574
+ "maximum": 1000000000
575
+ },
576
+ "traffic_drop_percent": {
577
+ "type": "number",
578
+ "minimum": 0,
579
+ "maximum": 100
580
+ },
581
+ "key_event_drop_percent": {
582
+ "type": "number",
583
+ "minimum": 0,
584
+ "maximum": 100
585
+ },
586
+ "unassigned_percent": {
587
+ "type": "number",
588
+ "minimum": 0,
589
+ "maximum": 100
590
+ },
591
+ "not_set_percent": {
592
+ "type": "number",
593
+ "minimum": 0,
594
+ "maximum": 100
595
+ }
596
+ }
597
+ },
598
+ "governance": {
599
+ "type": "object",
600
+ "additionalProperties": false,
601
+ "required": [
602
+ "experimental"
603
+ ],
604
+ "properties": {
605
+ "experimental": {
606
+ "const": true
607
+ },
608
+ "enhanced_measurement_required": {
609
+ "type": "boolean"
610
+ },
611
+ "email_redaction_required": {
612
+ "type": "boolean"
613
+ },
614
+ "query_parameter_redaction_required": {
615
+ "type": "boolean"
616
+ },
617
+ "reporting_identity": {
618
+ "enum": [
619
+ "blended",
620
+ "observed",
621
+ "device_based"
622
+ ]
623
+ },
624
+ "bigquery_link_required": {
625
+ "type": "boolean"
626
+ },
627
+ "expected_channel_groups": {
628
+ "$ref": "#/$defs/stringList"
629
+ },
630
+ "expected_calculated_metrics": {
631
+ "$ref": "#/$defs/stringList"
632
+ },
633
+ "expected_event_create_rules": {
634
+ "$ref": "#/$defs/stringList"
635
+ },
636
+ "expected_event_edit_rules": {
637
+ "$ref": "#/$defs/stringList"
638
+ }
639
+ }
640
+ },
641
+ "stringList": {
642
+ "type": "array",
643
+ "uniqueItems": true,
644
+ "items": {
645
+ "type": "string",
646
+ "minLength": 1,
647
+ "maxLength": 128
648
+ }
649
+ },
650
+ "bigquery": {
651
+ "type": "object",
652
+ "additionalProperties": false,
653
+ "required": [
654
+ "project_id",
655
+ "dataset",
656
+ "maximum_bytes_billed",
657
+ "experimental"
658
+ ],
659
+ "properties": {
660
+ "project_id": {
661
+ "type": "string",
662
+ "pattern": "^[a-z][a-z0-9-]{4,28}[a-z0-9]$"
663
+ },
664
+ "dataset": {
665
+ "type": "string",
666
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,1023}$"
667
+ },
668
+ "location": {
669
+ "type": "string",
670
+ "pattern": "^[A-Za-z][A-Za-z0-9-]{0,31}$"
671
+ },
672
+ "maximum_bytes_billed": {
673
+ "type": "integer",
674
+ "minimum": 1,
675
+ "maximum": 10000000000000000
676
+ },
677
+ "experimental": {
678
+ "const": true
679
+ }
680
+ }
681
+ },
682
+ "funnelStep": {
683
+ "type": "object",
684
+ "additionalProperties": false,
685
+ "required": [
686
+ "name",
687
+ "event_name"
688
+ ],
689
+ "properties": {
690
+ "name": {
691
+ "type": "string",
692
+ "minLength": 1,
693
+ "maxLength": 64
694
+ },
695
+ "event_name": {
696
+ "type": "string",
697
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,39}$"
698
+ }
699
+ }
700
+ },
701
+ "funnel": {
702
+ "type": "object",
703
+ "additionalProperties": false,
704
+ "required": [
705
+ "steps",
706
+ "experimental"
707
+ ],
708
+ "properties": {
709
+ "steps": {
710
+ "type": "array",
711
+ "minItems": 2,
712
+ "maxItems": 10,
713
+ "items": {
714
+ "$ref": "#/$defs/funnelStep"
715
+ }
716
+ },
717
+ "experimental": {
718
+ "const": true
719
+ }
720
+ }
721
+ },
722
+ "funnels": {
723
+ "type": "object",
724
+ "maxProperties": 20,
725
+ "propertyNames": {
726
+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
727
+ },
728
+ "additionalProperties": {
729
+ "$ref": "#/$defs/funnel"
730
+ }
173
731
  }
174
732
  }
175
733
  }