telemetry-constants.ts3464 lines · main
| 1 | /** |
| 2 | * Consolidated event definitions coming from the frontend, including studio, www, and docs. |
| 3 | * |
| 4 | * Note that events are not emitted for users that have opted out of telemetry. |
| 5 | * |
| 6 | * ## Naming conventions |
| 7 | * Event names and actions should use standardized past-tense verbs for data quality and consistency. |
| 8 | * Only use verbs already established in this file or in https://github.com/supabase/platform/blob/develop/shared/src/telemetry.ts |
| 9 | * Adding new verbs requires @growth-eng review to prevent data pollution. |
| 10 | * |
| 11 | * @module telemetry-frontend |
| 12 | */ |
| 13 | |
| 14 | export type TelemetryGroups = { |
| 15 | project: string |
| 16 | organization: string |
| 17 | } |
| 18 | |
| 19 | export const TABLE_EVENT_ACTIONS = { |
| 20 | TableCreated: 'table_created', |
| 21 | TableDataAdded: 'table_data_added', |
| 22 | TableRLSEnabled: 'table_rls_enabled', |
| 23 | } as const satisfies { |
| 24 | TableCreated: TableCreatedEvent['action'] |
| 25 | TableDataAdded: TableDataAddedEvent['action'] |
| 26 | TableRLSEnabled: TableRLSEnabledEvent['action'] |
| 27 | } |
| 28 | |
| 29 | export type TableEventAction = (typeof TABLE_EVENT_ACTIONS)[keyof typeof TABLE_EVENT_ACTIONS] |
| 30 | |
| 31 | export const TABLE_EVENT_VALUES: TableEventAction[] = Object.values(TABLE_EVENT_ACTIONS) |
| 32 | |
| 33 | /** |
| 34 | * Triggered when a user signs up. When signing up with Email and Password, this is only triggered once user confirms their email. |
| 35 | * |
| 36 | * @group Events |
| 37 | * @source studio |
| 38 | * @page /sign-up |
| 39 | */ |
| 40 | export interface SignUpEvent { |
| 41 | action: 'sign_up' |
| 42 | properties: { |
| 43 | category: 'conversion' |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Triggered when a user signs in with GitHub, Email and Password or SSO. |
| 49 | * |
| 50 | * Some unintuitive behavior: |
| 51 | * - If signing up with GitHub the SignInEvent gets triggered first before the SignUpEvent. |
| 52 | * |
| 53 | * @group Events |
| 54 | * @source studio |
| 55 | * @page /sign-in-mfa |
| 56 | */ |
| 57 | export interface SignInEvent { |
| 58 | action: 'sign_in' |
| 59 | properties: { |
| 60 | category: 'account' |
| 61 | /** |
| 62 | * The method used to sign in, e.g. email, github, sso |
| 63 | */ |
| 64 | method: string |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * User copied the database connection string. |
| 70 | * |
| 71 | * @group Events |
| 72 | * @source studio |
| 73 | */ |
| 74 | export interface ConnectionStringCopiedEvent { |
| 75 | action: 'connection_string_copied' |
| 76 | properties: { |
| 77 | /** |
| 78 | * Method selected by user, e.g. URI, PSQL, SQLAlchemy, MCP URL, Framework snippet, Command Line, JSON, etc. |
| 79 | * Required for Connection String, App Frameworks, and Mobile Frameworks tabs |
| 80 | */ |
| 81 | connectionType?: string |
| 82 | /** |
| 83 | * Language of the code block if selected, e.g. bash, go, http, typescript |
| 84 | * Required for Connection String, App Frameworks, and Mobile Frameworks tabs |
| 85 | */ |
| 86 | lang?: string |
| 87 | /** |
| 88 | * Connection Method, e.g. direct, transaction_pooler, session_pooler |
| 89 | * Only used for Connection String tab |
| 90 | */ |
| 91 | connectionMethod?: 'direct' | 'transaction_pooler' | 'session_pooler' |
| 92 | /** |
| 93 | * Tab from which the connection string was copied |
| 94 | */ |
| 95 | connectionTab: 'Connection String' | 'App Frameworks' | 'Mobile Frameworks' | 'ORMs' | 'MCP' |
| 96 | /** |
| 97 | * Selected framework, tool, or client (e.g., 'Next.js', 'Prisma', 'Cursor') |
| 98 | */ |
| 99 | selectedItem?: string |
| 100 | /** |
| 101 | * Source of the event, either 'studio' or 'docs' |
| 102 | */ |
| 103 | source?: 'studio' | 'docs' |
| 104 | } |
| 105 | groups: TelemetryGroups |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * User clicked the MCP install button (one-click installation for Cursor or VS Code). |
| 110 | * |
| 111 | * @group Events |
| 112 | * @source studio, docs |
| 113 | */ |
| 114 | export interface McpInstallButtonClickedEvent { |
| 115 | action: 'mcp_install_button_clicked' |
| 116 | properties: { |
| 117 | /** |
| 118 | * The MCP client that was selected (e.g., 'Cursor', 'VS Code') |
| 119 | */ |
| 120 | client: string |
| 121 | /** |
| 122 | * Source of the event, either 'studio' or 'docs' |
| 123 | */ |
| 124 | source?: 'studio' | 'docs' |
| 125 | } |
| 126 | groups: TelemetryGroups |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Cron job created. |
| 131 | * |
| 132 | * @group Events |
| 133 | * @source studio |
| 134 | * @page /dashboard/project/{ref}/integrations/cron/jobs?new=true |
| 135 | */ |
| 136 | export interface CronJobCreatedEvent { |
| 137 | action: 'cron_job_created' |
| 138 | properties: { |
| 139 | /** |
| 140 | * What the cron job executes, e.g. sql_function or sql_snippet |
| 141 | */ |
| 142 | type: 'sql_function' | 'sql_snippet' | 'edge_function' | 'http_request' |
| 143 | /** |
| 144 | * Schedule of the cron job in the format of * * * * * |
| 145 | */ |
| 146 | schedule: string |
| 147 | } |
| 148 | groups: TelemetryGroups |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * Cron job updated. |
| 153 | * |
| 154 | * @group Events |
| 155 | * @source studio |
| 156 | * @page /dashboard/project/{ref}/integrations/cron/jobs?new=true |
| 157 | */ |
| 158 | export interface CronJobUpdatedEvent { |
| 159 | action: 'cron_job_updated' |
| 160 | properties: { |
| 161 | /** |
| 162 | * What the cron job executes, e.g. sql_function or sql_snippet |
| 163 | */ |
| 164 | type: 'sql_function' | 'sql_snippet' | 'edge_function' | 'http_request' |
| 165 | /** |
| 166 | * Schedule of the cron job in the format of * * * * * |
| 167 | */ |
| 168 | schedule: string |
| 169 | } |
| 170 | groups: TelemetryGroups |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Cron job removed. Previously: cron_job_deleted |
| 175 | * |
| 176 | * @group Events |
| 177 | * @source studio |
| 178 | * @page /dashboard/project/{ref}/integrations/cron/jobs |
| 179 | */ |
| 180 | export interface CronJobRemovedEvent { |
| 181 | action: 'cron_job_removed' |
| 182 | properties: { |
| 183 | /** Cron job classification, parsed from the job's command at deletion time. */ |
| 184 | type: 'sql_function' | 'sql_snippet' | 'edge_function' | 'http_request' |
| 185 | } |
| 186 | groups: TelemetryGroups |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * Create job button clicked that opens the dialog. |
| 191 | * |
| 192 | * @group Events |
| 193 | * @source studio |
| 194 | * @page /dashboard/project/{ref}/integrations/cron/jobs |
| 195 | */ |
| 196 | export interface CronJobCreateClickedEvent { |
| 197 | action: 'cron_job_create_clicked' |
| 198 | groups: TelemetryGroups |
| 199 | } |
| 200 | |
| 201 | /** |
| 202 | * Edit cron job button (hidden in the dropdown) clicked that opens the dialog. |
| 203 | * |
| 204 | * @group Events |
| 205 | * @source studio |
| 206 | * @page /dashboard/project/{ref}/integrations/cron/jobs |
| 207 | */ |
| 208 | export interface CronJobUpdateClickedEvent { |
| 209 | action: 'cron_job_update_clicked' |
| 210 | groups: TelemetryGroups |
| 211 | } |
| 212 | |
| 213 | /** |
| 214 | * Delete cron job button (hidden in the dropdown) clicked that opens the deletion confirmation modal. |
| 215 | * |
| 216 | * @group Events |
| 217 | * @source studio |
| 218 | * @page /dashboard/project/{ref}/integrations/cron/jobs |
| 219 | */ |
| 220 | export interface CronJobDeleteClickedEvent { |
| 221 | action: 'cron_job_delete_clicked' |
| 222 | groups: TelemetryGroups |
| 223 | } |
| 224 | |
| 225 | /** |
| 226 | * User clicked the history button to see previous runs of the cron job |
| 227 | * |
| 228 | * @group Events |
| 229 | * @source studio |
| 230 | * @page /dashboard/project/{ref}/integrations/cron/jobs |
| 231 | */ |
| 232 | export interface CronJobHistoryClickedEvent { |
| 233 | action: 'cron_job_history_clicked' |
| 234 | groups: TelemetryGroups |
| 235 | } |
| 236 | |
| 237 | /** |
| 238 | * A feature preview was enabled by the user through the FeaturePreviewModal. |
| 239 | * |
| 240 | * The FeaturePreviewModal can be opened clicking at the profile icon at the bottom left corner of the project sidebar. |
| 241 | * |
| 242 | * @group Events |
| 243 | * @source studio |
| 244 | */ |
| 245 | export interface FeaturePreviewEnabledEvent { |
| 246 | action: 'feature_preview_enabled' |
| 247 | properties: { |
| 248 | /** |
| 249 | * Feature key of the preview that was enabled. e.g. briven-ui-api-side-panel |
| 250 | */ |
| 251 | feature: string |
| 252 | } |
| 253 | groups: TelemetryGroups |
| 254 | } |
| 255 | |
| 256 | /** |
| 257 | * A feature preview was disabled by the user through the FeaturePreviewModal. |
| 258 | * |
| 259 | * The FeaturePreviewModal can be opened clicking at the profile icon at the bottom left corner of the project sidebar. |
| 260 | * |
| 261 | * @group Events |
| 262 | * @source studio |
| 263 | */ |
| 264 | export interface FeaturePreviewDisabledEvent { |
| 265 | action: 'feature_preview_disabled' |
| 266 | properties: { |
| 267 | /** |
| 268 | * Feature key of the preview that was disabled. e.g. briven-ui-api-side-panel |
| 269 | */ |
| 270 | feature: string |
| 271 | } |
| 272 | groups: TelemetryGroups |
| 273 | } |
| 274 | |
| 275 | /** |
| 276 | * The user picked a timezone in the dashboard timezone picker (in the user |
| 277 | * avatar dropdown). Setting an explicit IANA value or returning to the auto |
| 278 | * detected default both fire this event. |
| 279 | * |
| 280 | * @group Events |
| 281 | * @source studio |
| 282 | */ |
| 283 | export interface TimezonePickerClickedEvent { |
| 284 | action: 'timezone_picker_clicked' |
| 285 | properties: { |
| 286 | /** IANA name resolved before the change. */ |
| 287 | previousTimezone: string |
| 288 | /** IANA name resolved after the change. */ |
| 289 | nextTimezone: string |
| 290 | /** True when the user opted back into the browser-detected default. */ |
| 291 | isAutoDetected: boolean |
| 292 | /** Where the picker was rendered. */ |
| 293 | source: 'user_dropdown' | 'account_preferences' |
| 294 | } |
| 295 | groups: TelemetryGroups |
| 296 | } |
| 297 | /** |
| 298 | * Top-of-funnel event for the dataApiRevokeOnCreateDefault rollout. Fires once per |
| 299 | * mount after the flag resolves so cohort attribution is clean — pair with |
| 300 | * project_creation_simple_version_submitted to measure the flag's impact on |
| 301 | * project creation completion rate. |
| 302 | * |
| 303 | * @group Events |
| 304 | * @source studio |
| 305 | * @page new/{slug} and /integrations/vercel/{slug}/deploy-button/new-project |
| 306 | */ |
| 307 | export interface ProjectCreationDefaultPrivilegesExposedEvent { |
| 308 | action: 'project_creation_default_privileges_exposed' |
| 309 | properties: { |
| 310 | /** Where the checkbox was shown. */ |
| 311 | surface: 'main' | 'vercel' |
| 312 | /** |
| 313 | * Current state of the "Automatically expose new tables" checkbox |
| 314 | * (`dataApiDefaultPrivileges` form field) at exposure time. This is the |
| 315 | * field the experiment actually controls. |
| 316 | * true = default privileges granted (legacy behaviour) |
| 317 | * false = revoke SQL runs on create (new behaviour, treatment default) |
| 318 | */ |
| 319 | dataApiDefaultPrivileges: boolean |
| 320 | /** |
| 321 | * Raw value of the dataApiRevokeOnCreateDefault PostHog flag at exposure time. |
| 322 | * true = revoke cohort (checkbox defaulted to unchecked) |
| 323 | * false = control cohort (checkbox defaulted to checked) |
| 324 | */ |
| 325 | dataApiRevokeOnCreateDefaultEnabled: boolean |
| 326 | } |
| 327 | groups: Omit<TelemetryGroups, 'project'> |
| 328 | } |
| 329 | |
| 330 | /** |
| 331 | * Project creation form was submitted and the project was created. Fires from both |
| 332 | * the main project creation wizard and the Vercel deploy-button flow — disambiguate |
| 333 | * by the `surface` property. |
| 334 | * |
| 335 | * @group Events |
| 336 | * @source studio |
| 337 | * @page new/{slug} and /integrations/vercel/{slug}/deploy-button/new-project |
| 338 | */ |
| 339 | export interface ProjectCreationSimpleVersionSubmittedEvent { |
| 340 | action: 'project_creation_simple_version_submitted' |
| 341 | properties: { |
| 342 | /** |
| 343 | * Which surface produced the submission. Omitted on events emitted before this |
| 344 | * property was introduced; treat absent as 'main' for backfill. |
| 345 | */ |
| 346 | surface?: 'main' | 'vercel' |
| 347 | /** |
| 348 | * The instance size selected in the project creation form. |
| 349 | */ |
| 350 | instanceSize?: string |
| 351 | /** |
| 352 | * Whether the automatic RLS event trigger option was enabled |
| 353 | */ |
| 354 | enableRlsEventTrigger?: boolean |
| 355 | /** |
| 356 | * Experiment variant: 'control' (checkbox not shown) or 'test' (checkbox shown) |
| 357 | */ |
| 358 | rlsOptionVariant?: 'control' | 'test' |
| 359 | /** |
| 360 | * Whether Data API is enabled. |
| 361 | * true = "Data API + Connection String" (default) |
| 362 | * false = "Only Connection String" |
| 363 | */ |
| 364 | dataApiEnabled?: boolean |
| 365 | /** |
| 366 | * Data API schema configuration. Only relevant when dataApiEnabled is true. |
| 367 | * true = "Use dedicated API schema for Data API" |
| 368 | * false = "Use public schema for Data API" (default) |
| 369 | */ |
| 370 | useApiSchema?: boolean |
| 371 | /** |
| 372 | * Postgres engine type selection. |
| 373 | * true = "Postgres with OrioleDB" (alpha) |
| 374 | * false = "Postgres" (default) |
| 375 | */ |
| 376 | useOrioleDb?: boolean |
| 377 | /** |
| 378 | * Raw checkbox state for "Automatically expose new tables and functions" at submission. |
| 379 | * true = default privileges are granted on new entities (current behaviour) |
| 380 | * false = revoke SQL ran; user must manually grant access per entity |
| 381 | */ |
| 382 | dataApiDefaultPrivilegesGranted?: boolean |
| 383 | /** |
| 384 | * Whether the dataApiRevokeOnCreateDefault PostHog flag was enabled for this user. |
| 385 | * Controls only the default checkbox state of "Automatically expose new tables and functions" |
| 386 | * at project creation. Tracking it lets us correlate flag cohort with user choice. |
| 387 | * true = user is in the staged rollout cohort (checkbox defaulted to unchecked) |
| 388 | * false = user is outside the rollout (checkbox defaulted to checked) |
| 389 | * omitted = PostHog flags had not loaded at the time of project creation |
| 390 | */ |
| 391 | dataApiRevokeOnCreateDefaultEnabled?: boolean |
| 392 | } |
| 393 | groups: TelemetryGroups |
| 394 | } |
| 395 | |
| 396 | /** |
| 397 | * User clicked to connect GitHub during project creation. |
| 398 | * |
| 399 | * @group Events |
| 400 | * @source studio |
| 401 | * @page new/{slug} |
| 402 | */ |
| 403 | export interface ProjectCreationGithubConnectClickedEvent { |
| 404 | action: 'project_creation_github_connect_clicked' |
| 405 | groups: Omit<TelemetryGroups, 'project'> |
| 406 | } |
| 407 | |
| 408 | /** |
| 409 | * Existing project creation form confirm modal was triggered and opened. |
| 410 | * |
| 411 | * @group Events |
| 412 | * @source studio |
| 413 | * @page new/{slug} |
| 414 | */ |
| 415 | export interface ProjectCreationSimpleVersionConfirmModalOpenedEvent { |
| 416 | action: 'project_creation_simple_version_confirm_modal_opened' |
| 417 | /** |
| 418 | * the instance size selected in the project creation form |
| 419 | */ |
| 420 | properties: { |
| 421 | instanceSize?: string |
| 422 | } |
| 423 | groups: Omit<TelemetryGroups, 'project'> |
| 424 | } |
| 425 | |
| 426 | /** |
| 427 | * User toggled Data API access on a table via the switch in the table editor side panel. |
| 428 | * Only fires for new tables — editing existing tables links out to the settings page instead. |
| 429 | * |
| 430 | * @group Events |
| 431 | * @source studio |
| 432 | * @page /dashboard/project/{ref}/editor |
| 433 | */ |
| 434 | export interface TableApiAccessToggleClickedEvent { |
| 435 | action: 'table_api_access_toggle_clicked' |
| 436 | properties: { |
| 437 | /** |
| 438 | * The resulting state of the toggle after the click. |
| 439 | */ |
| 440 | newState: 'enabled' | 'disabled' |
| 441 | /** |
| 442 | * The schema containing the table being created. |
| 443 | */ |
| 444 | schemaName: string |
| 445 | } |
| 446 | groups: TelemetryGroups |
| 447 | } |
| 448 | |
| 449 | /** |
| 450 | * User clicked either "Listening to channel" or "Start listening" button after selecting a channel. |
| 451 | * |
| 452 | * @group Events |
| 453 | * @source studio |
| 454 | * @page /dashboard/project/{ref}/realtime/inspector |
| 455 | */ |
| 456 | export interface RealtimeInspectorListenChannelClickedEvent { |
| 457 | action: 'realtime_inspector_listen_channel_clicked' |
| 458 | groups: TelemetryGroups |
| 459 | } |
| 460 | |
| 461 | /** |
| 462 | * A broadcast message was sent from the SendMessageModal. |
| 463 | * |
| 464 | * @group Events |
| 465 | * @source studio |
| 466 | * @page /dashboard/project/{ref}/realtime/inspector |
| 467 | */ |
| 468 | export interface RealtimeInspectorBroadcastSentEvent { |
| 469 | action: 'realtime_inspector_broadcast_sent' |
| 470 | groups: TelemetryGroups |
| 471 | } |
| 472 | |
| 473 | /** |
| 474 | * User clicked a message in the RealtimeInspector, which opens a sidebar that shows the messsage details including metadata. |
| 475 | * |
| 476 | * @group Events |
| 477 | * @source studio |
| 478 | * @page /dashboard/project/{ref}/realtime/inspector |
| 479 | */ |
| 480 | export interface RealtimeInspectorMessageClickedEvent { |
| 481 | action: 'realtime_inspector_message_clicked' |
| 482 | groups: TelemetryGroups |
| 483 | } |
| 484 | |
| 485 | /** |
| 486 | * A message was copied from the RealtimeInspector. |
| 487 | * |
| 488 | * @group Events |
| 489 | * @source studio |
| 490 | * @page /dashboard/project/{ref}/realtime/inspector |
| 491 | */ |
| 492 | export interface RealtimeInspectorCopyMessageClickedEvent { |
| 493 | action: 'realtime_inspector_copy_message_clicked' |
| 494 | groups: TelemetryGroups |
| 495 | } |
| 496 | |
| 497 | /** |
| 498 | * Filters were applied in the RealtimeInspector. |
| 499 | * |
| 500 | * @group Events |
| 501 | * @source studio |
| 502 | * @page /dashboard/project/{ref}/realtime/inspector |
| 503 | */ |
| 504 | export interface RealtimeInspectorFiltersAppliedEvent { |
| 505 | action: 'realtime_inspector_filters_applied' |
| 506 | groups: TelemetryGroups |
| 507 | } |
| 508 | |
| 509 | /** |
| 510 | * Database role was updated in the RealtimeInspector. |
| 511 | * |
| 512 | * @group Events |
| 513 | * @source studio |
| 514 | * @page /dashboard/project/{ref}/realtime/inspector |
| 515 | */ |
| 516 | export interface RealtimeInspectorDatabaseRoleUpdatedEvent { |
| 517 | action: 'realtime_inspector_database_role_updated' |
| 518 | groups: TelemetryGroups |
| 519 | } |
| 520 | |
| 521 | /** |
| 522 | * User clicked to toggle realtime on a table. |
| 523 | * |
| 524 | * @group Events |
| 525 | * @source studio |
| 526 | * @page /dashboard/project/{ref}/editor |
| 527 | */ |
| 528 | export interface RealtimeToggleTableClickedEvent { |
| 529 | action: 'realtime_toggle_table_clicked' |
| 530 | properties: { |
| 531 | /** |
| 532 | * The state of the toggle. |
| 533 | */ |
| 534 | newState: 'enabled' | 'disabled' |
| 535 | /** |
| 536 | * Where the toggle was clicked from |
| 537 | */ |
| 538 | origin: 'tableSidePanel' | 'tableGridHeader' |
| 539 | } |
| 540 | groups: TelemetryGroups |
| 541 | } |
| 542 | |
| 543 | /** |
| 544 | * Realtime was enabled on a table. |
| 545 | * |
| 546 | * @group Events |
| 547 | * @source studio |
| 548 | * @page /dashboard/project/{ref}/editor |
| 549 | */ |
| 550 | export interface TableRealtimeEnabledEvent { |
| 551 | action: 'table_realtime_enabled' |
| 552 | properties: { |
| 553 | /** |
| 554 | * The method used to enable realtime |
| 555 | */ |
| 556 | method: 'ui' | 'sql_editor' | 'api' |
| 557 | /** |
| 558 | * Schema name |
| 559 | */ |
| 560 | schema_name: string |
| 561 | /** |
| 562 | * Table name |
| 563 | */ |
| 564 | table_name: string |
| 565 | } |
| 566 | groups: TelemetryGroups |
| 567 | } |
| 568 | |
| 569 | /** |
| 570 | * Realtime was disabled on a table. |
| 571 | * |
| 572 | * @group Events |
| 573 | * @source studio |
| 574 | * @page /dashboard/project/{ref}/editor |
| 575 | */ |
| 576 | export interface TableRealtimeDisabledEvent { |
| 577 | action: 'table_realtime_disabled' |
| 578 | properties: { |
| 579 | /** |
| 580 | * The method used to disable realtime |
| 581 | */ |
| 582 | method: 'ui' | 'sql_editor' | 'api' |
| 583 | /** |
| 584 | * Schema name |
| 585 | */ |
| 586 | schema_name: string |
| 587 | /** |
| 588 | * Table name |
| 589 | */ |
| 590 | table_name: string |
| 591 | } |
| 592 | groups: TelemetryGroups |
| 593 | } |
| 594 | |
| 595 | /** |
| 596 | * User clicked the quickstart card in the SQL editor. |
| 597 | * |
| 598 | * @group Events |
| 599 | * @source studio |
| 600 | * @page /dashboard/project/{ref}/sql |
| 601 | */ |
| 602 | export interface SqlEditorQuickstartClickedEvent { |
| 603 | action: 'sql_editor_quickstart_clicked' |
| 604 | properties: { |
| 605 | /** |
| 606 | * The title of the quickstart card clicked. |
| 607 | */ |
| 608 | quickstartName: string |
| 609 | } |
| 610 | groups: TelemetryGroups |
| 611 | } |
| 612 | |
| 613 | /** |
| 614 | * User clicked the template card in the SQL editor. |
| 615 | * |
| 616 | * @group Events |
| 617 | * @source studio |
| 618 | * @page /dashboard/project/{ref}/sql |
| 619 | */ |
| 620 | export interface SqlEditorTemplateClickedEvent { |
| 621 | action: 'sql_editor_template_clicked' |
| 622 | properties: { |
| 623 | /** |
| 624 | * The name of the template card clicked. |
| 625 | */ |
| 626 | templateName: string |
| 627 | } |
| 628 | groups: TelemetryGroups |
| 629 | } |
| 630 | |
| 631 | /** |
| 632 | * User clicked the "Result download CSV" button in the SQL editor. |
| 633 | * |
| 634 | * @group Events |
| 635 | * @source studio |
| 636 | * @page /dashboard/project/{ref}/sql |
| 637 | */ |
| 638 | export interface SqlEditorResultDownloadCsvClickedEvent { |
| 639 | action: 'sql_editor_result_download_csv_clicked' |
| 640 | groups: TelemetryGroups |
| 641 | } |
| 642 | |
| 643 | /** |
| 644 | * User clicked the "Result copy Markdown" button in the SQL editor. |
| 645 | * |
| 646 | * @group Events |
| 647 | * @source studio |
| 648 | * @page /dashboard/project/{ref}/sql |
| 649 | */ |
| 650 | export interface SqlEditorResultCopyMarkdownClickedEvent { |
| 651 | action: 'sql_editor_result_copy_markdown_clicked' |
| 652 | groups: TelemetryGroups |
| 653 | } |
| 654 | |
| 655 | /** |
| 656 | * User clicked the "Result copy JSON" button in the SQL editor |
| 657 | * |
| 658 | * @group Events |
| 659 | * @source studio |
| 660 | * @page /dashboard/project/{ref}/sql |
| 661 | */ |
| 662 | export interface SqlEditorResultCopyJsonClickedEvent { |
| 663 | action: 'sql_editor_result_copy_json_clicked' |
| 664 | groups: TelemetryGroups |
| 665 | } |
| 666 | |
| 667 | /** |
| 668 | * User clicked the "Result copy CSV" button in the SQL editor |
| 669 | * |
| 670 | * @group Events |
| 671 | * @source studio |
| 672 | * @page /dashboard/project/{ref}/sql |
| 673 | */ |
| 674 | export interface SqlEditorResultCopyCsvClickedEvent { |
| 675 | action: 'sql_editor_result_copy_csv_clicked' |
| 676 | groups: TelemetryGroups |
| 677 | } |
| 678 | |
| 679 | /** |
| 680 | * User submitted a prompt to the assistant sidebar. |
| 681 | * |
| 682 | * @group Events |
| 683 | * @source studio |
| 684 | */ |
| 685 | export interface AssistantPromptSubmittedEvent { |
| 686 | action: 'assistant_prompt_submitted' |
| 687 | properties: { |
| 688 | /** UUID of the chat session in which the prompt was submitted */ |
| 689 | chatId?: string |
| 690 | } |
| 691 | groups: TelemetryGroups |
| 692 | } |
| 693 | |
| 694 | /** |
| 695 | * User submitted a debug request to the assistant sidebar or prompt submitted has Help me to debug. |
| 696 | * |
| 697 | * @group Events |
| 698 | * @source studio |
| 699 | */ |
| 700 | export interface AssistantDebugSubmittedEvent { |
| 701 | action: 'assistant_debug_submitted' |
| 702 | properties: { |
| 703 | /** UUID of the chat session in which the debug request was submitted */ |
| 704 | chatId?: string |
| 705 | } |
| 706 | groups: TelemetryGroups |
| 707 | } |
| 708 | |
| 709 | /** |
| 710 | * User clicked the run query button in the suggestion provided in the assistant sidebar. |
| 711 | * |
| 712 | * @group Events |
| 713 | * @source studio |
| 714 | */ |
| 715 | export interface AssistantSuggestionRunQueryClickedEvent { |
| 716 | action: 'assistant_suggestion_run_query_clicked' |
| 717 | properties: { |
| 718 | /** |
| 719 | * The type of suggestion that was run by the user. Mutate or Select query types only. |
| 720 | */ |
| 721 | queryType: string |
| 722 | /** |
| 723 | * For mutation queries only: the DDL subtype detected from the SQL. |
| 724 | * 'functions' for CREATE FUNCTION / CREATE OR REPLACE FUNCTION, |
| 725 | * 'rls-policies' for CREATE POLICY / ALTER POLICY, |
| 726 | * 'unknown' for any other mutation. Omitted for non-mutation queries. |
| 727 | */ |
| 728 | mutationType?: 'functions' | 'rls-policies' | 'unknown' |
| 729 | } |
| 730 | groups: TelemetryGroups |
| 731 | } |
| 732 | |
| 733 | /** |
| 734 | * User accepted or rejected changes in sql ai diff handler. |
| 735 | * They can accept change by clicking accept button or typing shortcut (CMD+Enter) or reject by clicking reject button or typing shortcut (Esc). |
| 736 | * Handler only appears after clicking any dropdown option in Edit in Sql Editor in suggestion provided by the assistant. |
| 737 | * The dropdown options only appear in any page with 'sql' in url. |
| 738 | * |
| 739 | * @group Events |
| 740 | * @source studio |
| 741 | * @page /dashboard/project/{ref}/sql |
| 742 | */ |
| 743 | export interface AssistantSqlDiffHandlerEvaluatedEvent { |
| 744 | action: 'assistant_sql_diff_handler_evaluated' |
| 745 | properties: { |
| 746 | /** |
| 747 | * Whether the user accepted or rejected the changes. |
| 748 | */ |
| 749 | handlerAccepted: boolean |
| 750 | } |
| 751 | groups: TelemetryGroups |
| 752 | } |
| 753 | |
| 754 | /** |
| 755 | * User clicked Edit in SQL Editor button in the assistant sidebar when user is in any page that does not have 'sql' in url or is in a new snippet. |
| 756 | * |
| 757 | * @group Events |
| 758 | * @source studio |
| 759 | */ |
| 760 | export interface AssistantEditInSqlEditorClickedEvent { |
| 761 | action: 'assistant_edit_in_sql_editor_clicked' |
| 762 | properties: { |
| 763 | /** |
| 764 | * Whether the user is in the SQL editor page or in a new snippet. |
| 765 | */ |
| 766 | isInSQLEditor: boolean |
| 767 | isInNewSnippet: boolean |
| 768 | } |
| 769 | groups: TelemetryGroups |
| 770 | } |
| 771 | |
| 772 | /** |
| 773 | * User clicked on Add block -> SQL Snippets -> a SQL snippet in a custom reports page. |
| 774 | * |
| 775 | * @group Events |
| 776 | * @source studio |
| 777 | * @page /dashboard/project/{ref}/reports/{id} |
| 778 | */ |
| 779 | export interface CustomReportAddSQLBlockClickedEvent { |
| 780 | action: 'custom_report_add_sql_block_clicked' |
| 781 | groups: TelemetryGroups |
| 782 | } |
| 783 | |
| 784 | /** |
| 785 | * User dragged and dropped a SQL block from the Assistant Panel into the custom report while on a custom report page. |
| 786 | * |
| 787 | * @group Events |
| 788 | * @source studio |
| 789 | * @page /dashboard/project/{ref}/reports/{id} |
| 790 | */ |
| 791 | export interface CustomReportAssistantSQLBlockAddedEvent { |
| 792 | action: 'custom_report_assistant_sql_block_added' |
| 793 | groups: TelemetryGroups |
| 794 | } |
| 795 | |
| 796 | /** |
| 797 | * User voted on the feedback button on a docs page. The feedback button is located at the sidebar of every docs page. |
| 798 | * |
| 799 | * @group Events |
| 800 | * @source docs |
| 801 | */ |
| 802 | export interface DocsFeedbackClickedEvent { |
| 803 | action: 'docs_feedback_clicked' |
| 804 | properties: { |
| 805 | /** |
| 806 | * 'yes' means clicking on the tick button, 'no' means clicking on the cross button. |
| 807 | */ |
| 808 | response: 'yes' | 'no' |
| 809 | } |
| 810 | } |
| 811 | |
| 812 | /** |
| 813 | * User clicked 'Copy as Markdown' option on a page. |
| 814 | * |
| 815 | * @group Events |
| 816 | * @source docs |
| 817 | */ |
| 818 | export interface CopyAsMarkdownEvent { |
| 819 | action: 'copy_as_markdown_clicked' |
| 820 | } |
| 821 | |
| 822 | /** |
| 823 | * User clicked "Ask..." to open a new window to consult an agent about the current page. |
| 824 | * |
| 825 | * @group Events |
| 826 | * @source docs |
| 827 | */ |
| 828 | export interface AskAIEvent { |
| 829 | action: 'ask_ai_clicked' |
| 830 | properties: { |
| 831 | agent: 'chatgpt' | 'claude' |
| 832 | } |
| 833 | } |
| 834 | |
| 835 | /** |
| 836 | * User clicked the framework quickstart card on the homepage, leading to the specific framework documentation. |
| 837 | * |
| 838 | * @group Events |
| 839 | * @source www |
| 840 | * @page / |
| 841 | */ |
| 842 | export interface HomepageFrameworkQuickstartClickedEvent { |
| 843 | action: 'homepage_framework_quickstart_clicked' |
| 844 | properties: { |
| 845 | /** |
| 846 | * The name of the framework quickstart card clicked. |
| 847 | */ |
| 848 | frameworkName: string |
| 849 | } |
| 850 | } |
| 851 | |
| 852 | /** |
| 853 | * User clicked on a product card in the homepage products section. |
| 854 | * |
| 855 | * @group Events |
| 856 | * @source www |
| 857 | * @page / |
| 858 | */ |
| 859 | export interface HomepageProductCardClickedEvent { |
| 860 | action: 'homepage_product_card_clicked' |
| 861 | properties: { |
| 862 | product: string |
| 863 | } |
| 864 | } |
| 865 | |
| 866 | /** |
| 867 | * User clicked on the CTA button on a plan in the pricing page. |
| 868 | * |
| 869 | * @group Events |
| 870 | * @source www |
| 871 | * @page /pricing |
| 872 | */ |
| 873 | export interface WwwPricingPlanCtaClickedEvent { |
| 874 | action: 'www_pricing_plan_cta_clicked' |
| 875 | properties: { |
| 876 | /** |
| 877 | * The plan type that was clicked. |
| 878 | */ |
| 879 | plan: string |
| 880 | /** |
| 881 | * Whether the upgrade now text is shown on the cta button. This is only shown when org is upgradeable and user is logged in. |
| 882 | */ |
| 883 | showUpgradeText: boolean |
| 884 | /** |
| 885 | * The section of the page where the plan was clicked. |
| 886 | * Main means the big top section of the page, |
| 887 | * comparison_table means the comparison table with all plans listed together below. |
| 888 | */ |
| 889 | section: 'main' | 'comparison_table' |
| 890 | tableMode?: 'mobile' | 'desktop' |
| 891 | } |
| 892 | groups?: Partial<TelemetryGroups> |
| 893 | } |
| 894 | |
| 895 | /** |
| 896 | * User clicked the main CTA button in an event page. |
| 897 | * |
| 898 | * @group Events |
| 899 | * @source www |
| 900 | * @page /events/* |
| 901 | */ |
| 902 | export interface EventPageCtaClickedEvent { |
| 903 | action: 'www_event_page_cta_clicked' |
| 904 | properties: { |
| 905 | /** |
| 906 | * The title of the event clicked. |
| 907 | */ |
| 908 | eventTitle: string |
| 909 | } |
| 910 | } |
| 911 | |
| 912 | /** |
| 913 | * User clicked the GitHub button in the homepage header section. The button is hidden in mobile view. |
| 914 | * |
| 915 | * @group Events |
| 916 | * @source www |
| 917 | * @page / |
| 918 | */ |
| 919 | export interface HomepageGitHubButtonClickedEvent { |
| 920 | action: 'homepage_github_button_clicked' |
| 921 | } |
| 922 | |
| 923 | /** |
| 924 | * User clicked the Discord button in the homepage community section. |
| 925 | * |
| 926 | * @group Events |
| 927 | * @source www |
| 928 | * @page / |
| 929 | */ |
| 930 | export interface HomepageDiscordButtonClickedEvent { |
| 931 | action: 'homepage_discord_button_clicked' |
| 932 | } |
| 933 | |
| 934 | /** |
| 935 | * User clicked a customer story card in the homepage. |
| 936 | * |
| 937 | * @group Events |
| 938 | * @source www |
| 939 | * @page / |
| 940 | */ |
| 941 | export interface HomepageCustomerStoryCardClickedEvent { |
| 942 | action: 'homepage_customer_story_card_clicked' |
| 943 | properties: { |
| 944 | customer?: string |
| 945 | /** |
| 946 | * The size of the card clicked. |
| 947 | */ |
| 948 | cardType: 'expanded' | 'narrow' |
| 949 | } |
| 950 | } |
| 951 | |
| 952 | /** |
| 953 | * User clicked the project template card in the homepage. |
| 954 | * |
| 955 | * @group Events |
| 956 | * @source www |
| 957 | * @page / |
| 958 | */ |
| 959 | export interface HomepageProjectTemplateCardClickedEvent { |
| 960 | action: 'homepage_project_template_card_clicked' |
| 961 | properties: { |
| 962 | /** |
| 963 | * The title of the project template card clicked. |
| 964 | */ |
| 965 | templateTitle: string |
| 966 | } |
| 967 | } |
| 968 | |
| 969 | /** |
| 970 | * User clicked the open source repository card. |
| 971 | * |
| 972 | * @group Events |
| 973 | * @source www |
| 974 | * @page /open-source |
| 975 | */ |
| 976 | export interface OpenSourceRepoCardClickedEvent { |
| 977 | action: 'open_source_repo_card_clicked' |
| 978 | properties: { |
| 979 | /** |
| 980 | * The name of the open source repository clicked. |
| 981 | */ |
| 982 | repoName: string |
| 983 | } |
| 984 | } |
| 985 | |
| 986 | /** |
| 987 | * User clicked the green "Start Project" button in various locations described in properties. |
| 988 | * |
| 989 | * @group Events |
| 990 | * @source www |
| 991 | */ |
| 992 | export interface StartProjectButtonClickedEvent { |
| 993 | action: 'start_project_button_clicked' |
| 994 | properties: { |
| 995 | /** |
| 996 | * The source of the button click, e.g. homepage hero, product page header. |
| 997 | */ |
| 998 | buttonLocation: string |
| 999 | } |
| 1000 | } |
| 1001 | |
| 1002 | /** |
| 1003 | * User clicked the "See Documentation" button usually next to the "Start Project" button in various locations described in properties. |
| 1004 | * |
| 1005 | * @group Events |
| 1006 | * @source www |
| 1007 | */ |
| 1008 | export interface SeeDocumentationButtonClickedEvent { |
| 1009 | action: 'see_documentation_button_clicked' |
| 1010 | properties: { |
| 1011 | /** |
| 1012 | * The source of the button click, e.g. homepage hero, product page header - product name. |
| 1013 | */ |
| 1014 | buttonLocation: string |
| 1015 | } |
| 1016 | } |
| 1017 | |
| 1018 | /** |
| 1019 | * User clicked the "Request a Demo" button in various locations described in properties. |
| 1020 | * |
| 1021 | * @group Events |
| 1022 | * @source www |
| 1023 | */ |
| 1024 | export interface RequestDemoButtonClickedEvent { |
| 1025 | action: 'request_demo_button_clicked' |
| 1026 | properties: { |
| 1027 | /** |
| 1028 | * The source of the button click, e.g. homepage hero, cta banner, product page header. |
| 1029 | * If it states it came from the request demo form, it can come from different pages so refer to path name to determine. |
| 1030 | */ |
| 1031 | buttonLocation: string |
| 1032 | } |
| 1033 | } |
| 1034 | |
| 1035 | /** |
| 1036 | * User clicked the sign-in button in various locations described in properties. |
| 1037 | * |
| 1038 | * @group Events |
| 1039 | * @source www |
| 1040 | */ |
| 1041 | export interface SignInButtonClickedEvent { |
| 1042 | action: 'sign_in_button_clicked' |
| 1043 | properties: { |
| 1044 | /** |
| 1045 | * The source of the button click, e.g. homepage hero, cta banner, product page header. |
| 1046 | */ |
| 1047 | buttonLocation: string |
| 1048 | } |
| 1049 | } |
| 1050 | |
| 1051 | /** |
| 1052 | * User clicked the "Help" button in the top right corner of the page header. |
| 1053 | * |
| 1054 | * @group Events |
| 1055 | * @source studio |
| 1056 | */ |
| 1057 | export interface HelpButtonClickedEvent { |
| 1058 | action: 'help_button_clicked' |
| 1059 | groups: Partial<TelemetryGroups> |
| 1060 | } |
| 1061 | |
| 1062 | /** |
| 1063 | * User clicked the "Send Feedback" button in the top right corner of the page header. |
| 1064 | * |
| 1065 | * @group Events |
| 1066 | * @source studio |
| 1067 | */ |
| 1068 | export interface SendFeedbackButtonClickedEvent { |
| 1069 | action: 'send_feedback_button_clicked' |
| 1070 | groups: Partial<TelemetryGroups> |
| 1071 | } |
| 1072 | |
| 1073 | /** |
| 1074 | * User clicked on an example project card. |
| 1075 | * |
| 1076 | * @group Events |
| 1077 | * @source studio |
| 1078 | * @page /project/{ref} |
| 1079 | */ |
| 1080 | export interface ExampleProjectCardClickedEvent { |
| 1081 | action: 'example_project_card_clicked' |
| 1082 | properties: { |
| 1083 | /** |
| 1084 | * The title of the example project card clicked. |
| 1085 | */ |
| 1086 | cardTitle: string |
| 1087 | } |
| 1088 | groups: TelemetryGroups |
| 1089 | } |
| 1090 | |
| 1091 | /** |
| 1092 | * User clicked the "Import Data" button. |
| 1093 | * |
| 1094 | * @group Events |
| 1095 | * @source studio |
| 1096 | * @page /dashboard/project/{ref}/editor |
| 1097 | */ |
| 1098 | export interface ImportDataButtonClickedEvent { |
| 1099 | action: 'import_data_button_clicked' |
| 1100 | properties: { |
| 1101 | /** |
| 1102 | * The type of table the data is imported to. |
| 1103 | * New Table means added when creating new table by clicking from New table sidebar, |
| 1104 | * Existing Table means added to an existing table by going to the table and clicking from the green Insert button.. |
| 1105 | */ |
| 1106 | tableType: 'New Table' | 'Existing Table' |
| 1107 | } |
| 1108 | groups: TelemetryGroups |
| 1109 | } |
| 1110 | |
| 1111 | /** |
| 1112 | * User added a file to the import data dropzone on an empty table. |
| 1113 | * |
| 1114 | * @group Events |
| 1115 | * @source studio |
| 1116 | * @page /dashboard/project/{ref}/editor |
| 1117 | */ |
| 1118 | export interface ImportDataFileAddedEvent { |
| 1119 | action: 'import_data_dropzone_file_added' |
| 1120 | groups: TelemetryGroups |
| 1121 | } |
| 1122 | |
| 1123 | /** |
| 1124 | * User added data from the import data via CSV/spreadsheet successfully. |
| 1125 | * |
| 1126 | * @group Events |
| 1127 | * @source studio |
| 1128 | * @page /dashboard/project/{ref}/editor |
| 1129 | */ |
| 1130 | export interface ImportDataAddedEvent { |
| 1131 | action: 'import_data_added' |
| 1132 | groups: TelemetryGroups |
| 1133 | } |
| 1134 | |
| 1135 | /** |
| 1136 | * User clicked the run query button in the SQL editor. |
| 1137 | * |
| 1138 | * @group Events |
| 1139 | * @source studio |
| 1140 | * @page /dashboard/project/{ref}/sql/{id} |
| 1141 | */ |
| 1142 | export interface SqlEditorQueryRunButtonClickedEvent { |
| 1143 | action: 'sql_editor_query_run_button_clicked' |
| 1144 | groups: TelemetryGroups |
| 1145 | } |
| 1146 | |
| 1147 | /** |
| 1148 | * User clicked on the CTA button on a plan in the pricing side panel in studio. |
| 1149 | * |
| 1150 | * @group Events |
| 1151 | * @source studio |
| 1152 | * @page /billing?panel=subscriptionPlan |
| 1153 | */ |
| 1154 | export interface StudioPricingPlanCtaClickedEvent { |
| 1155 | action: 'studio_pricing_plan_cta_clicked' |
| 1156 | properties: { |
| 1157 | /** |
| 1158 | * The plan type that was clicked. |
| 1159 | */ |
| 1160 | selectedPlan: string |
| 1161 | /** |
| 1162 | * The plan type the org is currently on. |
| 1163 | */ |
| 1164 | currentPlan?: string |
| 1165 | } |
| 1166 | groups: Omit<TelemetryGroups, 'project'> |
| 1167 | } |
| 1168 | |
| 1169 | /** |
| 1170 | * User opened the pricing side panel in studio. |
| 1171 | * |
| 1172 | * @group Events |
| 1173 | * @source studio |
| 1174 | * @page /billing?panel=subscriptionPlan |
| 1175 | */ |
| 1176 | export interface StudioPricingSidePanelOpenedEvent { |
| 1177 | action: 'studio_pricing_side_panel_opened' |
| 1178 | properties: { |
| 1179 | currentPlan?: string |
| 1180 | /** |
| 1181 | * Tracks how user landed on the Pricing side panel, e.g. diskManagementPanelDiskSize, backupsRestoreToNewProject |
| 1182 | */ |
| 1183 | origin?: string |
| 1184 | } |
| 1185 | groups: Omit<TelemetryGroups, 'project'> |
| 1186 | } |
| 1187 | |
| 1188 | /** |
| 1189 | * User clicks on grafana banner in studio Reports page. |
| 1190 | * |
| 1191 | * @group Events |
| 1192 | * @source studio |
| 1193 | * @page /reports/database |
| 1194 | */ |
| 1195 | export interface ReportsDatabaseGrafanaBannerClickedEvent { |
| 1196 | action: 'reports_database_grafana_banner_clicked' |
| 1197 | groups: TelemetryGroups |
| 1198 | } |
| 1199 | |
| 1200 | /** |
| 1201 | * User clicks on Metrics API banner CTA button in studio Observability pages. |
| 1202 | * |
| 1203 | * @group Events |
| 1204 | * @source studio |
| 1205 | * @page /observability/* |
| 1206 | */ |
| 1207 | export interface MetricsAPIBannerCtaButtonClickedEvent { |
| 1208 | action: 'metrics_api_banner_cta_button_clicked' |
| 1209 | groups: TelemetryGroups |
| 1210 | } |
| 1211 | |
| 1212 | /** |
| 1213 | * User clicked the dismiss button on a banner in studio Observability pages. |
| 1214 | * |
| 1215 | * @group Events |
| 1216 | * @source studio |
| 1217 | * @page /observability/* |
| 1218 | */ |
| 1219 | export interface MetricsAPIBannerDismissButtonClickedEvent { |
| 1220 | action: 'metrics_api_banner_dismiss_button_clicked' |
| 1221 | groups: TelemetryGroups |
| 1222 | } |
| 1223 | |
| 1224 | /** |
| 1225 | * User clicked the enable button for Index Advisor, either from the banner or the confirmation dialog. |
| 1226 | * |
| 1227 | * @group Events |
| 1228 | * @source studio |
| 1229 | * @page /observability/query-performance |
| 1230 | */ |
| 1231 | export interface IndexAdvisorEnableButtonClickedEvent { |
| 1232 | action: 'index_advisor_enable_button_clicked' |
| 1233 | properties: { |
| 1234 | origin: 'banner' | 'dialog' |
| 1235 | } |
| 1236 | groups: TelemetryGroups |
| 1237 | } |
| 1238 | |
| 1239 | /** |
| 1240 | * Index Advisor banner dimissed event. |
| 1241 | * |
| 1242 | * @group Events |
| 1243 | * @source studio |
| 1244 | * @page /observability/query-performance |
| 1245 | */ |
| 1246 | export interface IndexAdvisorBannerDismissButtonClickedEvent { |
| 1247 | action: 'index_advisor_banner_dismiss_button_clicked' |
| 1248 | groups: TelemetryGroups |
| 1249 | } |
| 1250 | |
| 1251 | /** |
| 1252 | * Index Advisor tab clicked event. |
| 1253 | * |
| 1254 | * @group Events |
| 1255 | * @source studio |
| 1256 | * @page /observability/query-performance |
| 1257 | */ |
| 1258 | export interface IndexAdvisorTabClickedEvent { |
| 1259 | action: 'index_advisor_tab_clicked' |
| 1260 | properties: { |
| 1261 | hasRecommendations: boolean |
| 1262 | isIndexAdvisorEnabled: boolean |
| 1263 | } |
| 1264 | groups: TelemetryGroups |
| 1265 | } |
| 1266 | |
| 1267 | /** |
| 1268 | * Index Advisor create indexes button clicked event. |
| 1269 | * |
| 1270 | * @group Events |
| 1271 | * @source studio |
| 1272 | * @page /observability/query-performance |
| 1273 | */ |
| 1274 | export interface IndexAdvisorCreateIndexesButtonClickedEvent { |
| 1275 | action: 'index_advisor_create_indexes_button_clicked' |
| 1276 | groups: TelemetryGroups |
| 1277 | } |
| 1278 | |
| 1279 | /** |
| 1280 | * User clicked the deploy button for an Edge Function. |
| 1281 | * |
| 1282 | * @group Events |
| 1283 | * @source studio |
| 1284 | * @page /dashboard/project/{ref}/functions/new |
| 1285 | */ |
| 1286 | export interface EdgeFunctionDeployButtonClickedEvent { |
| 1287 | action: 'edge_function_deploy_button_clicked' |
| 1288 | properties: { |
| 1289 | /** |
| 1290 | * Click on Deploy can either happen: |
| 1291 | * 1. in the functions editor page |
| 1292 | * 2. in the chat button in the functions editor |
| 1293 | */ |
| 1294 | origin: 'functions_editor' | 'functions_ai_assistant' |
| 1295 | } |
| 1296 | groups: TelemetryGroups |
| 1297 | } |
| 1298 | |
| 1299 | /** |
| 1300 | * User clicked the confirm deploy updates button for an Edge Function in the code page within the warning model. |
| 1301 | * |
| 1302 | * @group Events |
| 1303 | * @source studio |
| 1304 | * @page /dashboard/project/{ref}/functions/{id}/code |
| 1305 | */ |
| 1306 | export interface EdgeFunctionDeployUpdatesConfirmClickedEvent { |
| 1307 | action: 'edge_function_deploy_updates_confirm_clicked' |
| 1308 | groups: TelemetryGroups |
| 1309 | } |
| 1310 | |
| 1311 | /** |
| 1312 | * User clicked the AI Assistant button to create an Edge Function. |
| 1313 | * |
| 1314 | * @group Events |
| 1315 | * @source studio |
| 1316 | * @page /dashboard/project/{ref}/functions |
| 1317 | */ |
| 1318 | export interface EdgeFunctionAiAssistantButtonClickedEvent { |
| 1319 | action: 'edge_function_ai_assistant_button_clicked' |
| 1320 | properties: { |
| 1321 | /** |
| 1322 | * Click on AI Assistant can either happen: |
| 1323 | * 1. on the main block when there are no functions |
| 1324 | * 2. in the secondary action section of the page |
| 1325 | * 3. on the chat button in the functions editor |
| 1326 | */ |
| 1327 | origin: 'no_functions_block' | 'secondary_action' | 'functions_editor_chat' |
| 1328 | } |
| 1329 | groups: TelemetryGroups |
| 1330 | } |
| 1331 | |
| 1332 | /** |
| 1333 | * User clicked the button to go to the functions editor page to create an edge function. |
| 1334 | * |
| 1335 | * @group Events |
| 1336 | * @source studio |
| 1337 | * @page /dashboard/project/{ref}/functions |
| 1338 | */ |
| 1339 | export interface EdgeFunctionViaEditorButtonClickedEvent { |
| 1340 | action: 'edge_function_via_editor_button_clicked' |
| 1341 | properties: { |
| 1342 | /** |
| 1343 | * Click on Via Editor can either happen: |
| 1344 | * 1. on the main block when there are no functions |
| 1345 | * 2. in the secondary action section of the page |
| 1346 | */ |
| 1347 | origin: 'no_functions_block' | 'secondary_action' |
| 1348 | } |
| 1349 | groups: TelemetryGroups |
| 1350 | } |
| 1351 | |
| 1352 | /** |
| 1353 | * User clicked on an Edge Function template. |
| 1354 | * |
| 1355 | * @group Events |
| 1356 | * @source studio |
| 1357 | * @page /dashboard/project/{ref}/functions |
| 1358 | */ |
| 1359 | export interface EdgeFunctionTemplateClickedEvent { |
| 1360 | action: 'edge_function_template_clicked' |
| 1361 | properties: { |
| 1362 | templateName: string |
| 1363 | /** |
| 1364 | * Where the edge function template was clicked from: |
| 1365 | * 1. functions page |
| 1366 | * 2. editor page |
| 1367 | */ |
| 1368 | origin: 'functions_page' | 'editor_page' |
| 1369 | } |
| 1370 | groups: TelemetryGroups |
| 1371 | } |
| 1372 | |
| 1373 | /** |
| 1374 | * User clicked the button to create an edge function via CLI. |
| 1375 | * |
| 1376 | * @group Events |
| 1377 | * @source studio |
| 1378 | * @page /dashboard/project/{ref}/functions |
| 1379 | */ |
| 1380 | export interface EdgeFunctionViaCliButtonClickedEvent { |
| 1381 | action: 'edge_function_via_cli_button_clicked' |
| 1382 | properties: { |
| 1383 | /** |
| 1384 | * Click on Via CLI can either happen: |
| 1385 | * 1. on the main block when there are no functions |
| 1386 | * 2. in the secondary action section of the page |
| 1387 | */ |
| 1388 | origin: 'no_functions_block' | 'secondary_action' |
| 1389 | } |
| 1390 | groups: TelemetryGroups |
| 1391 | } |
| 1392 | |
| 1393 | /** |
| 1394 | * User clicked the deploy updates button for an edge function. |
| 1395 | * |
| 1396 | * @group Events |
| 1397 | * @source studio |
| 1398 | * @page /dashboard/project/{ref}/functions/{id}/code |
| 1399 | */ |
| 1400 | export interface EdgeFunctionDeployUpdatesButtonClickedEvent { |
| 1401 | action: 'edge_function_deploy_updates_button_clicked' |
| 1402 | groups: TelemetryGroups |
| 1403 | } |
| 1404 | |
| 1405 | /** |
| 1406 | * User clicked the Send Request button for testing an Edge Function. |
| 1407 | * |
| 1408 | * @group Events |
| 1409 | * @source studio |
| 1410 | * @page /dashboard/project/{ref}/functions/{id} |
| 1411 | */ |
| 1412 | export interface EdgeFunctionTestSendButtonClickedEvent { |
| 1413 | action: 'edge_function_test_send_button_clicked' |
| 1414 | properties: { |
| 1415 | /** |
| 1416 | * The HTTP method used for the test request, e.g., GET, POST. |
| 1417 | */ |
| 1418 | httpMethod: string |
| 1419 | } |
| 1420 | groups: TelemetryGroups |
| 1421 | } |
| 1422 | |
| 1423 | /** |
| 1424 | * User opened the side panel for testing an edge function. |
| 1425 | * |
| 1426 | * @group Events |
| 1427 | * @source studio |
| 1428 | * @page /dashboard/project/{ref}/functions/{id} |
| 1429 | */ |
| 1430 | export interface EdgeFunctionTestSidePanelOpenedEvent { |
| 1431 | action: 'edge_function_test_side_panel_opened' |
| 1432 | groups: TelemetryGroups |
| 1433 | } |
| 1434 | |
| 1435 | /** |
| 1436 | * User submitted a support ticket. Project and organization are optional because the ticket might be about user account issues. |
| 1437 | * |
| 1438 | * @group Events |
| 1439 | * @source studio |
| 1440 | * @page /dashboard/support/new |
| 1441 | */ |
| 1442 | export interface SupportTicketSubmittedEvent { |
| 1443 | action: 'support_ticket_submitted' |
| 1444 | properties: { |
| 1445 | ticketCategory: string |
| 1446 | } |
| 1447 | groups: Partial<TelemetryGroups> |
| 1448 | } |
| 1449 | |
| 1450 | /** |
| 1451 | * User clicked the AI Assistant card on top of the support ticket form. |
| 1452 | * This event is specifically when the user goes back to the AI Assistant in the Studio. |
| 1453 | * |
| 1454 | * @group Events |
| 1455 | * @source studio |
| 1456 | * @page /dashboard/support/new |
| 1457 | */ |
| 1458 | export interface AiAssistantInSupportFormClickedEvent { |
| 1459 | action: 'ai_assistant_in_support_form_clicked' |
| 1460 | groups: Partial<TelemetryGroups> |
| 1461 | } |
| 1462 | |
| 1463 | /** |
| 1464 | * User rated an AI assistant message with thumbs up or thumbs down. |
| 1465 | * |
| 1466 | * @group Events |
| 1467 | * @source studio |
| 1468 | */ |
| 1469 | export interface AssistantMessageRatingSubmittedEvent { |
| 1470 | action: 'assistant_message_rating_submitted' |
| 1471 | properties: { |
| 1472 | /** |
| 1473 | * The rating given by the user: positive (thumbs up) or negative (thumbs down) |
| 1474 | */ |
| 1475 | rating: 'positive' | 'negative' |
| 1476 | /** |
| 1477 | * The category of the conversation |
| 1478 | */ |
| 1479 | category: |
| 1480 | | 'sql_generation' |
| 1481 | | 'schema_design' |
| 1482 | | 'rls_policies' |
| 1483 | | 'edge_functions' |
| 1484 | | 'database_optimization' |
| 1485 | | 'debugging' |
| 1486 | | 'general_help' |
| 1487 | | 'other' |
| 1488 | /** Optional reason provided by the user when rating negatively */ |
| 1489 | reason?: string |
| 1490 | /** UUID of the chat session in which the message was rated */ |
| 1491 | chatId?: string |
| 1492 | } |
| 1493 | groups: TelemetryGroups |
| 1494 | } |
| 1495 | |
| 1496 | /** |
| 1497 | * User copied the command for a Briven UI component. |
| 1498 | * |
| 1499 | * @group Events |
| 1500 | * @source briven-ui |
| 1501 | * @page /ui/docs/{framework}/{templateTitle} |
| 1502 | */ |
| 1503 | export interface BrivenUiCommandCopyButtonClickedEvent { |
| 1504 | action: 'briven_ui_command_copy_button_clicked' |
| 1505 | properties: { |
| 1506 | templateTitle: string |
| 1507 | command: string |
| 1508 | framework: 'nextjs' | 'react-router' | 'tanstack' | 'react' | 'vue' | 'nuxtjs' |
| 1509 | packageManager: 'npm' | 'pnpm' | 'yarn' | 'bun' |
| 1510 | } |
| 1511 | } |
| 1512 | |
| 1513 | /** |
| 1514 | * Triggered when the organization MFA enforcement setting is updated. |
| 1515 | * |
| 1516 | * @group Events |
| 1517 | * @source studio |
| 1518 | * @page /dashboard/org/{slug}/security |
| 1519 | */ |
| 1520 | export interface OrganizationMfaEnforcementUpdatedEvent { |
| 1521 | action: 'organization_mfa_enforcement_updated' |
| 1522 | properties: { |
| 1523 | mfaEnforced: boolean |
| 1524 | } |
| 1525 | groups: Omit<TelemetryGroups, 'project'> |
| 1526 | } |
| 1527 | |
| 1528 | /** |
| 1529 | * Triggered when a new foreign data wrapper is created in a project. |
| 1530 | * |
| 1531 | * @group Events |
| 1532 | * @source studio |
| 1533 | * @page /dashboard/project/{ref}/database/integrations |
| 1534 | */ |
| 1535 | export interface ForeignDataWrapperCreatedEvent { |
| 1536 | action: 'foreign_data_wrapper_created' |
| 1537 | properties: { |
| 1538 | /** |
| 1539 | * The type of the foreign data wrapper, e.g. postgres_fdw, mysql_fdw, etc. |
| 1540 | */ |
| 1541 | wrapperType: string |
| 1542 | } |
| 1543 | groups: TelemetryGroups |
| 1544 | } |
| 1545 | |
| 1546 | /** |
| 1547 | * Triggered when a new storage bucket is created in a project. |
| 1548 | * |
| 1549 | * @group Events |
| 1550 | * @source studio |
| 1551 | * @page /dashboard/project/{ref}/storage/buckets |
| 1552 | */ |
| 1553 | export interface StorageBucketCreatedEvent { |
| 1554 | action: 'storage_bucket_created' |
| 1555 | properties: { |
| 1556 | /** |
| 1557 | * The type of the bucket created. E.g. standard or analytics iceberg. |
| 1558 | */ |
| 1559 | bucketType?: string |
| 1560 | } |
| 1561 | groups: TelemetryGroups |
| 1562 | } |
| 1563 | |
| 1564 | /** |
| 1565 | * Triggered when a new branch is created. |
| 1566 | * |
| 1567 | * @group Events |
| 1568 | * @source studio |
| 1569 | * @page /dashboard/project/{ref}/branches |
| 1570 | */ |
| 1571 | export interface BranchCreateButtonClickedEvent { |
| 1572 | action: 'branch_create_button_clicked' |
| 1573 | properties: { |
| 1574 | /** |
| 1575 | * The type of branch created, e.g. preview, persistent |
| 1576 | */ |
| 1577 | branchType: 'preview' | 'persistent' |
| 1578 | /** |
| 1579 | * Whether the branch was created with a git branch association |
| 1580 | */ |
| 1581 | gitlessBranching: boolean |
| 1582 | } |
| 1583 | groups: TelemetryGroups |
| 1584 | } |
| 1585 | |
| 1586 | /** |
| 1587 | * Triggered when a branch delete button is clicked. |
| 1588 | * |
| 1589 | * @group Events |
| 1590 | * @source studio |
| 1591 | * @page /dashboard/project/{ref}/branches |
| 1592 | */ |
| 1593 | export interface BranchDeleteButtonClickedEvent { |
| 1594 | action: 'branch_delete_button_clicked' |
| 1595 | properties: { |
| 1596 | /** |
| 1597 | * The type of branch being deleted, e.g. preview, persistent |
| 1598 | */ |
| 1599 | branchType?: 'preview' | 'persistent' |
| 1600 | /** |
| 1601 | * Where the delete action was initiated from |
| 1602 | */ |
| 1603 | origin: 'branches_page' | 'merge_page' |
| 1604 | } |
| 1605 | groups: TelemetryGroups |
| 1606 | } |
| 1607 | |
| 1608 | /** |
| 1609 | * Triggered when a create merge request is clicked for a branch. |
| 1610 | * |
| 1611 | * @group Events |
| 1612 | * @source studio |
| 1613 | * @page /dashboard/project/{ref}/branches |
| 1614 | */ |
| 1615 | export interface BranchCreateMergeRequestButtonClickedEvent { |
| 1616 | action: 'branch_create_merge_request_button_clicked' |
| 1617 | properties: { |
| 1618 | /** |
| 1619 | * The type of branch being merged, e.g. preview, persistent |
| 1620 | */ |
| 1621 | branchType: 'preview' | 'persistent' |
| 1622 | origin: 'header' | 'merge_page' | 'branch_selector' |
| 1623 | } |
| 1624 | groups: TelemetryGroups |
| 1625 | } |
| 1626 | |
| 1627 | /** |
| 1628 | * Triggered when a merge request is closed. |
| 1629 | * |
| 1630 | * @group Events |
| 1631 | * @source studio |
| 1632 | * @page /dashboard/project/{ref}/branches/merge-requests |
| 1633 | */ |
| 1634 | export interface BranchCloseMergeRequestButtonClickedEvent { |
| 1635 | action: 'branch_close_merge_request_button_clicked' |
| 1636 | groups: TelemetryGroups |
| 1637 | } |
| 1638 | |
| 1639 | /** |
| 1640 | * Triggered when a user clicks the merge button successfully to attempt merging a branch. |
| 1641 | * |
| 1642 | * @group Events |
| 1643 | * @source studio |
| 1644 | * @page /dashboard/project/{ref}/merge |
| 1645 | */ |
| 1646 | export interface BranchMergeSubmittedEvent { |
| 1647 | action: 'branch_merge_submitted' |
| 1648 | groups: TelemetryGroups |
| 1649 | } |
| 1650 | |
| 1651 | /** |
| 1652 | * Triggered when a branch merge completes successfully. Previously: branch_merge_succeeded |
| 1653 | * |
| 1654 | * @group Events |
| 1655 | * @source studio |
| 1656 | * @page /dashboard/project/{ref}/merge |
| 1657 | */ |
| 1658 | export interface BranchMergeCompletedEvent { |
| 1659 | action: 'branch_merge_completed' |
| 1660 | properties: { |
| 1661 | /** |
| 1662 | * The type of branch being merged, e.g. preview, persistent |
| 1663 | */ |
| 1664 | branchType: 'preview' | 'persistent' |
| 1665 | } |
| 1666 | groups: TelemetryGroups |
| 1667 | } |
| 1668 | |
| 1669 | /** |
| 1670 | * Triggered when a branch merge fails. |
| 1671 | * |
| 1672 | * @group Events |
| 1673 | * @source studio |
| 1674 | * @page /dashboard/project/{ref}/merge |
| 1675 | */ |
| 1676 | export interface BranchMergeFailedEvent { |
| 1677 | action: 'branch_merge_failed' |
| 1678 | properties: { |
| 1679 | /** |
| 1680 | * The type of branch being merged, e.g. preview, persistent |
| 1681 | */ |
| 1682 | branchType: 'preview' | 'persistent' |
| 1683 | /** |
| 1684 | * The error message or reason for failure |
| 1685 | */ |
| 1686 | error?: string |
| 1687 | } |
| 1688 | groups: TelemetryGroups |
| 1689 | } |
| 1690 | |
| 1691 | /** |
| 1692 | * Triggered when a branch is updated on push with latest changes from production. |
| 1693 | * Does not include renaming and linking to GitHub branch. |
| 1694 | * |
| 1695 | * @group Events |
| 1696 | * @source studio |
| 1697 | * @page /dashboard/project/{ref}/merge |
| 1698 | */ |
| 1699 | export interface BranchUpdatedEvent { |
| 1700 | action: 'branch_updated' |
| 1701 | properties: { |
| 1702 | /** |
| 1703 | * The source of the update action |
| 1704 | */ |
| 1705 | source: 'merge_page' | 'out_of_date_notice' |
| 1706 | modifiedEdgeFunctions?: boolean |
| 1707 | } |
| 1708 | groups: TelemetryGroups |
| 1709 | } |
| 1710 | |
| 1711 | /** |
| 1712 | * Triggered when a user clicks the review with assistant button for a merge. |
| 1713 | * |
| 1714 | * @group Events |
| 1715 | * @source studio |
| 1716 | * @page /dashboard/project/{ref}/merge |
| 1717 | */ |
| 1718 | export interface BranchReviewWithAssistantClickedEvent { |
| 1719 | action: 'branch_review_with_assistant_clicked' |
| 1720 | groups: TelemetryGroups |
| 1721 | } |
| 1722 | |
| 1723 | /** |
| 1724 | * Triggered when a user selects a branch from the branch selector dropdown. |
| 1725 | * |
| 1726 | * @group Events |
| 1727 | * @source studio |
| 1728 | * @page branch selector (header / sheet / popover) |
| 1729 | */ |
| 1730 | export interface BranchSelectorBranchClickedEvent { |
| 1731 | action: 'branch_selector_branch_clicked' |
| 1732 | properties: { |
| 1733 | branchId: string |
| 1734 | branchName: string |
| 1735 | } |
| 1736 | groups: TelemetryGroups |
| 1737 | } |
| 1738 | |
| 1739 | /** |
| 1740 | * Triggered when a user clicks "Create branch" in the branch selector dropdown. |
| 1741 | * |
| 1742 | * @group Events |
| 1743 | * @source studio |
| 1744 | * @page branch selector (header / sheet / popover) |
| 1745 | */ |
| 1746 | export interface BranchSelectorCreateClickedEvent { |
| 1747 | action: 'branch_selector_create_clicked' |
| 1748 | groups: TelemetryGroups |
| 1749 | } |
| 1750 | |
| 1751 | /** |
| 1752 | * Triggered when a user clicks "Manage branches" in the branch selector dropdown. |
| 1753 | * |
| 1754 | * @group Events |
| 1755 | * @source studio |
| 1756 | * @page branch selector (header / sheet / popover) |
| 1757 | */ |
| 1758 | export interface BranchSelectorManageClickedEvent { |
| 1759 | action: 'branch_selector_manage_clicked' |
| 1760 | groups: TelemetryGroups |
| 1761 | } |
| 1762 | |
| 1763 | /** |
| 1764 | * User clicked on a DPA PDF link to open it. |
| 1765 | * |
| 1766 | * @group Events |
| 1767 | * @source www, studio |
| 1768 | */ |
| 1769 | export interface DpaPdfOpenedEvent { |
| 1770 | action: 'dpa_pdf_opened' |
| 1771 | properties: { |
| 1772 | /** |
| 1773 | * The source of the click, e.g. www, studio |
| 1774 | */ |
| 1775 | source: 'www' | 'studio' |
| 1776 | } |
| 1777 | } |
| 1778 | |
| 1779 | /** |
| 1780 | * User clicked on an activity stat in HomeV2. |
| 1781 | * |
| 1782 | * @group Events |
| 1783 | * @source studio |
| 1784 | * @page /project/{ref} |
| 1785 | */ |
| 1786 | export interface HomeActivityStatClickedEvent { |
| 1787 | action: 'home_activity_stat_clicked' |
| 1788 | properties: { |
| 1789 | /** |
| 1790 | * The type of activity stat clicked |
| 1791 | */ |
| 1792 | stat_type: 'migrations' | 'backups' | 'branches' |
| 1793 | /** |
| 1794 | * The current value of the stat |
| 1795 | */ |
| 1796 | stat_value: number |
| 1797 | } |
| 1798 | groups: TelemetryGroups |
| 1799 | } |
| 1800 | |
| 1801 | /** |
| 1802 | * User clicked on a service title in Project Usage section of HomeV2. |
| 1803 | * |
| 1804 | * @group Events |
| 1805 | * @source studio |
| 1806 | * @page /project/{ref} |
| 1807 | */ |
| 1808 | export interface HomeProjectUsageServiceClickedEvent { |
| 1809 | action: 'home_project_usage_service_clicked' |
| 1810 | properties: { |
| 1811 | /** |
| 1812 | * The service that was clicked |
| 1813 | */ |
| 1814 | service_type: 'db' | 'functions' | 'auth' | 'storage' | 'realtime' |
| 1815 | /** |
| 1816 | * Total requests for this service |
| 1817 | */ |
| 1818 | total_requests: number |
| 1819 | /** |
| 1820 | * Number of errors for this service (optional, only sent when error data is available) |
| 1821 | */ |
| 1822 | error_count?: number |
| 1823 | } |
| 1824 | groups: TelemetryGroups |
| 1825 | } |
| 1826 | |
| 1827 | /** |
| 1828 | * User clicked on a bar in the usage chart in HomeV2. |
| 1829 | * |
| 1830 | * @group Events |
| 1831 | * @source studio |
| 1832 | * @page /project/{ref} |
| 1833 | */ |
| 1834 | export interface HomeProjectUsageChartClickedEvent { |
| 1835 | action: 'home_project_usage_chart_clicked' |
| 1836 | properties: { |
| 1837 | /** |
| 1838 | * The service type for this chart |
| 1839 | */ |
| 1840 | service_type: 'db' | 'functions' | 'auth' | 'storage' | 'realtime' |
| 1841 | /** |
| 1842 | * Timestamp of the bar clicked |
| 1843 | */ |
| 1844 | bar_timestamp: string |
| 1845 | } |
| 1846 | groups: TelemetryGroups |
| 1847 | } |
| 1848 | |
| 1849 | /** |
| 1850 | * User added a block to the custom report in HomeV2. |
| 1851 | * |
| 1852 | * @group Events |
| 1853 | * @source studio |
| 1854 | * @page /project/{ref} |
| 1855 | */ |
| 1856 | export interface HomeCustomReportBlockAddedEvent { |
| 1857 | action: 'home_custom_report_block_added' |
| 1858 | properties: { |
| 1859 | /** |
| 1860 | * ID of the snippet/block added |
| 1861 | */ |
| 1862 | block_id: string |
| 1863 | /** |
| 1864 | * If position is 0 it is equivalent to 'Add your first chart'. |
| 1865 | */ |
| 1866 | position: number |
| 1867 | } |
| 1868 | groups: TelemetryGroups |
| 1869 | } |
| 1870 | |
| 1871 | /** |
| 1872 | * User removed a block from the custom report in HomeV2. |
| 1873 | * |
| 1874 | * @group Events |
| 1875 | * @source studio |
| 1876 | * @page /project/{ref} |
| 1877 | */ |
| 1878 | export interface HomeCustomReportBlockRemovedEvent { |
| 1879 | action: 'home_custom_report_block_removed' |
| 1880 | properties: { |
| 1881 | /** |
| 1882 | * ID of the block removed |
| 1883 | */ |
| 1884 | block_id: string |
| 1885 | } |
| 1886 | groups: TelemetryGroups |
| 1887 | } |
| 1888 | |
| 1889 | /** |
| 1890 | * Connect section was shown to the user on the project homepage. |
| 1891 | * |
| 1892 | * @group Events |
| 1893 | * @source studio |
| 1894 | * @page /project/{ref} |
| 1895 | */ |
| 1896 | export interface HomeConnectSectionExposedEvent { |
| 1897 | action: 'home_connect_section_exposed' |
| 1898 | groups: TelemetryGroups |
| 1899 | } |
| 1900 | |
| 1901 | /** |
| 1902 | * User clicked a connect action tile in the Connect section on the project homepage. |
| 1903 | * |
| 1904 | * @group Events |
| 1905 | * @source studio |
| 1906 | * @page /project/{ref} |
| 1907 | */ |
| 1908 | export interface HomeConnectActionClickedEvent { |
| 1909 | action: 'home_connect_action_clicked' |
| 1910 | properties: { |
| 1911 | /** |
| 1912 | * The connect action/tile that was clicked |
| 1913 | */ |
| 1914 | mode: 'framework' | 'direct' | 'orm' | 'mcp' | 'api_keys' |
| 1915 | } |
| 1916 | groups: TelemetryGroups |
| 1917 | } |
| 1918 | |
| 1919 | /** |
| 1920 | * User opened the ConnectSheet panel. |
| 1921 | * |
| 1922 | * @group Events |
| 1923 | * @source studio |
| 1924 | * @page /project/{ref} |
| 1925 | */ |
| 1926 | export interface ConnectSheetOpenedEvent { |
| 1927 | action: 'connect_sheet_opened' |
| 1928 | properties: { |
| 1929 | /** |
| 1930 | * Where the sheet was opened from |
| 1931 | */ |
| 1932 | source: 'header_button' | 'connect_section' |
| 1933 | } |
| 1934 | groups: TelemetryGroups |
| 1935 | } |
| 1936 | |
| 1937 | /** |
| 1938 | * User reordered sections in HomeV2 using drag and drop. |
| 1939 | * |
| 1940 | * @group Events |
| 1941 | * @source studio |
| 1942 | * @page /project/{ref} |
| 1943 | */ |
| 1944 | export interface HomeSectionRowsMovedEvent { |
| 1945 | action: 'home_section_rows_moved' |
| 1946 | properties: { |
| 1947 | /** |
| 1948 | * The section that was moved |
| 1949 | */ |
| 1950 | section_moved: string |
| 1951 | /** |
| 1952 | * The old position of the section (0-based index) |
| 1953 | */ |
| 1954 | old_position: number |
| 1955 | /** |
| 1956 | * The new position of the section (0-based index) |
| 1957 | */ |
| 1958 | new_position: number |
| 1959 | } |
| 1960 | groups: TelemetryGroups |
| 1961 | } |
| 1962 | |
| 1963 | /** |
| 1964 | * User clicked the Request DPA button to open the confirmation modal. |
| 1965 | * |
| 1966 | * @group Events |
| 1967 | * @source studio |
| 1968 | * @page /dashboard/org/{slug}/documents |
| 1969 | */ |
| 1970 | export interface DpaRequestButtonClickedEvent { |
| 1971 | action: 'dpa_request_button_clicked' |
| 1972 | groups: Omit<TelemetryGroups, 'project'> |
| 1973 | } |
| 1974 | |
| 1975 | /** |
| 1976 | * User clicked a document view/download button to access a document. |
| 1977 | * |
| 1978 | * @group Events |
| 1979 | * @source studio |
| 1980 | * @page /dashboard/org/{slug}/documents |
| 1981 | */ |
| 1982 | export interface DocumentViewButtonClickedEvent { |
| 1983 | action: 'document_view_button_clicked' |
| 1984 | properties: { |
| 1985 | /** |
| 1986 | * The name of the document being viewed, e.g. TIA, SOC2, Standard Security Questionnaire |
| 1987 | */ |
| 1988 | documentName: 'TIA' | 'SOC2' | 'ISO27001' | 'Standard Security Questionnaire' |
| 1989 | } |
| 1990 | groups: Omit<TelemetryGroups, 'project'> |
| 1991 | } |
| 1992 | |
| 1993 | /** |
| 1994 | * User clicked the Request HIPAA button to open the HIPAA request form. |
| 1995 | * |
| 1996 | * @group Events |
| 1997 | * @source studio |
| 1998 | * @page /dashboard/org/{slug}/documents |
| 1999 | */ |
| 2000 | export interface HipaaRequestButtonClickedEvent { |
| 2001 | action: 'hipaa_request_button_clicked' |
| 2002 | groups: Omit<TelemetryGroups, 'project'> |
| 2003 | } |
| 2004 | |
| 2005 | /** |
| 2006 | * User successfully created a table in the project. |
| 2007 | * |
| 2008 | * @group Events |
| 2009 | * @source studio |
| 2010 | * @page /dashboard/project/{ref}/editor or /dashboard/project/{ref}/sql |
| 2011 | */ |
| 2012 | export interface TableCreatedEvent { |
| 2013 | action: 'table_created' |
| 2014 | properties: { |
| 2015 | /** |
| 2016 | * Method used to create the table |
| 2017 | */ |
| 2018 | method: 'sql_editor' | 'table_editor' |
| 2019 | /** |
| 2020 | * Schema where table was created |
| 2021 | */ |
| 2022 | schema_name?: string |
| 2023 | /** |
| 2024 | * Name of the table created |
| 2025 | */ |
| 2026 | table_name?: string |
| 2027 | /** |
| 2028 | * Whether RLS policies were generated and saved with the table |
| 2029 | */ |
| 2030 | has_generated_policies?: boolean |
| 2031 | } |
| 2032 | groups: Partial<TelemetryGroups> |
| 2033 | } |
| 2034 | |
| 2035 | /** |
| 2036 | * User successfully added data to a table. |
| 2037 | * |
| 2038 | * @group Events |
| 2039 | * @source studio |
| 2040 | * @page /dashboard/project/{ref}/editor or /dashboard/project/{ref}/sql |
| 2041 | */ |
| 2042 | export interface TableDataAddedEvent { |
| 2043 | action: 'table_data_added' |
| 2044 | properties: { |
| 2045 | /** |
| 2046 | * Method used to insert data |
| 2047 | */ |
| 2048 | method: 'sql_editor' | 'table_editor' | 'spreadsheet_import' |
| 2049 | /** |
| 2050 | * Schema of the table |
| 2051 | */ |
| 2052 | schema_name?: string |
| 2053 | /** |
| 2054 | * Name of the table |
| 2055 | */ |
| 2056 | table_name?: string |
| 2057 | } |
| 2058 | groups: Partial<TelemetryGroups> |
| 2059 | } |
| 2060 | |
| 2061 | /** |
| 2062 | * User successfully enabled RLS on a table. |
| 2063 | * |
| 2064 | * @group Events |
| 2065 | * @source studio |
| 2066 | * @page /dashboard/project/{ref}/editor or /dashboard/project/{ref}/sql |
| 2067 | */ |
| 2068 | export interface TableRLSEnabledEvent { |
| 2069 | action: 'table_rls_enabled' |
| 2070 | properties: { |
| 2071 | /** |
| 2072 | * Method used to enable RLS |
| 2073 | */ |
| 2074 | method: 'sql_editor' | 'table_editor' |
| 2075 | /** |
| 2076 | * Schema of the table |
| 2077 | */ |
| 2078 | schema_name?: string |
| 2079 | /** |
| 2080 | * Name of the table |
| 2081 | */ |
| 2082 | table_name?: string |
| 2083 | } |
| 2084 | groups: Partial<TelemetryGroups> |
| 2085 | } |
| 2086 | |
| 2087 | /** |
| 2088 | * User clicked the generate policies button in the table editor. |
| 2089 | * |
| 2090 | * @group Events |
| 2091 | * @source studio |
| 2092 | * @page /dashboard/project/{ref}/editor |
| 2093 | */ |
| 2094 | export interface RLSGeneratePoliciesClickedEvent { |
| 2095 | action: 'rls_generate_policies_clicked' |
| 2096 | groups: TelemetryGroups |
| 2097 | } |
| 2098 | |
| 2099 | /** |
| 2100 | * User removed a generated policy from the table editor. |
| 2101 | * |
| 2102 | * @group Events |
| 2103 | * @source studio |
| 2104 | * @page /dashboard/project/{ref}/editor |
| 2105 | */ |
| 2106 | export interface RLSGeneratedPolicyRemovedEvent { |
| 2107 | action: 'rls_generated_policy_removed' |
| 2108 | groups: TelemetryGroups |
| 2109 | } |
| 2110 | |
| 2111 | /** |
| 2112 | * User successfully created generated RLS policies for a table. |
| 2113 | * |
| 2114 | * @group Events |
| 2115 | * @source studio |
| 2116 | * @page /dashboard/project/{ref}/editor |
| 2117 | */ |
| 2118 | export interface RLSGeneratedPoliciesCreatedEvent { |
| 2119 | action: 'rls_generated_policies_created' |
| 2120 | groups: TelemetryGroups |
| 2121 | } |
| 2122 | |
| 2123 | /** |
| 2124 | * User opened API docs panel. |
| 2125 | * |
| 2126 | * @group Events |
| 2127 | * @source studio |
| 2128 | * @page Various pages with API docs button |
| 2129 | */ |
| 2130 | export interface ApiDocsOpenedEvent { |
| 2131 | action: 'api_docs_opened' |
| 2132 | properties: { |
| 2133 | /** |
| 2134 | * Source of the API docs button click, e.g. table_editor, sidebar |
| 2135 | */ |
| 2136 | source: string |
| 2137 | } |
| 2138 | groups: Partial<TelemetryGroups> |
| 2139 | } |
| 2140 | |
| 2141 | /** |
| 2142 | * User clicked copy button in API docs panel. |
| 2143 | * |
| 2144 | * @group Events |
| 2145 | * @source studio |
| 2146 | * @page API docs panel |
| 2147 | */ |
| 2148 | export interface ApiDocsCodeCopyButtonClickedEvent { |
| 2149 | action: 'api_docs_code_copy_button_clicked' |
| 2150 | properties: { |
| 2151 | /** |
| 2152 | * Title of the content being copied |
| 2153 | */ |
| 2154 | title?: string |
| 2155 | /** |
| 2156 | * Selected programming language, e.g. js, bash |
| 2157 | */ |
| 2158 | selectedLanguage?: string |
| 2159 | } |
| 2160 | groups: Partial<TelemetryGroups> |
| 2161 | } |
| 2162 | |
| 2163 | /** |
| 2164 | * User performed a search via the Auth Users page. |
| 2165 | * |
| 2166 | * @group Events |
| 2167 | * @source studio |
| 2168 | * @page /dashboard/project/{ref}/auth/users |
| 2169 | */ |
| 2170 | export interface AuthUsersSearchSubmittedEvent { |
| 2171 | action: 'auth_users_search_submitted' |
| 2172 | properties: { |
| 2173 | /** |
| 2174 | * The trigger that initiated the search |
| 2175 | */ |
| 2176 | trigger: |
| 2177 | | 'search_input' |
| 2178 | | 'refresh_button' |
| 2179 | | 'sort_change' |
| 2180 | | 'provider_filter' |
| 2181 | | 'user_type_filter' |
| 2182 | /** |
| 2183 | * The column being sorted on, e.g. email, phone, created_at, last_sign_in_at |
| 2184 | */ |
| 2185 | sort_column: string |
| 2186 | /** |
| 2187 | * The sort order, either ascending or descending |
| 2188 | */ |
| 2189 | sort_order: string |
| 2190 | /** |
| 2191 | * The authentication provider(s) being filtered on, e.g. email, phone, google, github |
| 2192 | */ |
| 2193 | providers?: string[] |
| 2194 | /** |
| 2195 | * The user role(s) being filtered on, e.g. verified, unverified, anonymous |
| 2196 | */ |
| 2197 | user_type?: string |
| 2198 | /** |
| 2199 | * The keywords being searched for |
| 2200 | */ |
| 2201 | keywords?: string |
| 2202 | /** |
| 2203 | * The column being filtered on, e.g. email, phone |
| 2204 | * (only included if filtering by a specific column and not all columns) |
| 2205 | */ |
| 2206 | filter_column?: string |
| 2207 | } |
| 2208 | groups: TelemetryGroups |
| 2209 | } |
| 2210 | |
| 2211 | /** |
| 2212 | * User opened the command menu. |
| 2213 | * |
| 2214 | * @group Events |
| 2215 | * @source studio, docs, www |
| 2216 | * @page any |
| 2217 | */ |
| 2218 | export interface CommandMenuOpenedEvent { |
| 2219 | action: 'command_menu_opened' |
| 2220 | properties: { |
| 2221 | /** |
| 2222 | * The trigger that opened the command menu |
| 2223 | */ |
| 2224 | trigger_type: 'keyboard_shortcut' | 'search_input' |
| 2225 | /** |
| 2226 | * The location where the command menu was opened |
| 2227 | */ |
| 2228 | trigger_location?: string |
| 2229 | /** |
| 2230 | * In which app the command input was typed |
| 2231 | */ |
| 2232 | app: 'studio' | 'docs' | 'www' |
| 2233 | } |
| 2234 | groups: Partial<TelemetryGroups> |
| 2235 | } |
| 2236 | |
| 2237 | /** |
| 2238 | * User typed a search term in the command menu input. |
| 2239 | * |
| 2240 | * @group Events |
| 2241 | * @source studio, docs, www |
| 2242 | * @page any |
| 2243 | */ |
| 2244 | export interface CommandMenuSearchSubmittedEvent { |
| 2245 | action: 'command_menu_search_submitted' |
| 2246 | properties: { |
| 2247 | /** |
| 2248 | * Search term typed into the command menu input |
| 2249 | */ |
| 2250 | value: string |
| 2251 | /** |
| 2252 | * In which app the command input was typed |
| 2253 | */ |
| 2254 | app: 'studio' | 'docs' | 'www' |
| 2255 | } |
| 2256 | groups: Partial<TelemetryGroups> |
| 2257 | } |
| 2258 | |
| 2259 | /** |
| 2260 | * User clicked a command from the command menu. |
| 2261 | * |
| 2262 | * @group Events |
| 2263 | * @source studio, docs, www |
| 2264 | * @page any |
| 2265 | */ |
| 2266 | export interface CommandMenuCommandClickedEvent { |
| 2267 | action: 'command_menu_command_clicked' |
| 2268 | properties: { |
| 2269 | /** |
| 2270 | * The clicked command |
| 2271 | */ |
| 2272 | command_name: string |
| 2273 | command_value?: string |
| 2274 | command_type: 'action' | 'route' |
| 2275 | /** |
| 2276 | * The search query that was active when the command was clicked |
| 2277 | */ |
| 2278 | search_query?: string |
| 2279 | /** |
| 2280 | * The path or URL the clicked item leads to (only present for route commands) |
| 2281 | */ |
| 2282 | result_path?: string |
| 2283 | /** |
| 2284 | * In which app the command input was typed |
| 2285 | */ |
| 2286 | app: 'studio' | 'docs' | 'www' |
| 2287 | } |
| 2288 | groups: Partial<TelemetryGroups> |
| 2289 | } |
| 2290 | |
| 2291 | /** |
| 2292 | * User closed the command menu. |
| 2293 | * |
| 2294 | * @group Events |
| 2295 | * @source studio, docs, www |
| 2296 | * @page any |
| 2297 | */ |
| 2298 | export interface CommandMenuClosedEvent { |
| 2299 | action: 'command_menu_closed' |
| 2300 | properties: { |
| 2301 | /** |
| 2302 | * In which app the command menu was closed |
| 2303 | */ |
| 2304 | app: 'studio' | 'docs' | 'www' |
| 2305 | } |
| 2306 | groups: Partial<TelemetryGroups> |
| 2307 | } |
| 2308 | |
| 2309 | /** |
| 2310 | * User opened a sidebar panel. |
| 2311 | * |
| 2312 | * @group Events |
| 2313 | * @source studio |
| 2314 | * @page Various pages with sidebar buttons |
| 2315 | */ |
| 2316 | export interface SidebarOpenedEvent { |
| 2317 | action: 'sidebar_opened' |
| 2318 | properties: { |
| 2319 | /** |
| 2320 | * The sidebar panel that was opened, e.g. ai-assistant, editor-panel, advisor-panel |
| 2321 | */ |
| 2322 | sidebar: 'ai-assistant' | 'editor-panel' | 'advisor-panel' | 'help-panel' |
| 2323 | } |
| 2324 | groups: TelemetryGroups |
| 2325 | } |
| 2326 | |
| 2327 | /** |
| 2328 | * User opened an org menu submenu in the mobile navigation sheet. |
| 2329 | * |
| 2330 | * @group Events |
| 2331 | * @source studio |
| 2332 | * @page Organization pages (mobile) |
| 2333 | */ |
| 2334 | export interface OrgSubmenuOpenedEvent { |
| 2335 | action: 'org_submenu_opened' |
| 2336 | properties: { |
| 2337 | /** The key of the submenu item that was opened */ |
| 2338 | itemKey: string |
| 2339 | /** The display label of the submenu item */ |
| 2340 | itemLabel: string |
| 2341 | } |
| 2342 | groups: TelemetryGroups |
| 2343 | } |
| 2344 | |
| 2345 | /** |
| 2346 | * User clicked the back button in the mobile org menu to return to the top-level menu. |
| 2347 | * |
| 2348 | * @group Events |
| 2349 | * @source studio |
| 2350 | * @page Organization pages (mobile) |
| 2351 | */ |
| 2352 | export interface OrgMenuBackClickedEvent { |
| 2353 | action: 'org_menu_back_clicked' |
| 2354 | groups: TelemetryGroups |
| 2355 | } |
| 2356 | |
| 2357 | /** |
| 2358 | * User clicked a menu item in the mobile org navigation sheet. |
| 2359 | * |
| 2360 | * @group Events |
| 2361 | * @source studio |
| 2362 | * @page Organization pages (mobile) |
| 2363 | */ |
| 2364 | export interface OrgMenuItemClickedEvent { |
| 2365 | action: 'org_menu_item_clicked' |
| 2366 | properties: { |
| 2367 | /** The key identifying the menu item */ |
| 2368 | itemKey: string |
| 2369 | /** The navigation href of the menu item */ |
| 2370 | itemHref: string |
| 2371 | } |
| 2372 | groups: TelemetryGroups |
| 2373 | } |
| 2374 | |
| 2375 | /** |
| 2376 | * User toggled the inline editor setting in account preferences. |
| 2377 | * |
| 2378 | * @group Events |
| 2379 | * @source studio |
| 2380 | * @page /dashboard/account/preferences |
| 2381 | */ |
| 2382 | export interface InlineEditorSettingClickedEvent { |
| 2383 | action: 'inline_editor_setting_clicked' |
| 2384 | properties: { |
| 2385 | /** |
| 2386 | * Whether the inline editor was enabled or disabled |
| 2387 | */ |
| 2388 | enabled: boolean |
| 2389 | } |
| 2390 | groups: Partial<TelemetryGroups> |
| 2391 | } |
| 2392 | |
| 2393 | /** |
| 2394 | * User toggled the queue table operations setting in account preferences. |
| 2395 | * |
| 2396 | * @group Events |
| 2397 | * @source studio |
| 2398 | * @page /dashboard/account/preferences |
| 2399 | */ |
| 2400 | export interface QueueOperationsSettingClickedEvent { |
| 2401 | action: 'queue_operations_setting_clicked' |
| 2402 | properties: { |
| 2403 | /** |
| 2404 | * Whether the queue operations was enabled or disabled |
| 2405 | */ |
| 2406 | enabled: boolean |
| 2407 | } |
| 2408 | groups: Partial<TelemetryGroups> |
| 2409 | } |
| 2410 | |
| 2411 | /** |
| 2412 | * User clicked the save destination button in add log drains sheet. |
| 2413 | * |
| 2414 | * @group Events |
| 2415 | * @source studio |
| 2416 | * @page /dashboard/project/{ref}/settings/log-drains (LogDrainDestinationSheetForm) |
| 2417 | */ |
| 2418 | export interface LogDrainSaveButtonClickedEvent { |
| 2419 | action: 'log_drain_save_button_clicked' |
| 2420 | properties: { |
| 2421 | /** |
| 2422 | * Type of the destination saved |
| 2423 | */ |
| 2424 | destination: |
| 2425 | | 'postgres' |
| 2426 | | 'bigquery' |
| 2427 | | 'clickhouse' |
| 2428 | | 'webhook' |
| 2429 | | 'datadog' |
| 2430 | | 'elastic' |
| 2431 | | 'loki' |
| 2432 | | 'sentry' |
| 2433 | | 's3' |
| 2434 | | 'axiom' |
| 2435 | | 'last9' |
| 2436 | | 'otlp' |
| 2437 | | 'syslog' |
| 2438 | } |
| 2439 | groups: TelemetryGroups |
| 2440 | } |
| 2441 | |
| 2442 | /** |
| 2443 | * User confirmed removal of a log drain destination in the delete-confirm modal. |
| 2444 | * |
| 2445 | * @group Events |
| 2446 | * @source studio |
| 2447 | * @page /dashboard/project/{ref}/settings/log-drains |
| 2448 | */ |
| 2449 | export interface LogDrainRemovedEvent { |
| 2450 | action: 'log_drain_removed' |
| 2451 | properties: { |
| 2452 | /** |
| 2453 | * Type of the destination removed |
| 2454 | */ |
| 2455 | destination: |
| 2456 | | 'postgres' |
| 2457 | | 'bigquery' |
| 2458 | | 'clickhouse' |
| 2459 | | 'webhook' |
| 2460 | | 'datadog' |
| 2461 | | 'elastic' |
| 2462 | | 'loki' |
| 2463 | | 'sentry' |
| 2464 | | 's3' |
| 2465 | | 'axiom' |
| 2466 | | 'last9' |
| 2467 | | 'otlp' |
| 2468 | | 'syslog' |
| 2469 | } |
| 2470 | groups: TelemetryGroups |
| 2471 | } |
| 2472 | |
| 2473 | type AdvisorCategory = 'PERFORMANCE' | 'SECURITY' |
| 2474 | type AdvisorLevel = 'ERROR' | 'WARN' | 'INFO' |
| 2475 | |
| 2476 | /** |
| 2477 | * User opened an advisor detail page to view a specific advisor (lint, notification, or signal). |
| 2478 | * This tracks when users engage with advisor recommendations. |
| 2479 | * |
| 2480 | * @group Events |
| 2481 | * @source studio |
| 2482 | * @page /dashboard/project/{ref}/advisors/security or home page or advisor panel sidebar |
| 2483 | */ |
| 2484 | export interface AdvisorDetailOpenedEvent { |
| 2485 | action: 'advisor_detail_opened' |
| 2486 | properties: { |
| 2487 | /** |
| 2488 | * Where the advisor was viewed from |
| 2489 | */ |
| 2490 | origin: 'homepage' | 'advisor_panel' | 'advisors_page' |
| 2491 | /** |
| 2492 | * Source of the advisor |
| 2493 | */ |
| 2494 | advisorSource: 'lint' | 'notification' | 'signal' |
| 2495 | /** |
| 2496 | * Category of the advisor (SECURITY or PERFORMANCE) |
| 2497 | */ |
| 2498 | advisorCategory?: AdvisorCategory |
| 2499 | /** |
| 2500 | * Specific advisor type/name, e.g. missing_index, no_rls_policy |
| 2501 | */ |
| 2502 | advisorType?: string |
| 2503 | /** |
| 2504 | * Severity level of the advisor (only for lints) |
| 2505 | */ |
| 2506 | advisorLevel?: AdvisorLevel |
| 2507 | } |
| 2508 | groups: TelemetryGroups |
| 2509 | } |
| 2510 | |
| 2511 | /** |
| 2512 | * User clicked the Assistant button to get AI help with an advisor issue. |
| 2513 | * This opens the AI Assistant sidebar with a pre-filled prompt about the issue. |
| 2514 | * |
| 2515 | * @group Events |
| 2516 | * @source studio |
| 2517 | * @page /dashboard/project/{ref} (homepage), /dashboard/project/{ref}/advisors/security or /dashboard/project/{ref}/advisors/performance (lint detail panel) |
| 2518 | */ |
| 2519 | export interface AdvisorAssistantButtonClickedEvent { |
| 2520 | action: 'advisor_assistant_button_clicked' |
| 2521 | properties: { |
| 2522 | /** |
| 2523 | * Where the button was clicked |
| 2524 | */ |
| 2525 | origin: 'homepage' | 'lint_detail' |
| 2526 | /** |
| 2527 | * Category of the advisor (SECURITY or PERFORMANCE) |
| 2528 | */ |
| 2529 | advisorCategory?: AdvisorCategory |
| 2530 | /** |
| 2531 | * Specific advisor type/name |
| 2532 | */ |
| 2533 | advisorType?: string |
| 2534 | /** |
| 2535 | * Severity level of the advisor (only for lints) |
| 2536 | */ |
| 2537 | advisorLevel?: AdvisorLevel |
| 2538 | /** |
| 2539 | * Number of issues found (only included when origin is 'homepage') |
| 2540 | */ |
| 2541 | issuesCount?: number |
| 2542 | } |
| 2543 | groups: TelemetryGroups |
| 2544 | } |
| 2545 | |
| 2546 | /** |
| 2547 | * User clicked on "Explain with AI" button in Query Performance detail panel |
| 2548 | * |
| 2549 | * @group Events |
| 2550 | * @source studio |
| 2551 | * @page /dashboard/project/{ref}/observability/query-performance |
| 2552 | */ |
| 2553 | export interface QueryPerformanceAIExplanationButtonClickedEvent { |
| 2554 | action: 'query_performance_explain_with_ai_button_clicked' |
| 2555 | groups: TelemetryGroups |
| 2556 | } |
| 2557 | |
| 2558 | /** |
| 2559 | * Source/location where AI assistant actions originate from. |
| 2560 | */ |
| 2561 | export type AiAssistantSource = |
| 2562 | | 'explain_visualizer' |
| 2563 | | 'query_performance' |
| 2564 | | 'sql_debug' |
| 2565 | | 'lint_detail' |
| 2566 | | 'advisor_section' |
| 2567 | | 'advisor_widget' |
| 2568 | | 'branch_review' |
| 2569 | | 'log_explorer' |
| 2570 | | 'error_code' |
| 2571 | | 'advisor_signal_detail' |
| 2572 | | 'rls_tester' |
| 2573 | |
| 2574 | /** |
| 2575 | * User copied an AI prompt to clipboard instead of using the built-in assistant. |
| 2576 | * This allows users to paste the prompt into external AI tools (Cursor, Claude, etc.) |
| 2577 | * |
| 2578 | * @group Events |
| 2579 | * @source studio |
| 2580 | */ |
| 2581 | export interface AiPromptCopiedEvent { |
| 2582 | action: 'ai_prompt_copied' |
| 2583 | properties: { |
| 2584 | /** |
| 2585 | * Source/location where the prompt was copied from |
| 2586 | */ |
| 2587 | source: AiAssistantSource |
| 2588 | } |
| 2589 | groups: TelemetryGroups |
| 2590 | } |
| 2591 | |
| 2592 | /** |
| 2593 | * User clicked the main AI assistant button in the dropdown. |
| 2594 | * |
| 2595 | * @group Events |
| 2596 | * @source studio |
| 2597 | */ |
| 2598 | export interface AiAssistantDropdownButtonClickedEvent { |
| 2599 | action: 'ai_assistant_dropdown_button_clicked' |
| 2600 | properties: { |
| 2601 | /** |
| 2602 | * Source/location where the button was clicked |
| 2603 | */ |
| 2604 | source: AiAssistantSource |
| 2605 | } |
| 2606 | groups: TelemetryGroups |
| 2607 | } |
| 2608 | |
| 2609 | /** |
| 2610 | * User clicked an external AI tool link (ChatGPT or Claude) in the dropdown. |
| 2611 | * |
| 2612 | * @group Events |
| 2613 | * @source studio |
| 2614 | */ |
| 2615 | export interface AiExternalToolClickedEvent { |
| 2616 | action: 'ai_external_tool_clicked' |
| 2617 | properties: { |
| 2618 | /** |
| 2619 | * Source/location where the link was clicked |
| 2620 | */ |
| 2621 | source: AiAssistantSource |
| 2622 | /** |
| 2623 | * Which external AI tool was selected |
| 2624 | */ |
| 2625 | tool: 'chatgpt' | 'claude' |
| 2626 | } |
| 2627 | groups: TelemetryGroups |
| 2628 | } |
| 2629 | |
| 2630 | /** |
| 2631 | * User clicked a CTA in the project security gate. |
| 2632 | * |
| 2633 | * @group Events |
| 2634 | * @source studio |
| 2635 | */ |
| 2636 | export interface ProjectSecurityCtaClickedEvent { |
| 2637 | action: 'project_security_cta_clicked' |
| 2638 | properties: { |
| 2639 | type: 'ask_assistant' | 'copy_prompt' | 'skip_to_home' | 'view_policies' |
| 2640 | schema?: string |
| 2641 | tableName?: string |
| 2642 | } |
| 2643 | groups: TelemetryGroups |
| 2644 | } |
| 2645 | |
| 2646 | /** |
| 2647 | * User opened the request upgrade modal (for users without billing permissions). |
| 2648 | * |
| 2649 | * @group Events |
| 2650 | * @source studio |
| 2651 | */ |
| 2652 | export interface RequestUpgradeModalOpenedEvent { |
| 2653 | action: 'request_upgrade_modal_opened' |
| 2654 | properties: { |
| 2655 | /** Target plan being requested */ |
| 2656 | requestedPlan: 'Pro' | 'Team' | 'Enterprise' |
| 2657 | /** Addon being requested, if applicable */ |
| 2658 | addon?: 'pitr' | 'customDomain' | 'ipv4' | 'spendCap' | 'computeSize' |
| 2659 | /** Current organization plan */ |
| 2660 | currentPlan?: string |
| 2661 | /** Feature context driving the upgrade request */ |
| 2662 | featureProposition?: string |
| 2663 | } |
| 2664 | groups: Omit<TelemetryGroups, 'project'> |
| 2665 | } |
| 2666 | |
| 2667 | /** |
| 2668 | * User submitted a request upgrade form to billing owners. |
| 2669 | * |
| 2670 | * @group Events |
| 2671 | * @source studio |
| 2672 | */ |
| 2673 | export interface RequestUpgradeSubmittedEvent { |
| 2674 | action: 'request_upgrade_submitted' |
| 2675 | properties: { |
| 2676 | /** Target plan being requested */ |
| 2677 | requestedPlan: 'Pro' | 'Team' | 'Enterprise' |
| 2678 | /** Addon being requested, if applicable */ |
| 2679 | addon?: 'pitr' | 'customDomain' | 'ipv4' | 'spendCap' | 'computeSize' |
| 2680 | /** Current organization plan */ |
| 2681 | currentPlan?: string |
| 2682 | } |
| 2683 | groups: Omit<TelemetryGroups, 'project'> |
| 2684 | } |
| 2685 | |
| 2686 | /** |
| 2687 | * Triggered when a Studio error UI element is displayed (mounted). |
| 2688 | * This includes error Admonitions, Toast notifications, and ErrorDisplay components. |
| 2689 | * |
| 2690 | * @group Events |
| 2691 | * @source studio |
| 2692 | */ |
| 2693 | export interface DashboardErrorCreatedEvent { |
| 2694 | action: 'dashboard_error_created' |
| 2695 | properties: { |
| 2696 | /** |
| 2697 | * Source of the error |
| 2698 | */ |
| 2699 | source?: 'admonition' | 'toast' | 'error_display' |
| 2700 | /** |
| 2701 | * Type of error matched (for error_display source) |
| 2702 | */ |
| 2703 | errorType?: string |
| 2704 | /** |
| 2705 | * Whether troubleshooting steps are available (for error_display source) |
| 2706 | */ |
| 2707 | hasTroubleshooting?: boolean |
| 2708 | } |
| 2709 | groups: TelemetryGroups |
| 2710 | } |
| 2711 | |
| 2712 | /** |
| 2713 | * Triggered when the inline error troubleshooter is shown to the user. |
| 2714 | * |
| 2715 | * @group Events |
| 2716 | * @source studio |
| 2717 | */ |
| 2718 | export interface InlineErrorTroubleshooterExposedEvent { |
| 2719 | action: 'inline_error_troubleshooter_exposed' |
| 2720 | properties: { |
| 2721 | /** ID of the matched error mapping */ |
| 2722 | errorType: string |
| 2723 | } |
| 2724 | groups: TelemetryGroups |
| 2725 | } |
| 2726 | |
| 2727 | /** |
| 2728 | * Triggered when a user opens or closes a troubleshooting accordion step. |
| 2729 | * |
| 2730 | * @group Events |
| 2731 | * @source studio |
| 2732 | */ |
| 2733 | export interface InlineErrorTroubleshooterStepClickedEvent { |
| 2734 | action: 'inline_error_troubleshooter_step_clicked' |
| 2735 | properties: { |
| 2736 | /** ID of the matched error mapping */ |
| 2737 | errorType: string |
| 2738 | /** Step number that was clicked (1, 2, 3, ...) — null when a step is collapsed */ |
| 2739 | step: number | null |
| 2740 | /** Title of the step that was clicked */ |
| 2741 | stepTitle?: string |
| 2742 | /** Whether the step was opened (true) or closed (false) */ |
| 2743 | expanded: boolean |
| 2744 | } |
| 2745 | groups: TelemetryGroups |
| 2746 | } |
| 2747 | |
| 2748 | /** |
| 2749 | * Triggered when a user clicks an action within the inline error troubleshooter. |
| 2750 | * Covers all CTAs including the contact support link. |
| 2751 | * |
| 2752 | * @group Events |
| 2753 | * @source studio |
| 2754 | */ |
| 2755 | export interface InlineErrorTroubleshooterActionClickedEvent { |
| 2756 | action: 'inline_error_troubleshooter_action_clicked' |
| 2757 | properties: { |
| 2758 | /** ID of the matched error mapping */ |
| 2759 | errorType: string |
| 2760 | /** Which CTA was clicked */ |
| 2761 | ctaType: 'restart_db' | 'troubleshooting_guide' | 'ask_ai' | 'contact_support' |
| 2762 | } |
| 2763 | groups: TelemetryGroups |
| 2764 | } |
| 2765 | |
| 2766 | /** |
| 2767 | * User successfully completed installing an integration via the integrations marketplace in the dashboard. |
| 2768 | * Note: This excludes Wrappers and Postgres Extensions. Previously: integration_installed |
| 2769 | * |
| 2770 | * @group Events |
| 2771 | * @source studio |
| 2772 | * @page /dashboard/project/{ref}/integrations/{integration_slug} |
| 2773 | */ |
| 2774 | export interface IntegrationInstallCompletedEvent { |
| 2775 | action: 'integration_install_completed' |
| 2776 | properties: { |
| 2777 | /** |
| 2778 | * The name of the integration installed |
| 2779 | */ |
| 2780 | integrationName: string |
| 2781 | } |
| 2782 | groups: TelemetryGroups |
| 2783 | } |
| 2784 | |
| 2785 | /** |
| 2786 | * User submitted an integration install via the integrations marketplace. Previously: integration_install_started |
| 2787 | * |
| 2788 | * @group Events |
| 2789 | * @source studio |
| 2790 | * @page /dashboard/project/{ref}/integrations/{integration_slug} |
| 2791 | */ |
| 2792 | export interface IntegrationInstallSubmittedEvent { |
| 2793 | action: 'integration_install_submitted' |
| 2794 | properties: { |
| 2795 | /** The name of the integration being installed */ |
| 2796 | integrationName: string |
| 2797 | /** The integration method (will be 'template' for frontend-driven integrations.) */ |
| 2798 | method: string |
| 2799 | } |
| 2800 | groups: TelemetryGroups |
| 2801 | } |
| 2802 | |
| 2803 | /** |
| 2804 | * User submitted an integration uninstall via the integrations marketplace. Previously: integration_uninstall_started |
| 2805 | * |
| 2806 | * @group Events |
| 2807 | * @source studio |
| 2808 | * @page /dashboard/project/{ref}/integrations/{integration_slug} |
| 2809 | */ |
| 2810 | export interface IntegrationUninstallSubmittedEvent { |
| 2811 | action: 'integration_uninstall_submitted' |
| 2812 | properties: { |
| 2813 | /** |
| 2814 | * The name of the integration being uninstalled |
| 2815 | */ |
| 2816 | integrationName: string |
| 2817 | } |
| 2818 | groups: TelemetryGroups |
| 2819 | } |
| 2820 | |
| 2821 | /** |
| 2822 | * Installation failed for an integration. |
| 2823 | * |
| 2824 | * @group Events |
| 2825 | * @source studio |
| 2826 | * @page /dashboard/project/{ref}/integrations/{integration_slug} |
| 2827 | */ |
| 2828 | export interface IntegrationInstallFailedEvent { |
| 2829 | action: 'integration_install_failed' |
| 2830 | properties: { |
| 2831 | /** |
| 2832 | * The name of the integration whose installation failed |
| 2833 | */ |
| 2834 | integrationName: string |
| 2835 | } |
| 2836 | groups: TelemetryGroups |
| 2837 | } |
| 2838 | |
| 2839 | /** |
| 2840 | * User successfully completed uninstalling an integration via the integrations marketplace in the dashboard. |
| 2841 | * Note: This excludes Wrappers and Postgres Extensions. Previously: integration_uninstalled |
| 2842 | * |
| 2843 | * @group Events |
| 2844 | * @source studio |
| 2845 | * @page /dashboard/project/{ref}/integrations/{integration_slug} |
| 2846 | */ |
| 2847 | export interface IntegrationUninstallCompletedEvent { |
| 2848 | action: 'integration_uninstall_completed' |
| 2849 | properties: { |
| 2850 | /** |
| 2851 | * The name of the integration installed |
| 2852 | */ |
| 2853 | integrationName: string |
| 2854 | } |
| 2855 | groups: TelemetryGroups |
| 2856 | } |
| 2857 | |
| 2858 | /** |
| 2859 | * User clicked the enable Create rls_ensure trigger button in the RLS Event Trigger banner. |
| 2860 | * |
| 2861 | * @group Events |
| 2862 | * @source studio |
| 2863 | * @page /project/{ref}/auth/policies |
| 2864 | */ |
| 2865 | export interface RlsEventTriggerBannerCreateButtonClickedEvent { |
| 2866 | action: 'rls_event_trigger_banner_create_button_clicked' |
| 2867 | groups: TelemetryGroups |
| 2868 | } |
| 2869 | |
| 2870 | /** |
| 2871 | * User clicked the Run button in the log explorer. |
| 2872 | * |
| 2873 | * @group Events |
| 2874 | * @source studio |
| 2875 | * @page /project/{ref}/logs/explorer |
| 2876 | */ |
| 2877 | export interface LogExplorerQueryRunButtonClickedEvent { |
| 2878 | action: 'log_explorer_query_run_button_clicked' |
| 2879 | properties: { |
| 2880 | /** |
| 2881 | * Whether the user is editing a saved query |
| 2882 | */ |
| 2883 | is_saved_query: boolean |
| 2884 | } |
| 2885 | groups: TelemetryGroups |
| 2886 | } |
| 2887 | |
| 2888 | /** |
| 2889 | * User clicked an upgrade CTA inside the compute badge hover card. |
| 2890 | * |
| 2891 | * @group Events |
| 2892 | * @source studio |
| 2893 | */ |
| 2894 | export interface ComputeBadgeUpgradeClickedEvent { |
| 2895 | action: 'compute_badge_upgrade_clicked' |
| 2896 | properties: { |
| 2897 | computeSize: string |
| 2898 | planId: string |
| 2899 | upgradeType: 'pro_upgrade' | 'free_micro_upgrade' | 'compute_upgrade' |
| 2900 | } |
| 2901 | groups: TelemetryGroups |
| 2902 | } |
| 2903 | |
| 2904 | /** |
| 2905 | * Fly.io deprecation banner rendered for a user with at least one Fly.io project or branch. |
| 2906 | * |
| 2907 | * @group Events |
| 2908 | * @source studio |
| 2909 | */ |
| 2910 | export interface FlyDeprecationBannerExposedEvent { |
| 2911 | action: 'fly_deprecation_banner_exposed' |
| 2912 | groups: TelemetryGroups |
| 2913 | properties: { |
| 2914 | primaryCount: number |
| 2915 | branchCount: number |
| 2916 | } |
| 2917 | } |
| 2918 | |
| 2919 | /** |
| 2920 | * User dismissed the Fly.io deprecation banner. |
| 2921 | * |
| 2922 | * @group Events |
| 2923 | * @source studio |
| 2924 | */ |
| 2925 | export interface FlyDeprecationBannerDismissedEvent { |
| 2926 | action: 'fly_deprecation_banner_dismissed' |
| 2927 | groups: TelemetryGroups |
| 2928 | properties: { |
| 2929 | primaryCount: number |
| 2930 | branchCount: number |
| 2931 | } |
| 2932 | } |
| 2933 | |
| 2934 | /** |
| 2935 | * User dismissed the free Micro upgrade banner. |
| 2936 | * |
| 2937 | * @group Events |
| 2938 | * @source studio |
| 2939 | */ |
| 2940 | export interface FreeMicroUpgradeBannerDismissedEvent { |
| 2941 | action: 'free_micro_upgrade_banner_dismissed' |
| 2942 | groups: TelemetryGroups |
| 2943 | } |
| 2944 | |
| 2945 | /** |
| 2946 | * User clicked the CTA on the free Micro upgrade banner. |
| 2947 | * |
| 2948 | * @group Events |
| 2949 | * @source studio |
| 2950 | */ |
| 2951 | export interface FreeMicroUpgradeBannerCtaClickedEvent { |
| 2952 | action: 'free_micro_upgrade_banner_cta_clicked' |
| 2953 | groups: TelemetryGroups |
| 2954 | } |
| 2955 | |
| 2956 | /** |
| 2957 | * User clicked the Navigate action in the storage explorer header. |
| 2958 | * |
| 2959 | * @group Events |
| 2960 | * @source studio |
| 2961 | * @page /project/{ref}/storage/files/buckets/{bucketId} |
| 2962 | */ |
| 2963 | export interface StorageExplorerNavigateClickedEvent { |
| 2964 | action: 'storage_explorer_navigate_clicked' |
| 2965 | groups: TelemetryGroups |
| 2966 | } |
| 2967 | |
| 2968 | /** |
| 2969 | * User submitted a folder path from the storage explorer Navigate action. |
| 2970 | * |
| 2971 | * @group Events |
| 2972 | * @source studio |
| 2973 | * @page /project/{ref}/storage/files/buckets/{bucketId} |
| 2974 | */ |
| 2975 | export interface StorageExplorerNavigateSubmittedEvent { |
| 2976 | action: 'storage_explorer_navigate_submitted' |
| 2977 | groups: TelemetryGroups |
| 2978 | } |
| 2979 | |
| 2980 | /** |
| 2981 | * User clicked the Remove policy button on the public bucket SELECT policy warning. |
| 2982 | * |
| 2983 | * @group Events |
| 2984 | * @source studio |
| 2985 | * @page /project/{ref}/storage/files/buckets/{bucketId} |
| 2986 | */ |
| 2987 | export interface StoragePublicBucketSelectPolicyRemovedEvent { |
| 2988 | action: 'storage_public_bucket_select_policy_removed' |
| 2989 | properties: { |
| 2990 | /** The ID of the bucket whose SELECT policy was removed */ |
| 2991 | bucketId: string |
| 2992 | } |
| 2993 | groups: TelemetryGroups |
| 2994 | } |
| 2995 | |
| 2996 | /** |
| 2997 | * User dismissed the public bucket SELECT policy warning banner. |
| 2998 | * |
| 2999 | * @group Events |
| 3000 | * @source studio |
| 3001 | * @page /project/{ref}/storage/files/buckets/{bucketId} |
| 3002 | */ |
| 3003 | export interface StoragePublicBucketSelectPolicyWarningDismissButtonClickedEvent { |
| 3004 | action: 'storage_public_bucket_select_policy_warning_dismiss_button_clicked' |
| 3005 | properties: { |
| 3006 | /** The ID of the bucket whose warning was dismissed */ |
| 3007 | bucketId: string |
| 3008 | } |
| 3009 | groups: TelemetryGroups |
| 3010 | } |
| 3011 | |
| 3012 | /** |
| 3013 | * Triggered when an access token is successfully created. |
| 3014 | * |
| 3015 | * @group Events |
| 3016 | * @source studio |
| 3017 | * @page /account/tokens |
| 3018 | */ |
| 3019 | export interface AccessTokenCreatedEvent { |
| 3020 | action: 'access_token_created' |
| 3021 | properties: { |
| 3022 | tokenType: 'classic' | 'scoped' |
| 3023 | expiryPreset: string |
| 3024 | resourceAccess?: 'all-orgs' | 'selected-orgs' | 'selected-projects' |
| 3025 | permissionCount?: number |
| 3026 | } |
| 3027 | groups: Omit<TelemetryGroups, 'project'> |
| 3028 | } |
| 3029 | |
| 3030 | /** |
| 3031 | * Triggered when an access token is successfully deleted. |
| 3032 | * |
| 3033 | * @group Events |
| 3034 | * @source studio |
| 3035 | * @page /account/tokens |
| 3036 | */ |
| 3037 | export interface AccessTokenRemovedEvent { |
| 3038 | action: 'access_token_removed' |
| 3039 | properties: { |
| 3040 | tokenType: 'classic' | 'scoped' |
| 3041 | } |
| 3042 | groups: Omit<TelemetryGroups, 'project'> |
| 3043 | } |
| 3044 | |
| 3045 | /** |
| 3046 | * User clicked the primary CTA on a resource exhaustion warning banner. |
| 3047 | * |
| 3048 | * @group Events |
| 3049 | * @source studio |
| 3050 | */ |
| 3051 | export interface ResourceExhaustionBannerUpgradeClickedEvent { |
| 3052 | action: 'resource_exhaustion_banner_upgrade_clicked' |
| 3053 | groups: TelemetryGroups |
| 3054 | properties: { |
| 3055 | warningTypes: string[] |
| 3056 | destination: string |
| 3057 | } |
| 3058 | } |
| 3059 | |
| 3060 | /** |
| 3061 | * User clicked "Ask AI Assistant" on a resource exhaustion warning banner. |
| 3062 | * |
| 3063 | * @group Events |
| 3064 | * @source studio |
| 3065 | */ |
| 3066 | export interface ResourceExhaustionBannerAiAssistantClickedEvent { |
| 3067 | action: 'resource_exhaustion_banner_ai_assistant_clicked' |
| 3068 | groups: TelemetryGroups |
| 3069 | properties: { |
| 3070 | warningTypes: string[] |
| 3071 | } |
| 3072 | } |
| 3073 | |
| 3074 | /** |
| 3075 | * User clicked a row in the Unified Logs interface. |
| 3076 | * |
| 3077 | * @group Events |
| 3078 | * @source studio |
| 3079 | */ |
| 3080 | export interface UnifiedLogsRowClickedEvent { |
| 3081 | action: 'unified_logs_row_clicked' |
| 3082 | properties: { |
| 3083 | /** |
| 3084 | * Service that produced the log row. Mirrors `LOG_TYPES` in UnifiedLogs.constants.tsx. |
| 3085 | * Server values are validated against this set by zod (UnifiedLogs.schema.ts) before |
| 3086 | * reaching the table; anything else is rejected upstream so the union here is exhaustive. |
| 3087 | */ |
| 3088 | logType: 'postgres' | 'postgrest' | 'auth' | 'storage' | 'edge function' |
| 3089 | } |
| 3090 | groups: TelemetryGroups |
| 3091 | } |
| 3092 | |
| 3093 | /** |
| 3094 | * User clicked the Briven logo in the top-left corner of the page header. |
| 3095 | * |
| 3096 | * @group Events |
| 3097 | * @source studio |
| 3098 | */ |
| 3099 | export interface HeaderHomeLogoClickedEvent { |
| 3100 | action: 'header_home_logo_clicked' |
| 3101 | groups: Partial<TelemetryGroups> |
| 3102 | } |
| 3103 | |
| 3104 | /** |
| 3105 | * User clicked the mobile back-to-dashboard chevron in the page header. |
| 3106 | * |
| 3107 | * @group Events |
| 3108 | * @source studio |
| 3109 | */ |
| 3110 | export interface HeaderBackToDashboardClickedEvent { |
| 3111 | action: 'header_back_to_dashboard_clicked' |
| 3112 | groups: Partial<TelemetryGroups> |
| 3113 | } |
| 3114 | |
| 3115 | /** |
| 3116 | * User clicked the "Exceeding usage limits" badge in the page header. |
| 3117 | * |
| 3118 | * @group Events |
| 3119 | * @source studio |
| 3120 | */ |
| 3121 | export interface HeaderExceedingUsageBadgeClickedEvent { |
| 3122 | action: 'header_exceeding_usage_badge_clicked' |
| 3123 | groups: Partial<TelemetryGroups> |
| 3124 | } |
| 3125 | |
| 3126 | /** |
| 3127 | * User opened the organization dropdown in the page header. |
| 3128 | * |
| 3129 | * @group Events |
| 3130 | * @source studio |
| 3131 | */ |
| 3132 | export interface HeaderOrganizationDropdownOpenedEvent { |
| 3133 | action: 'header_organization_dropdown_opened' |
| 3134 | groups: Partial<TelemetryGroups> |
| 3135 | } |
| 3136 | |
| 3137 | /** |
| 3138 | * User opened the project dropdown in the page header. |
| 3139 | * |
| 3140 | * @group Events |
| 3141 | * @source studio |
| 3142 | */ |
| 3143 | export interface HeaderProjectDropdownOpenedEvent { |
| 3144 | action: 'header_project_dropdown_opened' |
| 3145 | groups: Partial<TelemetryGroups> |
| 3146 | } |
| 3147 | |
| 3148 | /** |
| 3149 | * User opened the branch dropdown in the page header. |
| 3150 | * |
| 3151 | * @group Events |
| 3152 | * @source studio |
| 3153 | */ |
| 3154 | export interface HeaderBranchDropdownOpenedEvent { |
| 3155 | action: 'header_branch_dropdown_opened' |
| 3156 | groups: Partial<TelemetryGroups> |
| 3157 | } |
| 3158 | |
| 3159 | /** |
| 3160 | * User clicked the merge-request trigger button in the page header. |
| 3161 | * Fires on click; the existing branch_create_merge_request_button_clicked |
| 3162 | * fires only on successful merge-request creation. |
| 3163 | * |
| 3164 | * @group Events |
| 3165 | * @source studio |
| 3166 | */ |
| 3167 | export interface HeaderMergeRequestButtonClickedEvent { |
| 3168 | action: 'header_merge_request_button_clicked' |
| 3169 | properties: { |
| 3170 | /** Whether a review has already been requested for this branch. */ |
| 3171 | hasReviewRequested: boolean |
| 3172 | } |
| 3173 | groups: TelemetryGroups |
| 3174 | } |
| 3175 | |
| 3176 | /** |
| 3177 | * User clicked the "Connect" button in the page header. |
| 3178 | * |
| 3179 | * @group Events |
| 3180 | * @source studio |
| 3181 | */ |
| 3182 | export interface HeaderConnectButtonClickedEvent { |
| 3183 | action: 'header_connect_button_clicked' |
| 3184 | groups: TelemetryGroups |
| 3185 | } |
| 3186 | |
| 3187 | /** |
| 3188 | * User opened the feedback dropdown in the page header. |
| 3189 | * |
| 3190 | * @group Events |
| 3191 | * @source studio |
| 3192 | */ |
| 3193 | export interface HeaderFeedbackDropdownOpenedEvent { |
| 3194 | action: 'header_feedback_dropdown_opened' |
| 3195 | groups: Partial<TelemetryGroups> |
| 3196 | } |
| 3197 | |
| 3198 | /** |
| 3199 | * User clicked the Advisor Center toggle button in the page header. |
| 3200 | * |
| 3201 | * @group Events |
| 3202 | * @source studio |
| 3203 | */ |
| 3204 | export interface HeaderAdvisorButtonClickedEvent { |
| 3205 | action: 'header_advisor_button_clicked' |
| 3206 | groups: Partial<TelemetryGroups> |
| 3207 | } |
| 3208 | |
| 3209 | /** |
| 3210 | * User clicked the Inline SQL Editor toggle button in the page header. |
| 3211 | * |
| 3212 | * @group Events |
| 3213 | * @source studio |
| 3214 | */ |
| 3215 | export interface HeaderInlineEditorButtonClickedEvent { |
| 3216 | action: 'header_inline_editor_button_clicked' |
| 3217 | groups: Partial<TelemetryGroups> |
| 3218 | } |
| 3219 | |
| 3220 | /** |
| 3221 | * User clicked the AI Assistant toggle button in the page header. |
| 3222 | * |
| 3223 | * @group Events |
| 3224 | * @source studio |
| 3225 | */ |
| 3226 | export interface HeaderAssistantButtonClickedEvent { |
| 3227 | action: 'header_assistant_button_clicked' |
| 3228 | groups: Partial<TelemetryGroups> |
| 3229 | } |
| 3230 | |
| 3231 | /** |
| 3232 | * User opened the user/account dropdown in the page header. |
| 3233 | * |
| 3234 | * @group Events |
| 3235 | * @source studio |
| 3236 | */ |
| 3237 | export interface HeaderUserDropdownOpenedEvent { |
| 3238 | action: 'header_user_dropdown_opened' |
| 3239 | groups: Partial<TelemetryGroups> |
| 3240 | } |
| 3241 | |
| 3242 | /** |
| 3243 | * User opened the local-development settings dropdown in the page header. |
| 3244 | * |
| 3245 | * @group Events |
| 3246 | * @source studio |
| 3247 | */ |
| 3248 | export interface HeaderLocalDropdownOpenedEvent { |
| 3249 | action: 'header_local_dropdown_opened' |
| 3250 | groups: Partial<TelemetryGroups> |
| 3251 | } |
| 3252 | |
| 3253 | /** |
| 3254 | * User opened the local CLI version popover in the page header. |
| 3255 | * |
| 3256 | * @group Events |
| 3257 | * @source studio |
| 3258 | */ |
| 3259 | export interface HeaderLocalVersionPopoverOpenedEvent { |
| 3260 | action: 'header_local_version_popover_opened' |
| 3261 | groups: Partial<TelemetryGroups> |
| 3262 | } |
| 3263 | |
| 3264 | /** |
| 3265 | * User ran a query in the RLS tester feature preview. |
| 3266 | * |
| 3267 | * @group Events |
| 3268 | * @source studio |
| 3269 | */ |
| 3270 | export interface RLSTesterRunQueryClickedEvent { |
| 3271 | action: 'rls_tester_run_query_clicked' |
| 3272 | properties: { type: 'raw' | 'inferred' } |
| 3273 | groups: Partial<TelemetryGroups> |
| 3274 | } |
| 3275 | |
| 3276 | /** |
| 3277 | * @hidden |
| 3278 | */ |
| 3279 | export type TelemetryEvent = |
| 3280 | | SignUpEvent |
| 3281 | | SignInEvent |
| 3282 | | ConnectionStringCopiedEvent |
| 3283 | | McpInstallButtonClickedEvent |
| 3284 | | ApiDocsOpenedEvent |
| 3285 | | ApiDocsCodeCopyButtonClickedEvent |
| 3286 | | CronJobCreatedEvent |
| 3287 | | CronJobUpdatedEvent |
| 3288 | | CronJobRemovedEvent |
| 3289 | | CronJobCreateClickedEvent |
| 3290 | | CronJobUpdateClickedEvent |
| 3291 | | CronJobDeleteClickedEvent |
| 3292 | | CronJobHistoryClickedEvent |
| 3293 | | FeaturePreviewEnabledEvent |
| 3294 | | FeaturePreviewDisabledEvent |
| 3295 | | TimezonePickerClickedEvent |
| 3296 | | ProjectCreationDefaultPrivilegesExposedEvent |
| 3297 | | ProjectCreationGithubConnectClickedEvent |
| 3298 | | ProjectCreationSimpleVersionSubmittedEvent |
| 3299 | | ProjectCreationSimpleVersionConfirmModalOpenedEvent |
| 3300 | | TableApiAccessToggleClickedEvent |
| 3301 | | RealtimeInspectorListenChannelClickedEvent |
| 3302 | | RealtimeInspectorBroadcastSentEvent |
| 3303 | | RealtimeInspectorMessageClickedEvent |
| 3304 | | RealtimeInspectorCopyMessageClickedEvent |
| 3305 | | RealtimeInspectorFiltersAppliedEvent |
| 3306 | | RealtimeInspectorDatabaseRoleUpdatedEvent |
| 3307 | | RealtimeToggleTableClickedEvent |
| 3308 | | TableRealtimeEnabledEvent |
| 3309 | | TableRealtimeDisabledEvent |
| 3310 | | SqlEditorQuickstartClickedEvent |
| 3311 | | SqlEditorTemplateClickedEvent |
| 3312 | | SqlEditorResultDownloadCsvClickedEvent |
| 3313 | | SqlEditorResultCopyMarkdownClickedEvent |
| 3314 | | SqlEditorResultCopyJsonClickedEvent |
| 3315 | | SqlEditorResultCopyCsvClickedEvent |
| 3316 | | AssistantPromptSubmittedEvent |
| 3317 | | AssistantDebugSubmittedEvent |
| 3318 | | AssistantSuggestionRunQueryClickedEvent |
| 3319 | | AssistantSqlDiffHandlerEvaluatedEvent |
| 3320 | | AssistantEditInSqlEditorClickedEvent |
| 3321 | | AssistantMessageRatingSubmittedEvent |
| 3322 | | DocsFeedbackClickedEvent |
| 3323 | | CopyAsMarkdownEvent |
| 3324 | | AskAIEvent |
| 3325 | | HomepageFrameworkQuickstartClickedEvent |
| 3326 | | HomepageProductCardClickedEvent |
| 3327 | | WwwPricingPlanCtaClickedEvent |
| 3328 | | EventPageCtaClickedEvent |
| 3329 | | HomepageGitHubButtonClickedEvent |
| 3330 | | HomepageDiscordButtonClickedEvent |
| 3331 | | HomepageCustomerStoryCardClickedEvent |
| 3332 | | HomepageProjectTemplateCardClickedEvent |
| 3333 | | CustomReportAddSQLBlockClickedEvent |
| 3334 | | CustomReportAssistantSQLBlockAddedEvent |
| 3335 | | OpenSourceRepoCardClickedEvent |
| 3336 | | StartProjectButtonClickedEvent |
| 3337 | | SeeDocumentationButtonClickedEvent |
| 3338 | | RequestDemoButtonClickedEvent |
| 3339 | | SignInButtonClickedEvent |
| 3340 | | HelpButtonClickedEvent |
| 3341 | | ExampleProjectCardClickedEvent |
| 3342 | | ImportDataButtonClickedEvent |
| 3343 | | ImportDataFileAddedEvent |
| 3344 | | ImportDataAddedEvent |
| 3345 | | SendFeedbackButtonClickedEvent |
| 3346 | | SqlEditorQueryRunButtonClickedEvent |
| 3347 | | LogExplorerQueryRunButtonClickedEvent |
| 3348 | | StorageExplorerNavigateClickedEvent |
| 3349 | | StorageExplorerNavigateSubmittedEvent |
| 3350 | | StoragePublicBucketSelectPolicyRemovedEvent |
| 3351 | | StoragePublicBucketSelectPolicyWarningDismissButtonClickedEvent |
| 3352 | | StudioPricingPlanCtaClickedEvent |
| 3353 | | StudioPricingSidePanelOpenedEvent |
| 3354 | | ReportsDatabaseGrafanaBannerClickedEvent |
| 3355 | | MetricsAPIBannerCtaButtonClickedEvent |
| 3356 | | MetricsAPIBannerDismissButtonClickedEvent |
| 3357 | | IndexAdvisorEnableButtonClickedEvent |
| 3358 | | IndexAdvisorBannerDismissButtonClickedEvent |
| 3359 | | IndexAdvisorTabClickedEvent |
| 3360 | | IndexAdvisorCreateIndexesButtonClickedEvent |
| 3361 | | EdgeFunctionDeployButtonClickedEvent |
| 3362 | | EdgeFunctionDeployUpdatesConfirmClickedEvent |
| 3363 | | EdgeFunctionAiAssistantButtonClickedEvent |
| 3364 | | EdgeFunctionViaEditorButtonClickedEvent |
| 3365 | | EdgeFunctionTemplateClickedEvent |
| 3366 | | EdgeFunctionViaCliButtonClickedEvent |
| 3367 | | EdgeFunctionDeployUpdatesButtonClickedEvent |
| 3368 | | EdgeFunctionTestSendButtonClickedEvent |
| 3369 | | EdgeFunctionTestSidePanelOpenedEvent |
| 3370 | | BrivenUiCommandCopyButtonClickedEvent |
| 3371 | | SupportTicketSubmittedEvent |
| 3372 | | AiAssistantInSupportFormClickedEvent |
| 3373 | | OrganizationMfaEnforcementUpdatedEvent |
| 3374 | | ForeignDataWrapperCreatedEvent |
| 3375 | | StorageBucketCreatedEvent |
| 3376 | | BranchCreateButtonClickedEvent |
| 3377 | | BranchDeleteButtonClickedEvent |
| 3378 | | BranchCreateMergeRequestButtonClickedEvent |
| 3379 | | BranchCloseMergeRequestButtonClickedEvent |
| 3380 | | BranchMergeSubmittedEvent |
| 3381 | | BranchMergeCompletedEvent |
| 3382 | | BranchMergeFailedEvent |
| 3383 | | BranchUpdatedEvent |
| 3384 | | BranchReviewWithAssistantClickedEvent |
| 3385 | | BranchSelectorBranchClickedEvent |
| 3386 | | BranchSelectorCreateClickedEvent |
| 3387 | | BranchSelectorManageClickedEvent |
| 3388 | | DpaPdfOpenedEvent |
| 3389 | | HomeConnectSectionExposedEvent |
| 3390 | | HomeConnectActionClickedEvent |
| 3391 | | ConnectSheetOpenedEvent |
| 3392 | | HomeSectionRowsMovedEvent |
| 3393 | | HomeActivityStatClickedEvent |
| 3394 | | HomeProjectUsageServiceClickedEvent |
| 3395 | | HomeProjectUsageChartClickedEvent |
| 3396 | | HomeCustomReportBlockAddedEvent |
| 3397 | | HomeCustomReportBlockRemovedEvent |
| 3398 | | DpaRequestButtonClickedEvent |
| 3399 | | DocumentViewButtonClickedEvent |
| 3400 | | HipaaRequestButtonClickedEvent |
| 3401 | | TableCreatedEvent |
| 3402 | | TableDataAddedEvent |
| 3403 | | TableRLSEnabledEvent |
| 3404 | | RLSGeneratePoliciesClickedEvent |
| 3405 | | RLSGeneratedPolicyRemovedEvent |
| 3406 | | RLSGeneratedPoliciesCreatedEvent |
| 3407 | | AuthUsersSearchSubmittedEvent |
| 3408 | | CommandMenuOpenedEvent |
| 3409 | | CommandMenuClosedEvent |
| 3410 | | CommandMenuSearchSubmittedEvent |
| 3411 | | CommandMenuCommandClickedEvent |
| 3412 | | InlineEditorSettingClickedEvent |
| 3413 | | QueueOperationsSettingClickedEvent |
| 3414 | | SidebarOpenedEvent |
| 3415 | | LogDrainSaveButtonClickedEvent |
| 3416 | | LogDrainRemovedEvent |
| 3417 | | AdvisorDetailOpenedEvent |
| 3418 | | AdvisorAssistantButtonClickedEvent |
| 3419 | | QueryPerformanceAIExplanationButtonClickedEvent |
| 3420 | | AiPromptCopiedEvent |
| 3421 | | AiAssistantDropdownButtonClickedEvent |
| 3422 | | AiExternalToolClickedEvent |
| 3423 | | ProjectSecurityCtaClickedEvent |
| 3424 | | RequestUpgradeModalOpenedEvent |
| 3425 | | RequestUpgradeSubmittedEvent |
| 3426 | | DashboardErrorCreatedEvent |
| 3427 | | InlineErrorTroubleshooterExposedEvent |
| 3428 | | InlineErrorTroubleshooterStepClickedEvent |
| 3429 | | InlineErrorTroubleshooterActionClickedEvent |
| 3430 | | IntegrationInstallCompletedEvent |
| 3431 | | IntegrationInstallSubmittedEvent |
| 3432 | | IntegrationUninstallSubmittedEvent |
| 3433 | | IntegrationInstallFailedEvent |
| 3434 | | IntegrationUninstallCompletedEvent |
| 3435 | | RlsEventTriggerBannerCreateButtonClickedEvent |
| 3436 | | OrgSubmenuOpenedEvent |
| 3437 | | OrgMenuBackClickedEvent |
| 3438 | | OrgMenuItemClickedEvent |
| 3439 | | ComputeBadgeUpgradeClickedEvent |
| 3440 | | FlyDeprecationBannerExposedEvent |
| 3441 | | FlyDeprecationBannerDismissedEvent |
| 3442 | | FreeMicroUpgradeBannerDismissedEvent |
| 3443 | | FreeMicroUpgradeBannerCtaClickedEvent |
| 3444 | | AccessTokenCreatedEvent |
| 3445 | | AccessTokenRemovedEvent |
| 3446 | | ResourceExhaustionBannerUpgradeClickedEvent |
| 3447 | | ResourceExhaustionBannerAiAssistantClickedEvent |
| 3448 | | UnifiedLogsRowClickedEvent |
| 3449 | | HeaderHomeLogoClickedEvent |
| 3450 | | HeaderBackToDashboardClickedEvent |
| 3451 | | HeaderExceedingUsageBadgeClickedEvent |
| 3452 | | HeaderOrganizationDropdownOpenedEvent |
| 3453 | | HeaderProjectDropdownOpenedEvent |
| 3454 | | HeaderBranchDropdownOpenedEvent |
| 3455 | | HeaderMergeRequestButtonClickedEvent |
| 3456 | | HeaderConnectButtonClickedEvent |
| 3457 | | HeaderFeedbackDropdownOpenedEvent |
| 3458 | | HeaderAdvisorButtonClickedEvent |
| 3459 | | HeaderInlineEditorButtonClickedEvent |
| 3460 | | HeaderAssistantButtonClickedEvent |
| 3461 | | HeaderUserDropdownOpenedEvent |
| 3462 | | HeaderLocalDropdownOpenedEvent |
| 3463 | | HeaderLocalVersionPopoverOpenedEvent |
| 3464 | | RLSTesterRunQueryClickedEvent |