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,6 +4,16 @@ module AnalyticsOps
4
4
  type record = Hash[String, untyped]
5
5
 
6
6
  class Error < StandardError
7
+ attr_reader remote_reason: String?
8
+ attr_reader remote_metadata: record
9
+ attr_reader remote_code: String?
10
+
11
+ def initialize: (
12
+ ?String? message,
13
+ ?remote_reason: untyped,
14
+ ?remote_metadata: untyped,
15
+ ?remote_code: untyped
16
+ ) -> void
7
17
  end
8
18
 
9
19
  class ConfigurationError < Error
@@ -58,23 +68,50 @@ module AnalyticsOps
58
68
  MAX_KEY_BYTES: Integer
59
69
  READ_SCOPE: String
60
70
  EDIT_SCOPE: String
71
+ BIGQUERY_SCOPE: String
61
72
  ACCESS_SCOPES: Hash[Symbol, Array[String]]
62
73
 
63
74
  attr_reader path: String
75
+ attr_reader security_warnings: Array[String]
64
76
 
65
- def self.load: (?path: String?, ?store: Store) -> ServiceAccount
77
+ def self.load: (
78
+ ?path: String?,
79
+ ?store: Store,
80
+ ?connection: String?,
81
+ ?config: String?,
82
+ ?profile: String?
83
+ ) -> ServiceAccount
66
84
  def initialize: (String path) -> void
67
85
 
68
86
  class Store
69
87
  VERSION: Integer
88
+ LEGACY_VERSION: Integer
70
89
  MAX_BYTES: Integer
71
90
 
72
91
  attr_reader path: String
73
92
 
74
93
  def self.default_path: () -> String
75
94
  def initialize: (?path: String?) -> void
76
- def read: () -> String
77
- def write: (String service_account_path) -> String
95
+ def read: (?name: String?, ?config: String?, ?profile: String?) -> String
96
+ def resolve_connection_name: (?name: String?, ?config: String?, ?profile: String?) -> String
97
+ def connection_name_for: (
98
+ String service_account_path,
99
+ preferred: String,
100
+ config: String,
101
+ profile: String
102
+ ) -> String
103
+ def write: (
104
+ String service_account_path,
105
+ ?name: String,
106
+ ?config: String?,
107
+ ?profile: String?,
108
+ ?select: bool
109
+ ) -> String
110
+ def select: (config: String, profile: String, ?connection: String?) -> record
111
+ def selection: (config: String) -> record?
112
+ def selected_profile: (config: String) -> String?
113
+ def profile_connection: (config: String, profile: String) -> String?
114
+ def summaries: () -> Array[record]
78
115
  end
79
116
  end
80
117
 
@@ -161,8 +198,10 @@ module AnalyticsOps
161
198
  class Result
162
199
  attr_reader path: String
163
200
 
164
- def initialize: (path: String, created: bool) -> void
201
+ def initialize: (path: String, created: bool, ?updated: bool) -> void
165
202
  def created?: () -> bool
203
+ def updated?: () -> bool
204
+ def changed?: () -> bool
166
205
  def to_h: () -> record
167
206
  end
168
207
 
@@ -180,6 +219,12 @@ module AnalyticsOps
180
219
  attr_reader custom_metrics: Array[record]
181
220
  attr_reader manual_requirements: Array[String]
182
221
  attr_reader google_signals: record?
222
+ attr_reader labels: record
223
+ attr_reader reports: Hash[String, Reports::Definition]
224
+ attr_reader health: record?
225
+ attr_reader funnels: Hash[String, Funnels::Definition]
226
+ attr_reader bigquery: record?
227
+ attr_reader governance: record?
183
228
 
184
229
  def initialize: (
185
230
  profile: String,
@@ -190,7 +235,13 @@ module AnalyticsOps
190
235
  custom_dimensions: Array[record],
191
236
  custom_metrics: Array[record],
192
237
  manual_requirements: Array[String],
193
- google_signals: record?
238
+ google_signals: record?,
239
+ ?labels: record,
240
+ ?reports: Hash[String, Reports::Definition],
241
+ ?health: record?,
242
+ ?funnels: Hash[String, Funnels::Definition],
243
+ ?bigquery: record?,
244
+ ?governance: record?
194
245
  ) -> void
195
246
  def to_h: () -> record
196
247
  end
@@ -308,9 +359,104 @@ module AnalyticsOps
308
359
  ?limit: Integer
309
360
  ) -> void
310
361
  def realtime?: () -> bool
362
+ def with_date_ranges: (Array[record] value) -> Definition
363
+ def with_pagination: (offset: Integer, limit: Integer) -> Definition
364
+ def to_h: () -> record
365
+ end
366
+
367
+ class Field < Resources::Value
368
+ attr_reader api_name: String
369
+ attr_reader ui_name: String?
370
+ attr_reader description: String?
371
+ attr_reader category: String?
372
+ attr_reader kind: String
373
+ attr_reader custom_definition: bool
374
+ attr_reader deprecated_api_names: Array[String]
375
+ attr_reader data_type: String?
376
+ attr_reader expression: String?
377
+ attr_reader blocked_reasons: Array[String]
378
+ end
379
+
380
+ class Metadata
381
+ attr_reader property_id: String
382
+ attr_reader dimensions: Array[Field]
383
+ attr_reader metrics: Array[Field]
384
+
385
+ def initialize: (
386
+ property_id: String,
387
+ dimensions: Array[Field],
388
+ metrics: Array[Field]
389
+ ) -> void
390
+ def search: (?String? query, ?kind: String?) -> Array[Field]
311
391
  def to_h: () -> record
312
392
  end
313
393
 
394
+ class FieldList
395
+ attr_reader property_id: String
396
+ attr_reader query: String?
397
+ attr_reader kind: String?
398
+ attr_reader fields: Array[Field]
399
+
400
+ def initialize: (
401
+ property_id: String,
402
+ query: String?,
403
+ kind: String?,
404
+ fields: Array[Field]
405
+ ) -> void
406
+ def to_h: () -> record
407
+ end
408
+
409
+ class Recipe < Resources::Value
410
+ attr_reader name: String
411
+ attr_reader kind: String
412
+ attr_reader source: String
413
+ attr_reader dimensions: Array[String]
414
+ attr_reader metrics: Array[String]
415
+ end
416
+
417
+ class RecipeList
418
+ attr_reader recipes: Array[Recipe]
419
+
420
+ def initialize: (recipes: Array[Recipe]) -> void
421
+ def to_h: () -> record
422
+ end
423
+
424
+ class Compatibility
425
+ attr_reader report_name: String
426
+ attr_reader compatible: bool
427
+ attr_reader dimensions: Array[record]
428
+ attr_reader metrics: Array[record]
429
+
430
+ def initialize: (
431
+ report_name: String,
432
+ dimensions: Array[record],
433
+ metrics: Array[record]
434
+ ) -> void
435
+ def to_h: () -> record
436
+ end
437
+
438
+ class ExportResult < Resources::Value
439
+ attr_reader path: String
440
+ attr_reader rows: Integer
441
+ attr_reader headers: Array[String]
442
+ end
443
+
444
+ module CSVExport
445
+ def self.write: (String path, Enumerable[Result] pages) -> ExportResult
446
+ end
447
+
448
+ module Period
449
+ DEFAULT_DAYS: Integer
450
+ MAX_DAYS: Integer
451
+
452
+ def self.resolve: (
453
+ ?last_days: Integer?,
454
+ ?start_date: String?,
455
+ ?end_date: String?,
456
+ ?compare: bool
457
+ ) -> Array[record]?
458
+ end
459
+
314
460
  module Catalog
315
461
  def self.fetch: (String | Symbol name, ?kind: String?) -> Definition
316
462
  def self.names: () -> Array[String]
@@ -319,6 +465,9 @@ module AnalyticsOps
319
465
  end
320
466
 
321
467
  class Result
468
+ MAX_ROWS: Integer
469
+ MAX_CELL_BYTES: Integer
470
+
322
471
  attr_reader name: String
323
472
  attr_reader kind: String
324
473
  attr_reader dimension_headers: Array[String]
@@ -353,6 +502,187 @@ module AnalyticsOps
353
502
  end
354
503
  end
355
504
 
505
+ module Funnels
506
+ class Step < Resources::Value
507
+ attr_reader name: String
508
+ attr_reader event_name: String
509
+ end
510
+
511
+ class Definition
512
+ attr_reader name: String
513
+ attr_reader steps: Array[Step]
514
+
515
+ def initialize: (name: String, steps: Array[record]) -> void
516
+ def to_h: () -> record
517
+ end
518
+ end
519
+
520
+ module BigQuery
521
+ RECIPE_NAMES: Array[String]
522
+
523
+ class Definition
524
+ attr_reader name: String
525
+ attr_reader start_suffix: String
526
+ attr_reader end_suffix: String
527
+ attr_reader limit: Integer
528
+
529
+ def initialize: (
530
+ name: String,
531
+ start_date: untyped,
532
+ end_date: untyped,
533
+ ?limit: Integer
534
+ ) -> void
535
+ def self.from_date_ranges: (
536
+ String name,
537
+ Array[record] date_ranges,
538
+ ?limit: Integer,
539
+ ?today: untyped
540
+ ) -> Definition
541
+ def to_h: () -> record
542
+ end
543
+
544
+ class Result
545
+ attr_reader name: String
546
+ attr_reader headers: Array[String]
547
+ attr_reader rows: Array[record]
548
+ attr_reader bytes_processed: Integer
549
+ attr_reader maximum_bytes_billed: Integer
550
+
551
+ def initialize: (
552
+ name: String,
553
+ headers: Array[String],
554
+ rows: Array[record],
555
+ bytes_processed: Integer,
556
+ maximum_bytes_billed: Integer
557
+ ) -> void
558
+ def to_h: () -> record
559
+ end
560
+ end
561
+
562
+ module Health
563
+ DEFAULTS: record
564
+
565
+ def self.validate_date_ranges!: (Array[record] value) -> Array[record]
566
+
567
+ class Finding < Resources::Value
568
+ attr_reader severity: String
569
+ attr_reader code: String
570
+ attr_reader message: String
571
+ attr_reader actual: String?
572
+ attr_reader expected: String?
573
+ end
574
+
575
+ class Result
576
+ attr_reader profile: String
577
+ attr_reader property_id: String
578
+ attr_reader date_ranges: Array[record]
579
+ attr_reader findings: Array[Finding]
580
+ attr_reader summary: record
581
+
582
+ def initialize: (
583
+ profile: String,
584
+ property_id: String,
585
+ date_ranges: Array[record],
586
+ findings: Array[Finding],
587
+ summary: record
588
+ ) -> void
589
+ def healthy?: () -> bool
590
+ def to_h: () -> record
591
+ end
592
+
593
+ class Runner
594
+ def initialize: (
595
+ desired_state: DesiredState,
596
+ reports: Array[Reports::Result],
597
+ plan: Plan,
598
+ date_ranges: Array[record]
599
+ ) -> void
600
+ def call: () -> Result
601
+ end
602
+ end
603
+
604
+ module Governance
605
+ class StreamSettings < Resources::Value
606
+ attr_reader stream_id: String
607
+ attr_reader stream_name: String
608
+ attr_reader enhanced_measurement: record
609
+ attr_reader data_redaction: record
610
+ end
611
+
612
+ class Snapshot
613
+ attr_reader property_id: String
614
+ attr_reader stream_settings: Array[StreamSettings]
615
+ attr_reader reporting_identity: record
616
+ attr_reader attribution: record
617
+ attr_reader channel_groups: Array[record]
618
+ attr_reader calculated_metrics: Array[record]
619
+ attr_reader event_create_rules: Array[record]
620
+ attr_reader event_edit_rules: Array[record]
621
+ attr_reader bigquery_links: Array[record]
622
+
623
+ def initialize: (
624
+ property_id: String,
625
+ stream_settings: Array[StreamSettings],
626
+ reporting_identity: record,
627
+ attribution: record,
628
+ channel_groups: Array[record],
629
+ calculated_metrics: Array[record],
630
+ event_create_rules: Array[record],
631
+ event_edit_rules: Array[record],
632
+ bigquery_links: Array[record]
633
+ ) -> void
634
+ def to_h: () -> record
635
+ end
636
+
637
+ class Finding < Resources::Value
638
+ attr_reader severity: String
639
+ attr_reader code: String
640
+ attr_reader resource: String
641
+ attr_reader message: String
642
+ end
643
+
644
+ class Result
645
+ attr_reader snapshot: Snapshot
646
+ attr_reader findings: Array[Finding]
647
+
648
+ def initialize: (snapshot: Snapshot, findings: Array[Finding]) -> void
649
+ def compliant?: () -> bool
650
+ def to_h: () -> record
651
+ end
652
+
653
+ class ChangeHistory
654
+ attr_reader property_id: String
655
+ attr_reader events: Array[record]
656
+
657
+ def initialize: (property_id: String, events: Array[record]) -> void
658
+ def to_h: () -> record
659
+ end
660
+
661
+ class AccessReport
662
+ attr_reader property_id: String
663
+ attr_reader dimension_headers: Array[String]
664
+ attr_reader metric_headers: Array[String]
665
+ attr_reader rows: Array[record]
666
+ attr_reader row_count: Integer
667
+ attr_reader quota: record
668
+
669
+ def initialize: (
670
+ property_id: String,
671
+ dimension_headers: Array[String],
672
+ metric_headers: Array[String],
673
+ rows: Array[record],
674
+ row_count: Integer,
675
+ quota: record
676
+ ) -> void
677
+ def to_h: () -> record
678
+ end
679
+
680
+ class Auditor
681
+ def initialize: (snapshot: Snapshot, settings: record?) -> void
682
+ def call: () -> Result
683
+ end
684
+ end
685
+
356
686
  module Clients
357
687
  class Admin
358
688
  def initialize: (
@@ -366,6 +696,17 @@ module AnalyticsOps
366
696
  def discover: (?include_streams: bool) -> Array[Resources::Account]
367
697
  def property_access: (String property_id) -> Resources::Property
368
698
  def snapshot: (String property_id) -> Snapshot
699
+ def governance_snapshot: (String property_id) -> Governance::Snapshot
700
+ def change_history: (
701
+ String property_id,
702
+ ?limit: Integer,
703
+ ?days: Integer
704
+ ) -> Governance::ChangeHistory
705
+ def access_report: (
706
+ String property_id,
707
+ date_ranges: Array[record],
708
+ ?limit: Integer
709
+ ) -> Governance::AccessReport
369
710
  def capabilities: () -> Hash[String, bool]
370
711
  def compatibility: () -> record
371
712
  def apply_change: (Plan::Change change, property_id: String) -> Plan::Change
@@ -381,9 +722,30 @@ module AnalyticsOps
381
722
  ) -> void
382
723
  def run: (String property_id, Reports::Definition definition) -> Reports::Result
383
724
  def batch: (String property_id, Array[Reports::Definition] definitions) -> Array[Reports::Result]
725
+ def metadata: (String property_id) -> Reports::Metadata
726
+ def check_compatibility: (
727
+ String property_id,
728
+ Reports::Definition definition
729
+ ) -> Reports::Compatibility
384
730
  def available?: () -> bool
385
731
  def compatibility: () -> record
386
732
  end
733
+
734
+ class BigQuery
735
+ def initialize: (
736
+ settings: record,
737
+ ?service_account: ServiceAccount?,
738
+ ?client: untyped,
739
+ ?timeout: (Integer | Float)?,
740
+ ?logger: untyped
741
+ ) -> void
742
+ def run: (AnalyticsOps::BigQuery::Definition definition) -> AnalyticsOps::BigQuery::Result
743
+ def run_funnel: (
744
+ Funnels::Definition definition,
745
+ start_suffix: String,
746
+ end_suffix: String
747
+ ) -> AnalyticsOps::BigQuery::Result
748
+ end
387
749
  end
388
750
 
389
751
  class Connection
@@ -412,14 +774,18 @@ module AnalyticsOps
412
774
  attr_reader config_path: String
413
775
  attr_reader profile: String
414
776
  attr_reader property: Resources::Property
777
+ attr_reader warnings: Array[String]
415
778
 
416
779
  def initialize: (
417
780
  config_path: String,
418
781
  profile: String | Symbol,
419
782
  property: Resources::Property,
420
- created: bool
783
+ created: bool,
784
+ ?updated: bool,
785
+ ?warnings: Array[String]
421
786
  ) -> void
422
787
  def created?: () -> bool
788
+ def updated?: () -> bool
423
789
  def status: () -> String
424
790
  def to_h: () -> record
425
791
  end
@@ -430,6 +796,7 @@ module AnalyticsOps
430
796
  profile: String | Symbol,
431
797
  ?property_id: String?,
432
798
  ?noninteractive: bool,
799
+ ?warnings: Array[String],
433
800
  ?input: untyped,
434
801
  ?out: untyped
435
802
  ) -> void
@@ -461,6 +828,7 @@ module AnalyticsOps
461
828
  ?environment: Hash[String, String],
462
829
  ?admin: Clients::Admin?,
463
830
  ?data: Clients::Data?,
831
+ ?bigquery: Clients::BigQuery?,
464
832
  ?service_account: ServiceAccount?,
465
833
  ?transport: Symbol,
466
834
  ?timeout: (Integer | Float)?,
@@ -470,6 +838,7 @@ module AnalyticsOps
470
838
  desired_state: DesiredState,
471
839
  ?admin: Clients::Admin?,
472
840
  ?data: Clients::Data?,
841
+ ?bigquery: Clients::BigQuery?,
473
842
  ?service_account: ServiceAccount?,
474
843
  ?transport: Symbol,
475
844
  ?timeout: (Integer | Float)?,
@@ -481,12 +850,126 @@ module AnalyticsOps
481
850
  def plan: () -> Plan
482
851
  def apply: (Plan | String plan_or_path, ?confirm: bool) -> Applier::Result
483
852
  def verify: () -> Verification
484
- def report: (String | Reports::Definition name_or_definition) -> Reports::Result
853
+ def report: (
854
+ String | Reports::Definition name_or_definition,
855
+ ?date_ranges: Array[record]?
856
+ ) -> Reports::Result
485
857
  def realtime: (?String | Reports::Definition name_or_definition) -> Reports::Result
486
- def overview: () -> Reports::OverviewResult
858
+ def overview: (?date_ranges: Array[record]?) -> Reports::OverviewResult
859
+ def report_metadata: (?query: String?, ?kind: String?) -> Reports::FieldList
860
+ def report_recipes: () -> Reports::RecipeList
861
+ def report_compatibility: (
862
+ String | Reports::Definition name_or_definition
863
+ ) -> Reports::Compatibility
864
+ def each_report_page: (
865
+ String | Reports::Definition name_or_definition,
866
+ ?date_ranges: Array[record]?,
867
+ ?page_size: Integer,
868
+ ?max_rows: Integer
869
+ ) ?{ (Reports::Result) -> void } -> untyped
870
+ def export_report: (
871
+ String | Reports::Definition name_or_definition,
872
+ path: String,
873
+ ?date_ranges: Array[record]?,
874
+ ?page_size: Integer,
875
+ ?max_rows: Integer
876
+ ) -> Reports::ExportResult
877
+ def health: (?date_ranges: Array[record]?) -> Health::Result
878
+ def governance: () -> Governance::Result
879
+ def change_history: (?limit: Integer, ?days: Integer) -> Governance::ChangeHistory
880
+ def access_report: (
881
+ ?date_ranges: Array[record]?,
882
+ ?limit: Integer
883
+ ) -> Governance::AccessReport
884
+ def raw_report: (
885
+ String name,
886
+ ?date_ranges: Array[record]?,
887
+ ?limit: Integer
888
+ ) -> BigQuery::Result
889
+ def funnel: (String name, ?date_ranges: Array[record]?) -> BigQuery::Result
487
890
  def doctor: () -> DoctorResult
488
891
  end
489
892
 
893
+ class Portfolio
894
+ class Entry < Resources::Value
895
+ attr_reader profile: String
896
+ attr_reader property_id: String
897
+ attr_reader period: String
898
+ attr_reader active_users: String
899
+ attr_reader sessions: String
900
+ attr_reader key_events: String
901
+ end
902
+
903
+ class Result
904
+ attr_reader entries: Array[Entry]
905
+ attr_reader date_ranges: Array[record]
906
+
907
+ def initialize: (entries: Array[Entry], date_ranges: Array[record]) -> void
908
+ def to_h: () -> record
909
+ end
910
+
911
+ class ProfileResult < Resources::Value
912
+ attr_reader profile: String
913
+ attr_reader property_id: String
914
+ attr_reader labels: record
915
+ attr_reader status: String
916
+ attr_reader result: record?
917
+ attr_reader error: record?
918
+ end
919
+
920
+ class Collection
921
+ attr_reader kind: String
922
+ attr_reader name: String
923
+ attr_reader entries: Array[ProfileResult]
924
+ attr_reader date_ranges: Array[record]
925
+
926
+ def initialize: (
927
+ kind: String,
928
+ name: String,
929
+ entries: Array[ProfileResult],
930
+ date_ranges: Array[record]
931
+ ) -> void
932
+ def success?: () -> bool
933
+ def to_h: () -> record
934
+ end
935
+
936
+ def initialize: (
937
+ config: String,
938
+ ?store: ServiceAccount::Store,
939
+ ?workspace_loader: untyped,
940
+ ?service_account_loader: untyped,
941
+ ?transport: Symbol,
942
+ ?timeout: (Integer | Float)?,
943
+ ?logger: untyped
944
+ ) -> void
945
+ def overview: (?date_ranges: Array[record]?) -> Result
946
+ def report: (
947
+ String name,
948
+ ?date_ranges: Array[record]?,
949
+ ?concurrency: Integer
950
+ ) -> Collection
951
+ def health: (?date_ranges: Array[record]?, ?concurrency: Integer) -> Collection
952
+ end
953
+
954
+ class MCPServer
955
+ attr_reader server: untyped
956
+
957
+ def initialize: (
958
+ ?config: String,
959
+ ?profile: String?,
960
+ ?connection: String?,
961
+ ?store: ServiceAccount::Store,
962
+ ?workspace_loader: untyped,
963
+ ?connection_loader: untyped,
964
+ ?service_account_loader: untyped,
965
+ ?portfolio_loader: untyped,
966
+ ?transport: Symbol,
967
+ ?timeout: (Integer | Float)?,
968
+ ?logger: untyped
969
+ ) -> void
970
+ def start: () -> untyped
971
+ end
972
+
490
973
  class CLI
491
974
  def self.start: (
492
975
  Array[String] arguments,
@@ -496,7 +979,9 @@ module AnalyticsOps
496
979
  ?workspace_loader: untyped,
497
980
  ?connection_loader: untyped,
498
981
  ?service_account_loader: untyped,
499
- ?service_account_store: ServiceAccount::Store?
982
+ ?service_account_store: ServiceAccount::Store?,
983
+ ?mcp_server_loader: untyped,
984
+ ?portfolio_loader: untyped
500
985
  ) -> Integer
501
986
  end
502
987
  end