Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(sql-editor): React query plan visualizer, replacing pev2 (#21443)
Danny Xu4fcc7bc486f6
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 172e2ec108..9cc5a17346 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -1,5 +1,8 @@openapi: 3.1.0-info: {}+info:+ title: API+ description: API documentation for API+ version: 1.0.0paths:/bytebase.v1.AIService/Chat:post:@@ -13,13 +16,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -49,13 +56,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -85,13 +96,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -121,13 +136,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -157,13 +176,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -193,13 +216,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -229,13 +256,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -268,13 +299,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -306,13 +341,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -344,13 +383,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -383,13 +426,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -422,13 +469,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -460,13 +511,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -498,13 +553,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -536,13 +595,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -577,13 +640,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -615,13 +682,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -656,13 +727,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -696,13 +771,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -734,13 +813,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -772,13 +855,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -810,13 +897,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -848,13 +939,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -886,13 +981,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -924,13 +1023,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -962,13 +1065,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1000,13 +1107,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1038,13 +1149,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1076,13 +1191,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1114,13 +1233,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1153,13 +1276,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1193,13 +1320,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1231,13 +1362,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1269,13 +1404,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1308,13 +1447,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1346,13 +1489,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1384,13 +1531,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1422,13 +1573,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1460,13 +1615,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1498,13 +1657,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1536,13 +1699,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1574,13 +1741,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1612,13 +1783,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1650,13 +1825,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1691,13 +1870,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1729,13 +1912,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1767,13 +1954,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1806,13 +1997,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1844,13 +2039,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1883,13 +2082,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1921,13 +2124,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1959,13 +2166,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -1997,13 +2208,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2041,13 +2256,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2079,13 +2298,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2118,13 +2341,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2156,13 +2383,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2194,13 +2425,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2232,13 +2467,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2270,13 +2509,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2308,13 +2551,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2348,13 +2595,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2386,13 +2637,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2424,13 +2679,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2462,13 +2721,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2500,13 +2763,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2538,13 +2805,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2576,13 +2847,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2616,13 +2891,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2654,13 +2933,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2692,13 +2975,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2730,13 +3017,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2768,13 +3059,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2806,13 +3101,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2844,13 +3143,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2882,13 +3185,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2920,13 +3227,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2958,13 +3269,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -2996,13 +3311,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3034,13 +3353,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3079,13 +3402,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3123,13 +3450,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3161,13 +3492,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3199,13 +3534,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3237,13 +3576,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3275,13 +3618,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3313,13 +3660,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3351,13 +3702,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3389,13 +3744,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3427,13 +3786,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3465,13 +3828,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3503,13 +3870,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3541,13 +3912,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3579,13 +3954,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3617,13 +3996,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3655,13 +4038,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3694,13 +4081,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3732,13 +4123,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3770,13 +4165,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3810,13 +4209,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3848,13 +4251,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3886,13 +4293,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3924,13 +4335,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -3963,13 +4378,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4001,13 +4420,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4039,13 +4462,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4077,13 +4504,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4115,13 +4546,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4153,13 +4588,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4191,13 +4630,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4229,13 +4672,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4267,13 +4714,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4305,13 +4756,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4344,13 +4799,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4382,13 +4841,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4420,13 +4883,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4458,13 +4925,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4496,13 +4967,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4534,13 +5009,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4572,13 +5051,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4610,13 +5093,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4648,13 +5135,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4687,13 +5178,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4725,13 +5220,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4763,13 +5262,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4801,13 +5304,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4839,13 +5346,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4878,13 +5389,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4916,13 +5431,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4954,13 +5473,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -4992,13 +5515,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5030,13 +5557,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5068,13 +5599,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5106,13 +5641,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5144,13 +5683,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5182,13 +5725,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5221,13 +5768,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5262,13 +5813,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5300,13 +5855,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5338,13 +5897,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5376,13 +5939,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5414,13 +5981,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5452,13 +6023,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5490,13 +6065,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5528,13 +6107,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5566,13 +6149,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5604,13 +6191,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5642,13 +6233,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5681,13 +6276,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5721,13 +6320,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5762,13 +6365,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5801,13 +6408,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5841,13 +6452,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5881,13 +6496,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5921,13 +6540,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5960,13 +6583,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -5999,13 +6626,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6041,13 +6672,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6083,13 +6718,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6122,13 +6761,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6161,13 +6804,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6201,13 +6848,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6240,13 +6891,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6282,13 +6937,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6321,13 +6980,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6359,13 +7022,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6397,13 +7064,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6436,13 +7107,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6474,13 +7149,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6512,13 +7191,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6550,13 +7233,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6588,13 +7275,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6626,13 +7317,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6664,13 +7359,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6702,13 +7401,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6740,13 +7443,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6778,13 +7485,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6814,13 +7525,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6852,13 +7567,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6888,13 +7607,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6924,13 +7647,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6963,13 +7690,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -6999,13 +7730,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7035,13 +7770,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7073,13 +7812,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7109,13 +7852,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7145,13 +7892,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7186,13 +7937,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7227,13 +7982,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7267,13 +8026,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7306,13 +8069,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7344,13 +8111,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7385,13 +8156,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7429,13 +8204,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7467,13 +8246,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7506,13 +8289,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7545,13 +8332,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7585,13 +8376,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7626,13 +8421,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7666,13 +8465,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7704,13 +8507,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7742,13 +8549,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7781,13 +8592,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7820,13 +8635,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7858,13 +8677,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7896,13 +8719,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7935,13 +8762,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -7973,13 +8804,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8011,13 +8846,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8050,13 +8889,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8088,13 +8931,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8129,13 +8976,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8168,13 +9019,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8204,13 +9059,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8245,13 +9104,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8283,13 +9146,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8319,13 +9186,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -8351,9 +9222,10 @@ components:type: objectproperties:role:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AIChatMessageRole'title: roledescription: The role of the message sender.- $ref: '#/components/schemas/bytebase.v1.AIChatMessageRole'content:type:- string@@ -8489,8 +9361,9 @@ components:type: booleantitle: enabledprovider:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AISetting.Provider'title: provider- $ref: '#/components/schemas/bytebase.v1.AISetting.Provider'endpoint:type: stringtitle: endpoint@@ -8516,101 +9389,108 @@ components:- AZURE_OPENAIbytebase.v1.AccessGrant:type: object- allOf:- - properties:- name:- type: string- title: name- description: |-- The name of the access grant, generated by the server.- Format: projects/{project}/accessGrants/{access_grant}- The {access_grant} segment is a server-generated unique ID.- creator:- type: string- title: creator- description: |-- The creator of the access grant.- Format: users/{email}- status:- title: status- description: |-- The status of the access grant.- An ACTIVE grant with `expire_time` in the past is effectively expired- and no longer authorizes access. Use `expire_time` to determine- whether an ACTIVE grant has expired.- $ref: '#/components/schemas/bytebase.v1.AccessGrant.Status'- issue:- type: string- title: issue- description: |-- The issue associated with the access grant.- Can be empty.- Format: projects/{project}/issues/{issue}- targets:- type: array- items:- type: string- title: targets- description: |-- The target databases for this access grant.- Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- query:- type: string- title: query- description: The query permission granted.- unmask:- type: boolean- title: unmask- description: Whether the grant allows unmasking sensitive data.- createTime:- title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'- updateTime:- title: update_time- $ref: '#/components/schemas/google.protobuf.Timestamp'- reason:- type: string- title: reason- export:- type: boolean- title: export- description: Whether export the query result.- schema:- type: string- title: schema- description: The default schema to execute the query.- container:- type: string- title: container- description: The container name to execute the query against, used for CosmosDB only.- - oneOf:- - type: object- properties:- expireTime:- title: expire_time- description: The expiration time of the access grant.- $ref: '#/components/schemas/google.protobuf.Timestamp'+ anyOf:+ - type: object+ properties:+ expireTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: expire_time- required:- - expireTime- - type: object- properties:- ttl:- title: ttl- description: |-- Input only. The time-to-live duration for the access grant.- The server computes `expire_time` from this value at activation time.- $ref: '#/components/schemas/google.protobuf.Duration'+ description: The expiration time of the access grant.+ title: expire_time+ - type: object+ properties:+ ttl:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: ttl- required:- - ttl- - not:- anyOf:- - required:- - expireTime- - required:- - ttl+ description: |-+ Input only. The time-to-live duration for the access grant.+ The server computes `expire_time` from this value at activation time.+ title: ttlunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - expireTime+ - required:+ - ttl+ - not:+ oneOf:+ - required:+ - expireTime+ - required:+ - ttl+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the access grant, generated by the server.+ Format: projects/{project}/accessGrants/{access_grant}+ The {access_grant} segment is a server-generated unique ID.+ creator:+ type: string+ title: creator+ description: |-+ The creator of the access grant.+ Format: users/{email}+ status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AccessGrant.Status'+ title: status+ description: |-+ The status of the access grant.+ An ACTIVE grant with `expire_time` in the past is effectively expired+ and no longer authorizes access. Use `expire_time` to determine+ whether an ACTIVE grant has expired.+ issue:+ type: string+ title: issue+ description: |-+ The issue associated with the access grant.+ Can be empty.+ Format: projects/{project}/issues/{issue}+ targets:+ type: array+ items:+ type: string+ title: targets+ description: |-+ The target databases for this access grant.+ Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ query:+ type: string+ title: query+ description: The query permission granted.+ unmask:+ type: boolean+ title: unmask+ description: Whether the grant allows unmasking sensitive data.+ createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: create_time+ updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: update_time+ reason:+ type: string+ title: reason+ export:+ type: boolean+ title: export+ description: Whether export the query result.+ schema:+ type: string+ title: schema+ description: The default schema to execute the query.+ container:+ type: string+ title: container+ description: The container name to execute the query against, used for CosmosDB only.title: AccessGrantbytebase.v1.AccessGrant.Status:type: string@@ -8669,9 +9549,10 @@ components:title: external_urldescription: The external URL where users or webhook callbacks access Bytebase.lastActiveTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_active_timedescription: The last time any API call was made, refreshed on each request.- $ref: '#/components/schemas/google.protobuf.Timestamp'workspace:type: stringtitle: workspace@@ -8720,13 +9601,15 @@ components:format: int32description: The number of active VCS users seen in the active window.sample:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SampleInfo'title: sampledescription: Sample setup availability and provisioned resources.- $ref: '#/components/schemas/bytebase.v1.SampleInfo'mcpSetting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: mcp_settingdescription: The MCP (Model Context Protocol) setting in the current workspace.- $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: ActuatorInfoadditionalProperties: falsedescription: |-@@ -8742,11 +9625,12 @@ components:The name of the instance to add a data source to.Format: instances/{instance} or projects/{project}/instances/{instance}dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: |-Identified by data source ID.Only READ_ONLY data source can be added.- $ref: '#/components/schemas/bytebase.v1.DataSource'validateOnly:type: booleantitle: validate_only@@ -8763,9 +9647,10 @@ components:The name of the project to add the webhook to.Format: projects/{project}webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to add.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: AddWebhookRequestadditionalProperties: falsebytebase.v1.AdminExecuteRequest:@@ -8820,9 +9705,10 @@ components:type: objectproperties:status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Advice.Level'title: statusdescription: The advice level.- $ref: '#/components/schemas/bytebase.v1.Advice.Level'code:type: integertitle: code@@ -8837,18 +9723,21 @@ components:title: contentdescription: The advice content.startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: |-The start_position is inclusive and the end_position is exclusive.TODO: use range instead- $ref: '#/components/schemas/bytebase.v1.Position'endPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: end_position- $ref: '#/components/schemas/bytebase.v1.Position'ruleType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Advice.RuleType'title: rule_typedescription: The type of linting rule that generated this advice.- $ref: '#/components/schemas/bytebase.v1.Advice.RuleType'title: AdviceadditionalProperties: falsebytebase.v1.Advice.Level:@@ -8870,41 +9759,39 @@ components:description: RuleType indicates the source of the linting rule.bytebase.v1.Algorithm:type: object- oneOf:+ anyOf:- type: objectproperties:fullMask:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.FullMask'title: full_mask- $ref: '#/components/schemas/bytebase.v1.Algorithm.FullMask'title: full_mask- required:- - fullMask- type: objectproperties:innerOuterMask:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask'title: inner_outer_mask- $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask'title: inner_outer_mask- required:- - innerOuterMask- type: objectproperties:md5Mask:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.MD5Mask'title: md5_mask- $ref: '#/components/schemas/bytebase.v1.Algorithm.MD5Mask'title: md5_mask- required:- - md5Mask- type: objectproperties:rangeMask:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.RangeMask'title: range_mask- $ref: '#/components/schemas/bytebase.v1.Algorithm.RangeMask'title: range_mask- required:- - rangeMask- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- fullMask- required:@@ -8913,7 +9800,16 @@ components:- md5Mask- required:- rangeMask- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - fullMask+ - required:+ - innerOuterMask+ - required:+ - md5Mask+ - required:+ - rangeMasktitle: Algorithmbytebase.v1.Algorithm.FullMask:type: object@@ -8938,8 +9834,9 @@ components:title: suffix_lenformat: int32type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask.MaskType'title: type- $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask.MaskType'substitution:type: stringtitle: substitution@@ -9010,22 +9907,25 @@ components:title: linkdescription: The optional link, user can follow the link to check extra detailstheme:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Announcement.AnnouncementTheme'title: themedescription: |-Banner colors. Built-in presets (info/warning/critical) are afrontend-only concept that seeds these colors; the store only holds them.- $ref: '#/components/schemas/bytebase.v1.Announcement.AnnouncementTheme'title: AnnouncementadditionalProperties: falsebytebase.v1.Announcement.AnnouncementTheme:type: objectproperties:background:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: background- $ref: '#/components/schemas/google.type.Color'text:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: text- $ref: '#/components/schemas/google.type.Color'title: AnnouncementThemeadditionalProperties: falsebytebase.v1.AppIMSetting:@@ -9065,75 +9965,84 @@ components:additionalProperties: falsebytebase.v1.AppIMSetting.IMSetting:type: object- allOf:- - properties:- type:- title: type- $ref: '#/components/schemas/bytebase.v1.WebhookType'- - oneOf:- - type: object- properties:- dingtalk:- title: dingtalk- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.DingTalk'+ anyOf:+ - type: object+ properties:+ dingtalk:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.DingTalk'title: dingtalk- required:- - dingtalk- - type: object- properties:- feishu:- title: feishu- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Feishu'+ title: dingtalk+ - type: object+ properties:+ feishu:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Feishu'title: feishu- required:- - feishu- - type: object- properties:- lark:- title: lark- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Lark'+ title: feishu+ - type: object+ properties:+ lark:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Lark'title: lark- required:- - lark- - type: object- properties:- slack:- title: slack- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Slack'+ title: lark+ - type: object+ properties:+ slack:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Slack'title: slack- required:- - slack- - type: object- properties:- teams:- title: teams- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Teams'+ title: slack+ - type: object+ properties:+ teams:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Teams'title: teams- required:- - teams- - type: object- properties:- wecom:- title: wecom- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Wecom'+ title: teams+ - type: object+ properties:+ wecom:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Wecom'title: wecom- required:- - wecom- - not:- anyOf:- - required:- - dingtalk- - required:- - feishu- - required:- - lark- - required:- - slack- - required:- - teams- - required:- - wecom+ title: wecomunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - dingtalk+ - required:+ - feishu+ - required:+ - lark+ - required:+ - slack+ - required:+ - teams+ - required:+ - wecom+ - not:+ oneOf:+ - required:+ - dingtalk+ - required:+ - feishu+ - required:+ - lark+ - required:+ - slack+ - required:+ - teams+ - required:+ - wecom+ properties:+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WebhookType'+ title: typetitle: IMSettingbytebase.v1.AppIMSetting.Lark:type: object@@ -9214,9 +10123,10 @@ components:type: objectproperties:flow:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalFlow'title: flowdescription: The approval flow definition.- $ref: '#/components/schemas/bytebase.v1.ApprovalFlow'title:type: stringtitle: title@@ -9256,9 +10166,10 @@ components:type: objectproperties:policyDelta:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyDelta'title: policy_deltadescription: Changes to IAM policies.- $ref: '#/components/schemas/bytebase.v1.PolicyDelta'title: AuditDataadditionalProperties: falsedescription: Additional audit data specific to certain operations.@@ -9274,9 +10185,10 @@ components:- projects/{project}/auditLogs/{uid}- workspaces/{workspace}/auditLogs/{uid}createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the audit log was created.- $ref: '#/components/schemas/google.protobuf.Timestamp'user:type: stringtitle: user@@ -9290,9 +10202,10 @@ components:The method or action being audited.For example: /bytebase.v1.SQLService/Query or bb.project.repository.pushseverity:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AuditLog.Severity'title: severitydescription: The severity level of this audit log entry.- $ref: '#/components/schemas/bytebase.v1.AuditLog.Severity'resource:type: stringtitle: resource@@ -9308,28 +10221,33 @@ components:The response payload in JSON format.Some fields may be omitted if they are too large or contain sensitive information.status:+ allOf:+ - $ref: '#/components/schemas/google.rpc.Status'title: statusdescription: The status of the operation.- $ref: '#/components/schemas/google.rpc.Status'latency:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: latencydescription: The duration of the operation.- $ref: '#/components/schemas/google.protobuf.Duration'serviceData:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Any'title: service_datadescription: Service-specific metadata about the request, response, and activities.- $ref: '#/components/schemas/google.protobuf.Any'requestMetadata:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RequestMetadata'title: request_metadatadescription: Metadata about the request context.- $ref: '#/components/schemas/bytebase.v1.RequestMetadata'mcpDelegation:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MCPDelegation'title: mcp_delegationdescription: |-MCP delegation provenance. Present exactly when the audited call arrivedthrough the MCP server's delegated credential; never set for public APIcalls. Presence of this message is the MCP-origin marker.- $ref: '#/components/schemas/bytebase.v1.MCPDelegation'title: AuditLogadditionalProperties: falsedescription: Audit log entry recording system activity or API call.@@ -9365,9 +10283,10 @@ components:The workspace used for authentication, when one can be resolved.Format: workspaces/{workspace}restriction:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Restriction'title: restrictiondescription: The effective authentication restrictions.- $ref: '#/components/schemas/bytebase.v1.Restriction'identityProviders:type: arrayitems:@@ -9845,9 +10764,10 @@ components:The list of issues to update.Format: projects/{project}/issues/{issue}status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueStatus'title: statusdescription: The new status.- $ref: '#/components/schemas/bytebase.v1.IssueStatus'reason:type: stringtitle: reason@@ -9886,6 +10806,8 @@ components:For service accounts, the member should be: serviceAccount:{email}For workload identities, the member should be: workloadIdentity:{email}condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: |-The condition that is associated with this binding, only used in the project IAM policy.@@ -9919,11 +10841,11 @@ components:resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"]resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"]request.time < timestamp("2025-04-26T11:24:48.655Z")- $ref: '#/components/schemas/google.type.Expr'parsedExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: parsed_exprdescription: The parsed expression of the condition.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: BindingadditionalProperties: falsedescription: Binding associates members with a role and optional conditions.@@ -9931,9 +10853,10 @@ components:type: objectproperties:action:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BindingDelta.Action'title: actiondescription: The action that was performed on a Binding.- $ref: '#/components/schemas/bytebase.v1.BindingDelta.Action'role:type: stringtitle: role@@ -9945,9 +10868,10 @@ components:title: memberdescription: Follows the same format of Binding.members.condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: The condition that is associated with this binding.- $ref: '#/components/schemas/google.type.Expr'title: BindingDeltaadditionalProperties: falsedescription: A single change to a binding.@@ -10031,8 +10955,9 @@ components:description: |string.max_bytes = 72credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credential- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: ChangePasswordRequestrequired:- credential@@ -10045,18 +10970,18 @@ components:title: namedescription: 'Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Changelog.Status'title: status- $ref: '#/components/schemas/bytebase.v1.Changelog.Status'schema:type: stringtitle: schemaschemaSize:- type:- - integer- - string+ type: stringtitle: schema_sizeformat: int64taskRun:@@ -10108,9 +11033,10 @@ components:title: parentdescription: 'Format: projects/{project}'release:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to check.- $ref: '#/components/schemas/bytebase.v1.Release'targets:type: arrayitems:@@ -10132,11 +11058,12 @@ components:Example: "All tables must have a primary key"Example: "VARCHAR columns should specify a maximum length"vcsUser:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.VCSUser'title: vcs_userdescription: |-The non-bot VCS pull request or merge request creator observed by bytebase-release.If absent, Bytebase skips VCS user tracking and VCS user limit enforcement.- $ref: '#/components/schemas/bytebase.v1.VCSUser'title: CheckReleaseRequestadditionalProperties: falsebytebase.v1.CheckReleaseResponse:@@ -10149,16 +11076,15 @@ components:title: resultsdescription: The check results for each file and target combination.affectedRows:- type:- - integer- - string+ type: stringtitle: affected_rowsformat: int64description: The total affected rows across all checks.riskLevel:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: risk_leveldescription: The aggregated risk level of the check.- $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: CheckReleaseResponseadditionalProperties: falsebytebase.v1.CheckReleaseResponse.CheckResult:@@ -10182,16 +11108,15 @@ components:title: advicesdescription: The list of advice for the file and the target.affectedRows:- type:- - integer- - string+ type: stringtitle: affected_rowsformat: int64description: The count of affected rows of the statement on the target.riskLevel:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: risk_leveldescription: The risk level of the statement on the target.- $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: CheckResultadditionalProperties: falsedescription: Check result for a single release file on a target database.@@ -10226,17 +11151,6 @@ components:title: ColumnCatalogadditionalProperties: falsedescription: Column metadata within a table.- bytebase.v1.ColumnCatalog.LabelsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: LabelsEntry- additionalProperties: falsebytebase.v1.ColumnMetadata:type: objectproperties:@@ -10290,27 +11204,25 @@ components:title: commentdescription: The comment is the comment of a column.generation:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata'title: generationdescription: The generation is the generation of a column.- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata'isIdentity:type: booleantitle: is_identityidentityGeneration:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'title: identity_generationdescription: The identity_generation is for identity columns, PG only.- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'identitySeed:- type:- - integer- - string+ type: stringtitle: identity_seedformat: int64description: The identity_seed is for identity columns, MSSQL only.identityIncrement:- type:- - integer- - string+ type: stringtitle: identity_incrementformat: int64description: The identity_increment is for identity columns, MSSQL only.@@ -10414,14 +11326,16 @@ components:maxLength: 260description: 'Format: users/{email}. Must be the caller''s own name.'pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: |-The pending_version of the codes being confirmed. Confirming promotesexactly the set this version identifies, or nothing.- $ref: '#/components/schemas/google.protobuf.Timestamp'credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credential- $ref: '#/components/schemas/bytebase.v1.CredentialProof'otpCode:type: stringtitle: otp_code@@ -10444,9 +11358,10 @@ components:The parent project for the access grant.Format: projects/{project}accessGrant:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AccessGrant'title: access_grantdescription: The access grant to create.- $ref: '#/components/schemas/bytebase.v1.AccessGrant'title: CreateAccessGrantRequestadditionalProperties: falsebytebase.v1.CreateDatabaseGroupRequest:@@ -10459,9 +11374,10 @@ components:The parent resource where this database group will be created.Format: projects/{project}databaseGroup:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'title: database_groupdescription: The database group to create.- $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'databaseGroupId:type: stringtitle: database_group_id@@ -10482,9 +11398,10 @@ components:type: objectproperties:group:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Group'title: groupdescription: The group to create.- $ref: '#/components/schemas/bytebase.v1.Group'groupEmail:type: stringtitle: group_email@@ -10498,9 +11415,10 @@ components:type: objectproperties:identityProvider:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProvider'title: identity_providerdescription: The identity provider to create.- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'identityProviderId:type: stringtitle: identity_provider_id@@ -10529,9 +11447,10 @@ components:Format: projects/{project}. If omitted, the instance is created in theworkspace collection.instance:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Instance'title: instancedescription: The instance to create.- $ref: '#/components/schemas/bytebase.v1.Instance'instanceId:type: stringtitle: instance_id@@ -10557,9 +11476,10 @@ components:The issue nameFormat: projects/{project}/issues/{issue}issueComment:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment'title: issue_commentdescription: The comment to create.- $ref: '#/components/schemas/bytebase.v1.IssueComment'title: CreateIssueCommentRequestadditionalProperties: falsebytebase.v1.CreateIssueRequest:@@ -10572,9 +11492,10 @@ components:The parent, which owns this collection of issues.Format: projects/{project}issue:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue'title: issuedescription: The issue to create.- $ref: '#/components/schemas/bytebase.v1.Issue'title: CreateIssueRequestadditionalProperties: falsebytebase.v1.CreatePlanRequest:@@ -10587,9 +11508,10 @@ components:The parent project where this plan will be created.Format: projects/{project}plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan'title: plandescription: The plan to create.- $ref: '#/components/schemas/bytebase.v1.Plan'title: CreatePlanRequestadditionalProperties: falsebytebase.v1.CreatePolicyRequest:@@ -10603,22 +11525,25 @@ components:Workspace resource name: workspaces/{workspace-id}.Environment resource name: environments/environment-id.policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: The policy to create.- $ref: '#/components/schemas/bytebase.v1.Policy'type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyType'title: typedescription: The type of policy to create.- $ref: '#/components/schemas/bytebase.v1.PolicyType'title: CreatePolicyRequestadditionalProperties: falsebytebase.v1.CreateProjectRequest:type: objectproperties:project:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Project'title: projectdescription: The project to create.- $ref: '#/components/schemas/bytebase.v1.Project'projectId:type: stringtitle: project_id@@ -10634,11 +11559,13 @@ components:type: objectproperties:plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: plan- $ref: '#/components/schemas/bytebase.v1.PlanType'interval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BillingInterval'title: interval- $ref: '#/components/schemas/bytebase.v1.BillingInterval'seats:type: integertitle: seats@@ -10653,9 +11580,10 @@ components:title: parentdescription: 'Format: projects/{project}'release:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to create.- $ref: '#/components/schemas/bytebase.v1.Release'releaseIdTemplate:type: stringtitle: release_id_template@@ -10677,9 +11605,10 @@ components:type: objectproperties:reviewConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewConfig'title: review_configdescription: The SQL review config to create.- $ref: '#/components/schemas/bytebase.v1.ReviewConfig'title: CreateReviewConfigRequestadditionalProperties: falsebytebase.v1.CreateRevisionRequest:@@ -10690,18 +11619,20 @@ components:title: parentdescription: 'Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}'revision:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Revision'title: revisiondescription: The revision to create.- $ref: '#/components/schemas/bytebase.v1.Revision'title: CreateRevisionRequestadditionalProperties: falsebytebase.v1.CreateRoleRequest:type: objectproperties:role:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Role'title: roledescription: The role to create.- $ref: '#/components/schemas/bytebase.v1.Role'roleId:type: stringtitle: role_id@@ -10744,9 +11675,10 @@ components:The project to create the saved query in.Format: projects/{project}savedQuery:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQuery'title: saved_querydescription: The saved query to create.- $ref: '#/components/schemas/bytebase.v1.SavedQuery'title: CreateSavedQueryRequestadditionalProperties: falsebytebase.v1.CreateServiceAccountRequest:@@ -10766,9 +11698,10 @@ components:of the service account's email in the format: {service_account_id}@service.bytebase.comor {service_account_id}@{project-id}.service.bytebase.comserviceAccount:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: service_accountdescription: The service account to create.- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: CreateServiceAccountRequestadditionalProperties: falsedescription: Request message for creating a service account.@@ -10782,18 +11715,20 @@ components:The parent resource where this sheet will be created.Format: projects/{project}sheet:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Sheet'title: sheetdescription: The sheet to create.- $ref: '#/components/schemas/bytebase.v1.Sheet'title: CreateSheetRequestadditionalProperties: falsebytebase.v1.CreateUserRequest:type: objectproperties:user:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User'title: userdescription: The user to create.- $ref: '#/components/schemas/bytebase.v1.User'title: CreateUserRequestadditionalProperties: falsebytebase.v1.CreateWorkloadIdentityRequest:@@ -10813,15 +11748,16 @@ components:of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.comor {workload_identity_id}@{project-id}.workload.bytebase.comworkloadIdentity:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: workload_identitydescription: The workload identity to create.- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: CreateWorkloadIdentityRequestadditionalProperties: falsedescription: Request message for creating a workload identity.bytebase.v1.CredentialProof:type: object- oneOf:+ anyOf:- type: objectproperties:currentPassword:@@ -10832,8 +11768,6 @@ components:while a live MFA factor exists.string.max_bytes = 72title: current_password- required:- - currentPassword- type: objectproperties:emailCode:@@ -10844,8 +11778,6 @@ components:A one-time code from RequestReauthCode. Bytebase Cloud only, and onlywhile the account has no live MFA factor.title: email_code- required:- - emailCode- type: objectproperties:otpCode:@@ -10854,8 +11786,6 @@ components:maxLength: 64description: A live code from the account's enrolled TOTP authenticator.title: otp_code- required:- - otpCode- type: objectproperties:recoveryCode:@@ -10864,10 +11794,10 @@ components:maxLength: 64description: A single-use MFA recovery code.title: recovery_code- required:- - recoveryCode- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- currentPassword- required:@@ -10876,7 +11806,16 @@ components:- otpCode- required:- recoveryCode- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - currentPassword+ - required:+ - emailCode+ - required:+ - otpCode+ - required:+ - recoveryCodetitle: CredentialProofdescription: |-One proof that the caller currently controls a credential on the account.@@ -10911,24 +11850,14 @@ components:type: objecttitle: classificationadditionalProperties:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'title: value- $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'description: |-classification is the id - DataClassification map.The id should in [0-9]+-[0-9]+-[0-9]+ format.title: DataClassificationConfigadditionalProperties: false- bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry:- type: object- properties:- key:- type: string- title: key- value:- title: value- $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'- title: ClassificationEntry- additionalProperties: falsebytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification:type: objectproperties:@@ -10963,304 +11892,315 @@ components:additionalProperties: falsebytebase.v1.DataSource:type: object- allOf:- - properties:- id:- type: string- title: id- description: The unique identifier for this data source.- type:- title: type- description: The type of data source (ADMIN or READ_ONLY).- $ref: '#/components/schemas/bytebase.v1.DataSourceType'- username:- type: string- title: username- description: The username for database authentication.- password:- type: string- title: password- description: The password for database authentication.- useSsl:- type: boolean- title: use_ssl- description: Use SSL to connect to the data source. By default, we use system default SSL configuration.- sslCa:- type: string- title: ssl_ca- description: The SSL certificate authority certificate.- sslCert:- type: string- title: ssl_cert- description: The SSL client certificate.- sslKey:- type: string- title: ssl_key- description: The SSL client private key.- sslCaPath:- type: string- title: ssl_ca_path- description: The local filesystem path to the SSL certificate authority certificate.- sslCertPath:- type: string- title: ssl_cert_path- description: The local filesystem path to the SSL client certificate.- sslKeyPath:- type: string- title: ssl_key_path- description: The local filesystem path to the SSL client private key.- sslCaSet:- type: boolean- title: ssl_ca_set- description: Whether an SSL certificate authority certificate has been configured.- sslCertSet:- type: boolean- title: ssl_cert_set- description: Whether an SSL client certificate has been configured.- sslKeySet:- type: boolean- title: ssl_key_set- description: Whether an SSL client private key has been configured.- sslCaPathSet:- type: boolean- title: ssl_ca_path_set- description: Whether an SSL certificate authority path has been configured.- sslCertPathSet:- type: boolean- title: ssl_cert_path_set- description: Whether an SSL client certificate path has been configured.- sslKeyPathSet:- type: boolean- title: ssl_key_path_set- description: Whether an SSL client private key path has been configured.- verifyTlsCertificate:- type: boolean- title: verify_tls_certificate- description: |-- verify_tls_certificate enables TLS certificate verification for SSL connections.- Default is false (no verification) for backward compatibility.- Set to true for secure connections (recommended for production).- Only set to false for development or when certificates cannot be properly- validated (e.g., self-signed certs, VPN environments).- host:- type: string- title: host- description: The hostname or IP address of the database server.- port:- type: string- title: port- description: The port number of the database server.- database:- type: string- title: database- description: The name of the database to connect to.- srv:- type: boolean- title: srv- description: |-- srv, authentication_database and replica_set are used for MongoDB.- srv is a boolean flag that indicates whether the host is a DNS SRV record.- authenticationDatabase:- type: string- title: authentication_database- description: authentication_database is the database name to authenticate against, which stores the user credentials.- replicaSet:- type: string- title: replica_set- description: replica_set is used for MongoDB replica set.- sid:- type: string- title: sid- description: sid and service_name are used for Oracle.- serviceName:- type: string- title: service_name- sshHost:- type: string- title: ssh_host- description: |-- Connection over SSH.- The hostname of the SSH server agent.- Required.- sshPort:- type: string- title: ssh_port- description: |-- The port of the SSH server agent. It's 22 typically.- Required.- sshUser:- type: string- title: ssh_user- description: |-- The user to login the server.- Required.- sshPassword:- type: string- title: ssh_password- description: The password to login the server. If it's empty string, no password is required.- sshPrivateKey:- type: string- title: ssh_private_key- description: The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK").- authenticationPrivateKey:- type: string- title: authentication_private_key- description: |-- PKCS#8 private key in PEM format. If it's empty string, no private key is required.- Used for authentication when connecting to the data source.- authenticationPrivateKeyPassphrase:- type: string- title: authentication_private_key_passphrase- description: Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted.- externalSecret:- title: external_secret- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret'- authenticationType:- title: authentication_type- $ref: '#/components/schemas/bytebase.v1.DataSource.AuthenticationType'- cloudSqlIpType:- title: cloud_sql_ip_type- description: |-- cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections.- CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility.- $ref: '#/components/schemas/bytebase.v1.DataSource.CloudSQLIPType'- saslConfig:- title: sasl_config- $ref: '#/components/schemas/bytebase.v1.SASLConfig'- additionalAddresses:- type: array- items:- $ref: '#/components/schemas/bytebase.v1.DataSource.Address'- title: additional_addresses- description: additional_addresses is used for MongoDB replica set.- directConnection:- type: boolean- title: direct_connection- description: direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.- region:- type: string- title: region- description: region is the location of where the DB is, works for AWS RDS. For example, us-east-1.- warehouseId:- type: string- title: warehouse_id- description: warehouse_id is used by Databricks.- masterName:- type: string- title: master_name- description: master_name is the master name used by connecting redis-master via redis sentinel.- masterUsername:- type: string- title: master_username- description: master_username and master_password are master credentials used by redis sentinel mode.- masterPassword:- type: string- title: master_password- redisType:- title: redis_type- $ref: '#/components/schemas/bytebase.v1.DataSource.RedisType'- extraConnectionParameters:- type: object- title: extra_connection_parameters- additionalProperties:- type: string- title: value- description: |-- Extra connection parameters for the database connection.- For PostgreSQL HA, this can be used to set target_session_attrs=read-write- projectId:- type: string- title: project_id- description: |-- project_id and instance_id are the GCP resource identifiers.- project_id is used by Spanner and BigQuery; instance_id is used by Spanner.- For these engines, host and port optionally override the default Google API- endpoint (e.g. a Private Service Connect endpoint like- spanner-nonprod.p.googleapis.com).- instanceId:- type: string- title: instance_id- - oneOf:- - type: object- properties:- awsCredential:- title: aws_credential- $ref: '#/components/schemas/bytebase.v1.DataSource.AWSCredential'+ anyOf:+ - type: object+ properties:+ awsCredential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.AWSCredential'title: aws_credential- required:- - awsCredential- - type: object- properties:- azureCredential:- title: azure_credential- $ref: '#/components/schemas/bytebase.v1.DataSource.AzureCredential'+ title: aws_credential+ - type: object+ properties:+ azureCredential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.AzureCredential'title: azure_credential- required:- - azureCredential- - type: object- properties:- gcpCredential:- title: gcp_credential- $ref: '#/components/schemas/bytebase.v1.DataSource.GCPCredential'+ title: azure_credential+ - type: object+ properties:+ gcpCredential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.GCPCredential'title: gcp_credential- required:- - gcpCredential- - not:- anyOf:- - required:- - awsCredential- - required:- - azureCredential- - required:- - gcpCredential+ title: gcp_credentialunevaluatedProperties: false- title: DataSource- bytebase.v1.DataSource.AWSCredential:- type: object+ not:+ allOf:+ - anyOf:+ - required:+ - awsCredential+ - required:+ - azureCredential+ - required:+ - gcpCredential+ - not:+ oneOf:+ - required:+ - awsCredential+ - required:+ - azureCredential+ - required:+ - gcpCredentialproperties:- accessKeyId:+ id:type: string- title: access_key_id- secretAccessKey:+ title: id+ description: The unique identifier for this data source.+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceType'+ title: type+ description: The type of data source (ADMIN or READ_ONLY).+ username:type: string- title: secret_access_key- sessionToken:+ title: username+ description: The username for database authentication.+ password:type: string- title: session_token- roleArn:+ title: password+ description: The password for database authentication.+ useSsl:+ type: boolean+ title: use_ssl+ description: Use SSL to connect to the data source. By default, we use system default SSL configuration.+ sslCa:type: string- title: role_arn- description: |-- ARN of IAM role to assume for cross-account access.- See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html- externalId:+ title: ssl_ca+ description: The SSL certificate authority certificate.+ sslCert:type: string- title: external_id+ title: ssl_cert+ description: The SSL client certificate.+ sslKey:+ type: string+ title: ssl_key+ description: The SSL client private key.+ sslCaPath:+ type: string+ title: ssl_ca_path+ description: The local filesystem path to the SSL certificate authority certificate.+ sslCertPath:+ type: string+ title: ssl_cert_path+ description: The local filesystem path to the SSL client certificate.+ sslKeyPath:+ type: string+ title: ssl_key_path+ description: The local filesystem path to the SSL client private key.+ sslCaSet:+ type: boolean+ title: ssl_ca_set+ description: Whether an SSL certificate authority certificate has been configured.+ sslCertSet:+ type: boolean+ title: ssl_cert_set+ description: Whether an SSL client certificate has been configured.+ sslKeySet:+ type: boolean+ title: ssl_key_set+ description: Whether an SSL client private key has been configured.+ sslCaPathSet:+ type: boolean+ title: ssl_ca_path_set+ description: Whether an SSL certificate authority path has been configured.+ sslCertPathSet:+ type: boolean+ title: ssl_cert_path_set+ description: Whether an SSL client certificate path has been configured.+ sslKeyPathSet:+ type: boolean+ title: ssl_key_path_set+ description: Whether an SSL client private key path has been configured.+ verifyTlsCertificate:+ type: boolean+ title: verify_tls_certificatedescription: |-- Optional external ID for additional security when assuming role.- See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html- title: AWSCredential- additionalProperties: false- bytebase.v1.DataSource.Address:- type: object- properties:+ verify_tls_certificate enables TLS certificate verification for SSL connections.+ Default is false (no verification) for backward compatibility.+ Set to true for secure connections (recommended for production).+ Only set to false for development or when certificates cannot be properly+ validated (e.g., self-signed certs, VPN environments).host:type: stringtitle: host+ description: The hostname or IP address of the database server.port:type: stringtitle: port- title: Address- additionalProperties: false- bytebase.v1.DataSource.AuthenticationType:- type: string- title: AuthenticationType- enum:- - AUTHENTICATION_UNSPECIFIED- - PASSWORD- - GOOGLE_CLOUD_SQL_IAM- - AWS_RDS_IAM- - AZURE_IAM+ description: The port number of the database server.+ database:+ type: string+ title: database+ description: The name of the database to connect to.+ srv:+ type: boolean+ title: srv+ description: |-+ srv, authentication_database and replica_set are used for MongoDB.+ srv is a boolean flag that indicates whether the host is a DNS SRV record.+ authenticationDatabase:+ type: string+ title: authentication_database+ description: authentication_database is the database name to authenticate against, which stores the user credentials.+ replicaSet:+ type: string+ title: replica_set+ description: replica_set is used for MongoDB replica set.+ sid:+ type: string+ title: sid+ description: sid and service_name are used for Oracle.+ serviceName:+ type: string+ title: service_name+ sshHost:+ type: string+ title: ssh_host+ description: |-+ Connection over SSH.+ The hostname of the SSH server agent.+ Required.+ sshPort:+ type: string+ title: ssh_port+ description: |-+ The port of the SSH server agent. It's 22 typically.+ Required.+ sshUser:+ type: string+ title: ssh_user+ description: |-+ The user to login the server.+ Required.+ sshPassword:+ type: string+ title: ssh_password+ description: The password to login the server. If it's empty string, no password is required.+ sshPrivateKey:+ type: string+ title: ssh_private_key+ description: The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK").+ authenticationPrivateKey:+ type: string+ title: authentication_private_key+ description: |-+ PKCS#8 private key in PEM format. If it's empty string, no private key is required.+ Used for authentication when connecting to the data source.+ authenticationPrivateKeyPassphrase:+ type: string+ title: authentication_private_key_passphrase+ description: Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted.+ externalSecret:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret'+ title: external_secret+ authenticationType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.AuthenticationType'+ title: authentication_type+ cloudSqlIpType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.CloudSQLIPType'+ title: cloud_sql_ip_type+ description: |-+ cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections.+ CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility.+ saslConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SASLConfig'+ title: sasl_config+ additionalAddresses:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.DataSource.Address'+ title: additional_addresses+ description: additional_addresses is used for MongoDB replica set.+ directConnection:+ type: boolean+ title: direct_connection+ description: direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.+ region:+ type: string+ title: region+ description: region is the location of where the DB is, works for AWS RDS. For example, us-east-1.+ warehouseId:+ type: string+ title: warehouse_id+ description: warehouse_id is used by Databricks.+ masterName:+ type: string+ title: master_name+ description: master_name is the master name used by connecting redis-master via redis sentinel.+ masterUsername:+ type: string+ title: master_username+ description: master_username and master_password are master credentials used by redis sentinel mode.+ masterPassword:+ type: string+ title: master_password+ redisType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.RedisType'+ title: redis_type+ extraConnectionParameters:+ type: object+ title: extra_connection_parameters+ additionalProperties:+ type: string+ title: value+ description: |-+ Extra connection parameters for the database connection.+ For PostgreSQL HA, this can be used to set target_session_attrs=read-write+ projectId:+ type: string+ title: project_id+ description: |-+ project_id and instance_id are the GCP resource identifiers.+ project_id is used by Spanner and BigQuery; instance_id is used by Spanner.+ For these engines, host and port optionally override the default Google API+ endpoint (e.g. a Private Service Connect endpoint like+ spanner-nonprod.p.googleapis.com).+ instanceId:+ type: string+ title: instance_id+ title: DataSource+ bytebase.v1.DataSource.AWSCredential:+ type: object+ properties:+ accessKeyId:+ type: string+ title: access_key_id+ secretAccessKey:+ type: string+ title: secret_access_key+ sessionToken:+ type: string+ title: session_token+ roleArn:+ type: string+ title: role_arn+ description: |-+ ARN of IAM role to assume for cross-account access.+ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html+ externalId:+ type: string+ title: external_id+ description: |-+ Optional external ID for additional security when assuming role.+ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html+ title: AWSCredential+ additionalProperties: false+ bytebase.v1.DataSource.Address:+ type: object+ properties:+ host:+ type: string+ title: host+ port:+ type: string+ title: port+ title: Address+ additionalProperties: false+ bytebase.v1.DataSource.AuthenticationType:+ type: string+ title: AuthenticationType+ enum:+ - AUTHENTICATION_UNSPECIFIED+ - PASSWORD+ - GOOGLE_CLOUD_SQL_IAM+ - AWS_RDS_IAM+ - AZURE_IAMbytebase.v1.DataSource.AzureCredential:type: objectproperties:@@ -11284,17 +12224,6 @@ components:- PRIVATE- PSCdescription: CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.- bytebase.v1.DataSource.ExtraConnectionParametersEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: ExtraConnectionParametersEntry- additionalProperties: falsebytebase.v1.DataSource.GCPCredential:type: objectproperties:@@ -11313,86 +12242,92 @@ components:- CLUSTERbytebase.v1.DataSourceExternalSecret:type: object- allOf:- - properties:- secretType:- title: secret_type- description: The type of external secret store.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.SecretType'- url:- type: string- title: url- description: The URL of the external secret store.- authType:- title: auth_type- description: The authentication method for accessing the secret store.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AuthType'- tokenType:- title: token_type- description: How to interpret the token field when auth_type is TOKEN.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.TokenType'- engineName:- type: string- title: engine_name- description: engine name is the name for secret engine.- secretName:- type: string- title: secret_name- description: the secret name in the engine to store the password.- passwordKeyName:- type: string- title: password_key_name- description: the key name for the password.- skipVaultTlsVerification:- type: boolean- title: skip_vault_tls_verification- description: |-- TLS configuration for connecting to Vault server.- These fields are separate from the database TLS configuration in DataSource.- skip_vault_tls_verification disables TLS certificate verification for Vault connections.- Default is false (verification enabled) for security.- Only set to true for development or when certificates cannot be properly validated.- vaultSslCa:- type: string- title: vault_ssl_ca- description: CA certificate for Vault server verification.- vaultSslCert:- type: string- title: vault_ssl_cert- description: Client certificate for mutual TLS authentication with Vault.- vaultSslKey:- type: string- title: vault_ssl_key- description: Client private key for mutual TLS authentication with Vault.- - oneOf:- - type: object- properties:- appRole:- title: app_role- description: AppRole authentication configuration.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption'+ anyOf:+ - type: object+ properties:+ appRole:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption'title: app_role- required:- - appRole- - type: object- properties:- token:- type: string- title: token- description: |-- Token for direct authentication. Interpreted according to token_type:- the literal token (PLAIN), an environment variable name (ENVIRONMENT),- or a file path (FILE).+ description: AppRole authentication configuration.+ title: app_role+ - type: object+ properties:+ token:+ type: stringtitle: token- required:- - token- - not:- anyOf:- - required:- - appRole- - required:- - token+ description: |-+ Token for direct authentication. Interpreted according to token_type:+ the literal token (PLAIN), an environment variable name (ENVIRONMENT),+ or a file path (FILE).+ title: tokenunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - appRole+ - required:+ - token+ - not:+ oneOf:+ - required:+ - appRole+ - required:+ - token+ properties:+ secretType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.SecretType'+ title: secret_type+ description: The type of external secret store.+ url:+ type: string+ title: url+ description: The URL of the external secret store.+ authType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AuthType'+ title: auth_type+ description: The authentication method for accessing the secret store.+ tokenType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.TokenType'+ title: token_type+ description: How to interpret the token field when auth_type is TOKEN.+ engineName:+ type: string+ title: engine_name+ description: engine name is the name for secret engine.+ secretName:+ type: string+ title: secret_name+ description: the secret name in the engine to store the password.+ passwordKeyName:+ type: string+ title: password_key_name+ description: the key name for the password.+ skipVaultTlsVerification:+ type: boolean+ title: skip_vault_tls_verification+ description: |-+ TLS configuration for connecting to Vault server.+ These fields are separate from the database TLS configuration in DataSource.+ skip_vault_tls_verification disables TLS certificate verification for Vault connections.+ Default is false (verification enabled) for security.+ Only set to true for development or when certificates cannot be properly validated.+ vaultSslCa:+ type: string+ title: vault_ssl_ca+ description: CA certificate for Vault server verification.+ vaultSslCert:+ type: string+ title: vault_ssl_cert+ description: Client certificate for mutual TLS authentication with Vault.+ vaultSslKey:+ type: string+ title: vault_ssl_key+ description: Client private key for mutual TLS authentication with Vault.title: DataSourceExternalSecretbytebase.v1.DataSourceExternalSecret.AppRoleAuthOption:type: object@@ -11406,9 +12341,10 @@ components:title: secret_iddescription: the secret id for the role without ttl.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType'title: typedescription: The type of secret for AppRole authentication.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType'mountPath:type: stringtitle: mount_path@@ -11464,13 +12400,15 @@ components:Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}{database} is the database name in the instance.state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The existence of a database.- $ref: '#/components/schemas/bytebase.v1.State'successfulSyncTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: successful_sync_timedescription: The latest synchronization time.- $ref: '#/components/schemas/google.protobuf.Timestamp'project:type: stringtitle: project@@ -11509,34 +12447,25 @@ components:title: valuedescription: Labels will be used for deployment and policy control.instanceResource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.InstanceResource'title: instance_resourcedescription: The instance resource.- $ref: '#/components/schemas/bytebase.v1.InstanceResource'backupAvailable:type: booleantitle: backup_availabledescription: The database is available for DML prior backup.syncStatus:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SyncStatus'title: sync_statusdescription: The sync status of the database.- $ref: '#/components/schemas/bytebase.v1.SyncStatus'syncError:type: stringtitle: sync_errordescription: The error message if sync failed.title: DatabaseadditionalProperties: false- bytebase.v1.Database.LabelsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: LabelsEntry- additionalProperties: falsebytebase.v1.DatabaseCatalog:type: objectproperties:@@ -11577,6 +12506,8 @@ components:maxLength: 200description: The short name used in actual databases specified by users.databaseExpr:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: database_exprdescription: |-The condition that is associated with this database group.@@ -11592,7 +12523,6 @@ components:For example:resource.environment_id == "test" && resource.database_name.startsWith("sample_")resource.database_labels["tenant"] == "tenant1"- $ref: '#/components/schemas/google.type.Expr'matchedDatabases:type: arrayitems:@@ -11929,6 +12859,8 @@ components:The database whose current schema is the diff source.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}targetMetadata:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: target_metadatadescription: |-The metadata of the target schema. The source metadata and the engine are@@ -11936,7 +12868,6 @@ components:Must describe the COMPLETE target schema: the diff runs against the fullstored source, so any object omitted from the target (for example by atruncated metadata fetch) is treated as dropped.- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: DiffMetadataRequestadditionalProperties: falsebytebase.v1.DiffMetadataResponse:@@ -11950,45 +12881,47 @@ components:additionalProperties: falsebytebase.v1.DiffSchemaRequest:type: object- allOf:- - properties:- name:+ anyOf:+ - type: object+ properties:+ changelog:type: string- title: name+ title: changelogdescription: |-- The name of the database or changelog.+ The resource name of the changelogFormat:- database: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- changelog: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}- - oneOf:- - type: object- properties:- changelog:- type: string- title: changelog- description: |-- The resource name of the changelog- Format:- instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}- title: changelog- required:- - changelog- - type: object- properties:- schema:- type: string- title: schema- description: The target schema.+ instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ title: changelog+ - type: object+ properties:+ schema:+ type: stringtitle: schema- required:- - schema- - not:- anyOf:- - required:- - changelog- - required:- - schema+ description: The target schema.+ title: schemaunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - changelog+ - required:+ - schema+ - not:+ oneOf:+ - required:+ - changelog+ - required:+ - schema+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the database or changelog.+ Format:+ database: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ changelog: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}title: DiffSchemaRequestbytebase.v1.DiffSchemaResponse:type: object@@ -12060,40 +12993,36 @@ components:Format: users/{email}. The caller's own, or another user's withbb.users.update.credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credentialdescription: |-Required for a self-service call against a live factor, and then onlyotp_code or recovery_code. Unused on an admin-assisted call.- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: DisableMFARequestadditionalProperties: falsebytebase.v1.EmailSetting:type: object- allOf:- - properties:- from:- type: string- title: from- fromName:- type: string- title: from_name- type:- title: type- $ref: '#/components/schemas/bytebase.v1.EmailSetting.Type'- - oneOf:- - type: object- properties:- smtp:- title: smtp- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig'+ anyOf:+ - type: object+ properties:+ smtp:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig'title: smtp- required:- - smtp- - not:- anyOf:- - required:- - smtp+ title: smtpunevaluatedProperties: false+ properties:+ from:+ type: string+ title: from+ fromName:+ type: string+ title: from_name+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting.Type'+ title: typetitle: EmailSettingbytebase.v1.EmailSetting.SMTPConfig:type: object@@ -12112,11 +13041,13 @@ components:type: stringtitle: passwordencryption:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Encryption'title: encryption- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Encryption'authentication:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Authentication'title: authentication- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Authentication'title: SMTPConfigadditionalProperties: falsebytebase.v1.EmailSetting.SMTPConfig.Authentication:@@ -12156,15 +13087,17 @@ components:maxLength: 64description: A code from the authenticator the pending secret was just added to.pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: The pending_version this enrollment was minted with.- $ref: '#/components/schemas/google.protobuf.Timestamp'credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credentialdescription: |-Proof of the *existing* factor, not the new device above. Required for arotation, and for first-time enrollment on an account with a password.- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: EnableMFARequestrequired:- pendingVersion@@ -12260,21 +13193,11 @@ components:type: stringtitle: valuecolor:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: color- $ref: '#/components/schemas/google.type.Color'title: EnvironmentadditionalProperties: false- bytebase.v1.EnvironmentSetting.Environment.TagsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: TagsEntry- additionalProperties: falsebytebase.v1.EventMetadata:type: objectproperties:@@ -12356,9 +13279,10 @@ components:- order_by = "create_time asc"- order_by = "create_time desc"format:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ExportFormat'title: formatdescription: The export format.- $ref: '#/components/schemas/bytebase.v1.ExportFormat'pageSize:type: integertitle: page_size@@ -12425,9 +13349,10 @@ components:format: int32description: The maximum number of rows to return.format:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ExportFormat'title: formatdescription: The export format.- $ref: '#/components/schemas/bytebase.v1.ExportFormat'admin:type: booleantitle: admin@@ -12667,8 +13592,9 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'expression:type: stringtitle: expression@@ -12720,8 +13646,9 @@ components:The name of the changelog to retrieve.Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}view:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: view- $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: GetChangelogRequestadditionalProperties: falsebytebase.v1.GetDatabaseCatalogRequest:@@ -12746,9 +13673,10 @@ components:The name of the database group to retrieve.Format: projects/{project}/databaseGroups/{databaseGroup}view:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: viewdescription: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.- $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: GetDatabaseGroupRequestadditionalProperties: falsedescription: Request message for getting a database group.@@ -12811,9 +13739,10 @@ components:The name of the database to retrieve SDL schema.Format: instances/{instance}/databases/{database}/sdlSchema or projects/{project}/instances/{instance}/databases/{database}/sdlSchemaformat:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'title: formatdescription: The format of the SDL schema output.- $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'title: GetDatabaseSDLSchemaRequestadditionalProperties: falsebytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat:@@ -13038,8 +13967,9 @@ components:The name of the database.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'title: type- $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'schema:type: stringtitle: schema@@ -13049,11 +13979,12 @@ components:title: objectdescription: It's empty for DATABASE and SCHEMA.metadata:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: metadatadescription: |-If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.Also the schema and object are empty.- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: GetSchemaStringRequestadditionalProperties: falsebytebase.v1.GetSchemaStringRequest.ObjectType:@@ -13103,8 +14034,9 @@ components:type: objectproperties:setting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Setting'title: setting- $ref: '#/components/schemas/bytebase.v1.Setting'title: GetSettingResponseadditionalProperties: falsedescription: The response message for getting a setting.@@ -13250,9 +14182,10 @@ components:Format: users/[email protected]role:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GroupMember.Role'title: roledescription: The member's role in the group.- $ref: '#/components/schemas/bytebase.v1.GroupMember.Role'title: GroupMemberadditionalProperties: falsedescription: A member of a group with a role.@@ -13305,83 +14238,96 @@ components:title: domaindescription: The domain for email matching when using this identity provider.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'title: typedescription: The type of identity provider protocol.- $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'config:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProviderConfig'title: configdescription: The configuration details for the identity provider.- $ref: '#/components/schemas/bytebase.v1.IdentityProviderConfig'title: IdentityProvideradditionalProperties: falsebytebase.v1.IdentityProviderConfig:type: object- oneOf:+ anyOf:- type: objectproperties:ldapConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig'title: ldap_configdescription: LDAP protocol configuration.- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig'title: ldap_config- required:- - ldapConfig- type: objectproperties:oauth2Config:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderConfig'title: oauth2_configdescription: OAuth2 protocol configuration.- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderConfig'title: oauth2_config- required:- - oauth2Config- type: objectproperties:oidcConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderConfig'title: oidc_configdescription: OIDC protocol configuration.- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderConfig'title: oidc_config- required:- - oidcConfig- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- ldapConfig- required:- oauth2Config- required:- oidcConfig- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - ldapConfig+ - required:+ - oauth2Config+ - required:+ - oidcConfigtitle: IdentityProviderConfigbytebase.v1.IdentityProviderContext:type: object- oneOf:+ anyOf:- type: objectproperties:oauth2Context:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderContext'title: oauth2_contextdescription: OAuth2 authentication context.- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderContext'title: oauth2_context- required:- - oauth2Context- type: objectproperties:oidcContext:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderContext'title: oidc_contextdescription: OpenID Connect authentication context.- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderContext'title: oidc_context- required:- - oidcContext- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- oauth2Context- required:- oidcContext- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - oauth2Context+ - required:+ - oidcContexttitle: IdentityProviderContextdescription: Context for identity provider authentication.bytebase.v1.IdentityProviderType:@@ -13410,9 +14356,7 @@ components:keyLength:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: key_lengthdescription: |-@@ -13457,9 +14401,7 @@ components:title: parent_index_namedescription: The index name of the parent index.granularity:- type:- - integer- - string+ type: stringtitle: granularityformat: int64description: The number of granules in the block. It's a ClickHouse specific field.@@ -13470,9 +14412,10 @@ components:It's a PostgreSQL specific field.The unique constraint and unique index are not the same thing in PostgreSQL.spatialConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SpatialIndexConfig'title: spatial_configdescription: Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc.- $ref: '#/components/schemas/bytebase.v1.SpatialIndexConfig'opclassNames:type: arrayitems:@@ -13500,18 +14443,20 @@ components:The name of the instance.Format: instances/{instance} or projects/{project}/instances/{instance}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the instance.- $ref: '#/components/schemas/bytebase.v1.State'title:type: stringtitle: titlemaxLength: 200description: The display title of the instance.engine:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Engine'title: enginedescription: The database engine type.- $ref: '#/components/schemas/bytebase.v1.Engine'engineVersion:type: stringtitle: engine_version@@ -13545,19 +14490,22 @@ components:title: rolesdescription: Database roles available in this instance.syncInterval:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: sync_intervaldescription: How often the instance is synced.- $ref: '#/components/schemas/google.protobuf.Duration'syncDatabases:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SyncDatabases'title: sync_databasesdescription: |-Enable sync for following databases.Not set means sync all schemas & databases.- $ref: '#/components/schemas/bytebase.v1.SyncDatabases'lastSyncTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_sync_timedescription: The last time the instance was synced.- $ref: '#/components/schemas/google.protobuf.Timestamp'labels:type: objecttitle: labels@@ -13569,17 +14517,6 @@ components:For example, { "org_group": "infrastructure", "environment": "production" }title: InstanceadditionalProperties: false- bytebase.v1.Instance.LabelsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: LabelsEntry- additionalProperties: falsebytebase.v1.InstanceResource:type: objectproperties:@@ -13588,9 +14525,10 @@ components:title: titledescription: The display title of the instance.engine:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Engine'title: enginedescription: The database engine type.- $ref: '#/components/schemas/bytebase.v1.Engine'engineVersion:type: stringtitle: engine_version@@ -13686,31 +14624,36 @@ components:maxLength: 10000description: The description of the issue.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue.Type'title: type- $ref: '#/components/schemas/bytebase.v1.Issue.Type'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueStatus'title: statusdescription: The status of the issue.- $ref: '#/components/schemas/bytebase.v1.IssueStatus'approvers:type: arrayitems:$ref: '#/components/schemas/bytebase.v1.Issue.Approver'title: approversapprovalTemplate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'title: approval_templatedescription: The approval template for the issue.- $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'creator:type: stringtitle: creatordescription: 'Format: users/[email protected]'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time- $ref: '#/components/schemas/google.protobuf.Timestamp'plan:type: stringtitle: plan@@ -13719,13 +14662,15 @@ components:Can be empty.Format: projects/{project}/plans/{plan}roleGrant:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RoleGrant'title: role_grantdescription: Used if the issue type is ROLE_GRANT.- $ref: '#/components/schemas/bytebase.v1.RoleGrant'riskLevel:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: risk_leveldescription: The risk level of the issue.- $ref: '#/components/schemas/bytebase.v1.RiskLevel'labels:type: arrayitems:@@ -13733,9 +14678,10 @@ components:title: labelsdescription: Labels attached to the issue for categorization and filtering.approvalStatus:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'title: approval_statusdescription: The overall approval status for the issue.- $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'accessGrant:type: stringtitle: access_grant@@ -13752,9 +14698,10 @@ components:type: objectproperties:status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue.Approver.Status'title: statusdescription: The new status.- $ref: '#/components/schemas/bytebase.v1.Issue.Approver.Status'principal:type: stringtitle: principal@@ -13782,115 +14729,125 @@ components:description: The type of issue.bytebase.v1.IssueComment:type: object- allOf:- - properties:- name:- type: string- title: name- description: 'Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid}'- comment:- type: string- title: comment- maxLength: 65536- description: The text content of the comment.- payload:- type: string- title: payload- description: 'TODO: use struct message instead.'- createTime:- title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'- updateTime:- title: update_time- $ref: '#/components/schemas/google.protobuf.Timestamp'- creator:- type: string- title: creator- description: 'Format: users/{email}'- root:- type:- - string- - "null"- title: root- description: |-- The thread root's name, set only on replies. Immutable after creation.- Format: projects/{project}/issues/{issue}/issueComments/{issueComment}- Must name a thread root in the same issue, never a general comment or reply.- threadState:- oneOf:- - $ref: '#/components/schemas/bytebase.v1.IssueComment.ThreadState'- - type: "null"- title: thread_state- description: |-- Present only on thread roots. Set OPEN on create to start a thread; an- anchored root starts one without it. Omit root, thread_state, and- statement_anchor to create a general comment.- Update through the thread_state field mask to resolve or reopen.- Adding a reply does not reopen a resolved thread.- statementAnchor:- title: statement_anchor- description: |-- Optional source context on a root or reply. A reply's anchor must share- the root's spec and sheet_sha256; it may narrow the range.- Cannot be set on events. Immutable after creation.- $ref: '#/components/schemas/bytebase.v1.StatementAnchor'- - oneOf:- - type: object- properties:- approval:- title: approval- description: Approval event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval'+ anyOf:+ - type: object+ properties:+ approval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval'title: approval- required:- - approval- - type: object- properties:- issueUpdate:- title: issue_update- description: Issue update event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.IssueUpdate'+ description: Approval event.+ title: approval+ - type: object+ properties:+ issueUpdate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.IssueUpdate'title: issue_update- required:- - issueUpdate- - type: object- properties:- planUpdate:- title: plan_update- description: Plan update event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanUpdate'+ description: Issue update event.+ title: issue_update+ - type: object+ properties:+ planUpdate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanUpdate'title: plan_update- required:- - planUpdate- - type: object- properties:- reviewSubmission:- title: review_submission- description: Review submission event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.ReviewSubmission'+ description: Plan update event.+ title: plan_update+ - type: object+ properties:+ reviewSubmission:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.ReviewSubmission'title: review_submission- required:- - reviewSubmission- - not:- anyOf:- - required:- - approval- - required:- - issueUpdate- - required:- - planUpdate- - required:- - reviewSubmission+ description: Review submission event.+ title: review_submissionunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - approval+ - required:+ - issueUpdate+ - required:+ - planUpdate+ - required:+ - reviewSubmission+ - not:+ oneOf:+ - required:+ - approval+ - required:+ - issueUpdate+ - required:+ - planUpdate+ - required:+ - reviewSubmission+ properties:+ name:+ type: string+ title: name+ description: 'Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid}'+ comment:+ type: string+ title: comment+ maxLength: 65536+ description: The text content of the comment.+ payload:+ type: string+ title: payload+ description: 'TODO: use struct message instead.'+ createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: create_time+ updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: update_time+ creator:+ type: string+ title: creator+ description: 'Format: users/{email}'+ root:+ type:+ - string+ - "null"+ title: root+ description: |-+ The thread root's name, set only on replies. Immutable after creation.+ Format: projects/{project}/issues/{issue}/issueComments/{issueComment}+ Must name a thread root in the same issue, never a general comment or reply.+ threadState:+ oneOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.ThreadState'+ - type: "null"+ title: thread_state+ description: |-+ Present only on thread roots. Set OPEN on create to start a thread; an+ anchored root starts one without it. Omit root, thread_state, and+ statement_anchor to create a general comment.+ Update through the thread_state field mask to resolve or reopen.+ Adding a reply does not reopen a resolved thread.+ statementAnchor:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StatementAnchor'+ title: statement_anchor+ description: |-+ Optional source context on a root or reply. A reply's anchor must share+ the root's spec and sheet_sha256; it may narrow the range.+ Cannot be set on events. Immutable after creation.title: IssueCommentdescription: A comment on an issue.bytebase.v1.IssueComment.Approval:type: objectproperties:status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval.Status'title: statusdescription: The approval status.- $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval.Status'title: ApprovaladditionalProperties: falsedescription: Approval event information.@@ -14065,17 +15022,19 @@ components:title: user_filterdescription: UserFilter is the filter to search for users, e.g., "(uid=%s)".securityProtocol:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol'title: security_protocoldescription: |-SecurityProtocol is the security protocol to be used for establishingconnections with the LDAP server.- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol'fieldMapping:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.FieldMapping'title: field_mappingdescription: |-FieldMapping is the mapping of the user attributes returned by the LDAPserver.- $ref: '#/components/schemas/bytebase.v1.FieldMapping'title: LDAPIdentityProviderConfigadditionalProperties: falsedescription: LDAPIdentityProviderConfig is the structure for LDAP identity provider config.@@ -14107,9 +15066,10 @@ components:title: valuedescription: The label value/name.color:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: colordescription: The label color.- $ref: '#/components/schemas/google.type.Color'group:type: stringtitle: group@@ -14227,8 +15187,9 @@ components:When paginating, all other parameters provided must matchthe call that provided the page token.view:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: view- $ref: '#/components/schemas/bytebase.v1.ChangelogView'filter:type: stringtitle: filter@@ -14274,9 +15235,10 @@ components:The parent resource whose database groups are to be listed.Format: projects/{project}view:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: viewdescription: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.- $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: ListDatabaseGroupsRequestadditionalProperties: falsedescription: Request message for listing database groups.@@ -15606,19 +16568,21 @@ components:The name of the identity provider.Format: idps/{idp}type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'title: typedescription: The type of identity provider protocol.- $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'title:type: stringtitle: titledescription: The display title of the identity provider.authorizationRequest:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AuthorizationRequest'title: authorization_requestdescription: |-The parameters the browser needs to start the authorization redirect.Set for OAUTH2 and OIDC, absent for LDAP, whose bind happens server-side.- $ref: '#/components/schemas/bytebase.v1.AuthorizationRequest'title: LoginIdentityProvideradditionalProperties: falsedescription: |-@@ -15659,9 +16623,10 @@ components:The name of the identity provider.Format: idps/{idp}idpContext:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProviderContext'title: idp_contextdescription: The idp_context is used to get the user information from identity provider.- $ref: '#/components/schemas/bytebase.v1.IdentityProviderContext'otpCode:type:- string@@ -15726,9 +16691,10 @@ components:title: require_reset_passworddescription: Whether user must reset password before continuing.user:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User'title: userdescription: The user from the successful login.- $ref: '#/components/schemas/bytebase.v1.User'title: LoginResponseadditionalProperties: falsebytebase.v1.LogoutRequest:@@ -15831,6 +16797,8 @@ components:type: objectproperties:capability:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MCPSetting.Capability'title: capabilitydescription: |-The maximum capability available to MCP sessions in this workspace, acting@@ -15839,7 +16807,6 @@ components:on the internal MCP chain decides, per request, which method classes areserved, and under READ_ONLY the SQL clamp decides, per statement, whetherit only reads.- $ref: '#/components/schemas/bytebase.v1.MCPSetting.Capability'ignoreMaskingExemptions:type: booleantitle: ignore_masking_exemptions@@ -15897,6 +16864,8 @@ components:For service accounts, the member should be: serviceAccount:{email}For workload identities, the member should be: workloadIdentity:{email}condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: |-The condition that is associated with this exception policy instance.@@ -15915,7 +16884,6 @@ components:For example:resource.instance_id == "local" && resource.database_name == "employee" && request.time < timestamp("2025-04-30T11:10:39.000Z")resource.instance_id == "local" && resource.database_name == "employee"- $ref: '#/components/schemas/google.type.Expr'title: ExemptionadditionalProperties: falsebytebase.v1.MaskingReason:@@ -15972,6 +16940,8 @@ components:title: iddescription: A unique identifier for the rule in UUID format.condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: |-The condition for the masking rule.@@ -15998,7 +16968,6 @@ components:resource.instance_id == "sample-instance" && resource.database_name == "employee" && resource.table_name in ["table1", "table2"]resource.environment_id != "test" || !(resource.project_id in ["poject1", "prject2"])resource.instance_id == "sample-instance" && (resource.database_name == "db1" || resource.database_name == "db2")- $ref: '#/components/schemas/google.type.Expr'semanticType:type: stringtitle: semantic_type@@ -16116,17 +17085,19 @@ components:title: scopesdescription: The list of OAuth2 scopes to request.fieldMapping:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.FieldMapping'title: field_mappingdescription: Mapping configuration for user attributes from OAuth2 response.- $ref: '#/components/schemas/bytebase.v1.FieldMapping'skipTlsVerify:type: booleantitle: skip_tls_verifydescription: Whether to skip TLS certificate verification.authStyle:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'title: auth_styledescription: The authentication style for client credentials.- $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'title: OAuth2IdentityProviderConfigadditionalProperties: falsedescription: OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.@@ -16174,17 +17145,19 @@ components:The scopes that the OIDC provider supports.Should be fetched from the well-known configuration file of the OIDC provider.fieldMapping:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.FieldMapping'title: field_mappingdescription: Mapping configuration for user attributes from OIDC claims.- $ref: '#/components/schemas/bytebase.v1.FieldMapping'skipTlsVerify:type: booleantitle: skip_tls_verifydescription: Whether to skip TLS certificate verification.authStyle:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'title: auth_styledescription: The authentication style for client credentials.- $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'authEndpoint:type: stringtitle: auth_endpoint@@ -16216,51 +17189,57 @@ components:additionalProperties: falsebytebase.v1.ObjectSchema:type: object- allOf:- - properties:- type:- title: type- description: The data type of this object.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.Type'- semanticType:- type: string- title: semantic_type- description: The semantic type of this object.- - oneOf:- - type: object- properties:- arrayKind:- title: array_kind- description: Array schema.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.ArrayKind'+ anyOf:+ - type: object+ properties:+ arrayKind:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema.ArrayKind'title: array_kind- required:- - arrayKind- - type: object- properties:- structKind:- title: struct_kind- description: Struct schema.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.StructKind'+ description: Array schema.+ title: array_kind+ - type: object+ properties:+ structKind:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema.StructKind'title: struct_kind- required:- - structKind- - not:- anyOf:- - required:- - arrayKind- - required:- - structKind+ description: Struct schema.+ title: struct_kindunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - arrayKind+ - required:+ - structKind+ - not:+ oneOf:+ - required:+ - arrayKind+ - required:+ - structKind+ properties:+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema.Type'+ title: type+ description: The data type of this object.+ semanticType:+ type: string+ title: semantic_type+ description: The semantic type of this object.title: ObjectSchemadescription: Schema definition for object-type columns.bytebase.v1.ObjectSchema.ArrayKind:type: objectproperties:kind:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema'title: kinddescription: The schema of array elements.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'title: ArrayKindadditionalProperties: falsedescription: Array type with element schema.@@ -16271,23 +17250,13 @@ components:type: objecttitle: propertiesadditionalProperties:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema'title: value- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'description: Properties of the struct.title: StructKindadditionalProperties: falsedescription: Structure type with named properties.- bytebase.v1.ObjectSchema.StructKind.PropertiesEntry:- type: object- properties:- key:- type: string- title: key- value:- title: value- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'- title: PropertiesEntry- additionalProperties: falsebytebase.v1.ObjectSchema.Type:type: stringtitle: Type@@ -16380,9 +17349,10 @@ components:`plan` is a system generated ID.Format: projects/{project}/plans/{plan}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The state of the plan.- $ref: '#/components/schemas/bytebase.v1.State'issue:type: stringtitle: issue@@ -16411,11 +17381,13 @@ components:title: creatordescription: 'Format: users/[email protected]'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time- $ref: '#/components/schemas/google.protobuf.Timestamp'planCheckRunStatusCount:type: objecttitle: plan_check_run_status_count@@ -16435,11 +17407,12 @@ components:title: has_rolloutdescription: Whether the plan has started the rollout.approvalStatus:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'title: approval_statusdescription: |-The approval status of the linked issue.Unspecified when no linked issue exists or the linked issue is a draft.- $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'rolloutStageSummaries:type: arrayitems:@@ -16449,11 +17422,12 @@ components:Per-stage rollout status summary.Ordered by environment deployment order. Empty when no rollout exists.issueStatus:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueStatus'title: issue_statusdescription: |-The lifecycle status of the linked issue.Unspecified when no linked issue exists.- $ref: '#/components/schemas/bytebase.v1.IssueStatus'lastPlanEditor:type: stringtitle: last_plan_editor@@ -16536,22 +17510,10 @@ components:Format: environments/prod where prod is the environment resource ID.title: CreateDatabaseConfigadditionalProperties: false- bytebase.v1.Plan.PlanCheckRunStatusCountEntry:+ bytebase.v1.Plan.RolloutStageSummary:type: objectproperties:- key:- type: string- title: key- value:- type: integer- title: value- format: int32- title: PlanCheckRunStatusCountEntry- additionalProperties: false- bytebase.v1.Plan.RolloutStageSummary:- type: object- properties:- stage:+ stage:type: stringtitle: stagedescription: |-@@ -16567,44 +17529,49 @@ components:additionalProperties: falsebytebase.v1.Plan.Spec:type: object- allOf:- - properties:- id:- type: string- title: id- description: A UUID4 string that uniquely identifies the Spec.- - oneOf:- - type: object- properties:- changeDatabaseConfig:- title: change_database_config- $ref: '#/components/schemas/bytebase.v1.Plan.ChangeDatabaseConfig'+ anyOf:+ - type: object+ properties:+ changeDatabaseConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan.ChangeDatabaseConfig'title: change_database_config- required:- - changeDatabaseConfig- - type: object- properties:- createDatabaseConfig:- title: create_database_config- $ref: '#/components/schemas/bytebase.v1.Plan.CreateDatabaseConfig'+ title: change_database_config+ - type: object+ properties:+ createDatabaseConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan.CreateDatabaseConfig'title: create_database_config- required:- - createDatabaseConfig- - not:- anyOf:- - required:- - changeDatabaseConfig- - required:- - createDatabaseConfig+ title: create_database_configunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - changeDatabaseConfig+ - required:+ - createDatabaseConfig+ - not:+ oneOf:+ - required:+ - changeDatabaseConfig+ - required:+ - createDatabaseConfig+ properties:+ id:+ type: string+ title: id+ description: A UUID4 string that uniquely identifies the Spec.title: Specbytebase.v1.Plan.TaskStatusCount:type: objectproperties:status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.Status'title: statusdescription: The task status.- $ref: '#/components/schemas/bytebase.v1.Task.Status'count:type: integertitle: count@@ -16620,8 +17587,9 @@ components:title: namedescription: 'Format: projects/{project}/plans/{plan}/planCheckRun'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Status'title: status- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Status'results:type: arrayitems:@@ -16632,71 +17600,80 @@ components:title: errordescription: error is set if the Status is FAILED.createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'title: PlanCheckRunadditionalProperties: falsebytebase.v1.PlanCheckRun.Result:type: object- allOf:- - properties:- status:- title: status- $ref: '#/components/schemas/bytebase.v1.Advice.Level'- title:- type: string- title: title- content:- type: string- title: content- code:- type: integer- title: code- format: int32- target:- type: string- title: target- description: |-- Target identification for consolidated results.- Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- type:- title: type- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.Type'- - oneOf:- - type: object- properties:- sqlReviewReport:- title: sql_review_report- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlReviewReport'+ anyOf:+ - type: object+ properties:+ sqlReviewReport:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlReviewReport'title: sql_review_report- required:- - sqlReviewReport- - type: object- properties:- sqlSummaryReport:- title: sql_summary_report- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlSummaryReport'+ title: sql_review_report+ - type: object+ properties:+ sqlSummaryReport:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlSummaryReport'title: sql_summary_report- required:- - sqlSummaryReport- - not:- anyOf:- - required:- - sqlReviewReport- - required:- - sqlSummaryReport+ title: sql_summary_reportunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - sqlReviewReport+ - required:+ - sqlSummaryReport+ - not:+ oneOf:+ - required:+ - sqlReviewReport+ - required:+ - sqlSummaryReport+ properties:+ status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Advice.Level'+ title: status+ title:+ type: string+ title: title+ content:+ type: string+ title: content+ code:+ type: integer+ title: code+ format: int32+ target:+ type: string+ title: target+ description: |-+ Target identification for consolidated results.+ Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.Type'+ title: typetitle: Resultbytebase.v1.PlanCheckRun.Result.SqlReviewReport:type: objectproperties:startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: Position of the SQL statement.- $ref: '#/components/schemas/bytebase.v1.Position'endPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: end_position- $ref: '#/components/schemas/bytebase.v1.Position'title: SqlReviewReportadditionalProperties: falsebytebase.v1.PlanCheckRun.Result.SqlSummaryReport:@@ -16709,9 +17686,7 @@ components:title: statement_typesdescription: statement_types are the types of statements that are found in the sql.affectedRows:- type:- - integer- - string+ type: stringtitle: affected_rowsformat: int64title: SqlSummaryReport@@ -16830,8 +17805,9 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: type- $ref: '#/components/schemas/bytebase.v1.PlanType'maximumInstanceCount:type: integertitle: maximum_instance_count@@ -16858,86 +17834,95 @@ components:- ENTERPRISEbytebase.v1.Policy:type: object- allOf:- - properties:- name:- type: string- title: name- description: |-- The name of the policy.- Format: {resource name}/policies/{policy type}- Workspace resource name: workspaces/{workspace-id}.- Environment resource name: environments/environment-id.- inheritFromParent:- type: boolean- title: inherit_from_parent- description: Whether this policy inherits from its parent resource.- type:- title: type- description: The type of policy.- $ref: '#/components/schemas/bytebase.v1.PolicyType'- enforce:- type: boolean- title: enforce- description: Whether the policy is enforced.- resourceType:- title: resource_type- description: The resource type for the policy.- $ref: '#/components/schemas/bytebase.v1.PolicyResourceType'- - oneOf:- - type: object- properties:- maskingExemptionPolicy:- title: masking_exemption_policy- $ref: '#/components/schemas/bytebase.v1.MaskingExemptionPolicy'+ anyOf:+ - type: object+ properties:+ maskingExemptionPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MaskingExemptionPolicy'title: masking_exemption_policy- required:- - maskingExemptionPolicy- - type: object- properties:- maskingRulePolicy:- title: masking_rule_policy- $ref: '#/components/schemas/bytebase.v1.MaskingRulePolicy'+ title: masking_exemption_policy+ - type: object+ properties:+ maskingRulePolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MaskingRulePolicy'title: masking_rule_policy- required:- - maskingRulePolicy- - type: object- properties:- queryDataPolicy:- title: query_data_policy- $ref: '#/components/schemas/bytebase.v1.QueryDataPolicy'+ title: masking_rule_policy+ - type: object+ properties:+ queryDataPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryDataPolicy'title: query_data_policy- required:- - queryDataPolicy- - type: object- properties:- rolloutPolicy:- title: rollout_policy- $ref: '#/components/schemas/bytebase.v1.RolloutPolicy'+ title: query_data_policy+ - type: object+ properties:+ rolloutPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RolloutPolicy'title: rollout_policy- required:- - rolloutPolicy- - type: object- properties:- tagPolicy:- title: tag_policy- $ref: '#/components/schemas/bytebase.v1.TagPolicy'+ title: rollout_policy+ - type: object+ properties:+ tagPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TagPolicy'title: tag_policy- required:- - tagPolicy- - not:- anyOf:- - required:- - maskingExemptionPolicy- - required:- - maskingRulePolicy- - required:- - queryDataPolicy- - required:- - rolloutPolicy- - required:- - tagPolicy+ title: tag_policyunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - maskingExemptionPolicy+ - required:+ - maskingRulePolicy+ - required:+ - queryDataPolicy+ - required:+ - rolloutPolicy+ - required:+ - tagPolicy+ - not:+ oneOf:+ - required:+ - maskingExemptionPolicy+ - required:+ - maskingRulePolicy+ - required:+ - queryDataPolicy+ - required:+ - rolloutPolicy+ - required:+ - tagPolicy+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the policy.+ Format: {resource name}/policies/{policy type}+ Workspace resource name: workspaces/{workspace-id}.+ Environment resource name: environments/environment-id.+ inheritFromParent:+ type: boolean+ title: inherit_from_parent+ description: Whether this policy inherits from its parent resource.+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyType'+ title: type+ description: The type of policy.+ enforce:+ type: boolean+ title: enforce+ description: Whether the policy is enforced.+ resourceType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyResourceType'+ title: resource_type+ description: The resource type for the policy.title: Policybytebase.v1.PolicyDelta:type: object@@ -17082,9 +18067,10 @@ components:The name of the project.Format: projects/{project}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the project.- $ref: '#/components/schemas/bytebase.v1.State'title:type: stringtitle: title@@ -17125,9 +18111,10 @@ components:title: allow_self_approvaldescription: Whether to allow issue creators to self-approve their own issues.executionRetryPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Project.ExecutionRetryPolicy'title: execution_retry_policydescription: Execution retry policy for task runs.- $ref: '#/components/schemas/bytebase.v1.Project.ExecutionRetryPolicy'ciSamplingSize:type: integertitle: ci_sampling_size@@ -17187,34 +18174,26 @@ components:title: ExecutionRetryPolicyadditionalProperties: falsedescription: Execution retry policy configuration.- bytebase.v1.Project.LabelsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: LabelsEntry- additionalProperties: falsebytebase.v1.PurchaseBillingMethod:type: objectproperties:interval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BillingInterval'title: interval- $ref: '#/components/schemas/bytebase.v1.BillingInterval'discount:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount'title: discount- $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount'title: PurchaseBillingMethodadditionalProperties: falsebytebase.v1.PurchaseDiscount:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount.Type'title: type- $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount.Type'value:type: integertitle: value@@ -17233,8 +18212,9 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: type- $ref: '#/components/schemas/bytebase.v1.PlanType'selfServicePurchase:type: booleantitle: self_service_purchase@@ -17254,8 +18234,9 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PurchasePlanAdditional.Type'title: type- $ref: '#/components/schemas/bytebase.v1.PurchasePlanAdditional.Type'unitPrice:type: integertitle: unit_price@@ -17352,8 +18333,9 @@ components:type: stringtitle: creatorcreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'statement:type: stringtitle: statement@@ -17363,11 +18345,13 @@ components:- "null"title: errorduration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: duration- $ref: '#/components/schemas/google.protobuf.Duration'type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryHistory.Type'title: type- $ref: '#/components/schemas/bytebase.v1.QueryHistory.Type'title: QueryHistoryadditionalProperties: falsebytebase.v1.QueryHistory.Type:@@ -17381,20 +18365,30 @@ components:type: objectproperties:redisRunCommandsOn:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryOption.RedisRunCommandsOn'title: redis_run_commands_on- $ref: '#/components/schemas/bytebase.v1.QueryOption.RedisRunCommandsOn'- mssqlExplainFormat:- title: mssql_explain_format- $ref: '#/components/schemas/bytebase.v1.QueryOption.MSSQLExplainFormat'+ explainFormat:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryOption.ExplainFormat'+ title: explain_formattitle: QueryOptionadditionalProperties: false- bytebase.v1.QueryOption.MSSQLExplainFormat:+ bytebase.v1.QueryOption.ExplainFormat:type: string- title: MSSQLExplainFormat+ title: ExplainFormatenum:- - MSSQL_EXPLAIN_FORMAT_UNSPECIFIED- - MSSQL_EXPLAIN_FORMAT_ALL- - MSSQL_EXPLAIN_FORMAT_XML+ - EXPLAIN_FORMAT_UNSPECIFIED+ - TEXT+ - JSON+ - XML+ description: |-+ Which explain output the caller wants, for an explain request.++ Leave it unspecified for the engine's own default, which is the only+ output most engines have. Naming a format an engine cannot produce is+ INVALID_ARGUMENT rather than a silent fallback, as is any explain request+ against an engine that has no explain at all.bytebase.v1.QueryOption.RedisRunCommandsOn:type: stringtitle: RedisRunCommandsOn@@ -17443,8 +18437,9 @@ components:The default schema to search objects. Equals to the current schema inOracle and search path in Postgres.queryOption:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryOption'title: query_option- $ref: '#/components/schemas/bytebase.v1.QueryOption'container:type:- string@@ -17475,112 +18470,118 @@ components:additionalProperties: falsebytebase.v1.QueryResult:type: object- allOf:- - properties:- columnNames:- type: array- items:- type: string- title: column_names- description: Column names of the query result.- columnTypeNames:- type: array- items:- type: string- title: column_type_names- description: |-- Column types of the query result.- The types come from the Golang SQL driver.- rows:- type: array- items:- $ref: '#/components/schemas/bytebase.v1.QueryRow'- title: rows- description: Rows of the query result.- rowsCount:- type:- - integer- - string- title: rows_count- format: int64- error:- type: string- title: error- description: The error message if the query failed.- latency:- title: latency- description: The time it takes to execute the query.- $ref: '#/components/schemas/google.protobuf.Duration'- statement:- type: string- title: statement- description: The query statement for the result.- messages:- type: array- items:- $ref: '#/components/schemas/bytebase.v1.QueryResult.Message'- title: messages- description: |-- Informational or debug messages returned by the database engine during query execution.- Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE.- masked:- type: array- items:- $ref: '#/components/schemas/bytebase.v1.MaskingReason'- title: masked- description: Masking reasons for each column (empty for non-masked columns).- - oneOf:- - type: object- properties:- commandError:- title: command_error- $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError'+ anyOf:+ - type: object+ properties:+ commandError:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError'title: command_error- required:- - commandError- - type: object- properties:- permissionDenied:- title: permission_denied- $ref: '#/components/schemas/bytebase.v1.PermissionDeniedDetail'+ title: command_error+ - type: object+ properties:+ permissionDenied:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PermissionDeniedDetail'title: permission_denied- required:- - permissionDenied- - type: object- properties:- postgresError:- title: postgres_error- $ref: '#/components/schemas/bytebase.v1.QueryResult.PostgresError'+ title: permission_denied+ - type: object+ properties:+ postgresError:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.PostgresError'title: postgres_error- required:- - postgresError- - type: object- properties:- syntaxError:- title: syntax_error- $ref: '#/components/schemas/bytebase.v1.QueryResult.SyntaxError'+ title: postgres_error+ - type: object+ properties:+ syntaxError:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.SyntaxError'title: syntax_error- required:- - syntaxError- - not:- anyOf:- - required:- - commandError- - required:- - permissionDenied- - required:- - postgresError- - required:- - syntaxError+ title: syntax_errorunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - commandError+ - required:+ - permissionDenied+ - required:+ - postgresError+ - required:+ - syntaxError+ - not:+ oneOf:+ - required:+ - commandError+ - required:+ - permissionDenied+ - required:+ - postgresError+ - required:+ - syntaxError+ properties:+ columnNames:+ type: array+ items:+ type: string+ title: column_names+ description: Column names of the query result.+ columnTypeNames:+ type: array+ items:+ type: string+ title: column_type_names+ description: |-+ Column types of the query result.+ The types come from the Golang SQL driver.+ rows:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.QueryRow'+ title: rows+ description: Rows of the query result.+ rowsCount:+ type: string+ title: rows_count+ format: int64+ error:+ type: string+ title: error+ description: The error message if the query failed.+ latency:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'+ title: latency+ description: The time it takes to execute the query.+ statement:+ type: string+ title: statement+ description: The query statement for the result.+ messages:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.QueryResult.Message'+ title: messages+ description: |-+ Informational or debug messages returned by the database engine during query execution.+ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE.+ masked:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.MaskingReason'+ title: masked+ description: Masking reasons for each column (empty for non-masked columns).title: QueryResultbytebase.v1.QueryResult.CommandError:type: objectproperties:commandType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError.Type'title: command_typedescription: Disallowed command_type.- $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError.Type'title: CommandErroradditionalProperties: falsedescription: |-@@ -17598,8 +18599,9 @@ components:type: objectproperties:level:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.Message.Level'title: level- $ref: '#/components/schemas/bytebase.v1.QueryResult.Message.Level'content:type: stringtitle: content@@ -17682,9 +18684,10 @@ components:type: objectproperties:startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: Position information for highlighting in editor- $ref: '#/components/schemas/bytebase.v1.Position'title: SyntaxErroradditionalProperties: falsedescription: Syntax error with position information for editor highlighting@@ -17748,9 +18751,10 @@ components:title: recovery_codesdescription: The pending recovery codes, shown once for the caller to save.pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: Identifies this mint; see StartMFAEnrollmentResponse.pending_version.- $ref: '#/components/schemas/google.protobuf.Timestamp'title: RegenerateRecoveryCodesResponseadditionalProperties: falsebytebase.v1.RejectIssueRequest:@@ -17788,24 +18792,28 @@ components:title: filesdescription: The SQL files included in the release.vcsSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release.VCSSource'title: vcs_sourcedescription: The version control source of the release.- $ref: '#/components/schemas/bytebase.v1.Release.VCSSource'creator:type: stringtitle: creatordescription: 'Format: users/[email protected]'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the release.- $ref: '#/components/schemas/bytebase.v1.State'type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release.Type'title: typedescription: The type of schema change for all files in this release.- $ref: '#/components/schemas/bytebase.v1.Release.Type'title: ReleaseadditionalProperties: falsebytebase.v1.Release.File:@@ -17852,9 +18860,10 @@ components:type: objectproperties:vcsType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.VCSType'title: vcs_typedescription: The type of VCS.- $ref: '#/components/schemas/bytebase.v1.VCSType'url:type: stringtitle: url@@ -17872,20 +18881,22 @@ components:The name of the instance to remove a data source from.Format: instances/{instance} or projects/{project}/instances/{instance}dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: |-Identified by data source ID.Only READ_ONLY data source can be removed.- $ref: '#/components/schemas/bytebase.v1.DataSource'title: RemoveDataSourceRequestadditionalProperties: falsebytebase.v1.RemoveWebhookRequest:type: objectproperties:webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to remove. Identified by its url.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: RemoveWebhookRequestadditionalProperties: falsebytebase.v1.RequestIssueRequest:@@ -17989,9 +19000,10 @@ components:title: disallow_password_signindescription: Whether password sign-in is disabled for all end users.passwordRestriction:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'title: password_restrictiondescription: Password complexity and restriction requirements.- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'allowEmailCodeSignin:type: booleantitle: allow_email_code_signin@@ -18060,22 +19072,26 @@ components:The {reviewRun} id is the reviewer: "rule" or "guideline". The nameaddresses a slot, not an execution.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewRun.Type'title: typedescription: Derived from the name.- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Type'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewRun.Status'title: status- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Status'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: When the current run was triggered. Reset on every re-run.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: |-When the run reached a terminal status. Unset while AVAILABLE orRUNNING.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -18119,8 +19135,9 @@ components:Format: projects/{project}/releases/{release}Can be empty.createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'deleter:type: stringtitle: deleter@@ -18128,9 +19145,10 @@ components:Format: users/[email protected]Can be empty.deleteTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: delete_timedescription: Can be empty.- $ref: '#/components/schemas/google.protobuf.Timestamp'file:type: stringtitle: file@@ -18160,9 +19178,10 @@ components:Can be empty.Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Revision.Type'title: typedescription: The type of the revision.- $ref: '#/components/schemas/bytebase.v1.Revision.Type'title: RevisionadditionalProperties: falsebytebase.v1.Revision.Type:@@ -18217,9 +19236,10 @@ components:title: permissionsdescription: List of permission identifiers granted by this role.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Role.Type'title: typedescription: Role type indicating if it's built-in or custom.- $ref: '#/components/schemas/bytebase.v1.Role.Type'title: RoleadditionalProperties: falsedescription: Role defines a set of permissions that can be assigned to users.@@ -18246,13 +19266,15 @@ components:The user to be granted.Format: users/{email}.condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: The condition for the role. Same as the condition in IAM Binding message.- $ref: '#/components/schemas/google.type.Expr'expiration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: expirationdescription: The duration for which the grant is valid.- $ref: '#/components/schemas/google.protobuf.Duration'title: RoleGrantadditionalProperties: falsebytebase.v1.Rollout:@@ -18277,11 +19299,13 @@ components:title: stagesdescription: Stages and thus tasks of the rollout.createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time- $ref: '#/components/schemas/google.protobuf.Timestamp'title: RolloutadditionalProperties: falsebytebase.v1.RolloutPolicy:@@ -18322,15 +19346,13 @@ components:additionalProperties: falsebytebase.v1.RowValue:type: object- oneOf:+ anyOf:- type: objectproperties:boolValue:type: booleantitle: bool_valuetitle: bool_value- required:- - boolValue- type: objectproperties:bytesValue:@@ -18338,8 +19360,6 @@ components:title: bytes_valueformat: bytetitle: bytes_value- required:- - bytesValue- type: objectproperties:doubleValue:@@ -18347,8 +19367,6 @@ components:title: double_valueformat: doubletitle: double_value- required:- - doubleValue- type: objectproperties:floatValue:@@ -18356,8 +19374,6 @@ components:title: float_valueformat: floattitle: float_value- required:- - floatValue- type: objectproperties:int32Value:@@ -18365,89 +19381,73 @@ components:title: int32_valueformat: int32title: int32_value- required:- - int32Value- type: objectproperties:int64Value:- type:- - integer- - string+ type: stringtitle: int64_valueformat: int64title: int64_value- required:- - int64Value- type: objectproperties:nullValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.NullValue'title: null_value- $ref: '#/components/schemas/google.protobuf.NullValue'title: null_value- required:- - nullValue- type: objectproperties:stringValue:type: stringtitle: string_valuetitle: string_value- required:- - stringValue- type: objectproperties:timestampTzValue:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RowValue.TimestampTZ'title: timestamp_tz_valuedescription: |-timestamp_tz_value is used for the timestamptz data type, whichaccurately represents the timestamp with location information.- $ref: '#/components/schemas/bytebase.v1.RowValue.TimestampTZ'title: timestamp_tz_value- required:- - timestampTzValue- type: objectproperties:timestampValue:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RowValue.Timestamp'title: timestamp_valuedescription: |-timestamp_value is used for the timestamp without time zone data type,meaning it only includes the timestamp without any time zone or locationinfo. Although it may be expressed as a UTC value, it should be seen as atimestamp missing location context.- $ref: '#/components/schemas/bytebase.v1.RowValue.Timestamp'title: timestamp_value- required:- - timestampValue- type: objectproperties:uint32Value:type: integertitle: uint32_valuetitle: uint32_value- required:- - uint32Value- type: objectproperties:uint64Value:- type:- - integer- - string+ type: stringtitle: uint64_valueformat: int64title: uint64_value- required:- - uint64Value- type: objectproperties:valueValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Value'title: value_valuedescription: value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only.- $ref: '#/components/schemas/google.protobuf.Value'title: value_value- required:- - valueValue- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- boolValue- required:@@ -18474,14 +19474,42 @@ components:- uint64Value- required:- valueValue- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - boolValue+ - required:+ - bytesValue+ - required:+ - doubleValue+ - required:+ - floatValue+ - required:+ - int32Value+ - required:+ - int64Value+ - required:+ - nullValue+ - required:+ - stringValue+ - required:+ - timestampTzValue+ - required:+ - timestampValue+ - required:+ - uint32Value+ - required:+ - uint64Value+ - required:+ - valueValuetitle: RowValuebytebase.v1.RowValue.Timestamp:type: objectproperties:googleTimestamp:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: google_timestamp- $ref: '#/components/schemas/google.protobuf.Timestamp'accuracy:type: integertitle: accuracy@@ -18493,8 +19521,9 @@ components:type: objectproperties:googleTimestamp:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: google_timestamp- $ref: '#/components/schemas/google.protobuf.Timestamp'zone:type: stringtitle: zone@@ -18551,20 +19580,15 @@ components:additionalProperties: falsebytebase.v1.SASLConfig:type: object- oneOf:+ anyOf:- type: objectproperties:krbConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.KerberosConfig'title: krb_configdescription: Kerberos authentication configuration.- $ref: '#/components/schemas/bytebase.v1.KerberosConfig'title: krb_config- required:- - krbConfig- - not:- anyOf:- - required:- - krbConfigunevaluatedProperties: falsetitle: SASLConfigbytebase.v1.SQLEditorThemeSetting:@@ -18583,102 +19607,103 @@ components:type: objecttitle: tokensadditionalProperties:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: value- $ref: '#/components/schemas/google.type.Color'description: CSS token colors.title: SQLEditorThemeSettingadditionalProperties: false- bytebase.v1.SQLEditorThemeSetting.TokensEntry:- type: object- properties:- key:- type: string- title: key- value:- title: value- $ref: '#/components/schemas/google.type.Color'- title: TokensEntry- additionalProperties: falsebytebase.v1.SQLReviewRule:type: object- allOf:- - properties:- type:- title: type- description: The type of SQL review rule.- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Type'- level:- title: level- description: The severity level of the rule.- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Level'- engine:- title: engine- description: The database engine this rule applies to.- $ref: '#/components/schemas/bytebase.v1.Engine'- - oneOf:- - type: object- properties:- commentConventionPayload:- title: comment_convention_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.CommentConventionRulePayload'+ anyOf:+ - type: object+ properties:+ commentConventionPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.CommentConventionRulePayload'title: comment_convention_payload- required:- - commentConventionPayload- - type: object- properties:- namingCasePayload:- title: naming_case_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingCaseRulePayload'+ title: comment_convention_payload+ - type: object+ properties:+ namingCasePayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingCaseRulePayload'title: naming_case_payload- required:- - namingCasePayload- - type: object- properties:- namingPayload:- title: naming_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingRulePayload'+ title: naming_case_payload+ - type: object+ properties:+ namingPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingRulePayload'title: naming_payload- required:- - namingPayload- - type: object- properties:- numberPayload:- title: number_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NumberRulePayload'+ title: naming_payload+ - type: object+ properties:+ numberPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NumberRulePayload'title: number_payload- required:- - numberPayload- - type: object- properties:- stringArrayPayload:- title: string_array_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringArrayRulePayload'+ title: number_payload+ - type: object+ properties:+ stringArrayPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringArrayRulePayload'title: string_array_payload- required:- - stringArrayPayload- - type: object- properties:- stringPayload:- title: string_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringRulePayload'+ title: string_array_payload+ - type: object+ properties:+ stringPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringRulePayload'title: string_payload- required:- - stringPayload- - not:- anyOf:- - required:- - commentConventionPayload- - required:- - namingCasePayload- - required:- - namingPayload- - required:- - numberPayload- - required:- - stringArrayPayload- - required:- - stringPayload+ title: string_payloadunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - commentConventionPayload+ - required:+ - namingCasePayload+ - required:+ - namingPayload+ - required:+ - numberPayload+ - required:+ - stringArrayPayload+ - required:+ - stringPayload+ - not:+ oneOf:+ - required:+ - commentConventionPayload+ - required:+ - namingCasePayload+ - required:+ - namingPayload+ - required:+ - numberPayload+ - required:+ - stringArrayPayload+ - required:+ - stringPayload+ properties:+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Type'+ title: type+ description: The type of SQL review rule.+ level:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Level'+ title: level+ description: The severity level of the rule.+ engine:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Engine'+ title: engine+ description: The database engine this rule applies to.title: SQLReviewRuledescription: SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.bytebase.v1.SQLReviewRule.CommentConventionRulePayload:@@ -18885,9 +19910,10 @@ components:The provisioned sample instance.Format: instances/{instance} or projects/{project}/instances/{instance}expireTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: expire_timedescription: The time when the provisioned sample instance expires.- $ref: '#/components/schemas/google.protobuf.Timestamp'title: InstanceadditionalProperties: falsedescription: Instance describes one provisioned sample instance.@@ -18924,11 +19950,13 @@ components:The owner. Ownership does not transfer.Format: users/{email}createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time- $ref: '#/components/schemas/google.protobuf.Timestamp'content:type: stringtitle: content@@ -18937,9 +19965,7 @@ components:The SQL text. SearchSavedQueries returns a truncated preview;GetSavedQuery returns the full text.contentSize:- type:- - integer- - string+ type: stringtitle: content_sizeformat: int64description: The full size of the content, which may exceed the `content` returned.@@ -18960,8 +19986,9 @@ components:type: objectproperties:level:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQueryBinding.Level'title: level- $ref: '#/components/schemas/bytebase.v1.SavedQueryBinding.Level'members:type: arrayitems:@@ -19598,8 +20625,9 @@ components:title: descriptiondescription: the description of the semantic type, it can be empty.algorithm:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm'title: algorithm- $ref: '#/components/schemas/bytebase.v1.Algorithm'icon:type: stringtitle: icon@@ -19697,9 +20725,10 @@ components:The name of the service account.Format: serviceAccounts/{email}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The state of the service account.- $ref: '#/components/schemas/bytebase.v1.State'email:type: stringtitle: email@@ -19717,9 +20746,10 @@ components:title: service_keydescription: The service key for authentication. Only returned on creation or key rotation.createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the service account was created.- $ref: '#/components/schemas/google.protobuf.Timestamp'title: ServiceAccountadditionalProperties: falsedescription: ServiceAccount represents an API integration account.@@ -19734,8 +20764,9 @@ components:Format: projects/{project}Format: workspaces/{workspace}policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IamPolicy'title: policy- $ref: '#/components/schemas/bytebase.v1.IamPolicy'etag:type: stringtitle: etag@@ -19753,11 +20784,12 @@ components:title: resourcedescription: 'Format: projects/{project}/savedQueries/{savedQuery}'policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQueryPolicy'title: policydescription: |-The new policy, replacing the stored one in full. Empty `bindings` makesthe saved query private again.- $ref: '#/components/schemas/bytebase.v1.SavedQueryPolicy'title: SetSavedQueryPolicyRequestadditionalProperties: falsebytebase.v1.Setting:@@ -19771,9 +20803,10 @@ components:Format: settings/{setting}Example: "settings/SEMANTIC_TYPES"value:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SettingValue'title: valuedescription: The configuration value of the setting.- $ref: '#/components/schemas/bytebase.v1.SettingValue'title: SettingadditionalProperties: falsedescription: The schema of setting.@@ -19793,81 +20826,74 @@ components:- MCPbytebase.v1.SettingValue:type: object- oneOf:+ anyOf:- type: objectproperties:ai:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AISetting'title: ai- $ref: '#/components/schemas/bytebase.v1.AISetting'title: ai- required:- - ai- type: objectproperties:appIm:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting'title: app_im- $ref: '#/components/schemas/bytebase.v1.AppIMSetting'title: app_im- required:- - appIm- type: objectproperties:dataClassification:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting'title: data_classification- $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting'title: data_classification- required:- - dataClassification- type: objectproperties:email:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting'title: email- $ref: '#/components/schemas/bytebase.v1.EmailSetting'title: email- required:- type: objectproperties:environment:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EnvironmentSetting'title: environment- $ref: '#/components/schemas/bytebase.v1.EnvironmentSetting'title: environment- required:- - environment- type: objectproperties:mcp:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: mcp- $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: mcp- required:- - mcp- type: objectproperties:semanticType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SemanticTypeSetting'title: semantic_type- $ref: '#/components/schemas/bytebase.v1.SemanticTypeSetting'title: semantic_type- required:- - semanticType- type: objectproperties:workspaceApproval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting'title: workspace_approval- $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting'title: workspace_approval- required:- - workspaceApproval- type: objectproperties:workspaceProfile:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting'title: workspace_profile- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting'title: workspace_profile- required:- - workspaceProfile- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- ai- required:@@ -19886,7 +20912,26 @@ components:- workspaceApproval- required:- workspaceProfile- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - ai+ - required:+ - appIm+ - required:+ - dataClassification+ - required:+ - required:+ - environment+ - required:+ - mcp+ - required:+ - semanticType+ - required:+ - workspaceApproval+ - required:+ - workspaceProfiletitle: SettingValuedescription: The data in setting value.bytebase.v1.Sheet:@@ -19908,9 +20953,7 @@ components:By default, it will be cut off, if it doesn't match the `content_size`, you canset the `raw` to true in GetSheet request to retrieve the full content.contentSize:- type:- - integer- - string+ type: stringtitle: content_sizeformat: int64description: content_size is the full size of the content, may not match the size of the `content` field.@@ -19948,17 +20991,20 @@ components:title: methoddescription: Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST")tessellation:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TessellationConfig'title: tessellationdescription: Tessellation configuration for grid-based spatial indexes- $ref: '#/components/schemas/bytebase.v1.TessellationConfig'storage:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StorageConfig'title: storagedescription: Storage and performance configuration- $ref: '#/components/schemas/bytebase.v1.StorageConfig'dimensional:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DimensionalConfig'title: dimensionaldescription: Dimensional configuration- $ref: '#/components/schemas/bytebase.v1.DimensionalConfig'title: SpatialIndexConfigadditionalProperties: falsedescription: SpatialIndexConfig defines the spatial index configuration for spatial databases.@@ -20018,17 +21064,19 @@ components:title: recovery_codesdescription: The pending recovery codes, shown once for the caller to save.expireTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: expire_timedescription: When this enrollment stops being confirmable.- $ref: '#/components/schemas/google.protobuf.Timestamp'pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: |-Identifies this mint. Echo it back to EnableMFA andConfirmRecoveryCodes; a mint from another tab or device replaces thepending state, and those methods refuse a version that is no longer thepending one rather than promoting something this caller never saw.- $ref: '#/components/schemas/google.protobuf.Timestamp'title: StartMFAEnrollmentResponseadditionalProperties: falsebytebase.v1.StartTrialRequest:@@ -20055,15 +21103,17 @@ components:title: sheet_sha256description: SHA256 of the saved sheet, as 64 lowercase hexadecimal characters.startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: |-One-based lines and Unicode code-point columns. When both columns are zero,the range covers whole lines, including the end line. Otherwise both columnsmust be positive, start_position is inclusive, and end_position is exclusive.- $ref: '#/components/schemas/bytebase.v1.Position'endPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: end_position- $ref: '#/components/schemas/bytebase.v1.Position'title: StatementAnchoradditionalProperties: falsedescription: |-@@ -20195,17 +21245,19 @@ components:title: commentdescription: The comment of the stream.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'title: typedescription: The type of the stream.- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'stale:type: booleantitle: staledescription: Indicates whether the stream was last read before the `stale_after` time.mode:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'title: modedescription: The mode of the stream.- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'definition:type: stringtitle: definition@@ -20230,8 +21282,9 @@ components:type: objectproperties:plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: plan- $ref: '#/components/schemas/bytebase.v1.PlanType'seats:type: integertitle: seats@@ -20245,8 +21298,9 @@ components:title: active_instancesformat: int32expiresTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: expires_time- $ref: '#/components/schemas/google.protobuf.Timestamp'trialing:type: booleantitle: trialing@@ -20363,42 +21417,46 @@ components:description: SyncStatus is the status of the database sync operation.bytebase.v1.TableCatalog:type: object- allOf:- - properties:- name:- type: string- title: name- description: The table name.- classification:- type: string- title: classification- description: The data classification level for this table.- - oneOf:- - type: object- properties:- columns:- title: columns- description: Regular table columns.- $ref: '#/components/schemas/bytebase.v1.TableCatalog.Columns'+ anyOf:+ - type: object+ properties:+ columns:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TableCatalog.Columns'title: columns- required:- - columns- - type: object- properties:- objectSchema:- title: object_schema- description: Object schema for JSON/XML columns.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'+ description: Regular table columns.+ title: columns+ - type: object+ properties:+ objectSchema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema'title: object_schema- required:- - objectSchema- - not:- anyOf:- - required:- - columns- - required:- - objectSchema+ description: Object schema for JSON/XML columns.+ title: object_schemaunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - columns+ - required:+ - objectSchema+ - not:+ oneOf:+ - required:+ - columns+ - required:+ - objectSchema+ properties:+ name:+ type: string+ title: name+ description: The table name.+ classification:+ type: string+ title: classification+ description: The data classification level for this table.title: TableCatalogdescription: Table metadata within a schema.bytebase.v1.TableCatalog.Columns:@@ -20445,30 +21503,22 @@ components:title: charsetdescription: The character set of table.rowCount:- type:- - integer- - string+ type: stringtitle: row_countformat: int64description: The row_count is the estimated number of rows of a table.dataSize:- type:- - integer- - string+ type: stringtitle: data_sizeformat: int64description: The data_size is the estimated data size of a table.indexSize:- type:- - integer- - string+ type: stringtitle: index_sizeformat: int64description: The index_size is the estimated index size of a table.dataFree:- type:- - integer- - string+ type: stringtitle: data_freeformat: int64description: The data_free is the estimated free data size of a table.@@ -20541,9 +21591,10 @@ components:title: namedescription: The name is the name of a table partition.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'title: typedescription: The type of a table partition.- $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'expression:type: stringtitle: expression@@ -20633,86 +21684,81 @@ components:title: TagPolicyadditionalProperties: falsedescription: Policy for tagging resources with metadata.- bytebase.v1.TagPolicy.TagsEntry:+ bytebase.v1.Task:type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: TagsEntry- additionalProperties: false- bytebase.v1.Task:- type: object- allOf:- - properties:- name:- type: string- title: name- description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}'- specId:- type: string- title: spec_id- description: A UUID4 string that uniquely identifies the Spec.- status:- title: status- description: Status is the status of the task.- $ref: '#/components/schemas/bytebase.v1.Task.Status'- skippedReason:- type: string- title: skipped_reason- description: The reason why the task was skipped.- type:- title: type- $ref: '#/components/schemas/bytebase.v1.Task.Type'- target:- type: string- title: target- description: |-- Format: instances/{instance} or projects/{project}/instances/{instance} if the task is DatabaseCreate.- Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- updateTime:- oneOf:- - $ref: '#/components/schemas/google.protobuf.Timestamp'- - type: "null"- title: update_time- description: |-- The update_time is the update time of latest task run.- If there are no task runs, it will be empty.- runTime:- oneOf:- - $ref: '#/components/schemas/google.protobuf.Timestamp'- - type: "null"- title: run_time- description: |-- The run_time is the scheduled run time of latest task run.- If there are no task runs or the task run is not scheduled, it will be empty.- - oneOf:- - type: object- properties:- databaseCreate:- title: database_create- $ref: '#/components/schemas/bytebase.v1.Task.DatabaseCreate'+ anyOf:+ - type: object+ properties:+ databaseCreate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.DatabaseCreate'title: database_create- required:- - databaseCreate- - type: object- properties:- databaseUpdate:- title: database_update- $ref: '#/components/schemas/bytebase.v1.Task.DatabaseUpdate'+ title: database_create+ - type: object+ properties:+ databaseUpdate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.DatabaseUpdate'title: database_update- required:- - databaseUpdate- - not:- anyOf:- - required:- - databaseCreate- - required:- - databaseUpdate+ title: database_updateunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - databaseCreate+ - required:+ - databaseUpdate+ - not:+ oneOf:+ - required:+ - databaseCreate+ - required:+ - databaseUpdate+ properties:+ name:+ type: string+ title: name+ description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}'+ specId:+ type: string+ title: spec_id+ description: A UUID4 string that uniquely identifies the Spec.+ status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.Status'+ title: status+ description: Status is the status of the task.+ skippedReason:+ type: string+ title: skipped_reason+ description: The reason why the task was skipped.+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.Type'+ title: type+ target:+ type: string+ title: target+ description: |-+ Format: instances/{instance} or projects/{project}/instances/{instance} if the task is DatabaseCreate.+ Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ updateTime:+ oneOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ - type: "null"+ title: update_time+ description: |-+ The update_time is the update time of latest task run.+ If there are no task runs, it will be empty.+ runTime:+ oneOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ - type: "null"+ title: run_time+ description: |-+ The run_time is the scheduled run time of latest task run.+ If there are no task runs or the task run is not scheduled, it will be empty.title: Taskbytebase.v1.Task.DatabaseCreate:type: object@@ -20726,7 +21772,7 @@ components:description: Payload for creating a new database.bytebase.v1.Task.DatabaseUpdate:type: object- oneOf:+ anyOf:- type: objectproperties:release:@@ -20734,8 +21780,6 @@ components:title: releasedescription: 'Format: projects/{project}/releases/{release}'title: release- required:- - release- type: objectproperties:sheet:@@ -20743,15 +21787,20 @@ components:title: sheetdescription: 'Format: projects/{project}/sheets/{sheet}'title: sheet- required:- - sheet- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- release- required:- sheet- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - release+ - required:+ - sheettitle: DatabaseUpdatedescription: Payload for updating a database schema.bytebase.v1.Task.Status:@@ -20810,9 +21859,10 @@ components:title: predecessorsdescription: The predecessor tasks of the task.state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'title: statedescription: The state of the task.- $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'condition:type: stringtitle: condition@@ -20842,15 +21892,18 @@ components:title: creatordescription: 'Format: users/[email protected]'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_time- $ref: '#/components/schemas/google.protobuf.Timestamp'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRun.Status'title: statusdescription: The current execution status of the task run.- $ref: '#/components/schemas/bytebase.v1.TaskRun.Status'detail:type: stringtitle: detail@@ -20858,9 +21911,10 @@ components:Below are the results of a task run.Detailed information about the task run result.startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: The time when the task run started execution.- $ref: '#/components/schemas/google.protobuf.Timestamp'hasPriorBackup:type: booleantitle: has_prior_backup@@ -20869,9 +21923,10 @@ components:When true, rollback SQL can be generated via PreviewTaskRunRollback.Backup details are available in the task run logs.schedulerInfo:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo'title: scheduler_infodescription: Scheduling information about the task run.- $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo'runTime:oneOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'@@ -20886,19 +21941,21 @@ components:type: objectproperties:reportTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: report_timedescription: The time when the scheduling info was reported.- $ref: '#/components/schemas/google.protobuf.Timestamp'waitingCause:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo.WaitingCause'title: waiting_causedescription: The cause for the task run waiting.- $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo.WaitingCause'title: SchedulerInfoadditionalProperties: falsedescription: Information about task run scheduling.bytebase.v1.TaskRun.SchedulerInfo.WaitingCause:type: object- oneOf:+ anyOf:- type: objectproperties:parallelTasksLimit:@@ -20906,12 +21963,6 @@ components:title: parallel_tasks_limitdescription: Waiting due to parallel tasks limit.title: parallel_tasks_limit- required:- - parallelTasksLimit- - not:- anyOf:- - required:- - parallelTasksLimitunevaluatedProperties: falsetitle: WaitingCausedescription: Information about why a task run is waiting.@@ -20945,77 +21996,91 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.Type'title: typedescription: The type of this log entry.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.Type'logTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: log_timedescription: The time when the log was recorded.- $ref: '#/components/schemas/google.protobuf.Timestamp'replicaId:type: stringtitle: replica_iddescription: The replica ID for this log entry.schemaDump:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.SchemaDump'title: schema_dumpdescription: Schema dump details (if type is SCHEMA_DUMP).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.SchemaDump'commandExecute:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute'title: command_executedescription: Command execution details (if type is COMMAND_EXECUTE).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute'databaseSync:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.DatabaseSync'title: database_syncdescription: Database sync details (if type is DATABASE_SYNC).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.DatabaseSync'transactionControl:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl'title: transaction_controldescription: Transaction control details (if type is TRANSACTION_CONTROL).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl'priorBackup:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup'title: prior_backupdescription: Prior backup details (if type is PRIOR_BACKUP).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup'retryInfo:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.RetryInfo'title: retry_infodescription: Retry information details (if type is RETRY_INFO).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.RetryInfo'computeDiff:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ComputeDiff'title: compute_diffdescription: Compute diff details (if type is COMPUTE_DIFF).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ComputeDiff'releaseFileExecute:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ReleaseFileExecute'title: release_file_executedescription: Release file execution details (if type is RELEASE_FILE_EXECUTE).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ReleaseFileExecute'ghostMigration:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.GhostMigration'title: ghost_migrationdescription: gh-ost migration details (if type is GHOST_MIGRATION).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.GhostMigration'title: TaskRunLogEntryadditionalProperties: falsebytebase.v1.TaskRunLogEntry.CommandExecute:type: objectproperties:logTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: log_timedescription: When the command was logged.- $ref: '#/components/schemas/google.protobuf.Timestamp'range:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Range'title: rangedescription: |-The byte offset range of the executed command in the sheet.Uses byte offsets (not character indices) for efficient slicing of sheet content bytes.Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes.- $ref: '#/components/schemas/bytebase.v1.Range'statement:type: stringtitle: statementdescription: The executed statement.response:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse'title: responsedescription: The response from executing the command.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse'title: CommandExecuteadditionalProperties: falsedescription: Command execution details.@@ -21023,26 +22088,23 @@ components:type: objectproperties:logTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: log_timedescription: When the response was logged.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: errordescription: Error message if command execution failed.affectedRows:- type:- - integer- - string+ type: stringtitle: affected_rowsformat: int64description: Total affected rows.allAffectedRows:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: all_affected_rowsdescription: |-@@ -21055,13 +22117,15 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When diff computation started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When diff computation ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -21073,13 +22137,15 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When the database sync started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When the database sync ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -21091,13 +22157,15 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When the gh-ost migration started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When the gh-ost migration ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -21109,17 +22177,20 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When the backup started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When the backup ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'priorBackupDetail:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail'title: prior_backup_detaildescription: The backup details.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail'error:type: stringtitle: error@@ -21143,21 +22214,25 @@ components:type: objectproperties:sourceTable:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'title: source_tabledescription: The original table information.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'targetTable:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'title: target_tabledescription: The target backup table information.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: The start position in the SQL statement.- $ref: '#/components/schemas/bytebase.v1.Position'endPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: end_positiondescription: The end position in the SQL statement.- $ref: '#/components/schemas/bytebase.v1.Position'title: ItemadditionalProperties: falsedescription: A single backup table mapping.@@ -21219,13 +22294,15 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When the schema dump started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When the schema dump ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -21237,9 +22314,10 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl.Type'title: typedescription: The type of transaction control.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl.Type'error:type: stringtitle: error@@ -21273,35 +22351,30 @@ components:description: The type of log entry.bytebase.v1.TaskRunSession:type: object- allOf:- - properties:- name:- type: string- title: name- description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session'- - oneOf:- - type: object- properties:- postgres:- title: postgres- description: PostgreSQL session information.- $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres'+ anyOf:+ - type: object+ properties:+ postgres:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres'title: postgres- required:- - postgres- - not:- anyOf:- - required:- - postgres+ description: PostgreSQL session information.+ title: postgresunevaluatedProperties: false+ properties:+ name:+ type: string+ title: name+ description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session'title: TaskRunSessionbytebase.v1.TaskRunSession.Postgres:type: objectproperties:session:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres.Session'title: sessiondescription: '`session` is the session of the task run executing commands.'- $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres.Session'blockingSessions:type: arrayitems:@@ -21381,9 +22454,10 @@ components:title: client_portdescription: Client port number.backendStart:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: backend_startdescription: When the backend process started.- $ref: '#/components/schemas/google.protobuf.Timestamp'xactStart:oneOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'@@ -21418,9 +22492,10 @@ components:format: int32description: Number of cells per object (1-8192 for SQL Server)boundingBox:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BoundingBox'title: bounding_boxdescription: Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY)- $ref: '#/components/schemas/bytebase.v1.BoundingBox'title: TessellationConfigadditionalProperties: falsedescription: TessellationConfig defines tessellation parameters for spatial indexes.@@ -21431,8 +22506,9 @@ components:type: stringtitle: parentemailSetting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting'title: email_setting- $ref: '#/components/schemas/bytebase.v1.EmailSetting'to:type: stringtitle: to@@ -21451,48 +22527,54 @@ components:additionalProperties: falsebytebase.v1.TestIdentityProviderRequest:type: object- allOf:- - properties:- identityProvider:- title: identity_provider- description: The identity provider to test connection including uncreated.- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'- - oneOf:- - type: object- properties:- ldapContext:- title: ldap_context- description: LDAP credentials context for test connection.- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderTestRequestContext'+ anyOf:+ - type: object+ properties:+ ldapContext:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderTestRequestContext'title: ldap_context- required:- - ldapContext- - type: object- properties:- oauth2Context:- title: oauth2_context- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderTestRequestContext'+ description: LDAP credentials context for test connection.+ title: ldap_context+ - type: object+ properties:+ oauth2Context:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderTestRequestContext'title: oauth2_context- required:- - oauth2Context- - type: object- properties:- oidcContext:- title: oidc_context- description: OIDC authentication context for test connection.- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderTestRequestContext'+ title: oauth2_context+ - type: object+ properties:+ oidcContext:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderTestRequestContext'title: oidc_context- required:- - oidcContext- - not:- anyOf:- - required:- - ldapContext- - required:- - oauth2Context- - required:- - oidcContext+ description: OIDC authentication context for test connection.+ title: oidc_contextunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - ldapContext+ - required:+ - oauth2Context+ - required:+ - oidcContext+ - not:+ oneOf:+ - required:+ - ldapContext+ - required:+ - oauth2Context+ - required:+ - oidcContext+ properties:+ identityProvider:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProvider'+ title: identity_provider+ description: The identity provider to test connection including uncreated.title: TestIdentityProviderRequestbytebase.v1.TestIdentityProviderResponse:type: object@@ -21513,28 +22595,6 @@ components:description: The matched user info from the claims.title: TestIdentityProviderResponseadditionalProperties: false- bytebase.v1.TestIdentityProviderResponse.ClaimsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: ClaimsEntry- additionalProperties: false- bytebase.v1.TestIdentityProviderResponse.UserInfoEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: UserInfoEntry- additionalProperties: falsebytebase.v1.TestWebhookRequest:type: objectproperties:@@ -21545,6 +22605,8 @@ components:The name of the project which owns the webhook to test.Format: projects/{project}webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: |-The webhook to test.@@ -21552,7 +22614,6 @@ components:The url is what gets posted to. Reads do not return a saved webhook's url,so leave url empty and set name to test the one already stored; set url totest a url before saving it.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: TestWebhookRequestadditionalProperties: falsebytebase.v1.TestWebhookResponse:@@ -21685,13 +22746,15 @@ components:The name of the instance to update a data source.Format: instances/{instance} or projects/{project}/instances/{instance}dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: Identified by data source ID.- $ref: '#/components/schemas/bytebase.v1.DataSource'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'validateOnly:type: booleantitle: validate_only@@ -21708,6 +22771,8 @@ components:type: objectproperties:catalog:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'title: catalogdescription: |-The database catalog to update, identified by its `name` field.@@ -21716,7 +22781,6 @@ components:Replaces the whole catalog: send the complete value, since anything omittedis erased. There is no `update_mask` because `schemas` is a repeated field,and AIP-161 forbids addressing one element of one.- $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'title: UpdateDatabaseCatalogRequestadditionalProperties: falsedescription: Request message for updating a database catalog.@@ -21724,17 +22788,19 @@ components:type: objectproperties:databaseGroup:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'title: database_groupdescription: |-The database group to update.The database group's `name` field is used to identify the database group to update.Format: projects/{project}/databaseGroups/{databaseGroup}- $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21748,17 +22814,19 @@ components:type: objectproperties:database:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Database'title: databasedescription: |-The database to update.The database's `name` field is used to identify the database to update.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- $ref: '#/components/schemas/bytebase.v1.Database'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateDatabaseRequestadditionalProperties: falsebytebase.v1.UpdateEmailRequest:@@ -21782,17 +22850,19 @@ components:type: objectproperties:group:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Group'title: groupdescription: |-The group to update.The group's `name` field is used to identify the group to update.Format: groups/{email}- $ref: '#/components/schemas/bytebase.v1.Group'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21806,17 +22876,19 @@ components:type: objectproperties:identityProvider:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProvider'title: identity_providerdescription: |-The identity provider to update.The identity provider's `name` field is used to identify the identity provider to update.Format: idps/{identity_provider}- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21829,17 +22901,19 @@ components:type: objectproperties:instance:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Instance'title: instancedescription: |-The instance to update.The instance's `name` field is used to identify the instance to update.Format: instances/{instance} or projects/{project}/instances/{instance}- $ref: '#/components/schemas/bytebase.v1.Instance'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21860,13 +22934,15 @@ components:The issue nameFormat: projects/{project}/issues/{issue}issueComment:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment'title: issue_commentdescription: The comment to update.- $ref: '#/components/schemas/bytebase.v1.IssueComment'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21879,17 +22955,19 @@ components:type: objectproperties:issue:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue'title: issuedescription: |-The issue to update.The issue's `name` field is used to identify the issue to update.Format: projects/{project}/issues/{issue}- $ref: '#/components/schemas/bytebase.v1.Issue'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21902,17 +22980,19 @@ components:type: objectproperties:plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan'title: plandescription: |-The plan to update.The plan's `name` field is used to identify the plan to update.Format: projects/{project}/plans/{plan}- $ref: '#/components/schemas/bytebase.v1.Plan'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21925,6 +23005,8 @@ components:type: objectproperties:policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: |-The policy to update.@@ -21933,11 +23015,11 @@ components:Format: {resource name}/policies/{policy type}Workspace resource name: workspaces/{workspace-id}.Environment resource name: environments/environment-id.- $ref: '#/components/schemas/bytebase.v1.Policy'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21950,17 +23032,19 @@ components:type: objectproperties:project:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Project'title: projectdescription: |-The project to update.The project's `name` field is used to identify the project to update.Format: projects/{project}- $ref: '#/components/schemas/bytebase.v1.Project'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -21973,11 +23057,13 @@ components:type: objectproperties:plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: plan- $ref: '#/components/schemas/bytebase.v1.PlanType'interval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BillingInterval'title: interval- $ref: '#/components/schemas/bytebase.v1.BillingInterval'seats:type: integertitle: seats@@ -21991,29 +23077,33 @@ components:type: objectproperties:release:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to update.- $ref: '#/components/schemas/bytebase.v1.Release'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to be updated.- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateReleaseRequestadditionalProperties: falsebytebase.v1.UpdateReviewConfigRequest:type: objectproperties:reviewConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewConfig'title: review_configdescription: |-The SQL review config to update.The name field is used to identify the SQL review config to update.- $ref: '#/components/schemas/bytebase.v1.ReviewConfig'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -22026,13 +23116,15 @@ components:type: objectproperties:role:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Role'title: roledescription: The role to update.- $ref: '#/components/schemas/bytebase.v1.Role'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -22045,18 +23137,20 @@ components:type: objectproperties:savedQuery:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQuery'title: saved_querydescription: |-`saved_query.name` identifies the saved query to update.Format: projects/{project}/savedQueries/{savedQuery}- $ref: '#/components/schemas/bytebase.v1.SavedQuery'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: |-Fields to update, relative to the saved query (`title`, not`saved_query.title`). Supported: `title`, `content`, `database`, `folder`.At least one path is required.- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateSavedQueryRequestadditionalProperties: falsebytebase.v1.UpdateSavedQueryStarRequest:@@ -22076,19 +23170,21 @@ components:type: objectproperties:serviceAccount:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: service_accountdescription: |-The service account to update.The service account's `name` field is used to identify the service account to update.Format: serviceAccounts/{email}- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: |-The list of fields to update.Supported fields: title, service_key (triggers key rotation)- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateServiceAccountRequestadditionalProperties: falsedescription: Request message for updating a service account.@@ -22096,9 +23192,10 @@ components:type: objectproperties:setting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Setting'title: settingdescription: The setting to update.- $ref: '#/components/schemas/bytebase.v1.Setting'validateOnly:type: booleantitle: validate_only@@ -22109,8 +23206,9 @@ components:type: booleantitle: allow_missingupdateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_mask- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateSettingRequestadditionalProperties: falsedescription: The request message for updating or creating a setting.@@ -22118,17 +23216,19 @@ components:type: objectproperties:user:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User'title: userdescription: |-The user to update.The user's `name` field is used to identify the user to update.Format: users/{email}- $ref: '#/components/schemas/bytebase.v1.User'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -22141,13 +23241,15 @@ components:type: objectproperties:webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to modify.- $ref: '#/components/schemas/bytebase.v1.Webhook'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -22160,19 +23262,21 @@ components:type: objectproperties:workloadIdentity:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: workload_identitydescription: |-The workload identity to update.The workload identity's `name` field is used to identify the workload identity to update.Format: workloadIdentities/{email}- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: |-The list of fields to update.Supported fields: title, workload_identity_config- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateWorkloadIdentityRequestadditionalProperties: falsedescription: Request message for updating a workload identity.@@ -22180,11 +23284,13 @@ components:type: objectproperties:workspace:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Workspace'title: workspace- $ref: '#/components/schemas/bytebase.v1.Workspace'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_mask- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateWorkspaceRequestadditionalProperties: falsebytebase.v1.UploadLicenseRequest:@@ -22205,9 +23311,10 @@ components:The name of the user.Format: users/{email}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the user account.- $ref: '#/components/schemas/bytebase.v1.State'email:type: stringtitle: email@@ -22237,9 +23344,10 @@ components:Should be a valid E.164 compliant phone number.Could be empty.profile:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User.Profile'title: profiledescription: User profile metadata.- $ref: '#/components/schemas/bytebase.v1.User.Profile'groups:type: arrayitems:@@ -22260,13 +23368,15 @@ components:type: objectproperties:lastLoginTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_login_timedescription: The last time the user successfully logged in.- $ref: '#/components/schemas/google.protobuf.Timestamp'lastChangePasswordTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_change_password_timedescription: The last time the user changed their password.- $ref: '#/components/schemas/google.protobuf.Timestamp'source:type: stringtitle: source@@ -22287,8 +23397,9 @@ components:type: objectproperties:vcsType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.VCSType'title: vcs_type- $ref: '#/components/schemas/bytebase.v1.VCSType'userId:type: stringtitle: user_id@@ -22372,11 +23483,12 @@ components:name is the name of the webhook, generated by the server.format: projects/{project}/webhooks/{webhook}type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WebhookType'title: typedescription: |-Webhook integration type.type is the type of the webhook.- $ref: '#/components/schemas/bytebase.v1.WebhookType'title:type: stringtitle: title@@ -22455,9 +23567,10 @@ components:The name of the workload identity.Format: workloadIdentities/{email}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The state of the workload identity.- $ref: '#/components/schemas/bytebase.v1.State'email:type: stringtitle: email@@ -22471,13 +23584,15 @@ components:maxLength: 200description: The display title of the workload identity.createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the workload identity was created.- $ref: '#/components/schemas/google.protobuf.Timestamp'workloadIdentityConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'title: workload_identity_configdescription: The workload identity configuration for OIDC token validation.- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'title: WorkloadIdentityadditionalProperties: falsedescription: WorkloadIdentity represents an external CI/CD workload identity.@@ -22485,9 +23600,10 @@ components:type: objectproperties:providerType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig.ProviderType'title: provider_typedescription: Provider configuration mode.- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig.ProviderType'issuerUrl:type: stringtitle: issuer_url@@ -22558,9 +23674,12 @@ components:type: objectproperties:template:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'title: template- $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: |-The condition that is associated with the rule.@@ -22590,10 +23709,10 @@ components:For examples:resource.environment_id == "prod" && statement.affected_rows >= 100resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL"- $ref: '#/components/schemas/google.type.Expr'source:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting.Rule.Source'title: source- $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting.Rule.Source'title: RuleadditionalProperties: falsebytebase.v1.WorkspaceApprovalSetting.Rule.Source:@@ -22621,17 +23740,20 @@ components:title: require_mfadescription: Require MFA for all users.refreshTokenDuration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: refresh_token_durationdescription: The duration for refresh token. Default is 7 days.- $ref: '#/components/schemas/google.protobuf.Duration'announcement:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Announcement'title: announcementdescription: The setting of custom announcement- $ref: '#/components/schemas/bytebase.v1.Announcement'maximumRequestExpiration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: maximum_request_expirationdescription: The max expiration duration for data access requests.- $ref: '#/components/schemas/google.protobuf.Duration'domains:type: arrayitems:@@ -22643,9 +23765,10 @@ components:title: enforce_identity_domaindescription: Only user and group from the domains can be created and login.databaseChangeMode:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseChangeMode'title: database_change_modedescription: The workspace database change mode.- $ref: '#/components/schemas/bytebase.v1.DatabaseChangeMode'disallowPasswordSignin:type: booleantitle: disallow_password_signin@@ -22655,9 +23778,10 @@ components:title: enable_metric_collectiondescription: Whether to enable metric collection for the workspace.inactiveSessionTimeout:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: inactive_session_timeoutdescription: The session expiration time if not activity detected for the user. Value <= 0 means no limit.- $ref: '#/components/schemas/google.protobuf.Duration'enableAuditLogStdout:type: booleantitle: enable_audit_log_stdout@@ -22671,30 +23795,31 @@ components:Whether to display watermark on pages.Requires ENTERPRISE license.passwordRestriction:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'title: password_restrictiondescription: Password restriction settings.- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'accessTokenDuration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: access_token_durationdescription: The duration for access token. Default is 1 hour.- $ref: '#/components/schemas/google.protobuf.Duration'enableDebug:type: booleantitle: enable_debugdescription: Whether debug mode is enabled.sqlResultSize:- type:- - integer- - string+ type: stringtitle: sql_result_sizeformat: int64description: |-The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.queryTimeout:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: query_timeoutdescription: The query timeout duration for query and export, works for the SQL Editor and Export Center.- $ref: '#/components/schemas/google.protobuf.Duration'allowEmailCodeSignin:type: booleantitle: allow_email_code_signin@@ -22708,17 +23833,19 @@ components:Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset idOR a custom theme's uuid. Empty ⇒ default light.sqlEditorCustomTheme:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLEditorThemeSetting'title: sql_editor_custom_themedescription: |-The enforced CUSTOM theme's full definition — present ONLY whensql_editor_theme_id is a custom uuid. tokens is always complete.- $ref: '#/components/schemas/bytebase.v1.SQLEditorThemeSetting'maximumRoleExpiration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: maximum_role_expirationdescription: |-The max expiration duration for request role.Deprecated: use just-in-time access request flows instead.- $ref: '#/components/schemas/google.protobuf.Duration'directorySyncTokenConfigured:type: booleantitle: directory_sync_token_configured@@ -22757,20 +23884,23 @@ components:title: require_reset_password_for_first_logindescription: require_reset_password_for_first_login requires users to reset their password after the 1st login.passwordRotation:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: password_rotationdescription: password_rotation requires users to reset their password after the duration.- $ref: '#/components/schemas/google.protobuf.Duration'title: PasswordRestrictionadditionalProperties: falseconnect-protocol-version:type: number- title: Connect-Protocol-Version- enum:+ examples:- 1+ title: Connect-Protocol-Versiondescription: Define the version of the Connect protocolconst: 1connect-timeout-header:type: number+ examples:+ - 1000title: Connect-Timeout-Msdescription: Define the timeout, in msconnect.error:@@ -22814,26 +23944,21 @@ components:properties:type:type: string- description: 'A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`. This is used to determine the schema of the data in the `value` field and is the discriminator for the `debug` field.'+ description: 'A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`.'value:type: stringformat: binarydescription: The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the `type` field.debug:- oneOf:- - type: object- title: Any- additionalProperties: true- description: Detailed error information.- discriminator:- propertyName: type+ type: objecttitle: Debug+ additionalProperties: truedescription: Deserialized error detail payload. The 'type' field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.additionalProperties: truedescription: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.google.api.expr.v1alpha1.Constant:type: object- oneOf:+ anyOf:- type: objectproperties:boolValue:@@ -22841,8 +23966,6 @@ components:title: bool_valuedescription: boolean value.title: bool_value- required:- - boolValue- type: objectproperties:bytesValue:@@ -22851,8 +23974,6 @@ components:format: bytedescription: bytes value.title: bytes_value- required:- - bytesValue- type: objectproperties:doubleValue:@@ -22861,42 +23982,34 @@ components:format: doubledescription: double value.title: double_value- required:- - doubleValue- type: objectproperties:durationValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: duration_valuedescription: |-protobuf.Duration value.Deprecated: duration is no longer considered a builtin cel type.deprecated: true- $ref: '#/components/schemas/google.protobuf.Duration'title: duration_value- required:- - durationValue- type: objectproperties:int64Value:- type:- - integer- - string+ type: stringtitle: int64_valueformat: int64description: int64 value.title: int64_value- required:- - int64Value- type: objectproperties:nullValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.NullValue'title: null_valuedescription: null value.- $ref: '#/components/schemas/google.protobuf.NullValue'title: null_value- required:- - nullValue- type: objectproperties:stringValue:@@ -22904,35 +24017,30 @@ components:title: string_valuedescription: string value.title: string_value- required:- - stringValue- type: objectproperties:timestampValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: timestamp_valuedescription: |-protobuf.Timestamp value.Deprecated: timestamp is no longer considered a builtin cel type.deprecated: true- $ref: '#/components/schemas/google.protobuf.Timestamp'title: timestamp_value- required:- - timestampValue- type: objectproperties:uint64Value:- type:- - integer- - string+ type: stringtitle: uint64_valueformat: int64description: uint64 value.title: uint64_value- required:- - uint64Value- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- boolValue- required:@@ -22951,7 +24059,26 @@ components:- timestampValue- required:- uint64Value- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - boolValue+ - required:+ - bytesValue+ - required:+ - doubleValue+ - required:+ - durationValue+ - required:+ - int64Value+ - required:+ - nullValue+ - required:+ - stringValue+ - required:+ - timestampValue+ - required:+ - uint64Valuetitle: Constantdescription: |-Represents a primitive literal.@@ -22970,99 +24097,106 @@ components:`true`, `null`.google.api.expr.v1alpha1.Expr:type: object- allOf:- - properties:- id:- type:- - integer- - string- title: id- format: int64- description: |-- Required. An id assigned to this node by the parser which is unique in a- given expression tree. This is used to associate type information and other- attributes to a node in the parse tree.- - oneOf:- - type: object- properties:- callExpr:- title: call_expr- description: A call expression, including calls to predefined functions and operators.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Call'+ anyOf:+ - type: object+ properties:+ callExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Call'title: call_expr- required:- - callExpr- - type: object- properties:- comprehensionExpr:- title: comprehension_expr- description: A comprehension expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Comprehension'+ description: A call expression, including calls to predefined functions and operators.+ title: call_expr+ - type: object+ properties:+ comprehensionExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Comprehension'title: comprehension_expr- required:- - comprehensionExpr- - type: object- properties:- constExpr:- title: const_expr- description: A literal expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Constant'+ description: A comprehension expression.+ title: comprehension_expr+ - type: object+ properties:+ constExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Constant'title: const_expr- required:- - constExpr- - type: object- properties:- identExpr:- title: ident_expr- description: An identifier expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Ident'+ description: A literal expression.+ title: const_expr+ - type: object+ properties:+ identExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Ident'title: ident_expr- required:- - identExpr- - type: object- properties:- listExpr:- title: list_expr- description: A list creation expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateList'+ description: An identifier expression.+ title: ident_expr+ - type: object+ properties:+ listExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateList'title: list_expr- required:- - listExpr- - type: object- properties:- selectExpr:- title: select_expr- description: A field selection expression, e.g. `request.auth`.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Select'+ description: A list creation expression.+ title: list_expr+ - type: object+ properties:+ selectExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Select'title: select_expr- required:- - selectExpr- - type: object- properties:- structExpr:- title: struct_expr- description: A map or message creation expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateStruct'+ description: A field selection expression, e.g. `request.auth`.+ title: select_expr+ - type: object+ properties:+ structExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateStruct'title: struct_expr- required:- - structExpr- - not:- anyOf:- - required:- - callExpr- - required:- - comprehensionExpr- - required:- - constExpr- - required:- - identExpr- - required:- - listExpr- - required:- - selectExpr- - required:- - structExpr+ description: A map or message creation expression.+ title: struct_exprunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - callExpr+ - required:+ - comprehensionExpr+ - required:+ - constExpr+ - required:+ - identExpr+ - required:+ - listExpr+ - required:+ - selectExpr+ - required:+ - structExpr+ - not:+ oneOf:+ - required:+ - callExpr+ - required:+ - comprehensionExpr+ - required:+ - constExpr+ - required:+ - identExpr+ - required:+ - listExpr+ - required:+ - selectExpr+ - required:+ - structExpr+ properties:+ id:+ type: string+ title: id+ format: int64+ description: |-+ Required. An id assigned to this node by the parser which is unique in a+ given expression tree. This is used to associate type information and other+ attributes to a node in the parse tree.title: Exprdescription: |-An abstract representation of a common expression.@@ -23086,11 +24220,12 @@ components:type: objectproperties:target:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: targetdescription: |-The target of an method call-style expression. For example, `x` in`x.f()`.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'function:type: stringtitle: function@@ -23126,39 +24261,44 @@ components:When the iter_range is a map, this variable is the map entry value.This field is only set for comprehension v2 macros.iterRange:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: iter_rangedescription: The range over which the comprehension iterates.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'accuVar:type: stringtitle: accu_vardescription: The name of the variable used for accumulation of the result.accuInit:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: accu_initdescription: The initial value of the accumulator.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'loopCondition:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: loop_conditiondescription: |-An expression which can contain iter_var, iter_var2, and accu_var.Returns false when the result has been computed and may be used asa hint to short-circuit the remainder of the comprehension.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'loopStep:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: loop_stepdescription: |-An expression which can contain iter_var, iter_var2, and accu_var.Computes the next value of accu_var.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'result:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: resultdescription: |-An expression which can contain accu_var.Computes the result.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: ComprehensionadditionalProperties: falsedescription: |-@@ -23272,57 +24412,59 @@ components:`types.MyType{field_id: 'value'}`.google.api.expr.v1alpha1.Expr.CreateStruct.Entry:type: object- allOf:- - properties:- id:- type:- - integer- - string- title: id- format: int64- description: |-- Required. An id assigned to this node by the parser which is unique- in a given expression tree. This is used to associate type- information and other attributes to the node.- value:- title: value- description: |-- Required. The value assigned to the key.-- If the optional_entry field is true, the expression must resolve to an- optional-typed value. If the optional value is present, the key will be- set; however, if the optional value is absent, the key will be unset.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'- optionalEntry:- type: boolean- title: optional_entry- description: Whether the key-value pair is optional.- - oneOf:- - type: object- properties:- fieldKey:- type: string- title: field_key- description: The field key for a message creator statement.+ anyOf:+ - type: object+ properties:+ fieldKey:+ type: stringtitle: field_key- required:- - fieldKey- - type: object- properties:- mapKey:- title: map_key- description: The key expression for a map creation statement.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'+ description: The field key for a message creator statement.+ title: field_key+ - type: object+ properties:+ mapKey:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: map_key- required:- - mapKey- - not:- anyOf:- - required:- - fieldKey- - required:- - mapKey+ description: The key expression for a map creation statement.+ title: map_keyunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - fieldKey+ - required:+ - mapKey+ - not:+ oneOf:+ - required:+ - fieldKey+ - required:+ - mapKey+ properties:+ id:+ type: string+ title: id+ format: int64+ description: |-+ Required. An id assigned to this node by the parser which is unique+ in a given expression tree. This is used to associate type+ information and other attributes to the node.+ value:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'+ title: value+ description: |-+ Required. The value assigned to the key.++ If the optional_entry field is true, the expression must resolve to an+ optional-typed value. If the optional value is present, the key will be+ set; however, if the optional value is absent, the key will be unset.+ optionalEntry:+ type: boolean+ title: optional_entry+ description: Whether the key-value pair is optional.title: Entrydescription: Represents an entry.google.api.expr.v1alpha1.Expr.Ident:@@ -23344,13 +24486,14 @@ components:type: objectproperties:operand:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: operanddescription: |-Required. The target of the selection expression.For example, in the select expression `request.auth`, the `request`portion of the expression is the `operand`.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'field:type: stringtitle: field@@ -23378,307 +24521,27 @@ components:type: stringformat: binaryadditionalProperties: true- description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.+ description: An arbitrary message with a type URL identifying the encoded message type.google.protobuf.Duration:type: stringformat: duration- description: |-- A Duration represents a signed, fixed-length span of time represented- as a count of seconds and fractions of seconds at nanosecond- resolution. It is independent of any calendar and concepts like "day"- or "month". It is related to Timestamp in that the difference between- two Timestamp values is a Duration and it can be added or subtracted- from a Timestamp. Range is approximately +-10,000 years.-- # Examples-- Example 1: Compute Duration from two Timestamps in pseudo code.-- Timestamp start = ...;- Timestamp end = ...;- Duration duration = ...;-- duration.seconds = end.seconds - start.seconds;- duration.nanos = end.nanos - start.nanos;-- if (duration.seconds < 0 && duration.nanos > 0) {- duration.seconds += 1;- duration.nanos -= 1000000000;- } else if (duration.seconds > 0 && duration.nanos < 0) {- duration.seconds -= 1;- duration.nanos += 1000000000;- }-- Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.-- Timestamp start = ...;- Duration duration = ...;- Timestamp end = ...;-- end.seconds = start.seconds + duration.seconds;- end.nanos = start.nanos + duration.nanos;-- if (end.nanos < 0) {- end.seconds -= 1;- end.nanos += 1000000000;- } else if (end.nanos >= 1000000000) {- end.seconds += 1;- end.nanos -= 1000000000;- }-- Example 3: Compute Duration from datetime.timedelta in Python.-- td = datetime.timedelta(days=3, minutes=10)- duration = Duration()- duration.FromTimedelta(td)-- # JSON Mapping-- In JSON format, the Duration type is encoded as a string rather than an- object, where the string ends in the suffix "s" (indicating seconds) and- is preceded by the number of seconds, with nanoseconds expressed as- fractional seconds. For example, 3 seconds with 0 nanoseconds should be- encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should- be expressed in JSON format as "3.000000001s", and 3 seconds and 1- microsecond should be expressed in JSON format as "3.000001s".+ description: A signed duration in seconds, with up to nine fractional digits and an `s` suffix (for example, `3s` or `-0.001s`).google.protobuf.Empty:type: object- description: |-- A generic empty message that you can re-use to avoid defining duplicated- empty messages in your APIs. A typical example is to use it as the request- or the response type of an API method. For instance:-- service Foo {- rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);- }+ description: An empty JSON object.google.protobuf.FieldMask:type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: Comma-separated field paths in lowerCamelCase (for example, `user.displayName,photo`).google.protobuf.FloatValue:oneOf:- type: string- type: number- description: |-- Wrapper message for `float`.-- The JSON representation for `FloatValue` is JSON number.-- Not recommended for use in new APIs, but still useful for legacy APIs and- has no plan to be removed.+ description: A single-precision number. The non-finite values `NaN`, `Infinity`, and `-Infinity` are encoded as strings; `null` is also accepted.google.protobuf.ListValue:- type: object- properties:- values:- type: array- items:- $ref: '#/components/schemas/google.protobuf.Value'- title: values- description: Repeated field of dynamically typed values.- title: ListValue- additionalProperties: false- description: |-- `ListValue` is a wrapper around a repeated field of values.-- The JSON representation for `ListValue` is JSON array.+ type: array+ items:+ $ref: '#/components/schemas/google.protobuf.Value'+ description: A JSON array whose elements may be any JSON value.google.protobuf.NullValue:type: stringtitle: NullValue@@ -23693,122 +24556,14 @@ components:type: objectadditionalProperties:$ref: '#/components/schemas/google.protobuf.Value'- description: |-- `Struct` represents a structured data value, consisting of fields- which map to dynamically typed values. In some languages, `Struct`- might be supported by a native representation. For example, in- scripting languages like JS a struct is represented as an- object. The details of that representation are described together- with the proto support for the language.-- The JSON representation for `Struct` is JSON object.- google.protobuf.Struct.FieldsEntry:- type: object- properties:- key:- type: string- title: key- value:- title: value- $ref: '#/components/schemas/google.protobuf.Value'- title: FieldsEntry- additionalProperties: false+ description: A JSON object whose property values may be any JSON value.google.protobuf.Timestamp:type: stringexamples:- "2023-01-15T01:30:15.01Z"- "2024-12-25T12:00:00Z"format: date-time- description: |-- A Timestamp represents a point in time independent of any time zone or local- calendar, encoded as a count of seconds and fractions of seconds at- nanosecond resolution. The count is relative to an epoch at UTC midnight on- January 1, 1970, in the proleptic Gregorian calendar which extends the- Gregorian calendar backwards to year one.-- All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap- second table is needed for interpretation, using a [24-hour linear- smear](https://developers.google.com/time/smear).-- The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By- restricting to that range, we ensure that we can convert to and from [RFC- 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.-- # Examples-- Example 1: Compute Timestamp from POSIX `time()`.-- Timestamp timestamp;- timestamp.set_seconds(time(NULL));- timestamp.set_nanos(0);-- Example 2: Compute Timestamp from POSIX `gettimeofday()`.-- struct timeval tv;- gettimeofday(&tv, NULL);-- Timestamp timestamp;- timestamp.set_seconds(tv.tv_sec);- timestamp.set_nanos(tv.tv_usec * 1000);-- Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.-- FILETIME ft;- GetSystemTimeAsFileTime(&ft);- UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;-- // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z- // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.- Timestamp timestamp;- timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));- timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));-- Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.-- long millis = System.currentTimeMillis();-- Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)- .setNanos((int) ((millis % 1000) * 1000000)).build();-- Example 5: Compute Timestamp from Java `Instant.now()`.-- Instant now = Instant.now();-- Timestamp timestamp =- Timestamp.newBuilder().setSeconds(now.getEpochSecond())- .setNanos(now.getNano()).build();-- Example 6: Compute Timestamp from current time in Python.-- timestamp = Timestamp()- timestamp.GetCurrentTime()-- # JSON Mapping-- In JSON format, the Timestamp type is encoded as a string in the- [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the- format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"- where {year} is always expressed using four digits while {month}, {day},- {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional- seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),- are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone- is required. A proto3 JSON serializer should always use UTC (as indicated by- "Z") when printing the Timestamp type and a proto3 JSON parser should be- able to accept both UTC and other timezones (as indicated by an offset).-- For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past- 01:30 UTC on January 15, 2017.-- In JavaScript, one can convert a Date object to this format using the- standard- [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)- method. In Python, a standard `datetime.datetime` object can be converted- to this format using- [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with- the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use- the Joda Time's [`ISODateTimeFormat.dateTime()`](- http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()- ) to obtain a formatter capable of generating timestamps in this format.+ description: A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC.google.protobuf.Value:oneOf:- type: "null"@@ -23818,13 +24573,7 @@ components:- type: array- type: objectadditionalProperties: true- description: |-- `Value` represents a dynamically typed value which can be either- null, a number, a string, a boolean, a recursive struct value, or a- list of values. A producer of value is expected to set one of these- variants. Absence of any variant indicates an error.-- The JSON representation for `Value` is JSON value.+ description: 'Any JSON value: `null`, number, string, boolean, array, or object.'google.rpc.Status:type: objectproperties:@@ -23880,6 +24629,8 @@ components:format: floatdescription: The amount of blue in the color as a value in the interval [0, 1].alpha:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FloatValue'title: alphadescription: |-The fraction of this color that should be applied to the pixel. That is,@@ -23893,7 +24644,6 @@ components:possible to distinguish between a default value and the value being unset.If omitted, this color object is rendered as a solid color(as if the alpha value had been explicitly given a value of 1.0).- $ref: '#/components/schemas/google.protobuf.FloatValue'title: ColoradditionalProperties: falsedescription: |-diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.goindex 3c9c76e312..5d0e313dfd 100644--- a/backend/api/v1/sql_service.go+++ b/backend/api/v1/sql_service.go@@ -8,6 +8,7 @@ import ("io""math""regexp"+ "slices""strings""time"@@ -320,6 +321,11 @@ func (s *SQLService) Query(ctx context.Context, req *connect.Request[v1pb.QueryRreturn nil, err}}+ if request.Explain {+ if err := validateExplainFormat(instance.Metadata.GetEngine(), request.GetQueryOption().GetExplainFormat()); err != nil {+ return nil, err+ }+ }// The MCP read-only clamp. Unconditional on Explain, unlike the gate// above: an explain request carries the bare statement and the driver@@ -1958,6 +1964,58 @@ func (s *SQLService) prepareRelatedMessage(ctx context.Context, requestName strireturn user, instance, database, nil}+// supportedExplainFormats lists the explain formats an engine's driver actually+// produces. TEXT is the human-readable plan every engine returns by default,+// which is why only the engines with a machine-readable plan, or without a+// readable one, need a case here.+func supportedExplainFormats(engine storepb.Engine) []v1pb.QueryOption_ExplainFormat {+ switch engine {+ case storepb.Engine_POSTGRES:+ return []v1pb.QueryOption_ExplainFormat{v1pb.QueryOption_TEXT, v1pb.QueryOption_JSON, v1pb.QueryOption_XML}+ case storepb.Engine_MSSQL:+ return []v1pb.QueryOption_ExplainFormat{v1pb.QueryOption_TEXT, v1pb.QueryOption_XML}+ case storepb.Engine_SPANNER:+ // Spanner returns its plan as JSON and has no text form.+ return []v1pb.QueryOption_ExplainFormat{v1pb.QueryOption_JSON}+ case storepb.Engine_MONGODB, storepb.Engine_REDIS, storepb.Engine_DYNAMODB,+ storepb.Engine_CASSANDRA, storepb.Engine_COSMOSDB, storepb.Engine_DATABRICKS,+ storepb.Engine_ELASTICSEARCH:+ // No driver here implements explain: the first three refuse it, the rest+ // ignore the flag and would run the statement itself. Saying TEXT would+ // send a caller down a path that never produces a plan.+ return nil+ default:+ return []v1pb.QueryOption_ExplainFormat{v1pb.QueryOption_TEXT}+ }+}++// validateExplainFormat refuses a format the engine cannot produce. This is the+// one place the engine-to-format support is decided: drivers below map whatever+// reaches them onto their own syntax, so a request that slipped through would+// silently come back in a format the caller cannot parse.+func validateExplainFormat(engine storepb.Engine, format v1pb.QueryOption_ExplainFormat) error {+ supported := supportedExplainFormats(engine)+ // An engine with no explain at all is refused whatever the caller asked for,+ // including nothing. Its driver would otherwise run the statement as an+ // ordinary query — and an explain request skips the read-only validation+ // above, on the understanding that the driver turns the statement into a+ // plan.+ if len(supported) == 0 {+ return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("%s does not support EXPLAIN", engine))+ }+ if format == v1pb.QueryOption_EXPLAIN_FORMAT_UNSPECIFIED {+ return nil+ }+ if slices.Contains(supported, format) {+ return nil+ }+ names := make([]string, 0, len(supported))+ for _, f := range supported {+ names = append(names, f.String())+ }+ return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("%s does not support explain format %s, supported formats: %s", engine, format, strings.Join(names, ", ")))+}+func validateQueryRequest(instance *store.InstanceMessage, statement string) error {ok, _, err := parserbase.ValidateSQLForEditor(instance.Metadata.GetEngine(), statement)if err != nil {diff --git a/backend/api/v1/sql_service_test.go b/backend/api/v1/sql_service_test.goindex a9ecec36e5..41fa1f0b80 100644--- a/backend/api/v1/sql_service_test.go+++ b/backend/api/v1/sql_service_test.go@@ -330,3 +330,48 @@ func TestResolveDataSourceIDKeepsReadOnlyForDocumentEngineAutomaticReadQueryWhen})}}++// TestValidateExplainFormat pins the engine-to-format support table. A format an+// engine cannot produce has to be refused here, because the drivers below map+// anything that reaches them onto their own default rather than failing.+func TestValidateExplainFormat(t *testing.T) {+ t.Parallel()+ for _, tc := range []struct {+ name string+ engine storepb.Engine+ format v1pb.QueryOption_ExplainFormat+ wantErr bool+ }{+ {name: "unspecified is always the engine default", engine: storepb.Engine_MYSQL, format: v1pb.QueryOption_EXPLAIN_FORMAT_UNSPECIFIED},+ {name: "postgres json", engine: storepb.Engine_POSTGRES, format: v1pb.QueryOption_JSON},+ {name: "postgres xml", engine: storepb.Engine_POSTGRES, format: v1pb.QueryOption_XML},+ {name: "postgres text", engine: storepb.Engine_POSTGRES, format: v1pb.QueryOption_TEXT},+ {name: "mssql xml", engine: storepb.Engine_MSSQL, format: v1pb.QueryOption_XML},+ {name: "mssql json", engine: storepb.Engine_MSSQL, format: v1pb.QueryOption_JSON, wantErr: true},+ {name: "spanner json", engine: storepb.Engine_SPANNER, format: v1pb.QueryOption_JSON},+ {name: "spanner has no text plan", engine: storepb.Engine_SPANNER, format: v1pb.QueryOption_TEXT, wantErr: true},+ {name: "mysql text", engine: storepb.Engine_MYSQL, format: v1pb.QueryOption_TEXT},+ {name: "mysql json is not implemented yet", engine: storepb.Engine_MYSQL, format: v1pb.QueryOption_JSON, wantErr: true},+ {name: "oracle xml is not implemented yet", engine: storepb.Engine_ORACLE, format: v1pb.QueryOption_XML, wantErr: true},+ {name: "redis explains nothing at all", engine: storepb.Engine_REDIS, format: v1pb.QueryOption_TEXT, wantErr: true},+ {name: "mongodb explains nothing at all", engine: storepb.Engine_MONGODB, format: v1pb.QueryOption_JSON, wantErr: true},+ // A driver that ignores the explain flag runs the statement instead, and+ // the explain path skips the read-only validation, so an unspecified+ // format must be refused here too rather than reaching the driver.+ {name: "cassandra refuses even an unspecified format", engine: storepb.Engine_CASSANDRA, format: v1pb.QueryOption_EXPLAIN_FORMAT_UNSPECIFIED, wantErr: true},+ {name: "cosmosdb refuses even an unspecified format", engine: storepb.Engine_COSMOSDB, format: v1pb.QueryOption_EXPLAIN_FORMAT_UNSPECIFIED, wantErr: true},+ {name: "databricks refuses even an unspecified format", engine: storepb.Engine_DATABRICKS, format: v1pb.QueryOption_EXPLAIN_FORMAT_UNSPECIFIED, wantErr: true},+ {name: "elasticsearch refuses even an unspecified format", engine: storepb.Engine_ELASTICSEARCH, format: v1pb.QueryOption_EXPLAIN_FORMAT_UNSPECIFIED, wantErr: true},+ } {+ t.Run(tc.name, func(t *testing.T) {+ t.Parallel()+ err := validateExplainFormat(tc.engine, tc.format)+ if !tc.wantErr {+ require.NoError(t, err)+ return+ }+ require.Error(t, err)+ require.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err))+ })+ }+}diff --git a/backend/generated-go/v1/sql_service.pb.go b/backend/generated-go/v1/sql_service.pb.goindex 6201480871..07196dc29b 100644--- a/backend/generated-go/v1/sql_service.pb.go+++ b/backend/generated-go/v1/sql_service.pb.go@@ -77,55 +77,67 @@ func (QueryOption_RedisRunCommandsOn) EnumDescriptor() ([]byte, []int) {return file_v1_sql_service_proto_rawDescGZIP(), []int{4, 0}}-type QueryOption_MSSQLExplainFormat int32+// Which explain output the caller wants, for an explain request.+//+// Leave it unspecified for the engine's own default, which is the only+// output most engines have. Naming a format an engine cannot produce is+// INVALID_ARGUMENT rather than a silent fallback, as is any explain request+// against an engine that has no explain at all.+type QueryOption_ExplainFormat int32const (- // defaults to SHOWPLAN_ALL- QueryOption_MSSQL_EXPLAIN_FORMAT_UNSPECIFIED QueryOption_MSSQLExplainFormat = 0- // SHOWPLAN_ALL- QueryOption_MSSQL_EXPLAIN_FORMAT_ALL QueryOption_MSSQLExplainFormat = 1- // SHOWPLAN_XML- QueryOption_MSSQL_EXPLAIN_FORMAT_XML QueryOption_MSSQLExplainFormat = 2+ // The engine's default: PostgreSQL EXPLAIN, SQL Server SHOWPLAN_ALL.+ QueryOption_EXPLAIN_FORMAT_UNSPECIFIED QueryOption_ExplainFormat = 0+ // The human-readable plan. PostgreSQL: EXPLAIN (FORMAT TEXT). SQL Server:+ // SHOWPLAN_ALL.+ QueryOption_TEXT QueryOption_ExplainFormat = 1+ // The plan tree as JSON. PostgreSQL: EXPLAIN (FORMAT JSON).+ QueryOption_JSON QueryOption_ExplainFormat = 2+ // The plan tree as XML. PostgreSQL: EXPLAIN (FORMAT XML). SQL Server:+ // SHOWPLAN_XML.+ QueryOption_XML QueryOption_ExplainFormat = 3)-// Enum value maps for QueryOption_MSSQLExplainFormat.+// Enum value maps for QueryOption_ExplainFormat.var (- QueryOption_MSSQLExplainFormat_name = map[int32]string{- 0: "MSSQL_EXPLAIN_FORMAT_UNSPECIFIED",- 1: "MSSQL_EXPLAIN_FORMAT_ALL",- 2: "MSSQL_EXPLAIN_FORMAT_XML",- }- QueryOption_MSSQLExplainFormat_value = map[string]int32{- "MSSQL_EXPLAIN_FORMAT_UNSPECIFIED": 0,- "MSSQL_EXPLAIN_FORMAT_ALL": 1,- "MSSQL_EXPLAIN_FORMAT_XML": 2,+ QueryOption_ExplainFormat_name = map[int32]string{+ 0: "EXPLAIN_FORMAT_UNSPECIFIED",+ 1: "TEXT",+ 2: "JSON",+ 3: "XML",+ }+ QueryOption_ExplainFormat_value = map[string]int32{+ "EXPLAIN_FORMAT_UNSPECIFIED": 0,+ "TEXT": 1,+ "JSON": 2,+ "XML": 3,})-func (x QueryOption_MSSQLExplainFormat) Enum() *QueryOption_MSSQLExplainFormat {- p := new(QueryOption_MSSQLExplainFormat)+func (x QueryOption_ExplainFormat) Enum() *QueryOption_ExplainFormat {+ p := new(QueryOption_ExplainFormat)*p = xreturn p}-func (x QueryOption_MSSQLExplainFormat) String() string {+func (x QueryOption_ExplainFormat) String() string {return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))}-func (QueryOption_MSSQLExplainFormat) Descriptor() protoreflect.EnumDescriptor {+func (QueryOption_ExplainFormat) Descriptor() protoreflect.EnumDescriptor {return file_v1_sql_service_proto_enumTypes[1].Descriptor()}-func (QueryOption_MSSQLExplainFormat) Type() protoreflect.EnumType {+func (QueryOption_ExplainFormat) Type() protoreflect.EnumType {return &file_v1_sql_service_proto_enumTypes[1]}-func (x QueryOption_MSSQLExplainFormat) Number() protoreflect.EnumNumber {+func (x QueryOption_ExplainFormat) Number() protoreflect.EnumNumber {return protoreflect.EnumNumber(x)}-// Deprecated: Use QueryOption_MSSQLExplainFormat.Descriptor instead.-func (QueryOption_MSSQLExplainFormat) EnumDescriptor() ([]byte, []int) {+// Deprecated: Use QueryOption_ExplainFormat.Descriptor instead.+func (QueryOption_ExplainFormat) EnumDescriptor() ([]byte, []int) {return file_v1_sql_service_proto_rawDescGZIP(), []int{4, 1}}@@ -665,7 +677,7 @@ func (x *QueryResponse) GetAppliedAccessGrant() string {type QueryOption struct {state protoimpl.MessageState `protogen:"open.v1"`RedisRunCommandsOn QueryOption_RedisRunCommandsOn `protobuf:"varint,1,opt,name=redis_run_commands_on,json=redisRunCommandsOn,proto3,enum=bytebase.v1.QueryOption_RedisRunCommandsOn" json:"redis_run_commands_on,omitempty"`- MssqlExplainFormat QueryOption_MSSQLExplainFormat `protobuf:"varint,2,opt,name=mssql_explain_format,json=mssqlExplainFormat,proto3,enum=bytebase.v1.QueryOption_MSSQLExplainFormat" json:"mssql_explain_format,omitempty"`+ ExplainFormat QueryOption_ExplainFormat `protobuf:"varint,3,opt,name=explain_format,json=explainFormat,proto3,enum=bytebase.v1.QueryOption_ExplainFormat" json:"explain_format,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -707,11 +719,11 @@ func (x *QueryOption) GetRedisRunCommandsOn() QueryOption_RedisRunCommandsOn {return QueryOption_REDIS_RUN_COMMANDS_ON_UNSPECIFIED}-func (x *QueryOption) GetMssqlExplainFormat() QueryOption_MSSQLExplainFormat {+func (x *QueryOption) GetExplainFormat() QueryOption_ExplainFormat {if x != nil {- return x.MssqlExplainFormat+ return x.ExplainFormat}- return QueryOption_MSSQL_EXPLAIN_FORMAT_UNSPECIFIED+ return QueryOption_EXPLAIN_FORMAT_UNSPECIFIED}type QueryResult struct {@@ -2079,18 +2091,19 @@ const file_v1_sql_service_proto_rawDesc = "" +"_container\"u\n" +"\rQueryResponse\x122\n" +"\aresults\x18\x01 \x03(\v2\x18.bytebase.v1.QueryResultR\aresults\x120\n" +- "\x14applied_access_grant\x18\x02 \x01(\tR\x12appliedAccessGrant\"\xa1\x03\n" ++ "\x14applied_access_grant\x18\x02 \x01(\tR\x12appliedAccessGrant\"\x83\x03\n" +"\vQueryOption\x12^\n" +- "\x15redis_run_commands_on\x18\x01 \x01(\x0e2+.bytebase.v1.QueryOption.RedisRunCommandsOnR\x12redisRunCommandsOn\x12]\n" +- "\x14mssql_explain_format\x18\x02 \x01(\x0e2+.bytebase.v1.QueryOption.MSSQLExplainFormatR\x12mssqlExplainFormat\"[\n" ++ "\x15redis_run_commands_on\x18\x01 \x01(\x0e2+.bytebase.v1.QueryOption.RedisRunCommandsOnR\x12redisRunCommandsOn\x12M\n" ++ "\x0eexplain_format\x18\x03 \x01(\x0e2&.bytebase.v1.QueryOption.ExplainFormatR\rexplainFormat\"[\n" +"\x12RedisRunCommandsOn\x12%\n" +"!REDIS_RUN_COMMANDS_ON_UNSPECIFIED\x10\x00\x12\x0f\n" +"\vSINGLE_NODE\x10\x01\x12\r\n" +- "\tALL_NODES\x10\x02\"v\n" +- "\x12MSSQLExplainFormat\x12$\n" +- " MSSQL_EXPLAIN_FORMAT_UNSPECIFIED\x10\x00\x12\x1c\n" +- "\x18MSSQL_EXPLAIN_FORMAT_ALL\x10\x01\x12\x1c\n" +- "\x18MSSQL_EXPLAIN_FORMAT_XML\x10\x02\"\x97\r\n" ++ "\tALL_NODES\x10\x02\"L\n" ++ "\rExplainFormat\x12\x1e\n" ++ "\x1aEXPLAIN_FORMAT_UNSPECIFIED\x10\x00\x12\b\n" ++ "\x04TEXT\x10\x01\x12\b\n" ++ "\x04JSON\x10\x02\x12\a\n" ++ "\x03XML\x10\x03J\x04\b\x02\x10\x03R\x14mssql_explain_format\"\x97\r\n" +"\vQueryResult\x12!\n" +"\fcolumn_names\x18\x01 \x03(\tR\vcolumnNames\x12*\n" +"\x11column_type_names\x18\x02 \x03(\tR\x0fcolumnTypeNames\x12/\n" +@@ -2254,7 +2267,7 @@ var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18)var file_v1_sql_service_proto_goTypes = []any{(QueryOption_RedisRunCommandsOn)(0), // 0: bytebase.v1.QueryOption.RedisRunCommandsOn- (QueryOption_MSSQLExplainFormat)(0), // 1: bytebase.v1.QueryOption.MSSQLExplainFormat+ (QueryOption_ExplainFormat)(0), // 1: bytebase.v1.QueryOption.ExplainFormat(QueryResult_CommandError_Type)(0), // 2: bytebase.v1.QueryResult.CommandError.Type(QueryResult_Message_Level)(0), // 3: bytebase.v1.QueryResult.Message.Level(Advice_Level)(0), // 4: bytebase.v1.Advice.Level@@ -2296,7 +2309,7 @@ var file_v1_sql_service_proto_depIdxs = []int32{10, // 1: bytebase.v1.QueryRequest.query_option:type_name -> bytebase.v1.QueryOption11, // 2: bytebase.v1.QueryResponse.results:type_name -> bytebase.v1.QueryResult0, // 3: bytebase.v1.QueryOption.redis_run_commands_on:type_name -> bytebase.v1.QueryOption.RedisRunCommandsOn- 1, // 4: bytebase.v1.QueryOption.mssql_explain_format:type_name -> bytebase.v1.QueryOption.MSSQLExplainFormat+ 1, // 4: bytebase.v1.QueryOption.explain_format:type_name -> bytebase.v1.QueryOption.ExplainFormat13, // 5: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow24, // 6: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration18, // 7: bytebase.v1.QueryResult.postgres_error:type_name -> bytebase.v1.QueryResult.PostgresErrordiff --git a/backend/generated-go/v1/sql_service_equal.pb.go b/backend/generated-go/v1/sql_service_equal.pb.goindex 423c319e50..46623cac87 100644--- a/backend/generated-go/v1/sql_service_equal.pb.go+++ b/backend/generated-go/v1/sql_service_equal.pb.go@@ -117,7 +117,7 @@ func (x *QueryOption) Equal(y *QueryOption) bool {if x.RedisRunCommandsOn != y.RedisRunCommandsOn {return false}- if x.MssqlExplainFormat != y.MssqlExplainFormat {+ if x.ExplainFormat != y.ExplainFormat {return false}return truediff --git a/backend/plugin/db/mssql/mssql.go b/backend/plugin/db/mssql/mssql.goindex cdc541bfa2..f964ed4032 100644--- a/backend/plugin/db/mssql/mssql.go+++ b/backend/plugin/db/mssql/mssql.go@@ -417,6 +417,17 @@ func (d *Driver) QueryConn(ctx context.Context, conn *sql.Conn, statement stringreturn results, nil}+// showplanStatistic picks the SET statement that turns on the requested explain+// output. SQL Server has no JSON showplan; which formats an engine may be asked+// for is decided at the API boundary (validateExplainFormat), so anything else+// arriving here takes the default plan.+func showplanStatistic(option *v1pb.QueryOption) string {+ if option.GetExplainFormat() == v1pb.QueryOption_XML {+ return "SHOWPLAN_XML"+ }+ return "SHOWPLAN_ALL"+}+// queryBatch queries a batch of SQL statements, for Result Set-Generating statements, it returns the results, for Row Count-Generating statements,// it returns the affected rows, for other statements, it returns the empty query result.// https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/result-generating-and-result-free-statements?view=sql-server-ver16@@ -432,10 +443,7 @@ func (*Driver) queryBatch(ctx context.Context, conn *sql.Conn, batch string, que// Special handling for EXPLAIN queries in MSSQL using explainif queryContext.Explain {- explain := "SHOWPLAN_ALL"- if queryContext.Option.MssqlExplainFormat == v1pb.QueryOption_MSSQL_EXPLAIN_FORMAT_XML {- explain = "SHOWPLAN_XML"- }+ explain := showplanStatistic(queryContext.Option)// Enable explain mode once for all statementsif _, err := conn.ExecContext(ctx, fmt.Sprintf("SET %s ON", explain)); err != nil { // NOSONAR(go:S2077) explain is a hardcoded constant ("SHOWPLAN_ALL" or "SHOWPLAN_XML"), not user inputreturn nil, errors.Wrap(err, "failed to enable explain mode")diff --git a/backend/plugin/db/mssql/mssql_test.go b/backend/plugin/db/mssql/mssql_test.gonew file mode 100644index 0000000000..c51ee1916a--- /dev/null+++ b/backend/plugin/db/mssql/mssql_test.go@@ -0,0 +1,34 @@+package mssql++import (+ "testing"++ "github.com/stretchr/testify/require"++ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"+)++func TestShowplanStatistic(t *testing.T) {+ for _, tc := range []struct {+ name string+ option *v1pb.QueryOption+ want string+ }{+ {name: "no option", option: nil, want: "SHOWPLAN_ALL"},+ {name: "empty option", option: &v1pb.QueryOption{}, want: "SHOWPLAN_ALL"},+ {+ name: "text",+ option: &v1pb.QueryOption{ExplainFormat: v1pb.QueryOption_TEXT},+ want: "SHOWPLAN_ALL",+ },+ {+ name: "xml",+ option: &v1pb.QueryOption{ExplainFormat: v1pb.QueryOption_XML},+ want: "SHOWPLAN_XML",+ },+ } {+ t.Run(tc.name, func(t *testing.T) {+ require.Equal(t, tc.want, showplanStatistic(tc.option))+ })+ }+}diff --git a/backend/plugin/db/pg/pg.go b/backend/plugin/db/pg/pg.goindex 42aadbd842..bb9442f952 100644--- a/backend/plugin/db/pg/pg.go+++ b/backend/plugin/db/pg/pg.go@@ -799,7 +799,7 @@ func (d *Driver) QueryConn(ctx context.Context, conn *sql.Conn, statement stringfor _, singleSQL := range singleSQLs {statement := singleSQL.Textif queryContext.Explain {- statement = fmt.Sprintf("EXPLAIN %s", statement)+ statement = explainStatement(statement, queryContext.Option.GetExplainFormat())} else if queryContext.Limit > 0 {statement = getStatementWithResultLimit(statement, queryContext.Limit)}diff --git a/backend/plugin/db/pg/pg_test.go b/backend/plugin/db/pg/pg_test.goindex 73605be751..0eaed311be 100644--- a/backend/plugin/db/pg/pg_test.go+++ b/backend/plugin/db/pg/pg_test.go@@ -6,6 +6,7 @@ import ("crypto/rsa""crypto/x509""crypto/x509/pkix"+ "encoding/json""encoding/pem""math/big""strings"@@ -338,6 +339,79 @@ func TestQueryConnSearchPathEscapesSelectedSchemaName(t *testing.T) {require.Equal(t, "quoted", firstStringValue(t, results))}+// TestQueryConnExplainFormat pins both explain outputs at the driver boundary:+// the default stays the human-readable text plan, and JSON returns the plan tree+// as a single row. The JSON assertion is what a plan renderer depends on, and+// running it through QueryConn also proves the editor's read-only validator+// accepts the parenthesized EXPLAIN form.+func TestQueryConnExplainFormat(t *testing.T) {+ t.Parallel()+ ctx := context.Background()++ pgContainer := testcontainer.SharedPgContainer(t)+ dbName, rawDB := testcontainer.NewPgDatabase(t)+ _, err := rawDB.ExecContext(ctx, `+ CREATE TABLE plan_target (id int PRIMARY KEY, note text);+ INSERT INTO plan_target SELECT g, 'n' || g FROM generate_series(1, 500) g;+ ANALYZE plan_target;+ `)+ require.NoError(t, err)++ driver, err := (&Driver{}).Open(ctx, storepb.Engine_POSTGRES, db.ConnectionConfig{+ DataSource: &storepb.DataSource{+ Host: pgContainer.GetHost(),+ Port: pgContainer.GetPort(),+ Username: "postgres",+ },+ Password: "root-password",+ ConnectionContext: db.ConnectionContext{DatabaseName: dbName},+ })+ require.NoError(t, err)+ defer driver.Close(ctx)++ conn, err := driver.GetDB().Conn(ctx)+ require.NoError(t, err)+ defer conn.Close()++ const statement = `SELECT note FROM plan_target WHERE id > 100;`++ textResults, err := driver.QueryConn(ctx, conn, statement, db.QueryContext{+ Explain: true,+ Limit: 5000,+ MaximumSQLResultSize: 1 << 30,+ })+ require.NoError(t, err)+ require.NotEmpty(t, textResults)+ require.Empty(t, textResults[0].GetError())+ require.Contains(t, firstStringValue(t, textResults), "(cost=")++ jsonResults, err := driver.QueryConn(ctx, conn, statement, db.QueryContext{+ Explain: true,+ Limit: 5000,+ MaximumSQLResultSize: 1 << 30,+ Option: &v1pb.QueryOption{ExplainFormat: v1pb.QueryOption_JSON},+ })+ require.NoError(t, err)+ require.NotEmpty(t, jsonResults)+ require.Empty(t, jsonResults[0].GetError())+ require.Len(t, jsonResults[0].GetRows(), 1)++ var plan []struct {+ Plan struct {+ NodeType string `json:"Node Type"`+ RelationName string `json:"Relation Name"`+ TotalCost float64 `json:"Total Cost"`+ PlanRows float64 `json:"Plan Rows"`+ } `json:"Plan"`+ }+ require.NoError(t, json.Unmarshal([]byte(firstStringValue(t, jsonResults)), &plan))+ require.Len(t, plan, 1)+ require.NotEmpty(t, plan[0].Plan.NodeType)+ require.Equal(t, "plan_target", plan[0].Plan.RelationName)+ require.Positive(t, plan[0].Plan.TotalCost)+ require.Positive(t, plan[0].Plan.PlanRows)+}+func firstStringValue(t *testing.T, results []*v1pb.QueryResult) string {t.Helper()require.NotEmpty(t, results)diff --git a/backend/plugin/db/pg/query.go b/backend/plugin/db/pg/query.goindex c12bf5dd1e..e28eb4b49d 100644--- a/backend/plugin/db/pg/query.go+++ b/backend/plugin/db/pg/query.go@@ -212,6 +212,21 @@ func padZeroes(rawStr string, acc int) string {return rawStr}+// explainStatement wraps statement in EXPLAIN. JSON and XML return the plan tree+// in a single row, so a caller that renders the plan never has to parse the text+// output. PostgreSQL produces every format this API offers, so there is nothing+// to reject.+func explainStatement(statement string, format v1pb.QueryOption_ExplainFormat) string {+ switch format {+ case v1pb.QueryOption_JSON:+ return fmt.Sprintf("EXPLAIN (FORMAT JSON) %s", statement)+ case v1pb.QueryOption_XML:+ return fmt.Sprintf("EXPLAIN (FORMAT XML) %s", statement)+ default:+ return fmt.Sprintf("EXPLAIN %s", statement)+ }+}+// getStatementWithResultLimit returns the statement with LIMIT clause if not exists.func getStatementWithResultLimit(statement string, limit int) string {stmt, err := getStatementWithResultLimitInline(statement, limit)diff --git a/backend/plugin/db/pg/query_test.go b/backend/plugin/db/pg/query_test.goindex 282f9c0067..16ebd95e73 100644--- a/backend/plugin/db/pg/query_test.go+++ b/backend/plugin/db/pg/query_test.go@@ -10,9 +10,26 @@ import ("github.com/stretchr/testify/require""google.golang.org/protobuf/encoding/protojson"+ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"pgparser "github.com/bytebase/bytebase/backend/plugin/parser/pg")+func TestExplainStatement(t *testing.T) {+ for _, tc := range []struct {+ format v1pb.QueryOption_ExplainFormat+ want string+ }{+ {v1pb.QueryOption_EXPLAIN_FORMAT_UNSPECIFIED, "EXPLAIN SELECT 1;"},+ {v1pb.QueryOption_TEXT, "EXPLAIN SELECT 1;"},+ {v1pb.QueryOption_JSON, "EXPLAIN (FORMAT JSON) SELECT 1;"},+ {v1pb.QueryOption_XML, "EXPLAIN (FORMAT XML) SELECT 1;"},+ } {+ t.Run(tc.format.String(), func(t *testing.T) {+ require.Equal(t, tc.want, explainStatement("SELECT 1;", tc.format))+ })+ }+}+func TestBuildTimestamptzRowValue(t *testing.T) {tests := []struct {name stringdiff --git a/frontend/AGENTS.md b/frontend/AGENTS.mdindex 62d5626edf..4df89c3a27 100644--- a/frontend/AGENTS.md+++ b/frontend/AGENTS.md@@ -7,12 +7,13 @@ This file provides additional guidance to AI coding assistants working under `./## React-- All product UI code is React. Use React, Base UI, Tailwind CSS v4, and the shadcn-style component patterns below. The `pev2` adapter under `src/apps/explain-visualizer/` is the only Vue runtime exception.+- All product UI code is React. Use React, Base UI, Tailwind CSS v4, and the shadcn-style component patterns below. There is no Vue runtime.## Localization- All user-facing UI text belongs in `src/locales/` and is consumed through `useTranslation()` from `react-i18next`.- Locale files must not contain empty JSON objects; remove them when encountered.+- `src/apps/explain-visualizer/` is exempt and writes its text inline: the entry never initializes i18n, and doing so would pull every locale bundle into a standalone page that today ships 208 KB. Number formatting there is pinned to `en-US` for the same reason. Text in the main app that merely refers to the visualizer, such as the SQL editor's failure toasts, still belongs in `src/locales/`.## UX contract@@ -41,7 +42,7 @@ Use route ownership as the primary organization axis. Do not add a generic `feat| `src/hooks/` and `src/lib/` | Cross-cutting hooks and framework-neutral helpers only || `src/types/` and `src/utils/` | Existing cross-module contracts and compatibility utilities; prefer owner-local code for new work || `src/types/proto-es/` | Generated protobuf output; do not edit manually |-| `src/apps/explain-visualizer/` | Isolated secondary entrypoint; the only source subtree allowed to use Vue through `pev2` |+| `src/apps/explain-visualizer/` | Isolated secondary entrypoint for the query-plan viewer opened in its own tab |### Placement and dependency rules@@ -51,6 +52,7 @@ Use route ownership as the primary organization axis. Do not add a generic `feat- Put a large reusable workflow in `src/modules/<name>/`; do not spread one subsystem across `components` and `stores`.- Shared code and modules must not import from `src/routes/`. Move the shared implementation to its actual owner instead.- Prefer direct owner imports such as `@/modules/sql-editor/store` over broad barrels when the owner is known.+- `src/apps/explain-visualizer/` must not use primitives backed by `styles.stylex.ts`. The build appends StyleX's rules to the main app's CSS asset only (`cssInjectionTarget` in `vite.config.ts`), so a StyleX-sized control renders unstyled in that entry.- Historical migration plans under `docs/` describe old paths and are not current architecture guidance.- `CLAUDE.md` files only import their adjacent `AGENTS.md`; update `AGENTS.md` as the source of truth.diff --git a/frontend/biome.json b/frontend/biome.jsonindex 63cbb46d24..36d2bf2194 100644--- a/frontend/biome.json+++ b/frontend/biome.json@@ -51,7 +51,7 @@"level": "error","options": {"paths": {- "vue": "Only src/apps/explain-visualizer may use Vue."+ "vue": "The frontend is React-only; do not reintroduce Vue."}}},@@ -221,11 +221,7 @@},"overrides": [{- "includes": [- "src/shims-3rd-party.d.ts",- "tailwind.config.js",- "vite-plugin-export-csp-hashes.ts"- ],+ "includes": ["tailwind.config.js", "vite-plugin-export-csp-hashes.ts"],"formatter": { "enabled": false },"linter": { "enabled": false }},@@ -284,7 +280,7 @@"level": "error","options": {"paths": {- "vue": "Only src/apps/explain-visualizer may use Vue."+ "vue": "The frontend is React-only; do not reintroduce Vue."},"patterns": [{@@ -307,12 +303,6 @@],"plugins": ["./biome-plugins/cel-filter-literals.grit"]},- {- "includes": ["src/apps/explain-visualizer/**"],- "linter": {- "rules": { "style": { "noRestrictedImports": "off" } }- }- },{"includes": ["*.json", "**/*.json", "*.json5", "**/*.json5"],"javascript": { "globals": [] },diff --git a/frontend/explain-visualizer.html b/frontend/explain-visualizer.htmlindex 6a367567e5..9d5920f437 100644--- a/frontend/explain-visualizer.html+++ b/frontend/explain-visualizer.html@@ -4,6 +4,7 @@<meta charset="UTF-8" /><link rel="icon" type="image/*" href="/favicon.ico" /><meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <meta name="color-scheme" content="light only" /><title>Bytebase - PostgreSQL Explain Visualizer</title></head>diff --git a/frontend/package.json b/frontend/package.jsonindex 5f240a282d..199bac86f4 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -33,10 +33,10 @@"@markdoc/markdoc": "0.5.8","@stylexjs/stylex": "^0.19.0","@tanstack/react-virtual": "^3.13.24",- "bootstrap": "5.3.8","class-variance-authority": "^0.7.1","clsx": "^2.1.1","crypto-js": "^4.2.0",+ "d3-hierarchy": "^3.1.2","d3-shape": "^3.2.0","dayjs": "1.11.21","dompurify": "catalog:",@@ -60,7 +60,6 @@"markdown-it": "^14.1.0","monaco-editor": "npm:@codingame/[email protected]","normalize-wheel": "^1.0.1",- "pev2": "1.23.0","posthog-js": "^1.406.2","qrcode.react": "^4.2.0","qs": "6.16.0",@@ -84,7 +83,6 @@"vscode": "npm:@codingame/[email protected]","vscode-languageclient": "9.0.1","vscode-ws-jsonrpc": "3.5.0",- "vue": "3.5.40","zustand": "^5.0.13"},"devDependencies": {@@ -99,6 +97,7 @@"@testing-library/react": "^16.3.2","@tsconfig/node24": "24.0.5","@types/crypto-js": "^4.2.2",+ "@types/d3-hierarchy": "^3.1.7","@types/d3-shape": "^3.1.7","@types/downloadjs": "1.4.6","@types/file-saver": "^2.0.7",diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yamlindex 7786931d48..c3d860cc75 100644--- a/frontend/pnpm-lock.yaml+++ b/frontend/pnpm-lock.yaml@@ -65,9 +65,6 @@ importers:'@tanstack/react-virtual':specifier: ^3.13.24- bootstrap:- specifier: 5.3.8- version: 5.3.8(@popperjs/[email protected])class-variance-authority:specifier: ^0.7.1version: 0.7.1@@ -77,6 +74,9 @@ importers:crypto-js:specifier: ^4.2.0version: 4.2.0+ d3-hierarchy:+ specifier: ^3.1.2+ version: 3.1.2d3-shape:specifier: ^3.2.0version: 3.2.0@@ -146,9 +146,6 @@ importers:normalize-wheel:specifier: ^1.0.1version: 1.0.1- pev2:- specifier: 1.23.0- version: 1.23.0(@popperjs/[email protected])([email protected]([email protected]))([email protected])([email protected])posthog-js:specifier: ^1.406.2version: 1.407.2@@ -218,9 +215,6 @@ importers:vscode-ws-jsonrpc:specifier: 3.5.0version: 3.5.0- vue:- specifier: 3.5.40- version: 3.5.40([email protected])zustand:specifier: ^5.0.13version: 5.0.14(@types/[email protected])([email protected])([email protected])([email protected]([email protected]))@@ -258,6 +252,9 @@ importers:'@types/crypto-js':specifier: ^4.2.2version: 4.2.2+ '@types/d3-hierarchy':+ specifier: ^3.1.7+ version: 3.1.7'@types/d3-shape':specifier: ^3.1.7version: 3.1.8@@ -1346,32 +1343,6 @@ packages:'@floating-ui/[email protected]':resolution: {integrity: sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==}- '@fortawesome/[email protected]':- resolution: {integrity: sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==}- engines: {node: '>=6'}-- '@fortawesome/[email protected]':- resolution: {integrity: sha512-k0C0sdHmZtAo6dRDtd1Z/qcpyHbL0CKsjV8seMY/21xGhY5Wsv0XRmiI/xEEH4y2c9b1+jvgNs/3EqhV27yUEA==}- engines: {node: '>=6'}-- '@fortawesome/[email protected]':- resolution: {integrity: sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==}- engines: {node: '>=6'}-- '@fortawesome/[email protected]':- resolution: {integrity: sha512-q1EsmL7Q8DDnkRBUjSvrxbq7c9oVwwVjCn/xa5apKmdp65YSgzUg2y0Ltnd5aDbT6GdAQQdXql5Ha90ArqIReQ==}- engines: {node: '>=6'}-- '@fortawesome/[email protected]':- resolution: {integrity: sha512-GsBrnOzU8uj0LECDfD5zomZJIjrPhIlWU82AHwa2s40FKH+kcxQaBvBo3Z4TxyZHIyX8XTDxsyA33/Vx9eFuQA==}- engines: {node: '>=6'}-- '@fortawesome/[email protected]':- resolution: {integrity: sha512-OHHUTLPEzdwP8kcYIzhioUdUOjZ4zzmi+midwa4bqscza4OJCOvTKJEHkXNz8PgZ23kWci1HkKVX0bm8f9t9gQ==}- peerDependencies:- '@fortawesome/fontawesome-svg-core': ~1 || ~6 || ~7- vue: '>= 3.0.0 < 4'-'@jridgewell/[email protected]':resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}@@ -1417,9 +1388,6 @@ packages:engines: {node: '>=20'}hasBin: true- '@popperjs/[email protected]':- resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}-'@posthog/[email protected]':resolution: {integrity: sha512-FTVPsRw6GBKWvFwN26TNIQNNYPR9FsUj+B+CKhk/ht63IRzn4yYFtFOjcmW+bfXvNHuRADs6APbZ6Haz1kpoAw==}@@ -1862,6 +1830,9 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==}+ '@types/[email protected]':+ resolution: {integrity: sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==}+'@types/[email protected]':resolution: {integrity: sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==}@@ -1957,9 +1928,6 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}- '@types/[email protected]':- resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}-'@typescript/[email protected]':resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==}engines: {node: '>=16.20.0'}@@ -2126,55 +2094,15 @@ packages:'@vscode/[email protected]':resolution: {integrity: sha512-tK6k0DXFHW7q5+GGuGZO+phpAqpxO4WXl+BLc/8/uOk3RsM2ssAL3CQUQDb1TGfwltjsauhN6S4ghYZzs4sPFw==}- '@vue/[email protected]':- resolution: {integrity: sha512-39E8IgOhTbVDnoJFMKc2DvYnypcZwUqgUhQkccva/0m6FUwtIKSGV7n1hpVmYcFaoRAwf9pBcwnKlCEsN63ZEQ==}-'@vue/[email protected]':resolution: {integrity: sha512-2Ye1ilMtKXxl8qZUrQ5j0CdgenFp/HFQmta6rfRyfEsTG69L6Wk+tWuNoHYHMx9E8tF2Slvdg1FuwDvAXdy1LQ==}- '@vue/[email protected]':- resolution: {integrity: sha512-pwkx4vqlqOspFstrcmzwkKLePVMD3PT65imRzLhanU2V1Fj4K13g6OXjanOyzw3aTAuRk84BOmY8f3rEHqPaVA==}-'@vue/[email protected]':resolution: {integrity: sha512-qbhQZEFmycr+ni/qyuccS4sucNN7VAbDfbkvNxWOX2VfgFm90MNs3/UhRNKoPMEIVn0F8gdlYjLPvqxHwHeQOA==}- '@vue/[email protected]':- resolution: {integrity: sha512-gIf497P4kpuALcvs5n3AEg1Vdn0pSY4XbjASIfHNYF1/MP3T2Mf2STERTubysBxCRxzJGJYtF/O7vwJrxFB3Vw==}-- '@vue/[email protected]':- resolution: {integrity: sha512-rrE5xiXG663+vHCHa3J9p2z5OcBRjXmoqenprJxAFQxg5pSshzeBiCE6pu46axapRJ2Adk0YDA2BRZVjiHXnhg==}-- '@vue/[email protected]':- resolution: {integrity: sha512-B7ot9UlUZOi1zbq61/LvE88ZLTV8IlajTdiZTAEiDQgrnIMIZoPr9kGw0Zw46ObW62O9+H/Be3kMbfb7kYPQZA==}-- '@vue/[email protected]':- resolution: {integrity: sha512-KAZLweuZ6uUJPK1PMSQPgBU5gCjgrrfjUhSglmU9NhH+Zjepa8cnwSydPWDWHDwOgY4g3VcZ+PljbiHlURNCbw==}-- '@vue/[email protected]':- resolution: {integrity: sha512-ZfrX8ssZQds900L9pr8AuK05ddnMsR4MPMZr8cPN9GoqoPWcXLhjvvbIA2SMv+7a97sJ1vv9pj/zxK0Cq/eEFQ==}-- '@vue/[email protected]':- resolution: {integrity: sha512-XNJym9WpevhTVt1HuwOrCRJ5Q+9z4BjTMrDtjTrvx74SmUll8spNTw6whWJa9mEkO4PKn5TihI/bm/8ds2QVJw==}-- '@vue/[email protected]':- resolution: {integrity: sha512-WxnBtruIqOoV3rA4jeKDWzrYI5h7Cp4+pjwDi8kWGHz+IslhiN+wguLVVhtv2l8VoU02rzDCVfDjgCl1lNpZVg==}-'@vue/[email protected]':resolution: {integrity: sha512-2rPxex1jQf4jvl9MOHl6YaXCPcrNqz/FstMOEh3QWY+/OME9nQTvl9WYeCwhW7AFjaR0SnngZGlp/wkR6rkI6g==}- '@vueuse/[email protected]':- resolution: {integrity: sha512-aHfz47g0ZhMtTVHmIzMVpJy8ePhhOy68GY5bv110+5DVtZ+W7BsOx+m61UNQqfrWyPztIHIanWa3E2tib3NFIw==}- peerDependencies:- vue: ^3.5.0-- '@vueuse/[email protected]':- resolution: {integrity: sha512-BwxmbAzwAVF50+MW57GXOUEV61nFBGnlBvrTqj49PqWJu3uw7hdu72ztXeZ33RdZtDY6kO+bfCAE1PCn88Tktw==}-- '@vueuse/[email protected]':- resolution: {integrity: sha512-bZpge9eSXwa4ToSiqJ7j6KRwhAsneMFoSz3LMWKQDkqimm3D/tbFlrklrs/IOqC8tEcYmXQZJ6N0UrjhBirVCg==}- peerDependencies:- vue: ^3.5.0-resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==}engines: {node: '>=0.4.0'}@@ -2250,11 +2178,6 @@ packages:resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==}- resolution: {integrity: sha512-HP1SZDqaLDPwsNiqRqi5NcP0SSXciX2s9E+RyqJIIqGo+vJeN5AJVM98CXmW/Wux0nQ5L7jeWUdplCEf0Ee+tg==}- peerDependencies:- '@popperjs/core': ^2.11.8-resolution: {integrity: sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==}@@ -2318,9 +2241,6 @@ packages:resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==}- resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==}-resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}engines: {node: '>=12'}@@ -2345,10 +2265,6 @@ packages:resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}- resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}- engines: {node: '>= 10'}-resolution: {integrity: sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==}@@ -2389,139 +2305,18 @@ packages:resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}- resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==}- engines: {node: '>=12'}- hasBin: true-- resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-gJiHrx5uTTHq44bjyIb3xpbmmdZcWLYPKeO9EPVOq8EylMFOiH2+9sWqKAiQ4DcFuOZTAxPOQyv0Rnmji/g15A==}-- resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ==}-resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==}engines: {node: '>=12'}- resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==}- engines: {node: '>=12'}-resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==}engines: {node: '>=12'}- resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==}- engines: {node: '>=12'}-resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==}engines: {node: '>=12'}- resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==}- engines: {node: '>=12'}- peerDependencies:- d3-selection: 2 - 3-- resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==}- engines: {node: '>=12'}-- resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==}- engines: {node: '>=12'}-resolution: {integrity: sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==}engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}@@ -2551,12 +2346,6 @@ packages:resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}engines: {node: '>=8'}- resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==}-- resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==}-resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}engines: {node: '>=6'}@@ -2700,20 +2489,6 @@ packages:resolution: {integrity: sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==}- resolution: {integrity: sha512-Z2dQ+o7BsfpJI3+u0SQUNCrN+ajCKJen1blC4rCHx1Ta2EOHs+xKJegLT2aaD9iSMbU3OoX+WabQXkloUbZmJQ==}- peerDependencies:- '@emotion/is-prop-valid': '*'- react: ^18.0.0 || ^19.0.0- react-dom: ^18.0.0 || ^19.0.0- peerDependenciesMeta:- '@emotion/is-prop-valid':- optional: true- react:- optional: true- react-dom:- optional: true-resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}@@ -2743,9 +2518,6 @@ packages:resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}engines: {node: '>= 0.4'}- resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==}-resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}engines: {node: '>= 0.4'}@@ -2794,9 +2566,6 @@ packages:resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==}- resolution: {integrity: sha512-K7Ny/ULO1hDm2nnhvAY+SJV1skxFb61fd073SG1IWJl+D44ULrruCuTyjHKjBVVcSuTlnY99DKtgEG39CM5QOQ==}-resolution: {integrity: sha512-Bu5Z2nAXgfVyM8xvW3jk9EKRIuX37PudsrBViThNFx7CR7aaYTpP01cxNB/E4c4UUzTDiAZRstEhsRfPOL/8xA==}peerDependencies:@@ -2805,10 +2574,6 @@ packages:typescript:optional: true- resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}- engines: {node: '>=0.10.0'}-resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==}@@ -2832,10 +2597,6 @@ packages:resolution: {integrity: sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==}- resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==}- engines: {node: '>=12'}-resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==}@@ -3011,9 +2772,6 @@ packages:resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}- resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==}-resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}@@ -3219,26 +2977,6 @@ packages:resolution: {integrity: sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==}- resolution: {integrity: sha512-k33CsnxO2K3gBRMUZT+vPmc4Utlb5menKdG0RyVNLtlqRaaJPRWlE9fXl8NTtfZ5z3G8TDvqSu0MENLqSTaHZA==}-- resolution: {integrity: sha512-G3kc34H2cX2gI63RqU+cZq+zWRRPSsNIOjpdl9TN4AQwC4sgwYPl/Q/Obf/d53nOm569T0fYK+tcoSV50BWx8A==}-- resolution: {integrity: sha512-N06NLJ9IeBHeielRqIvYvjPfXuRdyTxa+9++BgpGa+hY2D7TcMkI6QzV3jaRuv0aZRXgMa7cPy9YcBUBisPzAQ==}- peerDependencies:- '@emotion/is-prop-valid': '*'- react: ^18.0.0 || ^19.0.0- react-dom: ^18.0.0 || ^19.0.0- peerDependenciesMeta:- '@emotion/is-prop-valid':- optional: true- react:- optional: true- react-dom:- optional: true-resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}@@ -3290,9 +3028,6 @@ packages:resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}- resolution: {integrity: sha512-b1EK39EEmlYSZlQcimK7hVknVbEJ14q3Eo2/AevkRLt2iTgXFfiePQqZQJ2b12IDyANHKp4dbFj6846Arr6E1g==}-resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}@@ -3536,9 +3271,6 @@ packages:resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==}engines: {node: '>=0.12'}- resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==}-resolution: {integrity: sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==}engines: {node: ^20.19.0 || >=22.12.0}@@ -3562,18 +3294,12 @@ packages:engines: {node: '>=18.0.0', npm: '>=8.0.0'}hasBin: true- resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==}-resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==}resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}- resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}-resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}engines: {node: '>=v12.22.7'}@@ -3587,9 +3313,6 @@ packages:resolution: {integrity: sha512-bnnvJL28/Rtz/kz2+4wpBjHzWoEzXhVg/TE8BeVGJHUqE8THNIRnDxDWMktwM+qahvlRdvlLdsQfYe+cuqfZeA==}- resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==}-resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}hasBin: true@@ -3643,11 +3366,6 @@ packages:resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}- resolution: {integrity: sha512-K+WKxWdqtKShV33gPjQl769wHxB3glypTOReCvYu/AJd38J+abHlpiF8rK6uBNPMrgw5thHZCI5JkEwsAqa9XA==}- peerDependencies:- vue: ^3.2.0-resolution: {integrity: sha512-kTYRg5FIcvsDtYUG2Qn9pYT6xKwiLJN5TTIvc5Mur6hIg4pSfdpHu8Yyu5bqESLHnVM3mXzD446cb2+uEaKZXg==}hasBin: true@@ -3714,9 +3432,6 @@ packages:engines: {node: '>=10'}hasBin: true- resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}-resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}@@ -3732,9 +3447,6 @@ packages:resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==}engines: {node: '>=14.0.0'}- resolution: {integrity: sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==}-resolution: {integrity: sha512-lJX2dEWx0SGH4O6p+7FPwYmJ/bu1JbcGJ8RLaG9b7liIgZ85itUVEPbMtWRVrde/0fnDPEPHW10ZsKW3kVsE9A==}@@ -3969,22 +3681,6 @@ packages:resolution: {integrity: sha512-13ZDy7Od4AfEPK2HIfY3DtyRi4FVsvFql1yobVJrpIoHOKGGJpIjVvIJpMxkrHzCZzWlYlg+WEu2hrYkCTvM0Q==}engines: {node: '>=20.10.0', npm: '>=10.2.3'}- resolution: {integrity: sha512-Q9S7dzWGax7LN5iiSPcu/K1GGm2gcBBlYwmMsUc5/16N6w90cbKow3FnPmPs95sungns4yvd9/+JhbAznECS2A==}-- resolution: {integrity: sha512-gdHbBV5/Vc8gH87hQHLA7TN1K4BlLco3MAPrTb70ZYGXxx+55rAU4a4mt0fIoP+gB3etu1khUZ6c29Br1n0CiA==}- peerDependencies:- vue: ^3.2.0-- resolution: {integrity: sha512-+8PJ4SJXdn/cHGImF4CKdxlWHIN5Dkt7DoufRREM6h6uVCx2m7QxgcEQmmzyOK8A9mcafg7sFbJFYsdFVubTig==}- peerDependencies:- typescript: '*'- peerDependenciesMeta:- typescript:- optional: true-resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==}engines: {node: '>=18'}@@ -5169,27 +4865,6 @@ snapshots:'@floating-ui/[email protected]': {}- '@fortawesome/[email protected]': {}-- '@fortawesome/[email protected]': {}-- '@fortawesome/[email protected]':- dependencies:- '@fortawesome/fontawesome-common-types': 6.7.2-- '@fortawesome/[email protected]':- dependencies:- '@fortawesome/fontawesome-common-types': 7.3.1-- '@fortawesome/[email protected]':- dependencies:- '@fortawesome/fontawesome-common-types': 6.7.2-- '@fortawesome/[email protected](@fortawesome/[email protected])([email protected]([email protected]))':- dependencies:- '@fortawesome/fontawesome-svg-core': 6.7.2- vue: 3.5.40([email protected])-'@jridgewell/[email protected]':dependencies:'@jridgewell/sourcemap-codec': 1.5.5@@ -5234,8 +4909,6 @@ snapshots:dependencies:playwright: 1.62.1- '@popperjs/[email protected]': {}-'@posthog/[email protected]':dependencies:'@posthog/core': 1.45.1@@ -5564,6 +5237,8 @@ snapshots:'@types/[email protected]': {}+ '@types/[email protected]': {}+'@types/[email protected]': {}'@types/[email protected]':@@ -5658,8 +5333,6 @@ snapshots:'@types/[email protected]': {}- '@types/[email protected]': {}-'@typescript/[email protected]':optional: true@@ -5786,14 +5459,6 @@ snapshots:'@vscode/[email protected]': {}- '@vue/[email protected]':- dependencies:- '@babel/parser': 7.29.8- '@vue/shared': 3.5.40- entities: 7.0.1- estree-walker: 2.0.2- source-map-js: 1.2.1-'@vue/[email protected]':dependencies:'@babel/parser': 7.29.8@@ -5802,72 +5467,13 @@ snapshots:estree-walker: 2.0.2source-map-js: 1.2.1- '@vue/[email protected]':- dependencies:- '@vue/compiler-core': 3.5.40- '@vue/shared': 3.5.40-'@vue/[email protected]':dependencies:'@vue/compiler-core': 3.5.42'@vue/shared': 3.5.42- '@vue/[email protected]':- dependencies:- '@babel/parser': 7.29.8- '@vue/compiler-core': 3.5.40- '@vue/compiler-dom': 3.5.40- '@vue/compiler-ssr': 3.5.40- '@vue/shared': 3.5.40- estree-walker: 2.0.2- magic-string: 0.30.21- postcss: 8.5.23- source-map-js: 1.2.1-- '@vue/[email protected]':- dependencies:- '@vue/compiler-dom': 3.5.40- '@vue/shared': 3.5.40-- '@vue/[email protected]':- dependencies:- '@vue/shared': 3.5.40-- '@vue/[email protected]':- dependencies:- '@vue/reactivity': 3.5.40- '@vue/shared': 3.5.40-- '@vue/[email protected]':- dependencies:- '@vue/reactivity': 3.5.40- '@vue/runtime-core': 3.5.40- '@vue/shared': 3.5.40- csstype: 3.2.3-- '@vue/[email protected]':- dependencies:- '@vue/compiler-ssr': 3.5.40- '@vue/runtime-dom': 3.5.40- '@vue/shared': 3.5.40-- '@vue/[email protected]': {}-'@vue/[email protected]': {}- dependencies:- '@types/web-bluetooth': 0.0.21- '@vueuse/metadata': 14.3.0- '@vueuse/shared': 14.3.0([email protected]([email protected]))- vue: 3.5.40([email protected])-- '@vueuse/[email protected]': {}-- dependencies:- vue: 3.5.40([email protected])-@@ -5941,10 +5547,6 @@ snapshots:dependencies:require-from-string: 2.0.2- [email protected](@popperjs/[email protected]):- dependencies:- '@popperjs/core': 2.11.8-dependencies:balanced-match: 1.0.2@@ -6004,12 +5606,6 @@ snapshots:dependencies:clsx: 2.1.1- dependencies:- good-listener: 1.2.2- select: 1.1.2- tiny-emitter: 2.1.0-dependencies:string-width: 4.2.3@@ -6045,8 +5641,6 @@ snapshots:- [email protected]: {}-@@ -6076,164 +5670,14 @@ snapshots:- dependencies:- internmap: 2.0.3-- [email protected]: {}-- dependencies:- d3-dispatch: 3.0.1- d3-drag: 3.0.0- d3-interpolate: 3.0.1- d3-selection: 3.0.0- d3-transition: 3.0.1([email protected])-- dependencies:- d3-path: 3.1.0-- [email protected]: {}-- dependencies:- d3-array: 3.2.4-- dependencies:- delaunator: 5.0.1-- [email protected]: {}-- dependencies:- d3-dispatch: 3.0.1- d3-selection: 3.0.0-- dependencies:- commander: 7.2.0- iconv-lite: 0.6.3- rw: 1.3.3-- [email protected]: {}-- dependencies:- d3-dsv: 3.0.1-- dependencies:- d3-hierarchy: 1.1.9-- dependencies:- d3-dispatch: 3.0.1- d3-quadtree: 3.0.1- d3-timer: 3.0.1-- [email protected]: {}-- dependencies:- d3-array: 3.2.4-- [email protected]: {}-- dependencies:- d3-color: 3.1.0-- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-- dependencies:- d3-color: 3.1.0- d3-interpolate: 3.0.1-- dependencies:- d3-array: 3.2.4- d3-format: 3.1.0- d3-interpolate: 3.0.1- d3-time: 3.1.0- d3-time-format: 4.1.0-- [email protected]: {}-dependencies:d3-path: 3.1.0- dependencies:- d3-time: 3.1.0-- dependencies:- d3-array: 3.2.4-- [email protected]: {}-- dependencies:- d3-color: 3.1.0- d3-dispatch: 3.0.1- d3-ease: 3.0.1- d3-interpolate: 3.0.1- d3-selection: 3.0.0- d3-timer: 3.0.1-- dependencies:- d3-dispatch: 3.0.1- d3-drag: 3.0.0- d3-interpolate: 3.0.1- d3-selection: 3.0.0- d3-transition: 3.0.1([email protected])-- dependencies:- d3-array: 3.2.4- d3-axis: 3.0.0- d3-brush: 3.0.0- d3-chord: 3.0.1- d3-color: 3.1.0- d3-contour: 4.0.2- d3-delaunay: 6.0.4- d3-dispatch: 3.0.1- d3-drag: 3.0.0- d3-dsv: 3.0.1- d3-ease: 3.0.1- d3-fetch: 3.0.1- d3-force: 3.0.0- d3-format: 3.1.0- d3-geo: 3.1.1- d3-hierarchy: 3.1.2- d3-interpolate: 3.0.1- d3-path: 3.1.0- d3-polygon: 3.0.1- d3-quadtree: 3.0.1- d3-random: 3.0.1- d3-scale: 4.0.2- d3-scale-chromatic: 3.1.0- d3-selection: 3.0.0- d3-shape: 3.2.0- d3-time: 3.1.0- d3-time-format: 4.1.0- d3-timer: 3.0.1- d3-transition: 3.0.1([email protected])- d3-zoom: 3.0.0-dependencies:whatwg-mimetype: 5.0.0@@ -6259,12 +5703,6 @@ snapshots:- dependencies:- robust-predicates: 3.0.2-- [email protected]: {}-@@ -6391,15 +5829,6 @@ snapshots:- dependencies:- motion-dom: 12.34.5- motion-utils: 12.29.2- tslib: 2.8.1- optionalDependencies:- react: 19.2.8- react-dom: 19.2.8([email protected])-optional: true@@ -6430,10 +5859,6 @@ snapshots:dunder-proto: 1.0.1es-object-atoms: 1.1.2- dependencies:- delegate: 3.2.0-@@ -6490,16 +5915,10 @@ snapshots:- [email protected]: {}-optionalDependencies:typescript: 7.0.2- dependencies:- safer-buffer: 2.1.2-@@ -6519,8 +5938,6 @@ snapshots:- [email protected]: {}-dependencies:loose-envify: 1.4.0@@ -6673,8 +6090,6 @@ snapshots:- [email protected]: {}-@@ -7078,20 +6493,6 @@ snapshots:- dependencies:- motion-utils: 12.29.2-- [email protected]: {}-- dependencies:- tslib: 2.8.1- optionalDependencies:- react: 19.2.8- react-dom: 19.2.8([email protected])-@@ -7145,31 +6546,6 @@ snapshots:- [email protected](@popperjs/[email protected])([email protected]([email protected]))([email protected])([email protected]):- dependencies:- '@fortawesome/fontawesome-svg-core': 6.7.2- '@fortawesome/free-regular-svg-icons': 7.3.1- '@fortawesome/free-solid-svg-icons': 6.7.2- '@fortawesome/vue-fontawesome': 3.1.3(@fortawesome/[email protected])([email protected]([email protected]))- '@vueuse/core': 14.3.0([email protected]([email protected]))- bootstrap: 5.3.8(@popperjs/[email protected])- d3: 7.9.0- d3-flextree: 2.1.2- highlight.js: 11.11.1- humanize-duration: 3.33.2- lodash: 4.18.1- splitpanes: 3.2.0([email protected]([email protected]))- vue: 3.5.40([email protected])- vue-clipboard3: 2.0.0- vue-tippy: 6.7.1([email protected]([email protected]))- transitivePeerDependencies:- - '@emotion/is-prop-valid'- - '@popperjs/core'- - react- - react-dom- - typescript-@@ -7442,8 +6818,6 @@ snapshots:- [email protected]: {}-dependencies:'@oxc-project/types': 0.139.0@@ -7506,16 +6880,12 @@ snapshots:'@rollup/rollup-win32-x64-msvc': 4.62.2fsevents: 2.3.3- [email protected]: {}-dependencies:tslib: 2.8.1- [email protected]: {}-dependencies:xmlchars: 2.2.0@@ -7528,8 +6898,6 @@ snapshots:- [email protected]: {}-@@ -7581,10 +6949,6 @@ snapshots:- dependencies:- vue: 3.5.40([email protected])-dependencies:argparse: 2.0.1@@ -7650,8 +7014,6 @@ snapshots:commander: 2.20.3source-map-support: 0.5.21- [email protected]: {}-@@ -7663,10 +7025,6 @@ snapshots:- dependencies:- '@popperjs/core': 2.11.8-@@ -7877,25 +7235,6 @@ snapshots:dependencies:vscode-jsonrpc: 8.2.1- dependencies:- clipboard: 2.0.11-- dependencies:- tippy.js: 6.3.7- vue: 3.5.40([email protected])-- dependencies:- '@vue/compiler-dom': 3.5.40- '@vue/compiler-sfc': 3.5.40- '@vue/runtime-dom': 3.5.40- '@vue/server-renderer': 3.5.40- '@vue/shared': 3.5.40- optionalDependencies:- typescript: 7.0.2-dependencies:xml-name-validator: 5.0.0diff --git a/frontend/scripts/generate-openapi-index.js b/frontend/scripts/generate-openapi-index.jsindex f9c4de78ec..643d99519d 100644--- a/frontend/scripts/generate-openapi-index.js+++ b/frontend/scripts/generate-openapi-index.js@@ -33,7 +33,8 @@ function isObjectSchema(schemaDef) {(schemaDef.type === "object" ||!!schemaDef.properties ||Array.isArray(schemaDef.allOf) ||- Array.isArray(schemaDef.oneOf))+ Array.isArray(schemaDef.oneOf) ||+ Array.isArray(schemaDef.anyOf)));}@@ -58,8 +59,15 @@ function mergeObjectShape(schemaDef, mergedProperties, mergedRequired, options)}}- if (Array.isArray(schemaDef.oneOf)) {- for (const branch of schemaDef.oneOf) {+ // A proto oneof renders as `oneOf` or `anyOf` depending on the generator+ // version, and both mean the same thing here: every branch's fields belong+ // to the message, none of them required. Walking only one spelling silently+ // drops whole branches — including their bytes fields, which then never get+ // base64-encoded on the way out.+ for (const key of ["oneOf", "anyOf"]) {+ const branches = schemaDef[key];+ if (!Array.isArray(branches)) continue;+ for (const branch of branches) {mergeObjectShape(branch, mergedProperties, mergedRequired, {includeRequired: false,});@@ -96,8 +104,27 @@ function extractPropertyInfo(propName, propDef, requiredSet) {return info;}- if (Array.isArray(propDef.oneOf)) {- const nonNullBranches = propDef.oneOf.filter(+ // A message-typed field renders either as a bare `$ref` or as a one-branch+ // `allOf` wrapping it, depending on the generator version — the wrapper is+ // how OpenAPI 3.0 attaches a title and description to a reference. Unwrap it,+ // or the field's type degrades to a bare object and nothing downstream knows+ // what it points at.+ if (Array.isArray(propDef.allOf)) {+ const branches = propDef.allOf.filter(Boolean);+ if (branches.length === 1) {+ const unwrapped = { ...branches[0] };+ if (propDef.description && !unwrapped.description) {+ unwrapped.description = propDef.description;+ }+ return extractPropertyInfo(propName, unwrapped, requiredSet);+ }+ }++ const propBranches = Array.isArray(propDef.oneOf)+ ? propDef.oneOf+ : propDef.anyOf;+ if (Array.isArray(propBranches)) {+ const nonNullBranches = propBranches.filter((branch) => branch && branch.type !== "null");if (nonNullBranches.length === 1) {diff --git a/frontend/src/apps/explain-visualizer/ExplainVisualizerApp.tsx b/frontend/src/apps/explain-visualizer/ExplainVisualizerApp.tsxindex 5bafe50787..4eefcca13b 100644--- a/frontend/src/apps/explain-visualizer/ExplainVisualizerApp.tsx+++ b/frontend/src/apps/explain-visualizer/ExplainVisualizerApp.tsx@@ -1,7 +1,7 @@import { parse } from "qs";import { type ReactNode, useMemo } from "react";import { Engine } from "@/types/proto-es/v1/common_pb";-import { readExplainFromToken } from "@/utils/pev2";+import { readExplainFromToken } from "@/utils/explainToken";import { MSSQLPlanView } from "./MSSQLPlanView";import { PostgresPlanView } from "./PostgresPlanView";import { SpannerQueryPlan } from "./SpannerQueryPlan";@@ -16,7 +16,10 @@ export function ExplainVisualizerApp() {if (!storedQuery) {return (<div className="ev-app">- <h1>session expired</h1>+ <div className="ev-unsupported">+ <h2>Session expired</h2>+ <p>Run the statement again to open a fresh query plan.</p>+ </div></div>);}diff --git a/frontend/src/apps/explain-visualizer/PlanCopyButton.test.tsx b/frontend/src/apps/explain-visualizer/PlanCopyButton.test.tsxnew file mode 100644index 0000000000..fb4ec6e40f--- /dev/null+++ b/frontend/src/apps/explain-visualizer/PlanCopyButton.test.tsx@@ -0,0 +1,79 @@+import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";+import { PlanCopyButton } from "./PlanCopyButton";++const writeText = vi.fn<(text: string) => Promise<void>>();++const button = () => screen.getByTestId("plan-copy-button");++beforeEach(() => {+ vi.useFakeTimers({ shouldAdvanceTime: true });+ writeText.mockReset().mockResolvedValue(undefined);+ Object.defineProperty(navigator, "clipboard", {+ configurable: true,+ value: { writeText },+ });+});++afterEach(() => {+ vi.useRealTimers();+});++describe("PlanCopyButton", () => {+ test("names what it copies until it is used", () => {+ render(<PlanCopyButton content="SELECT 1" label="Copy query" />);+ expect(button()).toHaveTextContent("Copy query");+ });++ test("puts the content on the clipboard and says so", async () => {+ render(<PlanCopyButton content="SELECT 1" label="Copy query" />);++ fireEvent.click(button());++ expect(writeText).toHaveBeenCalledWith("SELECT 1");+ await waitFor(() => expect(button()).toHaveTextContent("Copied"));+ });++ test("goes back to offering the copy after the confirmation", async () => {+ render(<PlanCopyButton content="SELECT 1" label="Copy query" />);++ fireEvent.click(button());+ await waitFor(() => expect(button()).toHaveTextContent("Copied"));++ vi.advanceTimersByTime(2000);+ await waitFor(() => expect(button()).toHaveTextContent("Copy query"));+ });++ test("reports a clipboard the browser refused rather than lying", async () => {+ writeText.mockRejectedValue(new Error("denied"));+ // The clipboard library then falls back to a hidden textarea; jsdom+ // implements no `execCommand` at all, so that fails too.+ Object.defineProperty(document, "execCommand", {+ configurable: true,+ value: () => false,+ });+ render(<PlanCopyButton content="SELECT 1" label="Copy query" />);++ fireEvent.click(button());++ await waitFor(() => expect(button()).toHaveTextContent("Copy failed"));+ });++ test("announces the outcome to a reader looking elsewhere", async () => {+ const { container } = render(+ <PlanCopyButton content="SELECT 1" label="Copy query" />+ );+ const live = container.querySelector("[aria-live='polite']");++ expect(live).toHaveTextContent("");+ fireEvent.click(button());+ await waitFor(() => expect(live).toHaveTextContent("Copied"));+ });++ test("can be disabled when there is nothing to copy", () => {+ render(<PlanCopyButton content="" label="Copy query" disabled />);++ fireEvent.click(button());+ expect(writeText).not.toHaveBeenCalled();+ });+});diff --git a/frontend/src/apps/explain-visualizer/PlanCopyButton.tsx b/frontend/src/apps/explain-visualizer/PlanCopyButton.tsxnew file mode 100644index 0000000000..efc8837140--- /dev/null+++ b/frontend/src/apps/explain-visualizer/PlanCopyButton.tsx@@ -0,0 +1,71 @@+import { Check, Copy } from "lucide-react";+import { useCallback, useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/button";+import { writeTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";++/**+ * A copy control that reports the result on itself.+ *+ * The shared `CopyButton` confirms through `useTranslation` and the app store's+ * notifications; this entry initializes neither, so a local button is the whole+ * dependency rather than the app's stores.+ */+interface Props {+ /** What to put on the clipboard. */+ readonly content: string;+ /** Names what is being copied, such as "Copy plan". */+ readonly label: string;+ readonly disabled?: boolean;+}++/** How long the outcome stays on the button before it offers the copy again. */+const CONFIRMATION_MS = 2000;++type CopyState = "idle" | "copied" | "failed";++const MESSAGE: Record<Exclude<CopyState, "idle">, string> = {+ copied: "Copied",+ failed: "Copy failed",+};++export function PlanCopyButton({ content, label, disabled }: Props) {+ const [state, setState] = useState<CopyState>("idle");+ const timerRef = useRef<ReturnType<typeof setTimeout>>(undefined);++ useEffect(() => () => clearTimeout(timerRef.current), []);++ const copy = useCallback(async () => {+ const ok = await writeTextToClipboard(content);+ setState(ok ? "copied" : "failed");+ clearTimeout(timerRef.current);+ timerRef.current = setTimeout(() => setState("idle"), CONFIRMATION_MS);+ }, [content]);++ const outcome = state === "idle" ? undefined : MESSAGE[state];++ return (+ <span className="inline-flex items-center">+ <Button+ size="sm"+ appearance="outline"+ disabled={disabled}+ data-testid="plan-copy-button"+ onClick={copy}+ className={cn("bg-background", state === "failed" && "text-error")}+ >+ {state === "copied" ? (+ <Check aria-hidden="true" className="size-3.5 text-success" />+ ) : (+ <Copy aria-hidden="true" className="size-3.5" />+ )}+ {outcome ?? label}+ </Button>+ {/* The button's own text already changed; this announces it to a reader+ whose focus is elsewhere on the page. */}+ <span aria-live="polite" className="sr-only">+ {outcome ?? ""}+ </span>+ </span>+ );+}diff --git a/frontend/src/apps/explain-visualizer/PlanMiniMap.test.tsx b/frontend/src/apps/explain-visualizer/PlanMiniMap.test.tsxnew file mode 100644index 0000000000..1fa46d47a2--- /dev/null+++ b/frontend/src/apps/explain-visualizer/PlanMiniMap.test.tsx@@ -0,0 +1,149 @@+import { fireEvent, render, screen } from "@testing-library/react";+import { describe, expect, test, vi } from "vitest";+import type { PlanLayout } from "./plan-layout";+import { PlanMiniMap } from "./PlanMiniMap";+import type { PlanNode } from "./plan-model";++const node = (id: string): PlanNode => ({+ id,+ nodeType: "Seq Scan",+ startupCost: 0,+ totalCost: 0,+ selfCost: 0,+ rows: 0,+ width: 0,+ properties: [],+ children: [],+});++// An 800x400 plan with a card at the origin and another to its lower right.+const layout: PlanLayout = {+ nodes: [+ { node: node("0"), x: 0, y: 0 },+ { node: node("0.0"), x: 584, y: 304 },+ ],+ edges: [],+ width: 800,+ height: 400,+};++const SIZE = { width: 400, height: 300 };++const renderMap = (+ overrides: Partial<Parameters<typeof PlanMiniMap>[0]> = {}+) => {+ const onPanTo = vi.fn();+ const props = {+ layout,+ size: SIZE,+ view: { scale: 1, x: 0, y: 0 },+ selectedId: "0",+ onPanTo,+ ...overrides,+ };+ return { onPanTo, ...render(<PlanMiniMap {...props} />) };+};++const surface = () => screen.getByTestId("plan-mini-map");+const frame = () => screen.getByTestId("plan-mini-map-viewport");++describe("PlanMiniMap", () => {+ test("draws the whole plan scaled into its corner", () => {+ renderMap();++ // 160/800 binds, so the plan is drawn at a fifth of its size.+ expect(surface().style.width).toBe("160px");+ expect(surface().style.height).toBe("80px");+ expect(screen.getAllByTestId("plan-mini-map-node")).toHaveLength(2);+ });++ test("places each node where it sits in the plan", () => {+ renderMap();+ const dots = screen.getAllByTestId("plan-mini-map-node");++ const px = (value: string) => Number.parseFloat(value);+ expect(px(dots[1].style.left)).toBeCloseTo(584 / 5, 6);+ expect(px(dots[1].style.top)).toBeCloseTo(304 / 5, 6);+ // A 216x96 card at a fifth of its size.+ expect(px(dots[1].style.width)).toBeCloseTo(43.2, 6);+ });++ test("marks where the selected node sits", () => {+ renderMap({ selectedId: "0.0" });+ const dots = screen.getAllByTestId("plan-mini-map-node");++ expect(dots[0]).not.toHaveClass("bg-accent");+ expect(dots[1]).toHaveClass("bg-accent");+ });++ test("frames the part of the plan currently on screen", () => {+ renderMap({ view: { scale: 1, x: -200, y: -50 } });++ expect(frame().style.left).toBe("40px");+ expect(frame().style.top).toBe("10px");+ expect(frame().style.width).toBe("80px");+ expect(frame().style.height).toBe("60px");+ });++ test("stays out of the accessibility tree", () => {+ renderMap();+ expect(surface()).toHaveAttribute("aria-hidden", "true");+ expect(screen.queryAllByRole("button")).toHaveLength(0);+ });++ test("asks for the point clicked to be brought to the middle", () => {+ const { onPanTo } = renderMap();++ fireEvent.pointerDown(surface(), { button: 0, clientX: 80, clientY: 40 });++ // A fifth-size map, so 80,40 on it is 400,200 in the plan.+ expect(onPanTo).toHaveBeenCalledWith({ x: 400, y: 200 });+ });++ test("keeps following a drag after the press", () => {+ const { onPanTo } = renderMap();++ fireEvent.pointerDown(surface(), { button: 0, clientX: 80, clientY: 40 });+ fireEvent.pointerMove(window, { clientX: 120, clientY: 60 });+ expect(onPanTo).toHaveBeenLastCalledWith({ x: 600, y: 300 });++ fireEvent.pointerUp(window);+ fireEvent.pointerMove(window, { clientX: 20, clientY: 20 });+ expect(onPanTo).toHaveBeenCalledTimes(2);+ });++ test("leaves the diagram's own pan alone while it is being dragged", () => {+ // The diagram pans on a press anywhere on its canvas, so a press aimed at+ // the mini-map must not reach it.+ const onCanvasPointerDown = vi.fn();+ const onPanTo = vi.fn();+ render(+ <div onPointerDown={onCanvasPointerDown}>+ <PlanMiniMap+ layout={layout}+ size={SIZE}+ view={{ scale: 1, x: 0, y: 0 }}+ selectedId="0"+ onPanTo={onPanTo}+ />+ </div>+ );++ fireEvent.pointerDown(surface(), { button: 0, clientX: 10, clientY: 10 });++ expect(onPanTo).toHaveBeenCalled();+ expect(onCanvasPointerDown).not.toHaveBeenCalled();+ });++ test("ignores a press that is not the primary button", () => {+ const { onPanTo } = renderMap();++ fireEvent.pointerDown(surface(), { button: 2, clientX: 80, clientY: 40 });+ expect(onPanTo).not.toHaveBeenCalled();+ });++ test("renders nothing for a plan with no extent to overview", () => {+ renderMap({ layout: { ...layout, width: 0, height: 0 } });+ expect(screen.queryByTestId("plan-mini-map")).toBeNull();+ });+});diff --git a/frontend/src/apps/explain-visualizer/PlanMiniMap.tsx b/frontend/src/apps/explain-visualizer/PlanMiniMap.tsxnew file mode 100644index 0000000000..1fe60a9518--- /dev/null+++ b/frontend/src/apps/explain-visualizer/PlanMiniMap.tsx@@ -0,0 +1,135 @@+import { useCallback, useMemo, useRef } from "react";+import { cn } from "@/lib/utils";+import {+ PLAN_NODE_HEIGHT,+ PLAN_NODE_WIDTH,+ type PlanLayout,+ type PlanViewport,+ type PlanViewportSize,+ planMiniMap,+} from "./plan-layout";++/** The box the overview is drawn into, in CSS pixels. */+export const PLAN_MINI_MAP_BOX: PlanViewportSize = { width: 160, height: 112 };++interface Props {+ readonly layout: PlanLayout;+ /** Size of the diagram's viewport, which marks the screen's share of the plan. */+ readonly size: PlanViewportSize;+ readonly view: PlanViewport;+ readonly selectedId: string | undefined;+ /** Asks for a content-space point to be brought to the middle of the screen. */+ readonly onPanTo: (point: { x: number; y: number }) => void;+}++/**+ * An overview of the whole plan for when it no longer fits on screen: every+ * node as a dot, the visible window as a frame, and a click or drag to move it.+ *+ * It is decoration in the accessibility tree. Everything it navigates to is+ * reachable without it — the cards are tab stops that bring themselves into+ * view, the grid lists every node, and Fit to view shows the whole plan — so a+ * second, pointer-only tree of controls would be noise to announce.+ */+export function PlanMiniMap({+ layout,+ size,+ view,+ selectedId,+ onPanTo,+}: Props) {+ const surfaceRef = useRef<HTMLDivElement>(null);+ const map = planMiniMap(layout, size, view, PLAN_MINI_MAP_BOX);++ // A drag reads the scale live rather than through the listeners it installed.+ const scaleRef = useRef(map.scale);+ scaleRef.current = map.scale;+ const panToRef = useRef(onPanTo);+ panToRef.current = onPanTo;++ const panToEvent = useCallback(+ (event: { clientX: number; clientY: number }) => {+ const rect = surfaceRef.current?.getBoundingClientRect();+ const scale = scaleRef.current;+ if (!rect || scale <= 0) return;+ panToRef.current({+ x: (event.clientX - rect.left) / scale,+ y: (event.clientY - rect.top) / scale,+ });+ },+ []+ );++ const startDrag = useCallback(+ (event: React.PointerEvent) => {+ if (event.button !== 0) return;+ // The diagram pans on a pointer press anywhere on its canvas; a drag that+ // starts here is aimed at the mini-map instead.+ event.stopPropagation();+ panToEvent(event);++ const onMove = (moveEvent: PointerEvent) => panToEvent(moveEvent);+ const stop = () => {+ window.removeEventListener("pointermove", onMove);+ window.removeEventListener("pointerup", stop);+ window.removeEventListener("pointercancel", stop);+ };+ window.addEventListener("pointermove", onMove);+ window.addEventListener("pointerup", stop);+ window.addEventListener("pointercancel", stop);+ },+ [panToEvent]+ );++ // Only the frame moves as the reader pans, and a pan re-renders on every+ // frame, so the dots are built once per plan rather than once per frame.+ const dots = useMemo(+ () =>+ layout.nodes.map(({ node, x, y }) => (+ <span+ key={node.id}+ data-testid="plan-mini-map-node"+ className={cn(+ "absolute rounded-xs",+ node.id === selectedId ? "bg-accent" : "bg-control-light"+ )}+ style={{+ left: x * map.scale,+ top: y * map.scale,+ width: PLAN_NODE_WIDTH * map.scale,+ height: PLAN_NODE_HEIGHT * map.scale,+ }}+ />+ )),+ [layout, map.scale, selectedId]+ );++ if (map.scale <= 0) return null;++ return (+ <div+ ref={surfaceRef}+ aria-hidden="true"+ data-testid="plan-mini-map"+ onPointerDown={startDrag}+ style={{ width: map.width, height: map.height }}+ className="absolute bottom-2 left-2 cursor-pointer overflow-hidden rounded-xs border border-control-border bg-background/90"+ >+ {dots}+ <span+ data-testid="plan-mini-map-viewport"+ className="absolute border border-accent bg-accent/15"+ style={{+ left: map.viewport.x,+ top: map.viewport.y,+ width: map.viewport.width,+ height: map.viewport.height,+ // A view panned right off the plan leaves no overlap to draw, and an+ // invisible frame would read as no frame at all.+ minWidth: 1,+ minHeight: 1,+ }}+ />+ </div>+ );+}diff --git a/frontend/src/apps/explain-visualizer/PostgresPlanView.test.tsx b/frontend/src/apps/explain-visualizer/PostgresPlanView.test.tsxnew file mode 100644index 0000000000..db1a342407--- /dev/null+++ b/frontend/src/apps/explain-visualizer/PostgresPlanView.test.tsx@@ -0,0 +1,82 @@+import { render, screen } from "@testing-library/react";+import type { ReactNode } from "react";+import { beforeEach, describe, expect, test, vi } from "vitest";+import cteNestedLoopInitplan from "./test-data/cte-nested-loop-initplan.json";+import { PostgresPlanView } from "./PostgresPlanView";+import {+ POSTGRES_PLAN_EMPTY_MESSAGE,+ POSTGRES_PLAN_INVALID_JSON_MESSAGE,+ POSTGRES_PLAN_NO_PLAN_MESSAGE,+} from "./postgres-plan";++vi.mock("react-resizable-panels", () => ({+ Group: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ Panel: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ Separator: () => <div />,+}));++describe("PostgresPlanView", () => {+ beforeEach(() => {+ // jsdom's window exposes no matchMedia under vitest; the viewer queries it+ // to decide whether to stack the detail pane.+ window.matchMedia = ((query: string) => ({+ matches: false,+ media: query,+ onchange: null,+ addEventListener: () => {},+ removeEventListener: () => {},+ addListener: () => {},+ removeListener: () => {},+ dispatchEvent: () => true,+ })) as unknown as typeof window.matchMedia;+ });++ test("renders every node of a real EXPLAIN (FORMAT JSON) plan", () => {+ render(+ <PostgresPlanView+ planSource={JSON.stringify(cteNestedLoopInitplan)}+ planQuery="SELECT c.region FROM orders JOIN customers c ON c.id = orders.customer_id LIMIT 10;"+ />+ );++ for (const nodeType of [+ "Limit",+ "Aggregate",+ "Nested Loop",+ "Seq Scan",+ "Index Scan",+ ]) {+ expect(+ screen.getAllByRole("button", { name: new RegExp(nodeType) }).length+ ).toBeGreaterThan(0);+ }+ expect(screen.getByText("InitPlan 1")).toBeInTheDocument();+ });++ test("explains malformed JSON and still shows what the server returned", () => {+ render(<PostgresPlanView planSource="Seq Scan on customers" />);++ expect(screen.getByRole("alert")).toHaveTextContent(+ POSTGRES_PLAN_INVALID_JSON_MESSAGE+ );+ expect(screen.getByText("Seq Scan on customers")).toBeInTheDocument();+ expect(screen.queryByTestId("plan-diagram-viewport")).toBeNull();+ });++ test("explains JSON that carries no plan", () => {+ render(<PostgresPlanView planSource='[{"Planning Time": 0.1}]' />);++ expect(screen.getByRole("alert")).toHaveTextContent(+ POSTGRES_PLAN_NO_PLAN_MESSAGE+ );+ });++ test("explains an empty plan without echoing an empty block", () => {+ const { container } = render(<PostgresPlanView planSource="" />);++ expect(screen.getByRole("alert")).toHaveTextContent(+ POSTGRES_PLAN_EMPTY_MESSAGE+ );+ expect(container.querySelector("pre")).toBeNull();+ });+});diff --git a/frontend/src/apps/explain-visualizer/PostgresPlanView.tsx b/frontend/src/apps/explain-visualizer/PostgresPlanView.tsxindex 39e6d0c2c1..781c4c1251 100644--- a/frontend/src/apps/explain-visualizer/PostgresPlanView.tsx+++ b/frontend/src/apps/explain-visualizer/PostgresPlanView.tsx@@ -1,27 +1,39 @@-import { Plan as pev2 } from "pev2";-import { useEffect, useRef } from "react";-import { type App, createApp } from "vue";+import { useMemo } from "react";+import { Alert } from "@/components/ui/alert";+import { parsePostgresPlan } from "./postgres-plan";+import { QueryPlanViewer } from "./QueryPlanViewer";interface Props {+ /** `EXPLAIN (FORMAT JSON)` output as PostgreSQL returned it. */planSource: string;planQuery?: string;}-// pev2 is a Vue 3 component; no React port exists. Reimplementing the-// Postgres EXPLAIN renderer is out of scope, so we mount pev2 as a-// short-lived Vue subapp inside this React node and unmount on cleanup.-// Vue is already in this entry's bundle transitively via pev2.export function PostgresPlanView({ planSource, planQuery }: Props) {- const hostRef = useRef<HTMLDivElement>(null);+ const result = useMemo(() => parsePostgresPlan(planSource), [planSource]);- useEffect(() => {- if (!hostRef.current) return;- const app: App = createApp(pev2, { planSource, planQuery });- app.mount(hostRef.current);- return () => {- app.unmount();- };- }, [planSource, planQuery]);+ if (!result.ok) {+ return (+ <div className="flex h-full min-h-0 w-full flex-col gap-4 overflow-auto bg-background p-4">+ <Alert+ variant="error"+ title="This query plan could not be read"+ description={result.message}+ />+ {planSource.trim() ? (+ <pre className="font-mono text-xs leading-4 break-words whitespace-pre-wrap text-control">+ {planSource}+ </pre>+ ) : null}+ </div>+ );+ }- return <div ref={hostRef} className="qp-root" />;+ return (+ <QueryPlanViewer+ tree={result.tree}+ rawPlan={planSource}+ query={planQuery}+ />+ );}diff --git a/frontend/src/apps/explain-visualizer/QueryPlanDiagram.test.tsx b/frontend/src/apps/explain-visualizer/QueryPlanDiagram.test.tsxnew file mode 100644index 0000000000..93e5478622--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanDiagram.test.tsx@@ -0,0 +1,489 @@+import { fireEvent, render, screen } from "@testing-library/react";+import { afterEach, describe, expect, test, vi } from "vitest";+import hashJoinAggregateSort from "./test-data/hash-join-aggregate-sort.json";+import seqScanFilter from "./test-data/seq-scan-filter.json";+import {+ PLAN_EDGE_MAX_WIDTH,+ PLAN_EDGE_MIN_WIDTH,+ type PlanTree,+} from "./plan-model";+import { parsePostgresPlan } from "./postgres-plan";+import { QueryPlanDiagram } from "./QueryPlanDiagram";++const treeFrom = (fixture: unknown): PlanTree => {+ const result = parsePostgresPlan(JSON.stringify(fixture));+ if (!result.ok) throw new Error(result.message);+ return result.tree;+};++const tree = (): PlanTree => treeFrom(hashJoinAggregateSort);++/**+ * The card whose accessible name matches, which is not simply the button whose+ * name does: a collapse toggle names the node it belongs to as well.+ */+const cardFor = (label: string) => {+ const pattern = new RegExp(label);+ const card = screen+ .getAllByTestId("plan-node-card")+ .find((entry) => pattern.test(entry.getAttribute("aria-label") ?? ""));+ if (!card) throw new Error(`no plan card named ${label}`);+ return card;+};++/** The collapse control belonging to a card, which sits beside it. */+const toggleFor = (label: string) => {+ const toggle = cardFor(label).parentElement?.querySelector(+ "[data-testid='plan-node-collapse']"+ );+ if (!toggle) throw new Error(`no collapse control on ${label}`);+ return toggle;+};++const canvasTransform = () =>+ screen.getByTestId("plan-diagram-canvas").style.transform;++const renderDiagram = (+ overrides: Partial<Parameters<typeof QueryPlanDiagram>[0]> = {}+) => {+ const onSelect = vi.fn();+ const onToggleCollapse = vi.fn();+ const props = {+ tree: tree(),+ selectedId: "0",+ onSelect,+ highlight: "off" as const,+ collapsedIds: new Set<string>(),+ onToggleCollapse,+ ...overrides,+ };+ return {+ onSelect,+ onToggleCollapse,+ ...render(<QueryPlanDiagram {...props} />),+ };+};++/** Makes the viewport a real size, which jsdom otherwise reports as zero. */+const sizeViewport = (width: number, height: number) => {+ const rect = {+ x: 0,+ y: 0,+ top: 0,+ left: 0,+ right: width,+ bottom: height,+ width,+ height,+ toJSON: () => "",+ };+ vi.spyOn(HTMLElement.prototype, "getBoundingClientRect").mockReturnValue(+ rect as DOMRect+ );+};++afterEach(() => {+ vi.restoreAllMocks();+});++describe("QueryPlanDiagram", () => {+ test("renders one card per plan node with its estimates", () => {+ renderDiagram();++ expect(screen.getAllByRole("button")).toHaveLength(+ // six plan node cards, the four collapse toggles their parents carry,+ // and the three zoom controls+ 6 + 4 + 3+ );+ expect(cardFor("Hash Join")).toHaveTextContent(+ "cost 1,090.86 · rows 50,000"+ );+ // The hash side of the join is the only node the planner marks "Inner".+ expect(cardFor("^Hash, Inner")).toHaveTextContent("cost 78 · rows 5,000");+ });++ test("draws an edge for every parent-child link", () => {+ renderDiagram();+ expect(+ screen.getByTestId("plan-diagram-edges").querySelectorAll("path")+ ).toHaveLength(5);+ });++ test("thickens an edge with the rows its child is estimated to return", () => {+ renderDiagram();+ const widthByRows = new Map(+ screen+ .getAllByTestId("plan-diagram-edge")+ .map((edge) => [+ Number(edge.getAttribute("data-plan-edge-rows")),+ Number(edge.getAttribute("stroke-width")),+ ])+ );++ // The plan's widest estimate saturates; the narrower ones rank below it and+ // stay above the floor that keeps a one-row edge visible.+ expect(widthByRows.get(50000)).toBe(PLAN_EDGE_MAX_WIDTH);+ const small = widthByRows.get(3) ?? 0;+ const middling = widthByRows.get(5000) ?? 0;+ expect(small).toBeGreaterThan(PLAN_EDGE_MIN_WIDTH);+ expect(small).toBeLessThan(middling);+ expect(middling).toBeLessThan(PLAN_EDGE_MAX_WIDTH);+ });++ test("names the row estimate an edge carries", () => {+ renderDiagram();+ const titles = screen+ .getAllByTestId("plan-diagram-edge")+ .map((edge) => edge.querySelector("title")?.textContent);++ expect(titles).toContain("50,000 estimated rows");+ expect(titles).toContain("3 estimated rows");+ });++ test("shows each node's share of the plan's cost on its card", () => {+ renderDiagram();+ const barOf = (label: string) =>+ cardFor(label).querySelector<HTMLElement>(+ "[data-testid='plan-cost-share-bar']"+ );++ // The scan of `orders` owns 819 of the plan's 1,465.93 cost units.+ expect(cardFor("^Seq Scan, orders")).toHaveTextContent("55.9%");+ expect(barOf("^Seq Scan, orders")?.style.width).toBe(+ `${(819 / 1465.93) * 100}%`+ );+ // A Hash adds nothing on top of the scan it hashes.+ expect(cardFor("^Hash, Inner")).toHaveTextContent("0%");+ expect(barOf("^Hash, Inner")?.style.width).toBe("0%");+ });++ test("warns on a sequential scan of a relation worth flagging", () => {+ renderDiagram();++ expect(screen.getAllByTestId("plan-node-full-scan")).toHaveLength(1);+ expect(+ cardFor("^Seq Scan, orders").querySelector(+ "[data-testid='plan-node-full-scan']"+ )+ ).not.toBeNull();+ expect(cardFor("^Seq Scan, orders")).toHaveAccessibleName(+ /full table scan/+ );+ // `customers` is small enough that reading all of it costs nothing worth+ // acting on.+ expect(+ cardFor("^Seq Scan, customers").querySelector(+ "[data-testid='plan-node-full-scan']"+ )+ ).toBeNull();+ });++ test("gives a lone node the whole plan and no warning", () => {+ renderDiagram({ tree: treeFrom(seqScanFilter) });++ expect(cardFor("^Seq Scan, customers")).toHaveTextContent("100%");+ expect(screen.queryAllByTestId("plan-node-full-scan")).toHaveLength(0);+ expect(screen.queryAllByTestId("plan-diagram-edge")).toHaveLength(0);+ });++ test("marks the selected card and reports clicks on the others", () => {+ const { onSelect } = renderDiagram();++ expect(cardFor("Sort")).toHaveAttribute("aria-pressed", "true");+ expect(cardFor("Hash Join")).toHaveAttribute("aria-pressed", "false");++ fireEvent.click(cardFor("Hash Join"));+ expect(onSelect).toHaveBeenCalledWith("0.0.0");+ });++ test("does not select a card when the click ends a pan", () => {+ const { onSelect } = renderDiagram();+ const viewport = screen.getByTestId("plan-diagram-viewport");++ fireEvent.pointerDown(viewport, { button: 0, clientX: 0, clientY: 0 });+ fireEvent.pointerMove(window, { clientX: 120, clientY: 40 });+ fireEvent.pointerUp(window);+ // detail 1: a real mouse click. A keyboard activation reports 0 and is+ // deliberately exempt from the drag guard.+ fireEvent.click(cardFor("Hash Join"), { detail: 1 });++ expect(onSelect).not.toHaveBeenCalled();+ });++ test("pans the canvas while the pointer is held down", () => {+ renderDiagram();+ const viewport = screen.getByTestId("plan-diagram-viewport");+ const before = canvasTransform();++ fireEvent.pointerDown(viewport, { button: 0, clientX: 10, clientY: 10 });+ fireEvent.pointerMove(window, { clientX: 90, clientY: 60 });++ expect(canvasTransform()).not.toBe(before);+ expect(canvasTransform()).toContain("translate(80px, 50px)");+ });++ test("zooms in and back out from the controls", () => {+ renderDiagram();++ expect(canvasTransform()).toContain("scale(1)");+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ expect(canvasTransform()).toContain("scale(1.25)");+ fireEvent.click(screen.getByRole("button", { name: "Zoom out" }));+ expect(canvasTransform()).toContain("scale(1)");+ });++ test("zooms the same amount whether a notch arrives in pixels or lines", () => {+ sizeViewport(600, 400);+ renderDiagram();+ const viewport = screen.getByTestId("plan-diagram-viewport");+ const scaleNow = () =>+ Number(/scale\(([\d.]+)\)/.exec(canvasTransform())?.[1] ?? "0");+ const fitted = scaleNow();++ // Chrome sends one notch as pixels; Firefox sends the same notch as lines.+ fireEvent.wheel(viewport, { deltaY: 120, deltaMode: 0 });+ const byPixels = scaleNow();+ expect(byPixels).toBeLessThan(fitted);++ fireEvent.click(screen.getByRole("button", { name: "Fit to view" }));+ fireEvent.wheel(viewport, { deltaY: 3, deltaMode: 1 });++ expect(scaleNow()).toBeCloseTo(byPixels, 10);+ });++ test("keeps a view the reader placed when a collapse re-lays out the plan", () => {+ sizeViewport(600, 400);+ const plan = tree();+ const { rerender } = renderDiagram({ tree: plan });+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ const placed = canvasTransform();++ rerender(+ <QueryPlanDiagram+ tree={plan}+ selectedId="0"+ onSelect={() => undefined}+ highlight="off"+ collapsedIds={new Set(["0.0.0"])}+ onToggleCollapse={() => undefined}+ />+ );++ expect(screen.getAllByTestId("plan-node-card")).toHaveLength(3);+ expect(canvasTransform()).toBe(placed);+ });++ test("still fits a plan the reader has not moved when it re-lays out", () => {+ sizeViewport(600, 400);+ const plan = tree();+ const { rerender } = renderDiagram({ tree: plan });+ const fitted = canvasTransform();++ rerender(+ <QueryPlanDiagram+ tree={plan}+ selectedId="0"+ onSelect={() => undefined}+ highlight="off"+ collapsedIds={new Set(["0.0.0"])}+ onToggleCollapse={() => undefined}+ />+ );++ // A narrower plan fits at a larger scale, so the fit has to be redone.+ expect(canvasTransform()).not.toBe(fitted);+ expect(screen.getAllByTestId("plan-node-card")).toHaveLength(3);+ });++ test("tints cards only while a highlight mode is on", () => {+ const { rerender } = renderDiagram();+ expect(screen.queryAllByTestId("plan-node-tint")).toHaveLength(0);++ rerender(+ <QueryPlanDiagram+ tree={tree()}+ selectedId="0"+ onSelect={() => undefined}+ highlight="cost"+ collapsedIds={new Set()}+ onToggleCollapse={() => undefined}+ />+ );+ const tintOf = (label: string) =>+ cardFor(label).querySelector("[data-testid='plan-node-tint']");+ // The sequential scan of `orders` owns the plan's largest exclusive cost,+ // so it saturates and every other node shades below it.+ expect(tintOf("^Seq Scan, orders")).toHaveClass("bg-warning");+ expect(tintOf("^Seq Scan, orders")).toHaveStyle({ opacity: "0.45" });+ expect(+ Number(+ (tintOf("Hash Join") as HTMLElement).style.opacity+ )+ ).toBeLessThan(0.45);++ rerender(+ <QueryPlanDiagram+ tree={tree()}+ selectedId="0"+ onSelect={() => undefined}+ highlight="rows"+ collapsedIds={new Set()}+ onToggleCollapse={() => undefined}+ />+ );+ expect(+ cardFor("Hash Join").querySelector("[data-testid='plan-node-tint']")+ ).toHaveClass("bg-info");+ });++ test("offers a collapse only on the nodes that have something below", () => {+ renderDiagram();++ expect(screen.getAllByTestId("plan-node-collapse")).toHaveLength(4);+ expect(+ cardFor("^Seq Scan, orders").parentElement?.querySelector(+ "[data-testid='plan-node-collapse']"+ )+ ).toBeNull();+ expect(toggleFor("Hash Join")).toHaveAccessibleName(+ "Collapse 3 nodes under Hash Join"+ );+ });++ test("reports the node whose subtree should fold away", () => {+ const { onToggleCollapse, onSelect } = renderDiagram();++ fireEvent.click(toggleFor("Hash Join"));++ expect(onToggleCollapse).toHaveBeenCalledWith("0.0.0");+ // The control belongs to the card without being part of it, so using it+ // does not also move the selection.+ expect(onSelect).not.toHaveBeenCalled();+ });++ test("drops a collapsed node's descendants and says how many", () => {+ renderDiagram({ collapsedIds: new Set(["0.0.0"]) });++ expect(screen.getAllByTestId("plan-node-card")).toHaveLength(3);+ expect(screen.queryAllByTestId("plan-diagram-edge")).toHaveLength(2);+ expect(toggleFor("Hash Join")).toHaveTextContent("3");+ expect(toggleFor("Hash Join")).toHaveAccessibleName(+ "Expand 3 nodes under Hash Join"+ );+ expect(toggleFor("Hash Join")).toHaveAttribute("aria-expanded", "false");+ // Nothing left the diagram quietly: the card says what it is holding.+ expect(cardFor("Hash Join")).toHaveAccessibleName(/3 nodes hidden/);+ });++ test("brings a node the caller asks for into the middle of the view", () => {+ sizeViewport(600, 400);+ const onRevealed = vi.fn();+ render(+ <QueryPlanDiagram+ tree={tree()}+ selectedId="0"+ onSelect={() => undefined}+ highlight="off"+ collapsedIds={new Set()}+ onToggleCollapse={() => undefined}+ revealId="0.0.0.0"+ onRevealed={onRevealed}+ />+ );++ const scale = Number(+ /scale\(([\d.]+)\)/.exec(canvasTransform())?.[1] ?? "0"+ );+ const [, x, y] = /translate\((-?[\d.]+)px, (-?[\d.]+)px\)/+ .exec(canvasTransform())+ ?.map(Number) ?? [0, 0, 0];+ const card = cardFor("^Seq Scan, orders");+ const wrapper = card.parentElement as HTMLElement;+ // The card's middle, in content space, lands on the viewport's middle.+ const centerX = Number.parseFloat(wrapper.style.left) + 216 / 2;+ const centerY = Number.parseFloat(wrapper.style.top) + 96 / 2;++ expect(x + centerX * scale).toBeCloseTo(300, 4);+ expect(y + centerY * scale).toBeCloseTo(200, 4);+ expect(onRevealed).toHaveBeenCalled();+ });++ test("ignores a reveal for a node the plan does not have", () => {+ sizeViewport(600, 400);+ const onRevealed = vi.fn();+ const { rerender } = renderDiagram();+ const before = canvasTransform();++ rerender(+ <QueryPlanDiagram+ tree={tree()}+ selectedId="0"+ onSelect={() => undefined}+ highlight="off"+ collapsedIds={new Set()}+ onToggleCollapse={() => undefined}+ revealId="nope"+ onRevealed={onRevealed}+ />+ );++ expect(canvasTransform()).toBe(before);+ // The caller still hears back, so a bad fragment does not leave a reveal+ // pending forever.+ expect(onRevealed).toHaveBeenCalled();+ });++ test("shows a mini-map only while the plan is too big to fit", () => {+ sizeViewport(400, 300);+ renderDiagram();+ expect(screen.queryByTestId("plan-mini-map")).toBeNull();++ // Zooming in pushes the plan past the edges of the viewport.+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ expect(screen.getByTestId("plan-mini-map")).toBeInTheDocument();++ fireEvent.click(screen.getByRole("button", { name: "Fit to view" }));+ expect(screen.queryByTestId("plan-mini-map")).toBeNull();+ });++ test("moves the view when the mini-map is clicked", () => {+ sizeViewport(400, 300);+ renderDiagram();+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ const before = canvasTransform();++ fireEvent.pointerDown(screen.getByTestId("plan-mini-map"), {+ button: 0,+ clientX: 120,+ clientY: 60,+ });++ expect(canvasTransform()).not.toBe(before);+ });++ test("leaves the mini-map out of an unmeasured viewport", () => {+ renderDiagram();+ expect(screen.queryByTestId("plan-mini-map")).toBeNull();+ });++ test("still selects a node from the keyboard after a drag", () => {+ const onSelect = vi.fn();+ renderDiagram({ onSelect });+ const viewport = screen.getByTestId("plan-diagram-viewport");++ // Drag the canvas: the click that ends this must not select.+ fireEvent.pointerDown(viewport, { button: 0, clientX: 0, clientY: 0 });+ fireEvent.pointerMove(window, { clientX: 120, clientY: 60 });+ fireEvent.pointerUp(window);++ const card = screen.getAllByRole("button", { name: /Seq Scan/ })[0];+ // A pointer click still loses to the guard...+ fireEvent.click(card, { detail: 1 });+ expect(onSelect).not.toHaveBeenCalled();+ // ...but Enter or Space, which arrive with detail 0, must not.+ fireEvent.click(card, { detail: 0 });+ expect(onSelect).toHaveBeenCalled();+ });+});diff --git a/frontend/src/apps/explain-visualizer/QueryPlanDiagram.tsx b/frontend/src/apps/explain-visualizer/QueryPlanDiagram.tsxnew file mode 100644index 0000000000..207ddf7f7e--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanDiagram.tsx@@ -0,0 +1,583 @@+import {+ ChevronsDownUp,+ ChevronsUpDown,+ Maximize2,+ TriangleAlert,+ ZoomIn,+ ZoomOut,+} from "lucide-react";+import {+ useCallback,+ useEffect,+ useLayoutEffect,+ useMemo,+ useRef,+ useState,+} from "react";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+// Deep import: `@/utils` (the barrel) transitively pulls in Monaco, which this+// standalone entry never loads. `minmax` itself is a leaf math helper.+import { minmax } from "@/utils/math";+import { PlanMiniMap } from "./PlanMiniMap";+import {+ layoutPlan,+ PLAN_NODE_HEIGHT,+ PLAN_NODE_WIDTH,+ type PlanViewport,+ type PlanViewportSize,+ planFitsViewport,+ planNodeCenter,+ planNodeOnScreen,+ planViewportCenteredOn,+} from "./plan-layout";+import {+ formatPlanCost,+ formatPlanCount,+ formatPlanShare,+ isFlaggedFullScan,+ PLAN_FULL_SCAN_HINT,+ type PlanHighlightMode,+ type PlanNode,+ type PlanTree,+ planDescendantCount,+ planEdgeWidth,+ planHighlightIntensity,+ planSelfCostShare,+} from "./plan-model";+import { PlanCostShareBar } from "./plan-shared";++interface Props {+ readonly tree: PlanTree;+ readonly selectedId: string | undefined;+ readonly onSelect: (id: string) => void;+ readonly highlight: PlanHighlightMode;+ /** Nodes whose subtrees are folded away. */+ readonly collapsedIds: ReadonlySet<string>;+ readonly onToggleCollapse: (id: string) => void;+ /** A node the diagram should bring into view, such as a deep link's target. */+ readonly revealId?: string;+ /** Called once `revealId` has been centered, so the caller can clear it. */+ readonly onRevealed?: () => void;+}++const MIN_SCALE = 0.2;+const MAX_SCALE = 2;+const ZOOM_STEP = 1.25;+/** Pointer travel, in CSS pixels, that turns a click into a pan. */+const PAN_THRESHOLD = 4;+const IDENTITY_VIEWPORT: PlanViewport = { scale: 1, x: 0, y: 0 };+const UNMEASURED: PlanViewportSize = { width: 0, height: 0 };++/**+ * What one wheel notch means in CSS pixels when the event reports something+ * else. Firefox reports the wheel in lines and some devices in pages; read as+ * pixels, a line-mode notch would move the zoom by a fraction of a percent.+ */+const WHEEL_LINE_PIXELS = 40;+const WHEEL_PAGE_PIXELS = 800;++function wheelPixels(event: WheelEvent): number {+ if (event.deltaMode === WheelEvent.DOM_DELTA_LINE) {+ return event.deltaY * WHEEL_LINE_PIXELS;+ }+ if (event.deltaMode === WheelEvent.DOM_DELTA_PAGE) {+ return event.deltaY * WHEEL_PAGE_PIXELS;+ }+ return event.deltaY;+}++/** Semantic surface each shading scale tints a card with. */+const HIGHLIGHT_CLASS: Record<Exclude<PlanHighlightMode, "off">, string> = {+ cost: "bg-warning",+ rows: "bg-info",+};++/** Opacity of the tint on the plan's worst node; the rest scale below it. */+const MAX_TINT_OPACITY = 0.45;++/**+ * Shading rides on a translucent overlay rather than the card's own background+ * so the intensity is a plain opacity over a semantic token: no per-node color+ * arithmetic, and it follows the theme.+ */+function PlanNodeTint({+ node,+ tree,+ highlight,+}: {+ node: PlanNode;+ tree: PlanTree;+ highlight: PlanHighlightMode;+}) {+ if (highlight === "off") return null;+ const intensity = planHighlightIntensity(node, tree, highlight);+ if (intensity <= 0) return null;+ return (+ <span+ aria-hidden="true"+ data-testid="plan-node-tint"+ className={cn(+ "pointer-events-none absolute inset-0",+ HIGHLIGHT_CLASS[highlight]+ )}+ style={{ opacity: intensity * MAX_TINT_OPACITY }}+ />+ );+}++/**+ * Folds a node's subtree away and says how much it took with it.+ *+ * It sits on the card's bottom edge, where the collapsed subtree's own edges+ * would leave, and is a sibling of the card rather than a control inside it:+ * the card is itself a button, and a button cannot hold another one.+ */+function PlanCollapseToggle({+ node,+ collapsed,+ hiddenCount,+ onToggle,+}: {+ node: PlanNode;+ collapsed: boolean;+ hiddenCount: number;+ onToggle: () => void;+}) {+ const label = collapsed+ ? `Expand ${formatPlanCount(hiddenCount)} nodes under ${node.nodeType}`+ : `Collapse ${formatPlanCount(hiddenCount)} nodes under ${node.nodeType}`;+ return (+ <Tooltip content={label}>+ <Button+ appearance="outline"+ size="xs"+ aria-expanded={!collapsed}+ aria-label={label}+ data-testid="plan-node-collapse"+ data-plan-collapsed={collapsed ? "true" : "false"}+ onClick={onToggle}+ // Half of the control hangs below the card so it reads as the seam the+ // subtree folds into, rather than as part of the card's own content.+ className="absolute -bottom-3 left-1/2 -translate-x-1/2 rounded-full bg-background px-1.5"+ >+ {collapsed ? (+ <ChevronsUpDown aria-hidden="true" className="size-3" />+ ) : (+ <ChevronsDownUp aria-hidden="true" className="size-3" />+ )}+ {collapsed ? (+ <span className="tabular-nums">{formatPlanCount(hiddenCount)}</span>+ ) : null}+ </Button>+ </Tooltip>+ );+}++export function QueryPlanDiagram({+ tree,+ selectedId,+ onSelect,+ highlight,+ collapsedIds,+ onToggleCollapse,+ revealId,+ onRevealed,+}: Props) {+ const layout = useMemo(+ () => layoutPlan(tree.root, collapsedIds),+ [tree, collapsedIds]+ );+ const viewportRef = useRef<HTMLDivElement>(null);+ const [view, setView] = useState<PlanViewport>(IDENTITY_VIEWPORT);+ const [size, setSize] = useState<PlanViewportSize>(UNMEASURED);++ // Pan reads the live viewport without re-binding its window listeners.+ const viewRef = useRef(view);+ viewRef.current = view;+ const sizeRef = useRef(size);+ sizeRef.current = size;+ // A drag that moved must not also select the card it started on.+ const draggedRef = useRef(false);+ const stopPanRef = useRef<(() => void) | undefined>(undefined);+ // Until the user zooms or pans, the diagram keeps refitting itself as the+ // container resizes. Once they place the view themselves, a resize must not+ // throw it away.+ const viewIsUsersRef = useRef(false);++ const measure = useCallback(() => {+ const rect = viewportRef.current?.getBoundingClientRect();+ const next = rect ? { width: rect.width, height: rect.height } : UNMEASURED;+ // The ref takes the size now rather than on the render the state schedules,+ // so an effect running later in this same commit already has it.+ sizeRef.current = next;+ setSize((prev) =>+ prev.width === next.width && prev.height === next.height ? prev : next+ );+ return next;+ }, []);++ const zoomAt = useCallback((factor: number, cx: number, cy: number) => {+ viewIsUsersRef.current = true;+ setView((prev) => {+ const scale = minmax(prev.scale * factor, MIN_SCALE, MAX_SCALE);+ const ratio = scale / prev.scale;+ return {+ scale,+ x: cx - ratio * (cx - prev.x),+ y: cy - ratio * (cy - prev.y),+ };+ });+ }, []);++ const zoomFromCenter = useCallback(+ (factor: number) => {+ const rect = viewportRef.current?.getBoundingClientRect();+ zoomAt(factor, (rect?.width ?? 0) / 2, (rect?.height ?? 0) / 2);+ },+ [zoomAt]+ );++ const fitToView = useCallback(() => {+ viewIsUsersRef.current = false;+ const measured = measure();+ // jsdom and a not-yet-laid-out container both report a zero-size box.+ if (measured.width === 0 || measured.height === 0) {+ setView(IDENTITY_VIEWPORT);+ return;+ }+ const scale = minmax(+ Math.min(measured.width / layout.width, measured.height / layout.height),+ MIN_SCALE,+ 1+ );+ setView({+ scale,+ x: (measured.width - layout.width * scale) / 2,+ y: (measured.height - layout.height * scale) / 2,+ });+ }, [layout, measure]);++ const panTo = useCallback((point: { x: number; y: number }) => {+ viewIsUsersRef.current = true;+ setView((prev) => planViewportCenteredOn(point, sizeRef.current, prev));+ }, []);++ useLayoutEffect(() => {+ // `fitToView` is rebuilt whenever the layout is, so this also runs when a+ // collapse re-lays out the plan. Folding a subtree away must not throw out+ // a view the reader placed, so only an untouched view refits.+ if (viewIsUsersRef.current) return;+ fitToView();+ }, [fitToView]);++ useEffect(() => {+ const element = viewportRef.current;+ if (!element) return;+ // The first measurement can land before the surrounding split pane has+ // sized itself, so refit until the user takes the view over.+ const observer = new ResizeObserver(() => {+ if (viewIsUsersRef.current) measure();+ else fitToView();+ });+ observer.observe(element);+ return () => observer.disconnect();+ }, [fitToView, measure]);++ useEffect(() => {+ const element = viewportRef.current;+ if (!element) return;+ // React's onWheel is passive, so preventDefault needs a manual listener;+ // without it the browser scrolls the page instead of zooming.+ const onWheel = (event: WheelEvent) => {+ event.preventDefault();+ const rect = element.getBoundingClientRect();+ zoomAt(+ Math.exp(-wheelPixels(event) / 400),+ event.clientX - rect.left,+ event.clientY - rect.top+ );+ };+ element.addEventListener("wheel", onWheel, { passive: false });+ return () => element.removeEventListener("wheel", onWheel);+ }, [zoomAt]);++ // Release a drag still in flight when the diagram unmounts.+ useEffect(() => () => stopPanRef.current?.(), []);++ // Fitting runs in a layout effect above, so this plain effect always lands+ // after it and the centering survives. Keep the two in that order.+ useEffect(() => {+ if (revealId === undefined) return;+ const placed = layout.nodes.find((entry) => entry.node.id === revealId);+ if (placed) panTo(planNodeCenter(placed));+ onRevealed?.();+ }, [revealId, layout, panTo, onRevealed]);++ const startPan = useCallback((event: React.PointerEvent) => {+ if (event.button !== 0) return;+ draggedRef.current = false;+ const startX = event.clientX;+ const startY = event.clientY;+ const origin = viewRef.current;++ const onMove = (moveEvent: PointerEvent) => {+ const dx = moveEvent.clientX - startX;+ const dy = moveEvent.clientY - startY;+ if (Math.abs(dx) + Math.abs(dy) > PAN_THRESHOLD) {+ draggedRef.current = true;+ viewIsUsersRef.current = true;+ }+ if (!draggedRef.current) return;+ setView((prev) => ({ ...prev, x: origin.x + dx, y: origin.y + dy }));+ };+ const stop = () => {+ window.removeEventListener("pointermove", onMove);+ window.removeEventListener("pointerup", stop);+ window.removeEventListener("pointercancel", stop);+ stopPanRef.current = undefined;+ };+ stopPanRef.current = stop;+ window.addEventListener("pointermove", onMove);+ window.addEventListener("pointerup", stop);+ window.addEventListener("pointercancel", stop);+ }, []);++ const selectNode = useCallback(+ // The drag guard applies only to a pointer click, which is the one a drag+ // ends with. A keyboard activation arrives without a pointer sequence, so+ // nothing would clear the flag for it and the node could never be picked.+ (id: string, fromPointer = true) => {+ if (fromPointer && draggedRef.current) return;+ onSelect(id);+ },+ [onSelect]+ );++ // Panning and zooming change `view` on every frame of a drag. The cards and+ // edges do not depend on it — the canvas they sit on carries the transform —+ // so they are built once per layout and reused across those frames.+ const edges = useMemo(+ () =>+ layout.edges.map((edge) => (+ <path+ key={edge.id}+ data-testid="plan-diagram-edge"+ data-plan-edge-rows={edge.target.rows}+ d={edge.path}+ // The enclosing svg stays transparent to pointers so a drag anywhere+ // on the canvas pans; the stroke takes them back so its title+ // surfaces on hover.+ className="pointer-events-auto fill-none stroke-control-border"+ strokeWidth={planEdgeWidth(edge.target.rows, tree)}+ strokeLinecap="round"+ >+ <title>{`${formatPlanCount(edge.target.rows)} estimated rows`}</title>+ </path>+ )),+ [layout, tree]+ );++ const cards = useMemo(+ () =>+ layout.nodes.map((placed) => {+ const { node, x, y } = placed;+ const selected = node.id === selectedId;+ const metrics = `cost ${formatPlanCost(node.totalCost)} · rows ${formatPlanCount(node.rows)}`;+ const share = planSelfCostShare(node, tree);+ const fullScan = isFlaggedFullScan(node);+ const collapsed = collapsedIds.has(node.id);+ const subtreeCount = planDescendantCount(node);+ // "Outer" is the default relationship and carries no information.+ const relationship =+ node.relationship === "Outer" ? undefined : node.relationship;+ return (+ <div+ key={node.id}+ className="absolute"+ style={{+ left: x,+ top: y,+ width: PLAN_NODE_WIDTH,+ height: PLAN_NODE_HEIGHT,+ }}+ >+ <Button+ appearance="outline"+ data-testid="plan-node-card"+ aria-pressed={selected}+ // The card's stacked lines concatenate into an unreadable name,+ // so it states its own. The full-scan warning is an icon with a+ // hover-only explanation, so the label has to carry it too.+ aria-label={[+ node.nodeType,+ relationship,+ node.subject,+ metrics,+ `${formatPlanShare(share)} of plan cost`,+ fullScan ? "full table scan" : undefined,+ collapsed+ ? `${formatPlanCount(subtreeCount)} nodes hidden`+ : undefined,+ ]+ .filter(Boolean)+ .join(", ")}+ // `detail` is 0 for a click synthesized from Enter or Space.+ onClick={(event) => selectNode(node.id, event.detail !== 0)}+ // Tabbing through a large plan has to be able to see where it+ // has got to, so a card off screen brings itself on.+ onFocus={() => {+ if (+ !planNodeOnScreen(placed, sizeRef.current, viewRef.current)+ ) {+ panTo(planNodeCenter(placed));+ }+ }}+ className={cn(+ "absolute inset-0 h-auto items-stretch justify-start overflow-hidden rounded-sm bg-background p-0 text-left",+ selected+ ? "border-accent ring-2 ring-accent"+ : "hover:border-control"+ )}+ >+ <PlanNodeTint node={node} tree={tree} highlight={highlight} />+ <span className="relative flex min-w-0 flex-1 flex-col gap-1 px-2.5 py-2">+ <span className="flex w-full items-center gap-1">+ <span className="min-w-0 flex-1 truncate text-sm leading-5 font-medium text-main">+ {node.nodeType}+ </span>+ {fullScan ? (+ // A native SVG title rather than a `Tooltip`: a large plan+ // would otherwise mount one tooltip provider per flagged+ // scan, and the detail pane states the same warning in the+ // accessibility tree.+ <TriangleAlert+ aria-hidden="true"+ data-testid="plan-node-full-scan"+ className="size-3.5 shrink-0 text-warning"+ >+ <title>{PLAN_FULL_SCAN_HINT}</title>+ </TriangleAlert>+ ) : null}+ {relationship ? (+ <span className="shrink-0 rounded-xs bg-control-bg px-1 text-xs leading-4 text-control-light">+ {relationship}+ </span>+ ) : null}+ </span>+ <span className="w-full truncate text-xs leading-4 text-control-light">+ {node.subject ?? "—"}+ </span>+ <span className="w-full truncate text-xs leading-4 text-control">+ {metrics}+ </span>+ <span className="flex w-full items-center gap-2">+ <PlanCostShareBar share={share} className="min-w-0 flex-1" />+ <span className="shrink-0 text-xs leading-4 text-control-light tabular-nums">+ {formatPlanShare(share)}+ </span>+ </span>+ </span>+ </Button>++ {node.children.length > 0 ? (+ <PlanCollapseToggle+ node={node}+ collapsed={collapsed}+ hiddenCount={subtreeCount}+ onToggle={() => onToggleCollapse(node.id)}+ />+ ) : null}+ </div>+ );+ }),+ [+ layout,+ tree,+ highlight,+ selectedId,+ collapsedIds,+ selectNode,+ panTo,+ onToggleCollapse,+ ]+ );++ return (+ <div+ ref={viewportRef}+ data-testid="plan-diagram-viewport"+ onPointerDown={startPan}+ className="relative h-full min-h-0 w-full touch-none overflow-hidden bg-control-bg"+ >+ <div+ data-testid="plan-diagram-canvas"+ className="absolute top-0 left-0 origin-top-left"+ style={{+ width: layout.width,+ height: layout.height,+ transform: `translate(${view.x}px, ${view.y}px) scale(${view.scale})`,+ }}+ >+ <svg+ aria-hidden="true"+ data-testid="plan-diagram-edges"+ className="pointer-events-none absolute top-0 left-0 overflow-visible"+ width={layout.width}+ height={layout.height}+ >+ {edges}+ </svg>++ {cards}+ </div>++ {planFitsViewport(layout, size, view) ? null : (+ <PlanMiniMap+ layout={layout}+ size={size}+ view={view}+ selectedId={selectedId}+ onPanTo={panTo}+ />+ )}++ <div className="absolute right-2 bottom-2 flex items-center gap-1">+ <Tooltip content="Zoom out">+ <Button+ appearance="outline"+ size="xs"+ aria-label="Zoom out"+ className="bg-background"+ onClick={() => zoomFromCenter(1 / ZOOM_STEP)}+ >+ <ZoomOut className="size-3.5" />+ </Button>+ </Tooltip>+ <Tooltip content="Zoom in">+ <Button+ appearance="outline"+ size="xs"+ aria-label="Zoom in"+ className="bg-background"+ onClick={() => zoomFromCenter(ZOOM_STEP)}+ >+ <ZoomIn className="size-3.5" />+ </Button>+ </Tooltip>+ <Tooltip content="Fit to view">+ <Button+ appearance="outline"+ size="xs"+ aria-label="Fit to view"+ className="bg-background"+ onClick={fitToView}+ >+ <Maximize2 className="size-3.5" />+ </Button>+ </Tooltip>+ </div>+ </div>+ );+}diff --git a/frontend/src/apps/explain-visualizer/QueryPlanGrid.test.tsx b/frontend/src/apps/explain-visualizer/QueryPlanGrid.test.tsxnew file mode 100644index 0000000000..836821bf9e--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanGrid.test.tsx@@ -0,0 +1,244 @@+import { fireEvent, render, screen, within } from "@testing-library/react";+import { describe, expect, test, vi } from "vitest";+import cteNestedLoopInitplan from "./test-data/cte-nested-loop-initplan.json";+import type { PlanTree } from "./plan-model";+import { parsePostgresPlan } from "./postgres-plan";+import { QueryPlanGrid } from "./QueryPlanGrid";++const treeFrom = (plan: unknown): PlanTree => {+ const result = parsePostgresPlan(JSON.stringify(plan));+ if (!result.ok) throw new Error(result.message);+ return result.tree;+};++const tree = () => treeFrom(cteNestedLoopInitplan);++const renderGrid = (+ overrides: Partial<Parameters<typeof QueryPlanGrid>[0]> = {}+) => {+ const onSelect = vi.fn();+ const props = {+ tree: tree(),+ selectedId: "0",+ onSelect,+ ...overrides,+ };+ return { onSelect, ...render(<QueryPlanGrid {...props} />) };+};++const rows = () => screen.getAllByTestId("plan-grid-row");+const nodeTypes = () =>+ screen.getAllByTestId("plan-grid-node-type").map((cell) => cell.textContent);+const cellsOf = (row: HTMLElement) =>+ within(row)+ .getAllByRole("cell")+ .map((cell) => cell.textContent);+const barWidth = (index: number) =>+ Number.parseFloat(+ screen.getAllByTestId("plan-cost-share-bar")[index].style.width+ );++describe("QueryPlanGrid", () => {+ test("lists every plan node once, in depth-first order", () => {+ renderGrid();++ expect(rows()).toHaveLength(6);+ // Six plan nodes plus the header row.+ expect(screen.getAllByRole("row")).toHaveLength(7);+ expect(nodeTypes()).toEqual([+ "Limit",+ "Aggregate",+ "Seq Scan",+ "Nested Loop",+ "Seq Scan",+ "Index Scan",+ ]);+ });++ test("numbers rows from one and reports each node's estimates", () => {+ renderGrid();++ expect(cellsOf(rows()[0])).toEqual([+ "1",+ "Limit",+ "0",+ "979.51",+ "10",+ "9",+ ]);+ expect(cellsOf(rows()[4])).toEqual([+ "5",+ "Seq Scanorders",+ "1,319",+ "1,319",+ "464",+ "8",+ ]);+ });++ test("indents each node by its depth and exposes that level", () => {+ renderGrid();++ expect(rows().map((row) => row.getAttribute("aria-level"))).toEqual([+ "1",+ "2",+ "3",+ "2",+ "3",+ "3",+ ]);+ expect(+ screen+ .getAllByTestId("plan-grid-node")+ .map((cell) => cell.style.paddingLeft)+ ).toEqual(["0px", "12px", "24px", "12px", "24px", "24px"]);+ });++ test("sizes each bar by the node's share of the plan's cost", () => {+ renderGrid();+ // The same denominator the diagram and the summary use: two bars that look+ // alike have to mean the same thing.+ const basis = tree().costBasis;++ expect(barWidth(4)).toBeCloseTo((1319 / basis) * 100, 4);+ expect(barWidth(2)).toBeCloseTo((819 / basis) * 100, 4);+ expect(barWidth(0)).toBe(0);+ });++ test("marks the selected row and reports a click on another", () => {+ const { onSelect } = renderGrid();++ expect(rows()[0]).toHaveAttribute("aria-selected", "true");+ expect(rows()[3]).toHaveAttribute("aria-selected", "false");++ fireEvent.click(rows()[3]);+ expect(onSelect).toHaveBeenCalledWith("0.1");+ });++ test("keeps one tab stop and moves it with the selection", () => {+ const { rerender } = renderGrid();++ expect(rows().map((row) => row.tabIndex)).toEqual([0, -1, -1, -1, -1, -1]);++ rerender(+ <QueryPlanGrid+ tree={tree()}+ selectedId="0.1.1"+ onSelect={() => undefined}+ />+ );+ expect(rows().map((row) => row.tabIndex)).toEqual([-1, -1, -1, -1, -1, 0]);+ });++ test("walks the plan with the arrow, home, and end keys", () => {+ const { onSelect } = renderGrid();++ fireEvent.keyDown(rows()[0], { key: "ArrowDown" });+ expect(onSelect).toHaveBeenLastCalledWith("0.0");+ expect(document.activeElement).toBe(rows()[1]);++ fireEvent.keyDown(rows()[1], { key: "ArrowUp" });+ expect(onSelect).toHaveBeenLastCalledWith("0");++ fireEvent.keyDown(rows()[0], { key: "End" });+ expect(onSelect).toHaveBeenLastCalledWith("0.1.1");++ fireEvent.keyDown(rows()[5], { key: "Home" });+ expect(onSelect).toHaveBeenLastCalledWith("0");+ });++ test("stays at the ends of the plan instead of wrapping", () => {+ const { onSelect } = renderGrid();++ fireEvent.keyDown(rows()[0], { key: "ArrowUp" });+ fireEvent.keyDown(rows()[5], { key: "ArrowDown" });+ expect(onSelect).not.toHaveBeenCalled();+ });++ test("activates the focused row with enter and space", () => {+ const { onSelect } = renderGrid();++ fireEvent.keyDown(rows()[2], { key: "Enter" });+ fireEvent.keyDown(rows()[2], { key: " " });+ expect(onSelect).toHaveBeenNthCalledWith(1, "0.0.0");+ expect(onSelect).toHaveBeenNthCalledWith(2, "0.0.0");+ });++ test("renders a single-node plan without a scrollable body", () => {+ renderGrid({+ tree: treeFrom([+ {+ Plan: {+ "Node Type": "Seq Scan",+ "Relation Name": "customers",+ "Startup Cost": 0,+ "Total Cost": 90.5,+ "Plan Rows": 1667,+ "Plan Width": 12,+ },+ },+ ]),+ selectedId: "0",+ });++ expect(rows()).toHaveLength(1);+ expect(barWidth(0)).toBe(100);+ });++ test("draws a connector guide for every level a row is nested under", () => {+ renderGrid();+ const guideCells = (index: number) =>+ Array.from(+ screen.getAllByTestId("plan-grid-guides")[index]?.children ?? []+ );++ // The root is not nested under anything, so it has no guides at all.+ expect(screen.queryAllByTestId("plan-grid-guides")).toHaveLength(5);+ expect(rows()[0].querySelector("[data-testid='plan-grid-guides']")).toBeNull();+ // The scan at depth two draws one pass-through level and one elbow.+ expect(guideCells(1)).toHaveLength(2);+ expect(guideCells(0)).toHaveLength(1);+ });++ test("keeps the guides out of the accessibility tree", () => {+ renderGrid();++ for (const guides of screen.getAllByTestId("plan-grid-guides")) {+ expect(guides).toHaveAttribute("aria-hidden", "true");+ }+ // The nesting is stated once, by the row itself.+ expect(rows()[2]).toHaveAttribute("aria-level", "3");+ });++ test("leaves the row's own indent and content where they were", () => {+ renderGrid();++ expect(+ screen.getAllByTestId("plan-grid-node").map((cell) => cell.style.paddingLeft)+ ).toEqual(["0px", "12px", "24px", "12px", "24px", "24px"]);+ expect(cellsOf(rows()[0])).toHaveLength(6);+ });++ test("renders a subject containing markup as text, not as markup", () => {+ const injected = "<img src=x onerror=alert(1)>";+ const { container } = renderGrid({+ tree: treeFrom([+ {+ Plan: {+ "Node Type": "Seq Scan",+ "Startup Cost": 0,+ "Total Cost": 1,+ "Plan Rows": 1,+ "Plan Width": 1,+ Filter: injected,+ },+ },+ ]),+ });++ expect(screen.getByTestId("plan-grid-node-subject")).toHaveTextContent(+ injected+ );+ expect(container.querySelector("img")).toBeNull();+ });+});diff --git a/frontend/src/apps/explain-visualizer/QueryPlanGrid.tsx b/frontend/src/apps/explain-visualizer/QueryPlanGrid.tsxnew file mode 100644index 0000000000..341807c94e--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanGrid.tsx@@ -0,0 +1,315 @@+import { memo, useCallback, useMemo } from "react";+import {+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow,+} from "@/components/ui/table";+import { cn } from "@/lib/utils";+import {+ PLAN_INDENT_STEP,+ planGuideLevels,+ planIndentPixels,+} from "./plan-layout";+import {+ formatPlanCost,+ formatPlanCount,+ type PlanRow,+ type PlanTree,+ planRows,+ planSelfCostShare,+} from "./plan-model";+import { PlanCostShareBar, SECONDARY_COLUMN_CLASS } from "./plan-shared";++interface Props {+ readonly tree: PlanTree;+ readonly selectedId: string | undefined;+ readonly onSelect: (id: string) => void;+}++const HEAD_CLASS = "sticky top-0 z-10 bg-control-bg text-xs leading-4";+const NUMERIC_CELL_CLASS =+ "py-2 text-right text-xs leading-4 text-control tabular-nums";++const GUIDE_LINE_CLASS = "absolute bg-control-border";++/**+ * Connector lines from a row up to its parent, drawn over the indent the row+ * already reserves so neither the row height nor the column widths move.+ *+ * Pure decoration: `aria-level` on the row is what states the nesting, and a+ * reader would gain nothing from a column of announced line segments.+ *+ * `left-4` is `TableCell`'s own horizontal padding, which is where the row's+ * indent starts; the two have to move together.+ */+function PlanTreeGuides({+ branchContinues,+}: {+ branchContinues: readonly boolean[];+}) {+ const levels = planGuideLevels(branchContinues);+ if (levels.length === 0) return null;+ return (+ <span+ aria-hidden="true"+ data-testid="plan-grid-guides"+ className="pointer-events-none absolute inset-y-0 left-4 flex"+ >+ {levels.map((continues, index) => {+ const last = index === levels.length - 1;+ // Every level but the last is a pass-through: a line only where an+ // ancestor still has rows to come. The last level turns into the row,+ // so it always arrives from above and carries on only when a sibling+ // follows.+ const vertical = last || continues;+ const toBottom = last ? continues : true;+ return (+ <span+ // A level has no identity apart from its position in the indent.+ key={index}+ className="relative shrink-0"+ style={{ width: PLAN_INDENT_STEP }}+ >+ {vertical ? (+ <span+ className={cn(+ GUIDE_LINE_CLASS,+ "left-1/2 w-px",+ toBottom ? "inset-y-0" : "top-0 h-1/2"+ )}+ />+ ) : null}+ {last ? (+ <span+ className={cn(+ GUIDE_LINE_CLASS,+ "top-1/2 right-0 left-1/2 h-px"+ )}+ />+ ) : null}+ </span>+ );+ })}+ </span>+ );+}++/**+ * One plan node as a row.+ *+ * Memoized because a selection change re-renders the grid, and every other row+ * of a large plan is drawing exactly what it drew before.+ */+const PlanGridRow = memo(function PlanGridRow({+ row: { node, depth, branchContinues },+ index,+ tree,+ selected,+ tabStop,+ onSelect,+ onKeyDown,+}: {+ row: PlanRow;+ index: number;+ tree: PlanTree;+ selected: boolean;+ tabStop: boolean;+ onSelect: (id: string) => void;+ onKeyDown: (+ event: React.KeyboardEvent<HTMLTableRowElement>,+ id: string+ ) => void;+}) {+ return (+ <TableRow+ data-testid="plan-grid-row"+ data-plan-node-id={node.id}+ aria-selected={selected}+ aria-level={depth + 1}+ tabIndex={tabStop ? 0 : -1}+ onClick={() => onSelect(node.id)}+ onKeyDown={(event) => onKeyDown(event, node.id)}+ className={cn(+ "cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent",+ selected && "bg-accent/10 hover:bg-accent/15"+ )}+ >+ <TableCell className="px-3 py-2 text-right text-xs leading-4 text-control-light tabular-nums">+ {index + 1}+ </TableCell>++ <TableCell className="relative py-2">+ <PlanTreeGuides branchContinues={branchContinues} />+ <div+ data-testid="plan-grid-node"+ className="relative flex min-w-0 items-baseline gap-2"+ style={{ paddingLeft: planIndentPixels(depth) }}+ >+ <span+ data-testid="plan-grid-node-type"+ className={cn(+ "truncate text-sm leading-5",+ selected ? "font-medium text-accent" : "text-main"+ )}+ >+ {node.nodeType}+ </span>+ {node.subject ? (+ <span+ data-testid="plan-grid-node-subject"+ title={node.subject}+ className="min-w-0 flex-1 truncate text-xs leading-4 text-control-light"+ >+ {node.subject}+ </span>+ ) : null}+ </div>+ </TableCell>++ <TableCell className="py-2 pr-4 pl-2">+ <div className="flex items-center justify-end gap-2">+ <PlanCostShareBar+ share={planSelfCostShare(node, tree)}+ className="w-10 shrink-0 sm:w-16"+ />+ <span className="text-xs leading-4 text-main tabular-nums">+ {formatPlanCost(node.selfCost)}+ </span>+ </div>+ </TableCell>++ <TableCell className={cn(NUMERIC_CELL_CLASS, SECONDARY_COLUMN_CLASS)}>+ {formatPlanCost(node.totalCost)}+ </TableCell>+ <TableCell className={cn(NUMERIC_CELL_CLASS, SECONDARY_COLUMN_CLASS)}>+ {formatPlanCount(node.rows)}+ </TableCell>+ <TableCell className={cn(NUMERIC_CELL_CLASS, SECONDARY_COLUMN_CLASS)}>+ {formatPlanCount(node.width)}+ </TableCell>+ </TableRow>+ );+});++export function QueryPlanGrid({ tree, selectedId, onSelect }: Props) {+ const rows = useMemo(() => planRows(tree.root), [tree]);++ // Roving tab stop: Tab reaches the grid once and the arrow keys move within+ // it, rather than making every row of a 30-node plan its own tab stop.+ const tabStopId = rows.some((row) => row.node.id === selectedId)+ ? selectedId+ : rows[0]?.node.id;++ const handleKeyDown = useCallback(+ (event: React.KeyboardEvent<HTMLTableRowElement>, id: string) => {+ // Each row carries its own node id, so arrow navigation can walk+ // siblings instead of holding a ref per row.+ const moveTo = (element: Element | null | undefined) => {+ if (!(element instanceof HTMLTableRowElement)) return;+ const next = element.dataset.planNodeId;+ if (next === undefined) return;+ element.focus();+ onSelect(next);+ };++ const row = event.currentTarget;+ switch (event.key) {+ case "ArrowDown":+ moveTo(row.nextElementSibling);+ break;+ case "ArrowUp":+ moveTo(row.previousElementSibling);+ break;+ case "Home":+ moveTo(row.parentElement?.firstElementChild);+ break;+ case "End":+ moveTo(row.parentElement?.lastElementChild);+ break;+ case "Enter":+ case " ":+ onSelect(id);+ break;+ default:+ return;+ }+ event.preventDefault();+ },+ [onSelect]+ );++ return (+ <div+ data-testid="plan-grid-scroll"+ className="min-h-0 w-full flex-1 overflow-auto"+ >+ <Table className="table-fixed">+ <caption className="sr-only">+ Plan nodes in the order the planner nests them, parents before+ children.+ </caption>+ <TableHeader>+ <TableRow>+ <TableHead className={cn(HEAD_CLASS, "w-12 px-3 text-right")}>+ #+ </TableHead>+ <TableHead className={HEAD_CLASS}>Node</TableHead>+ <TableHead+ className={cn(HEAD_CLASS, "w-32 pl-2 text-right sm:w-48")}+ title="Cost this node adds on top of its children; a node that rescans an input carries the repeats. The bar is that cost as a share of the plan."+ >+ Added cost+ </TableHead>+ <TableHead+ className={cn(+ HEAD_CLASS,+ SECONDARY_COLUMN_CLASS,+ "text-right sm:w-28"+ )}+ >+ Total cost+ </TableHead>+ <TableHead+ className={cn(+ HEAD_CLASS,+ SECONDARY_COLUMN_CLASS,+ "text-right sm:w-24"+ )}+ title="Estimated rows"+ >+ Rows+ </TableHead>+ <TableHead+ className={cn(+ HEAD_CLASS,+ SECONDARY_COLUMN_CLASS,+ "text-right sm:w-24"+ )}+ title="Estimated row width in bytes"+ >+ Width+ </TableHead>+ </TableRow>+ </TableHeader>++ <TableBody striped={false}>+ {rows.map((row, index) => (+ <PlanGridRow+ key={row.node.id}+ row={row}+ index={index}+ tree={tree}+ selected={row.node.id === selectedId}+ tabStop={row.node.id === tabStopId}+ onSelect={onSelect}+ onKeyDown={handleKeyDown}+ />+ ))}+ </TableBody>+ </Table>+ </div>+ );+}diff --git a/frontend/src/apps/explain-visualizer/QueryPlanNodeDetails.test.tsx b/frontend/src/apps/explain-visualizer/QueryPlanNodeDetails.test.tsxnew file mode 100644index 0000000000..aeb4e65402--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanNodeDetails.test.tsx@@ -0,0 +1,103 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, test } from "vitest";+import type { PlanNode } from "./plan-model";+import { QueryPlanNodeDetails } from "./QueryPlanNodeDetails";++const node = (overrides: Partial<PlanNode> = {}): PlanNode => ({+ id: "0",+ nodeType: "Hash Join",+ subject: "orders",+ relationship: "Inner",+ startupCost: 140.5,+ totalCost: 1090.86,+ selfCost: 193.86,+ rows: 50000,+ width: 7,+ properties: [+ { label: "Hash Cond", value: "(o.customer_id = c.id)" },+ { label: "Join Type", value: "Inner" },+ ],+ children: [],+ ...overrides,+});++describe("QueryPlanNodeDetails", () => {+ test("prompts for a selection when no node is chosen", () => {+ render(<QueryPlanNodeDetails node={undefined} />);+ expect(+ screen.getByText("Select a node to see its estimates.")+ ).toBeInTheDocument();+ });++ test("shows the node identity, its estimates, and its properties", () => {+ render(<QueryPlanNodeDetails node={node()} />);++ expect(+ screen.getByRole("heading", { name: "Hash Join" })+ ).toBeInTheDocument();+ expect(screen.getByText("orders")).toBeInTheDocument();++ expect(screen.getByText("Startup cost").nextSibling).toHaveTextContent(+ "140.5"+ );+ expect(screen.getByText("Total cost").nextSibling).toHaveTextContent(+ "1,090.86"+ );+ expect(screen.getByText("Added cost").nextSibling).toHaveTextContent(+ "193.86"+ );+ expect(screen.getByText("Estimated rows").nextSibling).toHaveTextContent(+ "50,000"+ );+ expect(screen.getByText("Row width").nextSibling).toHaveTextContent(+ "7 bytes"+ );++ expect(screen.getByText("Hash Cond").nextSibling).toHaveTextContent(+ "(o.customer_id = c.id)"+ );+ });++ test("renders a filter literal as text, never as markup", () => {+ const injected = "(name = '<img src=x onerror=alert(1)>'::text)";+ const { container } = render(+ <QueryPlanNodeDetails+ node={node({ properties: [{ label: "Filter", value: injected }] })}+ />+ );++ expect(screen.getByText(injected)).toBeInTheDocument();+ expect(container.querySelector("img")).toBeNull();+ });++ test("omits the property list when the node has no extra attributes", () => {+ render(<QueryPlanNodeDetails node={node({ properties: [] })} />);+ expect(screen.queryByText("Hash Cond")).not.toBeInTheDocument();+ expect(screen.getByText("Total cost")).toBeInTheDocument();+ });++ test("explains a full table scan without needing a hover to do it", () => {+ render(+ <QueryPlanNodeDetails+ node={node({ nodeType: "Seq Scan", subject: "orders", totalCost: 819 })}+ />+ );++ const warning = screen.getByTestId("plan-details-full-scan");+ expect(warning).toHaveTextContent("Full table scan");+ expect(warning).toHaveTextContent(/an index on the filtered columns/);+ expect(screen.getByRole("alert")).toBe(warning);+ });++ test("says nothing about scans that are not worth flagging", () => {+ render(+ <QueryPlanNodeDetails+ node={node({ nodeType: "Seq Scan", subject: "regions", totalCost: 12 })}+ />+ );+ expect(screen.queryByTestId("plan-details-full-scan")).toBeNull();++ render(<QueryPlanNodeDetails node={node({ totalCost: 5000 })} />);+ expect(screen.queryByTestId("plan-details-full-scan")).toBeNull();+ });+});diff --git a/frontend/src/apps/explain-visualizer/QueryPlanNodeDetails.tsx b/frontend/src/apps/explain-visualizer/QueryPlanNodeDetails.tsxnew file mode 100644index 0000000000..1882f5db70--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanNodeDetails.tsx@@ -0,0 +1,92 @@+import { Alert } from "@/components/ui/alert";+import { Separator } from "@/components/ui/separator";+import {+ formatPlanCost,+ formatPlanCount,+ isFlaggedFullScan,+ PLAN_FULL_SCAN_HINT,+ type PlanNode,+} from "./plan-model";+import { PlanMetric } from "./plan-shared";++interface Props {+ readonly node: PlanNode | undefined;+}++export function QueryPlanNodeDetails({ node }: Props) {+ if (!node) {+ return (+ <div className="flex h-full items-center justify-center p-4">+ <p className="text-sm leading-5 text-control-light">+ Select a node to see its estimates.+ </p>+ </div>+ );+ }++ return (+ <div className="flex h-full min-h-0 flex-col overflow-auto p-4 gap-4">+ <div className="flex flex-col gap-1">+ <h2 className="text-base leading-6 font-semibold text-main">+ {node.nodeType}+ </h2>+ {node.subject ? (+ <p className="text-sm leading-5 break-words text-control">+ {node.subject}+ </p>+ ) : null}+ {node.relationship ? (+ <p className="text-xs leading-4 text-control-light">+ {node.relationship}+ </p>+ ) : null}+ </div>++ {/* The diagram flags this with a hover-only icon, which a touch reader+ never reaches. The pane is where the selected node is explained, so+ it carries the warning too. */}+ {isFlaggedFullScan(node) ? (+ <Alert+ variant="warning"+ data-testid="plan-details-full-scan"+ title="Full table scan"+ description={PLAN_FULL_SCAN_HINT}+ />+ ) : null}++ <Separator />++ <dl className="flex flex-wrap gap-4">+ <PlanMetric+ label="Startup cost"+ value={formatPlanCost(node.startupCost)}+ />+ <PlanMetric label="Total cost" value={formatPlanCost(node.totalCost)} />+ <PlanMetric label="Added cost" value={formatPlanCost(node.selfCost)} />+ <PlanMetric label="Estimated rows" value={formatPlanCount(node.rows)} />+ <PlanMetric+ label="Row width"+ value={`${formatPlanCount(node.width)} bytes`}+ />+ </dl>++ {node.properties.length > 0 ? (+ <>+ <Separator />+ <dl className="flex flex-col gap-3">+ {node.properties.map((property) => (+ <div key={property.label} className="flex flex-col gap-1">+ <dt className="text-xs leading-4 text-control-light">+ {property.label}+ </dt>+ <dd className="font-mono text-xs leading-4 break-words whitespace-pre-wrap text-main">+ {property.value || "—"}+ </dd>+ </div>+ ))}+ </dl>+ </>+ ) : null}+ </div>+ );+}diff --git a/frontend/src/apps/explain-visualizer/QueryPlanSummary.test.tsx b/frontend/src/apps/explain-visualizer/QueryPlanSummary.test.tsxnew file mode 100644index 0000000000..4e10f49396--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanSummary.test.tsx@@ -0,0 +1,286 @@+import { fireEvent, render, screen, within } from "@testing-library/react";+import { describe, expect, test, vi } from "vitest";+import cteNestedLoopInitplan from "./test-data/cte-nested-loop-initplan.json";+import hashJoinAggregateSort from "./test-data/hash-join-aggregate-sort.json";+import seqScanFilter from "./test-data/seq-scan-filter.json";+import type { PlanTree } from "./plan-model";+import { parsePostgresPlan } from "./postgres-plan";+import { QueryPlanSummary } from "./QueryPlanSummary";++const treeFrom = (plan: unknown): PlanTree => {+ const result = parsePostgresPlan(JSON.stringify(plan));+ if (!result.ok) throw new Error(result.message);+ return result.tree;+};++/** A plan the planner costs at nothing, as a `VALUES`-only statement is. */+const zeroCostPlan = [+ {+ Plan: {+ "Node Type": "Limit",+ "Startup Cost": 0,+ "Total Cost": 0,+ "Plan Rows": 1,+ "Plan Width": 4,+ Plans: [+ {+ "Node Type": "Result",+ "Parent Relationship": "Outer",+ "Startup Cost": 0,+ "Total Cost": 0,+ "Plan Rows": 1,+ "Plan Width": 4,+ },+ ],+ },+ },+];++const renderSummary = (+ overrides: Partial<Parameters<typeof QueryPlanSummary>[0]> = {}+) => {+ const onSelect = vi.fn();+ const props = {+ tree: treeFrom(hashJoinAggregateSort),+ selectedId: "0",+ onSelect,+ ...overrides,+ };+ return { onSelect, ...render(<QueryPlanSummary {...props} />) };+};++const timelineRows = () => screen.getAllByTestId("plan-timeline-row");+const spans = () => screen.getAllByTestId("plan-timeline-span");+const percentOf = (value: string) => Number.parseFloat(value);++describe("QueryPlanSummary", () => {+ test("reports the plan's totals and says they are estimates", () => {+ renderSummary();++ expect(screen.getByText("Nodes").nextSibling).toHaveTextContent("6");+ expect(+ screen.getByText("Total estimated cost").nextSibling+ ).toHaveTextContent("1,465.93");+ expect(+ screen.getByText("Estimated rows returned").nextSibling+ ).toHaveTextContent("3");+ expect(screen.getByText(/planner estimate rather than a measurement/))+ .toBeVisible();+ expect(+ screen.getByText(/comparable only within this plan/)+ ).toBeInTheDocument();+ });++ test("plots one timeline row per node, in plan order", () => {+ renderSummary();++ expect(+ screen+ .getAllByTestId("plan-timeline-node-type")+ .map((cell) => cell.textContent)+ ).toEqual([+ "Sort",+ "HashAggregate",+ "Hash Join",+ "Seq Scan",+ "Hash",+ "Seq Scan",+ ]);+ });++ test("spans each bar from the startup cost to the total cost", () => {+ renderSummary();++ // The hash join starts at 140.5 and finishes at 1,090.86 of the plan's+ // 1,465.93 cost units.+ const join = spans()[2];+ expect(percentOf(join.style.left)).toBeCloseTo((140.5 / 1465.93) * 100, 4);+ expect(percentOf(join.style.width)).toBeCloseTo(+ ((1090.86 - 140.5) / 1465.93) * 100,+ 4+ );++ });++ test("keeps a span too short to draw visible and inside the axis", () => {+ renderSummary();++ // The root sort spans 1,465.92 to 1,465.93 — a thousandth of a percent,+ // so it is widened to the floor and pushed back off the axis end.+ const sort = spans()[0];+ expect(percentOf(sort.style.width)).toBe(0.5);+ expect(percentOf(sort.style.left)).toBe(99.5);+ });++ test("shades a span by how much of the plan the node itself costs", () => {+ renderSummary();+ const opacity = (index: number) => Number(spans()[index].style.opacity);++ // The scan of `orders` owns the largest self cost, so it saturates, and+ // the Hash that adds nothing stays at the floor that keeps it visible.+ expect(opacity(3)).toBe(1);+ expect(opacity(4)).toBe(0.3);+ expect(opacity(2)).toBeGreaterThan(0.3);+ expect(opacity(2)).toBeLessThan(1);+ });++ test("labels the axis from zero to the plan's cost", () => {+ renderSummary();+ expect(screen.getByTestId("plan-timeline-axis")).toHaveTextContent(+ "01,465.93"+ );+ });++ test("stretches the axis over the self costs a Limit hides", () => {+ renderSummary({ tree: treeFrom(cteNestedLoopInitplan) });+ // The root Limit reports 979.51, but its children account for 2,578.21.+ expect(screen.getByTestId("plan-timeline-axis")).toHaveTextContent(+ "02,578.21"+ );+ });++ test("indents a timeline row by the depth the planner nested it at", () => {+ renderSummary({ tree: treeFrom(cteNestedLoopInitplan) });++ expect(+ screen+ .getAllByTestId("plan-timeline-node-type")+ .map((cell) => (cell.parentElement as HTMLElement).style.paddingLeft)+ ).toEqual(["0px", "12px", "24px", "12px", "24px", "24px"]);+ });++ test("selects a node from its timeline row", () => {+ const { onSelect } = renderSummary();++ expect(timelineRows()[0]).toHaveAttribute("aria-pressed", "true");+ expect(timelineRows()[3]).toHaveAttribute("aria-pressed", "false");++ fireEvent.click(timelineRows()[3]);+ expect(onSelect).toHaveBeenCalledWith("0.0.0.0");+ });++ test("describes a timeline row without relying on its bar", () => {+ renderSummary();++ expect(timelineRows()[3]).toHaveAccessibleName(+ "Seq Scan, orders, cost 0 to 819, 55.9% of plan cost"+ );+ });++ test("ranks the costliest operators with their share of the plan", () => {+ renderSummary();+ const rows = screen.getAllByTestId("plan-costliest-row");++ expect(rows).toHaveLength(5);+ expect(rows[0]).toHaveTextContent("Seq Scan");+ expect(rows[0]).toHaveTextContent("orders");+ expect(rows[0]).toHaveTextContent("819");+ expect(rows[0]).toHaveTextContent("55.9%");+ expect(rows[1]).toHaveTextContent("HashAggregate");+ // The Hash node adds nothing on top of its child, so it is not ranked.+ expect(+ rows.some((row) => row.textContent?.startsWith("5Hash"))+ ).toBe(false);+ });++ test("selects a node from the costliest list", () => {+ const { onSelect } = renderSummary();++ fireEvent.click(screen.getAllByTestId("plan-costliest-row")[0]);+ expect(onSelect).toHaveBeenCalledWith("0.0.0.0");+ });++ test("totals the cost of every operation kind in the plan", () => {+ renderSummary();+ const cells = screen+ .getAllByTestId("plan-operation-row")+ .map((row) =>+ within(row)+ .getAllByRole("cell")+ .map((cell) => cell.textContent)+ );++ expect(cells[0]).toEqual(["Seq Scan", "2", "897", "61.2%"]);+ expect(cells.map((row) => row[0])).toEqual([+ "Seq Scan",+ "HashAggregate",+ "Hash Join",+ "Sort",+ "Hash",+ ]);+ expect(+ Number.parseFloat(+ screen.getAllByTestId("plan-cost-share-bar")[0].style.width+ )+ ).toBeCloseTo((897 / 1465.93) * 100, 4);+ });++ test("keeps every share inside the axis when a Limit truncates the root", () => {+ renderSummary({ tree: treeFrom(cteNestedLoopInitplan) });++ for (const span of spans()) {+ expect(percentOf(span.style.left)).toBeGreaterThanOrEqual(0);+ expect(+ percentOf(span.style.left) + percentOf(span.style.width)+ ).toBeLessThanOrEqual(100.0001);+ }+ // 1,319 of the 2,578.21 cost units the plan's nodes account for.+ expect(screen.getAllByTestId("plan-costliest-row")[0]).toHaveTextContent(+ "51.2%"+ );+ });++ test("gives a single-node plan the whole timeline", () => {+ renderSummary({ tree: treeFrom(seqScanFilter) });++ expect(timelineRows()).toHaveLength(1);+ expect(percentOf(spans()[0].style.left)).toBe(0);+ expect(percentOf(spans()[0].style.width)).toBe(100);+ expect(screen.getAllByTestId("plan-costliest-row")[0]).toHaveTextContent(+ "100%"+ );+ expect(+ within(screen.getAllByTestId("plan-operation-row")[0])+ .getAllByRole("cell")+ .map((cell) => cell.textContent)+ ).toEqual(["Seq Scan", "1", "90.5", "100%"]);+ });++ test("reports a plan the planner costs at nothing without dividing by it", () => {+ renderSummary({ tree: treeFrom(zeroCostPlan) });++ expect(spans().map((span) => span.style.left)).toEqual(["0%", "0%"]);+ expect(spans().map((span) => span.style.width)).toEqual(["0.5%", "0.5%"]);+ expect(timelineRows()[0]).toHaveTextContent("0%");+ expect(screen.queryAllByTestId("plan-costliest-row")).toHaveLength(0);+ expect(+ screen.getByText("No node in this plan adds an estimated cost of its own.")+ ).toBeVisible();+ expect(+ screen+ .getAllByTestId("plan-operation-row")+ .map((row) => row.textContent)+ ).toEqual(["Limit100%", "Result100%"]);+ });++ test("renders a subject containing markup as text, not as markup", () => {+ const injected = "<img src=x onerror=alert(1)>";+ const { container } = renderSummary({+ tree: treeFrom([+ {+ Plan: {+ "Node Type": "Seq Scan",+ "Startup Cost": 0,+ "Total Cost": 500,+ "Plan Rows": 1,+ "Plan Width": 1,+ Filter: injected,+ },+ },+ ]),+ });++ expect(timelineRows()[0]).toHaveTextContent(injected);+ expect(container.querySelector("img")).toBeNull();+ });+});diff --git a/frontend/src/apps/explain-visualizer/QueryPlanSummary.tsx b/frontend/src/apps/explain-visualizer/QueryPlanSummary.tsxnew file mode 100644index 0000000000..d35cc2cea7--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanSummary.tsx@@ -0,0 +1,408 @@+import { Info } from "lucide-react";+import type { ReactNode } from "react";+import { memo, useMemo } from "react";+import { Button } from "@/components/ui/button";+import {+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow,+} from "@/components/ui/table";+import { cn } from "@/lib/utils";+import { planIndentPixels } from "./plan-layout";+import {+ formatPlanCost,+ formatPlanCount,+ formatPlanShare,+ type PlanTimelineRow,+ type PlanTree,+ planCostByOperation,+ planCostliestNodes,+ planHighlightIntensity,+ planSelfCostShare,+ planTimeline,+} from "./plan-model";+import {+ PlanCostShareBar,+ PlanMetric,+ SECONDARY_COLUMN_CLASS,+} from "./plan-shared";++interface Props {+ readonly tree: PlanTree;+ readonly selectedId: string | undefined;+ readonly onSelect: (id: string) => void;+}++/**+ * Faintest a timeline span is drawn. A node that adds no cost of its own still+ * occupies a span of the plan, and hiding it would misreport the shape.+ */+const MIN_SPAN_OPACITY = 0.3;++/**+ * Narrowest a timeline span is drawn, as a fraction of the axis. A node whose+ * startup and total costs are the same spans nothing, and a bar of no width+ * would read as an absent row rather than an instant one.+ */+const MIN_SPAN_FRACTION = 0.005;++/** A span's placement on the axis, kept whole and inside the track. */+function spanGeometry(start: number, end: number) {+ const width = Math.min(1, Math.max(end - start, MIN_SPAN_FRACTION));+ return {+ left: `${Math.min(start, 1 - width) * 100}%`,+ width: `${width * 100}%`,+ };+}++/** Width of the label column once the row has room to put it beside the track. */+const LABEL_COLUMN_CLASS = "sm:w-56 sm:shrink-0";+/** Width of the trailing share column in the lists that carry one. */+const SHARE_COLUMN_CLASS = "w-12 shrink-0 text-right";++const ROW_BUTTON_CLASS =+ "h-auto w-full justify-start rounded-xs px-2 py-1.5 text-left font-normal";++function Section({+ title,+ description,+ children,+}: {+ title: string;+ description?: string;+ children: ReactNode;+}) {+ return (+ <section className="flex flex-col gap-3">+ <div className="flex flex-col gap-1">+ <h2 className="text-base leading-6 font-semibold text-main">{title}</h2>+ {description ? (+ <p className="text-xs leading-4 text-control-light">{description}</p>+ ) : null}+ </div>+ {children}+ </section>+ );+}++function PlanTotals({ tree }: { tree: PlanTree }) {+ return (+ <div className="flex flex-col gap-3">+ <dl className="flex flex-wrap gap-4">+ <PlanMetric label="Nodes" value={formatPlanCount(tree.nodes.length)} />+ <PlanMetric+ label="Total estimated cost"+ value={formatPlanCost(tree.root.totalCost)}+ />+ <PlanMetric+ label="Estimated rows returned"+ value={formatPlanCount(tree.root.rows)}+ />+ </dl>+ <p className="flex items-start gap-2 text-xs leading-4 text-control-light">+ <Info aria-hidden="true" className="mt-px size-3.5 shrink-0" />+ <span>+ EXPLAIN ran without ANALYZE, so every figure here is a planner+ estimate rather than a measurement. Cost units are arbitrary and+ comparable only within this plan.+ </span>+ </p>+ </div>+ );+}++/**+ * One node as a span on the plan's cost axis.+ *+ * Memoized because a selection change re-renders the timeline, and every other+ * row of a large plan is drawing exactly what it drew before.+ */+const TimelineRow = memo(function TimelineRow({+ row,+ tree,+ selected,+ onSelect,+}: {+ row: PlanTimelineRow;+ tree: PlanTree;+ selected: boolean;+ onSelect: (id: string) => void;+}) {+ const { node, depth, start, end, share } = row;+ return (+ <li>+ <Button+ appearance="secondary"+ data-testid="plan-timeline-row"+ aria-pressed={selected}+ aria-label={`${[node.nodeType, node.subject].filter(Boolean).join(", ")}, cost ${formatPlanCost(node.startupCost)} to ${formatPlanCost(node.totalCost)}, ${formatPlanShare(share)} of plan cost`}+ onClick={() => onSelect(node.id)}+ className={cn(+ ROW_BUTTON_CLASS,+ "flex-col items-stretch gap-1 sm:flex-row sm:items-center sm:gap-3",+ selected && "bg-accent/10 hover:bg-accent/15"+ )}+ >+ <span+ className={cn(+ "flex min-w-0 items-baseline gap-2",+ LABEL_COLUMN_CLASS+ )}+ style={{ paddingLeft: planIndentPixels(depth) }}+ >+ <span+ data-testid="plan-timeline-node-type"+ className={cn(+ "truncate text-xs leading-4",+ selected ? "font-medium text-accent" : "text-main"+ )}+ >+ {node.nodeType}+ </span>+ <span className="min-w-0 flex-1 truncate text-xs leading-4 text-control-light">+ {node.subject ?? ""}+ </span>+ <span className="shrink-0 text-xs leading-4 text-control tabular-nums">+ {formatPlanShare(share)}+ </span>+ </span>+ <span+ aria-hidden="true"+ // `flex-1` only once the row is horizontal: in the stacked layout it+ // is the column's main axis and would flatten the track to nothing.+ className="relative h-2.5 w-full min-w-0 overflow-hidden rounded-xs bg-control-bg sm:flex-1"+ >+ <span+ data-testid="plan-timeline-span"+ className="absolute inset-y-0 rounded-xs bg-warning"+ style={{+ ...spanGeometry(start, end),+ opacity:+ MIN_SPAN_OPACITY ++ (1 - MIN_SPAN_OPACITY) *+ planHighlightIntensity(node, tree, "cost"),+ }}+ />+ </span>+ </Button>+ </li>+ );+});++function CostTimeline({+ tree,+ selectedId,+ onSelect,+}: {+ tree: PlanTree;+ selectedId: string | undefined;+ onSelect: (id: string) => void;+}) {+ const rows = useMemo(() => planTimeline(tree), [tree]);+ return (+ <div className="flex flex-col gap-1">+ <div className="flex items-center gap-3">+ <span+ aria-hidden="true"+ className={cn("hidden sm:block", LABEL_COLUMN_CLASS)}+ />+ <span+ data-testid="plan-timeline-axis"+ className="flex min-w-0 flex-1 items-baseline justify-between px-2 text-xs leading-4 text-control-light tabular-nums sm:px-0"+ >+ <span>0</span>+ <span>{formatPlanCost(tree.costBasis)}</span>+ </span>+ </div>+ <ol data-testid="plan-timeline" className="flex flex-col">+ {rows.map((row) => (+ <TimelineRow+ key={row.node.id}+ row={row}+ tree={tree}+ selected={row.node.id === selectedId}+ onSelect={onSelect}+ />+ ))}+ </ol>+ </div>+ );+}++function CostliestOperators({+ tree,+ selectedId,+ onSelect,+}: {+ tree: PlanTree;+ selectedId: string | undefined;+ onSelect: (id: string) => void;+}) {+ const nodes = useMemo(() => planCostliestNodes(tree), [tree]);++ if (nodes.length === 0) {+ return (+ <p className="text-sm leading-5 text-control-light">+ No node in this plan adds an estimated cost of its own.+ </p>+ );+ }++ return (+ <ol data-testid="plan-costliest" className="flex flex-col">+ {nodes.map((node, index) => {+ const selected = node.id === selectedId;+ return (+ <li key={node.id}>+ <Button+ appearance="secondary"+ data-testid="plan-costliest-row"+ aria-pressed={selected}+ onClick={() => onSelect(node.id)}+ className={cn(+ ROW_BUTTON_CLASS,+ "items-baseline gap-3",+ selected && "bg-accent/10 hover:bg-accent/15"+ )}+ >+ <span className="w-4 shrink-0 text-xs leading-4 text-control-light tabular-nums">+ {index + 1}+ </span>+ <span className="flex min-w-0 flex-1 items-baseline gap-2">+ <span+ className={cn(+ "truncate text-sm leading-5",+ selected ? "font-medium text-accent" : "text-main"+ )}+ >+ {node.nodeType}+ </span>+ <span className="min-w-0 flex-1 truncate text-xs leading-4 text-control-light">+ {node.subject ?? ""}+ </span>+ </span>+ <span className="hidden shrink-0 text-xs leading-4 text-control tabular-nums sm:inline">+ {formatPlanCost(node.selfCost)}+ </span>+ <span+ className={cn(+ SHARE_COLUMN_CLASS,+ "text-xs leading-4 text-main tabular-nums"+ )}+ >+ {formatPlanShare(planSelfCostShare(node, tree))}+ </span>+ </Button>+ </li>+ );+ })}+ </ol>+ );+}++function CostByOperation({ tree }: { tree: PlanTree }) {+ const operations = useMemo(() => planCostByOperation(tree), [tree]);+ return (+ <Table className="table-fixed">+ <TableHeader>+ <TableRow>+ <TableHead className="text-xs leading-4">Operation</TableHead>+ <TableHead className="w-16 text-right text-xs leading-4">+ Count+ </TableHead>+ <TableHead+ className={cn(+ SECONDARY_COLUMN_CLASS,+ "text-right text-xs leading-4 sm:w-28"+ )}+ >+ Added cost+ </TableHead>+ <TableHead className="w-28 text-right text-xs leading-4 sm:w-40">+ Share+ </TableHead>+ </TableRow>+ </TableHeader>+ <TableBody striped={false}>+ {operations.map((operation) => (+ <TableRow key={operation.nodeType} data-testid="plan-operation-row">+ <TableCell className="py-2 text-sm leading-5 text-main">+ <span className="block truncate">{operation.nodeType}</span>+ </TableCell>+ <TableCell className="py-2 text-right text-xs leading-4 text-control tabular-nums">+ {formatPlanCount(operation.count)}+ </TableCell>+ <TableCell+ className={cn(+ SECONDARY_COLUMN_CLASS,+ "py-2 text-right text-xs leading-4 text-control tabular-nums"+ )}+ >+ {formatPlanCost(operation.selfCost)}+ </TableCell>+ <TableCell className="py-2 pr-4">+ <span className="flex items-center justify-end gap-2">+ <PlanCostShareBar+ share={operation.share}+ className="w-10 shrink-0 sm:w-20"+ />+ <span className="w-12 shrink-0 text-right text-xs leading-4 text-main tabular-nums">+ {formatPlanShare(operation.share)}+ </span>+ </span>+ </TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ );+}++/**+ * Where the plan's estimated cost goes, read three ways: when each node's work+ * happens, which nodes own the most of it, and which kinds of operation do.+ */+export function QueryPlanSummary({ tree, selectedId, onSelect }: Props) {+ return (+ <div+ data-testid="plan-summary"+ className="min-h-0 w-full flex-1 overflow-auto"+ >+ <div className="flex flex-col gap-6 p-4">+ <PlanTotals tree={tree} />++ <Section+ title="Cost ranges"+ description="Each node spans its startup cost — the cost before its first row — to its total cost, both of which include everything below it. Darker spans carry more of the plan's cost. Costs are not a schedule: two inputs of a join overlap here but run one after the other."+ >+ <CostTimeline+ tree={tree}+ selectedId={selectedId}+ onSelect={onSelect}+ />+ </Section>++ <Section+ title="Costliest operators"+ description="Ranked by the cost a node adds on top of its children. A node that rescans an input, such as a nested loop, carries the repeats of that input rather than the input itself."+ >+ <CostliestOperators+ tree={tree}+ selectedId={selectedId}+ onSelect={onSelect}+ />+ </Section>++ <Section+ title="Cost by operation"+ description="Every node type in the plan and what it costs in total."+ >+ <CostByOperation tree={tree} />+ </Section>+ </div>+ </div>+ );+}diff --git a/frontend/src/apps/explain-visualizer/QueryPlanViewer.test.tsx b/frontend/src/apps/explain-visualizer/QueryPlanViewer.test.tsxnew file mode 100644index 0000000000..e8b7e44a1a--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanViewer.test.tsx@@ -0,0 +1,373 @@+import { fireEvent, render, screen, within } from "@testing-library/react";+import type { ReactNode } from "react";+import { beforeEach, describe, expect, test, vi } from "vitest";+import bitmapIndexScan from "./test-data/bitmap-index-scan.json";+import type { PlanTree } from "./plan-model";+import { parsePostgresPlan } from "./postgres-plan";+import { QueryPlanViewer } from "./QueryPlanViewer";++vi.mock("react-resizable-panels", () => ({+ Group: ({+ children,+ orientation,+ }: {+ children: ReactNode;+ orientation: string;+ }) => (+ <div data-testid="plan-split" data-orientation={orientation}>+ {children}+ </div>+ ),+ Panel: ({ children }: { children: ReactNode }) => <div>{children}</div>,+ Separator: () => <div />,+}));++// jsdom's window exposes no matchMedia under vitest, so the viewer's+// narrow-screen query needs one.+function mockMatchMedia(matches: boolean) {+ window.matchMedia = ((query: string) => ({+ matches,+ media: query,+ onchange: null,+ addEventListener: () => {},+ removeEventListener: () => {},+ addListener: () => {},+ removeListener: () => {},+ dispatchEvent: () => true,+ })) as unknown as typeof window.matchMedia;+}++const rawPlan = JSON.stringify(bitmapIndexScan);++const tree = (): PlanTree => {+ const result = parsePostgresPlan(rawPlan);+ if (!result.ok) throw new Error(result.message);+ return result.tree;+};++const renderViewer = (query?: string) =>+ render(<QueryPlanViewer tree={tree()} rawPlan={rawPlan} query={query} />);++const openTab = (name: string) =>+ fireEvent.click(screen.getByRole("tab", { name }));++/** Loads the page at a fragment, the way following a shared link would. */+const startAtFragment = (fragment: string) =>+ history.replaceState(null, "", `${location.pathname}${fragment}`);++const collapseToggle = () => screen.getByTestId("plan-node-collapse");+const cards = () => screen.queryAllByTestId("plan-node-card");++describe("QueryPlanViewer", () => {+ beforeEach(() => {+ mockMatchMedia(false);+ // The viewer keeps the selection in the fragment, so each test has to+ // start from a page that has none.+ startAtFragment("");+ });++ test("opens on the diagram with the root node already selected", () => {+ renderViewer();++ expect(screen.getByTestId("plan-diagram-viewport")).toBeInTheDocument();+ expect(+ screen.getByRole("heading", { name: "Bitmap Heap Scan" })+ ).toBeInTheDocument();+ expect(screen.getByText("2 nodes · estimated cost 39.18")).toBeVisible();+ });++ test("moves the detail pane to whichever node is clicked", () => {+ renderViewer();++ fireEvent.click(+ screen.getByRole("button", { name: /Bitmap Index Scan/ })+ );+ expect(+ screen.getByRole("heading", { name: "Bitmap Index Scan" })+ ).toBeInTheDocument();+ expect(screen.getByText("(customer_id = 42)")).toBeInTheDocument();+ });++ test("lists the same plan as a table on the grid tab", () => {+ renderViewer();++ fireEvent.click(screen.getByRole("tab", { name: "Grid" }));+ expect(screen.getByTestId("plan-diagram-viewport")).not.toBeVisible();+ expect(+ screen+ .getAllByTestId("plan-grid-node-type")+ .map((cell) => cell.textContent)+ ).toEqual(["Bitmap Heap Scan", "Bitmap Index Scan"]);+ // The diagram stays mounted behind this tab, so the totals it also draws+ // are in the document; this one belongs to the panel on screen.+ expect(+ within(screen.getByRole("tabpanel")).getByText(+ "2 nodes · estimated cost 39.18"+ )+ ).toBeVisible();+ });++ test("keeps the selection when moving between the diagram and grid", () => {+ renderViewer();++ fireEvent.click(screen.getByRole("tab", { name: "Grid" }));+ const rows = screen.getAllByTestId("plan-grid-row");+ expect(rows[0]).toHaveAttribute("aria-selected", "true");++ fireEvent.click(rows[1]);+ expect(+ screen.getByRole("heading", { name: "Bitmap Index Scan" })+ ).toBeInTheDocument();++ fireEvent.click(screen.getByRole("tab", { name: "Diagram" }));+ expect(+ screen.getByRole("button", { name: /Bitmap Index Scan/ })+ ).toHaveAttribute("aria-pressed", "true");++ fireEvent.click(screen.getByRole("button", { name: /^Bitmap Heap Scan/ }));+ fireEvent.click(screen.getByRole("tab", { name: "Grid" }));+ expect(screen.getAllByTestId("plan-grid-row")[0]).toHaveAttribute(+ "aria-selected",+ "true"+ );+ expect(+ screen.getByRole("heading", { name: "Bitmap Heap Scan" })+ ).toBeInTheDocument();+ });++ test("answers where the cost goes on the summary tab", () => {+ renderViewer();++ fireEvent.click(screen.getByRole("tab", { name: "Summary" }));+ expect(screen.getByTestId("plan-diagram-viewport")).not.toBeVisible();+ expect(screen.getByTestId("plan-summary")).toBeInTheDocument();+ expect(+ screen+ .getAllByTestId("plan-timeline-node-type")+ .map((cell) => cell.textContent)+ ).toEqual(["Bitmap Heap Scan", "Bitmap Index Scan"]);+ // 34.81 of the plan's 39.18 cost units are the heap scan's own.+ expect(screen.getAllByTestId("plan-costliest-row")[0]).toHaveTextContent(+ "88.8%"+ );+ });++ test("shares the selection between the summary and the other tabs", () => {+ renderViewer();++ fireEvent.click(screen.getByRole("tab", { name: "Summary" }));+ const timelineRows = screen.getAllByTestId("plan-timeline-row");+ expect(timelineRows[0]).toHaveAttribute("aria-pressed", "true");++ fireEvent.click(timelineRows[1]);+ expect(+ screen.getByRole("heading", { name: "Bitmap Index Scan" })+ ).toBeInTheDocument();++ fireEvent.click(screen.getByRole("tab", { name: "Diagram" }));+ expect(+ screen.getByRole("button", { name: /Bitmap Index Scan/ })+ ).toHaveAttribute("aria-pressed", "true");++ fireEvent.click(screen.getByRole("tab", { name: "Grid" }));+ fireEvent.click(screen.getAllByTestId("plan-grid-row")[0]);+ fireEvent.click(screen.getByRole("tab", { name: "Summary" }));+ expect(screen.getAllByTestId("plan-timeline-row")[0]).toHaveAttribute(+ "aria-pressed",+ "true"+ );+ });++ test("switches to the raw plan and back to the diagram", () => {+ renderViewer();++ fireEvent.click(screen.getByRole("tab", { name: "Raw plan" }));+ expect(screen.getByText(/"Node Type": "Bitmap Heap Scan"/)).toBeVisible();+ expect(screen.getByTestId("plan-diagram-viewport")).not.toBeVisible();++ fireEvent.click(screen.getByRole("tab", { name: "Diagram" }));+ expect(screen.getByTestId("plan-diagram-viewport")).toBeVisible();+ });++ test("shows the statement on the query tab", () => {+ renderViewer("SELECT * FROM orders WHERE customer_id = 42;");++ fireEvent.click(screen.getByRole("tab", { name: "Query" }));+ expect(+ screen.getByText("SELECT * FROM orders WHERE customer_id = 42;")+ ).toBeVisible();+ });++ test("offers a copy of whichever text a tab is showing", () => {+ renderViewer("SELECT * FROM orders WHERE customer_id = 42;");++ openTab("Raw plan");+ expect(screen.getByTestId("plan-copy-button")).toHaveTextContent(+ "Copy plan"+ );++ openTab("Query");+ expect(screen.getByTestId("plan-copy-button")).toHaveTextContent(+ "Copy query"+ );+ });++ test("offers no copy of a statement that was never captured", () => {+ renderViewer();++ openTab("Query");+ expect(screen.queryByTestId("plan-copy-button")).toBeNull();+ });++ test("explains an absent statement instead of rendering an empty tab", () => {+ renderViewer();++ fireEvent.click(screen.getByRole("tab", { name: "Query" }));+ expect(+ screen.getByText("The statement was not captured with this plan.")+ ).toBeVisible();+ });++ test("shades the diagram once a highlight mode is chosen", () => {+ renderViewer();+ expect(screen.queryAllByTestId("plan-node-tint")).toHaveLength(0);++ fireEvent.click(screen.getByRole("button", { name: "Cost" }));+ expect(screen.getAllByTestId("plan-node-tint").length).toBeGreaterThan(0);+ });++ test("splits side by side on a wide screen", () => {+ renderViewer();+ expect(screen.getByTestId("plan-split")).toHaveAttribute(+ "data-orientation",+ "horizontal"+ );+ });++ test("stacks the detail pane below the diagram on a narrow screen", () => {+ mockMatchMedia(true);+ renderViewer();+ expect(screen.getByTestId("plan-split")).toHaveAttribute(+ "data-orientation",+ "vertical"+ );+ });++ test("names the selected node in the URL, which is what shares it", () => {+ renderViewer();++ fireEvent.click(screen.getByRole("button", { name: /Bitmap Index Scan/ }));+ expect(location.hash).toBe("#node-0.0");+ });++ test("leaves the URL alone until the reader picks a node", () => {+ renderViewer();++ // A fragment written on load would make the next reload look like a+ // followed deep link, which reveals its node over the view the page fits.+ expect(location.hash).toBe("");+ });++ test("opens on the node a fragment names", () => {+ startAtFragment("#node-0.0");+ renderViewer();++ expect(+ screen.getByRole("heading", { name: "Bitmap Index Scan" })+ ).toBeInTheDocument();+ expect(+ screen.getByRole("button", { name: /Bitmap Index Scan/ })+ ).toHaveAttribute("aria-pressed", "true");+ });++ test("falls back to the root when a fragment names no node in this plan", () => {+ startAtFragment("#node-9.9.9");+ renderViewer();++ expect(+ screen.getByRole("heading", { name: "Bitmap Heap Scan" })+ ).toBeInTheDocument();+ // The fragment is the reader's; a load neither follows nor rewrites it.+ expect(location.hash).toBe("#node-9.9.9");+ });++ test("ignores a fragment that is not about a node at all", () => {+ startAtFragment("#somewhere-else");+ renderViewer();++ expect(+ screen.getByRole("heading", { name: "Bitmap Heap Scan" })+ ).toBeInTheDocument();+ });++ test("follows a fragment that changes without a reload", () => {+ renderViewer();++ startAtFragment("#node-0.0");+ fireEvent(window, new Event("hashchange"));++ expect(+ screen.getByRole("heading", { name: "Bitmap Index Scan" })+ ).toBeInTheDocument();+ });++ test("keeps the diagram's zoom while the reader moves between tabs", () => {+ renderViewer();+ const canvas = () => screen.getByTestId("plan-diagram-canvas").style.transform;++ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ const zoomed = canvas();+ expect(zoomed).toContain("scale(1.25)");++ openTab("Grid");+ openTab("Diagram");++ expect(canvas()).toBe(zoomed);+ });++ test("keeps a subtree folded while the reader moves between tabs", () => {+ renderViewer();+ expect(cards()).toHaveLength(2);++ fireEvent.click(collapseToggle());+ expect(cards()).toHaveLength(1);++ openTab("Grid");+ openTab("Diagram");+ expect(cards()).toHaveLength(1);+ expect(collapseToggle()).toHaveAttribute("aria-expanded", "false");+ });++ test("moves the selection out of a subtree it folds away", () => {+ renderViewer();++ fireEvent.click(screen.getByRole("button", { name: /Bitmap Index Scan/ }));+ expect(+ screen.getByRole("heading", { name: "Bitmap Index Scan" })+ ).toBeInTheDocument();++ fireEvent.click(collapseToggle());++ // The selected node has no card any more, so the collapse that swallowed+ // it takes the selection — and the URL follows.+ expect(+ screen.getByRole("heading", { name: "Bitmap Heap Scan" })+ ).toBeInTheDocument();+ expect(location.hash).toBe("#node-0");+ });++ test("unfolds a subtree when a node inside it is selected elsewhere", () => {+ renderViewer();+ fireEvent.click(collapseToggle());++ openTab("Grid");+ // The grid still lists every node, folded or not.+ fireEvent.click(screen.getAllByTestId("plan-grid-row")[1]);++ openTab("Diagram");+ expect(cards()).toHaveLength(2);+ expect(+ screen.getByRole("button", { name: /Bitmap Index Scan/ })+ ).toHaveAttribute("aria-pressed", "true");+ });+});diff --git a/frontend/src/apps/explain-visualizer/QueryPlanViewer.tsx b/frontend/src/apps/explain-visualizer/QueryPlanViewer.tsxnew file mode 100644index 0000000000..ef84b3aca0--- /dev/null+++ b/frontend/src/apps/explain-visualizer/QueryPlanViewer.tsx@@ -0,0 +1,361 @@+import type { ReactNode } from "react";+import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import {+ Panel,+ Group as PanelGroup,+ Separator as PanelResizeHandle,+} from "react-resizable-panels";+import { Button } from "@/components/ui/button";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { Tooltip } from "@/components/ui/tooltip";+import { useMediaQuery } from "@/hooks/useMediaQuery";+import { cn } from "@/lib/utils";+import { PlanCopyButton } from "./PlanCopyButton";+import {+ findPlanNode,+ formatPlanCost,+ formatPlanCount,+ type PlanHighlightMode,+ type PlanNode,+ type PlanTree,+ planCollapsedAncestor,+ planNodeFragment,+ planNodeIdFromFragment,+ planRevealNode,+} from "./plan-model";+import { QueryPlanDiagram } from "./QueryPlanDiagram";+import { QueryPlanGrid } from "./QueryPlanGrid";+import { QueryPlanNodeDetails } from "./QueryPlanNodeDetails";+import { QueryPlanSummary } from "./QueryPlanSummary";++interface Props {+ readonly tree: PlanTree;+ /** The engine's plan output, shown verbatim on the raw tab. */+ readonly rawPlan: string;+ readonly query?: string;+}++type TabValue = "diagram" | "grid" | "summary" | "raw" | "query";++const HIGHLIGHT_OPTIONS: {+ value: PlanHighlightMode;+ label: string;+ hint: string;+}[] = [+ { value: "off", label: "Off", hint: "Leave every node card unshaded" },+ {+ value: "cost",+ label: "Cost",+ // Total cost is cumulative, so shading by it would always make the root+ // darkest. Self cost is what the node adds on top of its children.+ hint: "Shade by the cost a node adds on top of its children",+ },+ { value: "rows", label: "Rows", hint: "Shade by the estimated row count" },+];++const RESIZE_HANDLE_BASE_CLASS =+ "shrink-0 bg-control-border transition-colors hover:bg-accent data-[resize-handle-active]:bg-accent";++/** Below this width the diagram and its details stack instead of splitting. */+const STACK_QUERY = "(max-width: 767px)";++/**+ * A toggle group rather than `SegmentedControl`: this entry never loads the+ * main app's stylesheet, which is where the build injects StyleX's rules, so a+ * StyleX-sized control would render unstyled here.+ */+function HighlightControl({+ value,+ onChange,+}: {+ value: PlanHighlightMode;+ onChange: (next: PlanHighlightMode) => void;+}) {+ return (+ <div+ role="group"+ aria-label="Highlight nodes by"+ className="inline-flex items-center gap-px overflow-hidden rounded-xs border border-control-border bg-control-border"+ >+ {HIGHLIGHT_OPTIONS.map((option) => {+ const selected = option.value === value;+ return (+ <Tooltip key={option.value} content={option.hint}>+ <Button+ size="sm"+ appearance={selected ? "solid" : "secondary"}+ aria-pressed={selected}+ className={cn("rounded-none", !selected && "bg-background")}+ onClick={() => onChange(option.value)}+ >+ {option.label}+ </Button>+ </Tooltip>+ );+ })}+ </div>+ );+}++function PlanTotalsLine({ tree }: { tree: PlanTree }) {+ return (+ <p className="text-xs leading-4 text-control-light">+ {`${formatPlanCount(tree.nodes.length)} nodes · estimated cost ${formatPlanCost(tree.root.totalCost)}`}+ </p>+ );+}++/**+ * Puts one plan representation beside the detail pane. The diagram and the grid+ * are two readings of the same selection, so they share this frame instead of+ * each carrying its own copy of the details.+ */+function PlanWithDetails({+ stacked,+ node,+ children,+}: {+ stacked: boolean;+ node: PlanNode | undefined;+ children: ReactNode;+}) {+ return (+ <PanelGroup+ orientation={stacked ? "vertical" : "horizontal"}+ className="h-full min-h-0 w-full"+ >+ <Panel defaultSize={stacked ? "60%" : "70%"} minSize="30%">+ <div className="flex h-full min-h-0 flex-col">{children}</div>+ </Panel>+ <PanelResizeHandle+ className={cn(+ RESIZE_HANDLE_BASE_CLASS,+ stacked ? "h-1 w-full cursor-ns-resize" : "w-1 cursor-ew-resize"+ )}+ />+ <Panel defaultSize={stacked ? "40%" : "30%"} minSize="20%">+ <QueryPlanNodeDetails node={node} />+ </Panel>+ </PanelGroup>+ );+}++function prettyPrintJson(source: string): string {+ try {+ return JSON.stringify(JSON.parse(source), null, 2);+ } catch {+ return source;+ }+}++/** A panel whose content scrolls under a toolbar holding its copy control. */+function CopyablePanel({+ content,+ label,+ children,+}: {+ content: string;+ label: string;+ children: ReactNode;+}) {+ return (+ <>+ <div className="flex shrink-0 items-center justify-end px-4 py-2">+ <PlanCopyButton content={content} label={label} />+ </div>+ <div className="min-h-0 flex-1 overflow-auto px-4 pb-4">{children}</div>+ </>+ );+}++const MONOSPACE_BLOCK_CLASS =+ "font-mono text-xs leading-4 break-words whitespace-pre-wrap text-main";++/**+ * The node a fragment names, ignoring one that names a node this plan does not+ * have: a stale or hand-edited link should open the plan, not break it.+ */+function fragmentSelection(tree: PlanTree): string | undefined {+ const id = planNodeIdFromFragment(location.hash);+ return findPlanNode(tree, id)?.id;+}++export function QueryPlanViewer({ tree, rawPlan, query }: Props) {+ const [tab, setTab] = useState<TabValue>("diagram");+ const [selectedId, setSelectedId] = useState<string>(+ () => fragmentSelection(tree) ?? tree.root.id+ );+ const [highlight, setHighlight] = useState<PlanHighlightMode>("off");+ // Collapsed subtrees live here rather than in the diagram so switching tabs+ // does not fold the plan back open.+ const [collapsedIds, setCollapsedIds] = useState<ReadonlySet<string>>(+ () => new Set()+ );+ // A node the diagram should scroll to, rather than merely mark as selected.+ const [revealId, setRevealId] = useState<string | undefined>(() =>+ fragmentSelection(tree)+ );++ const selectedNode = findPlanNode(tree, selectedId);+ const formattedPlan = useMemo(() => prettyPrintJson(rawPlan), [rawPlan]);+ const stacked = useMediaQuery(STACK_QUERY);++ const selectNode = useCallback(+ (id: string) => {+ setSelectedId(id);+ // The grid and the summary list nodes the diagram may have folded away.+ // Opening the collapse that hides one keeps every surface agreeing on+ // where the selection is.+ setCollapsedIds((previous) => planRevealNode(tree.root, previous, id));+ },+ [tree]+ );++ const toggleCollapse = useCallback(+ (id: string) => {+ const next = new Set(collapsedIds);+ if (!next.delete(id)) next.add(id);+ setCollapsedIds(next);+ // Folding a subtree away must not leave the selection inside it with no+ // card on screen; the collapse that swallowed it takes the selection.+ const hiding = planCollapsedAncestor(tree.root, next, selectedId);+ if (hiding) setSelectedId(hiding.id);+ },+ [collapsedIds, selectedId, tree]+ );++ // Naming the selection in the fragment is what makes a node shareable. It+ // replaces rather than pushes, so Back leaves the page instead of walking+ // through every node the reader clicked on the way here.+ //+ // Only a selection the reader moved is written: naming the root on load+ // would turn every reload into a followed deep link, which reveals the node+ // and takes the view away from the fit the page opened on.+ const writtenSelection = useRef(selectedId);+ useEffect(() => {+ if (selectedId === writtenSelection.current) return;+ writtenSelection.current = selectedId;+ const fragment = planNodeFragment(selectedId);+ if (location.hash !== fragment) {+ history.replaceState(null, "", fragment);+ }+ }, [selectedId]);++ // Following a second link to the page it is already on changes the fragment+ // without reloading anything.+ useEffect(() => {+ const onHashChange = () => {+ const id = fragmentSelection(tree);+ if (id === undefined) return;+ selectNode(id);+ setRevealId(id);+ };+ window.addEventListener("hashchange", onHashChange);+ return () => window.removeEventListener("hashchange", onHashChange);+ }, [tree, selectNode]);++ const onRevealed = useCallback(() => setRevealId(undefined), []);++ return (+ <Tabs+ value={tab}+ onValueChange={(value) => setTab(value as TabValue)}+ className="flex h-full min-h-0 w-full flex-col bg-background text-main"+ >+ <TabsList className="shrink-0 flex-wrap px-4 pt-3">+ <TabsTrigger value="diagram">Diagram</TabsTrigger>+ <TabsTrigger value="grid">Grid</TabsTrigger>+ <TabsTrigger value="summary">Summary</TabsTrigger>+ <TabsTrigger value="raw">Raw plan</TabsTrigger>+ <TabsTrigger value="query">Query</TabsTrigger>+ </TabsList>++ <TabsPanel+ value="diagram"+ // The diagram holds the reader's zoom and pan, which unmounting would+ // throw away; the other tabs keep nothing a remount would lose.+ keepMounted+ className="mt-0 flex min-h-0 flex-1 flex-col overflow-hidden"+ >+ <PlanWithDetails stacked={stacked} node={selectedNode}>+ <div className="flex shrink-0 flex-wrap items-center justify-between gap-4 px-4 py-2">+ <div className="flex items-center gap-2">+ <span className="text-xs leading-4 text-control-light">+ Highlight+ </span>+ <HighlightControl value={highlight} onChange={setHighlight} />+ </div>+ <PlanTotalsLine tree={tree} />+ </div>+ <p className="shrink-0 px-4 pb-2 text-xs leading-4 text-control-light">+ Each card's bar is that node's share of the plan's estimated cost;+ an edge thickens with the rows its child is estimated to return.+ </p>+ <QueryPlanDiagram+ tree={tree}+ selectedId={selectedId}+ onSelect={selectNode}+ highlight={highlight}+ collapsedIds={collapsedIds}+ onToggleCollapse={toggleCollapse}+ revealId={revealId}+ onRevealed={onRevealed}+ />+ </PlanWithDetails>+ </TabsPanel>++ <TabsPanel+ value="grid"+ className="mt-0 flex min-h-0 flex-1 flex-col overflow-hidden"+ >+ <PlanWithDetails stacked={stacked} node={selectedNode}>+ <div className="flex shrink-0 flex-wrap items-center justify-end gap-4 px-4 py-2">+ <PlanTotalsLine tree={tree} />+ </div>+ <QueryPlanGrid+ tree={tree}+ selectedId={selectedId}+ onSelect={selectNode}+ />+ </PlanWithDetails>+ </TabsPanel>++ <TabsPanel+ value="summary"+ className="mt-0 flex min-h-0 flex-1 flex-col overflow-hidden"+ >+ <PlanWithDetails stacked={stacked} node={selectedNode}>+ <QueryPlanSummary+ tree={tree}+ selectedId={selectedId}+ onSelect={selectNode}+ />+ </PlanWithDetails>+ </TabsPanel>++ <TabsPanel+ value="raw"+ className="mt-0 flex min-h-0 flex-1 flex-col overflow-hidden"+ >+ <CopyablePanel content={formattedPlan} label="Copy plan">+ <pre className={MONOSPACE_BLOCK_CLASS}>{formattedPlan}</pre>+ </CopyablePanel>+ </TabsPanel>++ <TabsPanel+ value="query"+ className="mt-0 flex min-h-0 flex-1 flex-col overflow-hidden"+ >+ {query ? (+ <CopyablePanel content={query} label="Copy query">+ <pre className={MONOSPACE_BLOCK_CLASS}>{query}</pre>+ </CopyablePanel>+ ) : (+ <p className="p-4 text-sm leading-5 text-control-light">+ The statement was not captured with this plan.+ </p>+ )}+ </TabsPanel>+ </Tabs>+ );+}diff --git a/frontend/src/apps/explain-visualizer/explain-visualizer.css b/frontend/src/apps/explain-visualizer/explain-visualizer.cssindex a5696e1117..228320b2fb 100644--- a/frontend/src/apps/explain-visualizer/explain-visualizer.css+++ b/frontend/src/apps/explain-visualizer/explain-visualizer.css@@ -1,7 +1,8 @@-/* Standalone styles for the Explain Visualizer entry. Classes are- prefixed `ev-` because the page also loads `bootstrap`, `pev2`, and- `html-query-plan` CSS, none of which expect to coexist with the main- app's design tokens. */+/* Standalone styles for the Explain Visualizer entry.+ The page loads the product's Tailwind entry, so the PostgreSQL view uses the+ shared semantic tokens. The `ev-` prefixed rules below belong to the SQL+ Server and Spanner views, which predate that and also share the page with+ `html-query-plan`'s stylesheet. */:root {--radius-xs: 2px;@@ -17,42 +18,14 @@ body,body {margin: 0;+ background-color: rgb(var(--color-background));+ color: rgb(var(--color-main));}.ev-app {display: flex;}-/* Font Awesome SVG sizing — pev2 renders icons via- @fortawesome/vue-fontawesome, which expects Font Awesome's- `autoAddCss` to inject these rules into <head> at runtime. That- injection fires in the standalone Vue app but not reliably when pev2- is mounted as a Vue island inside React, leaving icons unsized- (`<svg>` defaults to filling its container). Inline the minimum- sizing rules so behavior is deterministic without taking a direct- dependency on `@fortawesome/fontawesome-svg-core`. */-.svg-inline--fa {- display: var(--fa-display, inline-block);- height: 1em;- overflow: visible;- vertical-align: -0.125em;-}-svg.svg-inline--fa:not(:root) {- overflow: visible;- box-sizing: content-box;-}-.svg-inline--fa.fa-fw {- width: var(--fa-fw-width, 1.25em);-}-.svg-inline--fa.fa-pull-left {- margin-right: var(--fa-pull-margin, 0.3em);- width: auto;-}-.svg-inline--fa.fa-pull-right {- margin-left: var(--fa-pull-margin, 0.3em);- width: auto;-}-.ev-unsupported {display: flex;flex-direction: column;@@ -64,13 +37,17 @@ svg.svg-inline--fa:not(:root) {text-align: center;}+/* Tailwind's preflight strips heading sizing, so these state screens restate+ it rather than relying on browser defaults. */.ev-unsupported h2 {margin-bottom: 8px;- color: #666;+ font-size: 18px;+ font-weight: 600;+ color: rgb(var(--color-main));}.ev-unsupported p {- color: #999;+ color: rgb(var(--color-control-light));}.ev-mssql-container {@@ -80,25 +57,6 @@ svg.svg-inline--fa:not(:root) {padding: 16px;}-/* `.qp-root` is the wrapper that pev2 mounts into. The Vue version- placed pev2 directly inside `<div id="app" class="d-flex">` so pev2's- root (`.plan-container`) was a flex child and stretched on the cross- axis. Our React wrapper adds one extra layer, and `.plan-container`- has no explicit height in pev2's CSS — without help, it shrinks to- content height and the splitpanes inside (`height: 100%`) collapse.- Force the first child to fill so the cascade resolves. */-.qp-root {- width: 100%;- height: 100%;- display: flex;- flex-direction: column;-}-.qp-root > * {- flex: 1 1 0;- min-height: 0;- width: 100%;-}-/* Spanner query plan tree */.ev-spanner {width: 100%;diff --git a/frontend/src/apps/explain-visualizer/main.tsx b/frontend/src/apps/explain-visualizer/main.tsxindex 35cb637b1d..51d9efa672 100644--- a/frontend/src/apps/explain-visualizer/main.tsx+++ b/frontend/src/apps/explain-visualizer/main.tsx@@ -1,5 +1,4 @@-import "bootstrap/dist/css/bootstrap.css";-import "pev2/dist/pev2.css";+import "@/assets/css/tailwind.css";import "html-query-plan/css/qp.css";import "./explain-visualizer.css";import { createRoot } from "react-dom/client";@@ -8,28 +7,6 @@ import { ExplainVisualizerApp } from "./ExplainVisualizerApp";// Some bundled dependencies expect a `global` reference on the window.(globalThis as typeof globalThis & Record<string, unknown>).global = globalThis;-// Force Font Awesome SVG sizing into <head> before pev2 mounts. pev2-// renders icons via @fortawesome/vue-fontawesome and relies on the-// `autoAddCss` runtime mechanism to inject these rules. That injection-// doesn't fire reliably when pev2 is mounted as a Vue island inside-// React, leaving SVGs unconstrained (they expand to fill their parent,-// blowing up the info-circle icon to viewport size). We can't import-// `@fortawesome/fontawesome-svg-core/styles.css` directly because it's-// a transitive dep that pnpm doesn't hoist to the top-level-// node_modules. So inline the rules — marked `!important` because the-// pev2 runtime can also inject conflicting CSS later.-const STYLE_ID = "pev2-fa-svg-core";-if (!document.getElementById(STYLE_ID)) {- const el = document.createElement("style");- el.id = STYLE_ID;- el.textContent = `- .svg-inline--fa{display:inline-block!important;height:1em!important;width:auto!important;overflow:visible!important;vertical-align:-.125em!important}- svg.svg-inline--fa:not(:root){overflow:visible!important;box-sizing:content-box!important}- .svg-inline--fa.fa-fw{width:1.25em!important}- `;- document.head.appendChild(el);-}-const container = document.getElementById("app");if (container) {createRoot(container).render(<ExplainVisualizerApp />);diff --git a/frontend/src/apps/explain-visualizer/plan-layout.test.ts b/frontend/src/apps/explain-visualizer/plan-layout.test.tsnew file mode 100644index 0000000000..a21737dcaf--- /dev/null+++ b/frontend/src/apps/explain-visualizer/plan-layout.test.ts@@ -0,0 +1,356 @@+import { describe, expect, test } from "vitest";+import {+ layoutPlan,+ PLAN_NODE_HEIGHT,+ PLAN_NODE_WIDTH,+ planFitsViewport,+ planGuideLevels,+ planIndentPixels,+ planMiniMap,+ planNodeCenter,+ planNodeOnScreen,+ planViewportCenteredOn,+} from "./plan-layout";+import type { PlanNode, PlanTree } from "./plan-model";+import { parsePostgresPlan } from "./postgres-plan";+import hashJoinAggregateSort from "./test-data/hash-join-aggregate-sort.json";+import seqScanFilter from "./test-data/seq-scan-filter.json";++const parseFixture = (fixture: unknown): PlanTree => {+ const result = parsePostgresPlan(JSON.stringify(fixture));+ if (!result.ok) throw new Error(result.message);+ return result.tree;+};++const depthOf = (root: PlanNode, id: string): number => {+ const walk = (node: PlanNode, depth: number): number | undefined => {+ if (node.id === id) return depth;+ for (const child of node.children) {+ const found = walk(child, depth + 1);+ if (found !== undefined) return found;+ }+ return undefined;+ };+ const depth = walk(root, 0);+ if (depth === undefined) throw new Error(`no node ${id}`);+ return depth;+};++describe("layoutPlan", () => {+ test("places a lone node inside a card-sized content box", () => {+ const { root } = parseFixture(seqScanFilter);+ const layout = layoutPlan(root);++ expect(layout.nodes).toHaveLength(1);+ expect(layout.edges).toHaveLength(0);+ expect(layout.nodes[0]).toMatchObject({ x: 32, y: 32 });+ expect(layout.width).toBe(PLAN_NODE_WIDTH + 64);+ expect(layout.height).toBe(PLAN_NODE_HEIGHT + 64);+ });++ test("stacks every node of a plan on one row per depth", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const layout = layoutPlan(tree.root);++ expect(layout.nodes).toHaveLength(tree.nodes.length);+ const rowByDepth = new Map<number, number>();+ for (const placed of layout.nodes) {+ const depth = depthOf(tree.root, placed.node.id);+ const existing = rowByDepth.get(depth);+ if (existing === undefined) {+ rowByDepth.set(depth, placed.y);+ } else {+ expect(placed.y).toBe(existing);+ }+ }+ expect(rowByDepth.size).toBe(5);+ });++ test("keeps every card inside the reported content box", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const layout = layoutPlan(tree.root);++ for (const placed of layout.nodes) {+ expect(placed.x).toBeGreaterThanOrEqual(0);+ expect(placed.y).toBeGreaterThanOrEqual(0);+ expect(placed.x + PLAN_NODE_WIDTH).toBeLessThanOrEqual(layout.width);+ expect(placed.y + PLAN_NODE_HEIGHT).toBeLessThanOrEqual(layout.height);+ }+ });++ test("draws one edge per parent-child link, top-down", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const layout = layoutPlan(tree.root);+ const byId = new Map(+ layout.nodes.map((placed) => [placed.node.id, placed])+ );++ expect(layout.edges.map((edge) => edge.id)).toEqual([+ "0->0.0",+ "0.0->0.0.0",+ "0.0.0->0.0.0.0",+ "0.0.0->0.0.0.1",+ "0.0.0.1->0.0.0.1.0",+ ]);++ const parent = byId.get("0.0.0");+ const child = byId.get("0.0.0.1");+ if (!parent || !child) throw new Error("missing laid-out node");+ const edge = layout.edges.find((entry) => entry.id === "0.0.0->0.0.0.1");+ expect(edge?.path).toBe(+ `M${parent.x + PLAN_NODE_WIDTH / 2},${parent.y + PLAN_NODE_HEIGHT} ` ++ `C${parent.x + PLAN_NODE_WIDTH / 2},${(parent.y + PLAN_NODE_HEIGHT + child.y) / 2} ` ++ `${child.x + PLAN_NODE_WIDTH / 2},${(parent.y + PLAN_NODE_HEIGHT + child.y) / 2} ` ++ `${child.x + PLAN_NODE_WIDTH / 2},${child.y}`+ );+ });++ test("names the child each edge feeds into", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const layout = layoutPlan(tree.root);++ expect(+ layout.edges.map((edge) => [edge.target.id, edge.target.rows])+ ).toEqual([+ ["0.0", 3],+ ["0.0.0", 50000],+ ["0.0.0.0", 50000],+ ["0.0.0.1", 5000],+ ["0.0.0.1.0", 5000],+ ]);+ });++ test("does not overlap siblings horizontally", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const layout = layoutPlan(tree.root);+ const byId = new Map(+ layout.nodes.map((placed) => [placed.node.id, placed])+ );++ const left = byId.get("0.0.0.0");+ const right = byId.get("0.0.0.1");+ if (!left || !right) throw new Error("missing laid-out node");+ expect(right.x - left.x).toBeGreaterThanOrEqual(PLAN_NODE_WIDTH);+ });+});++describe("layoutPlan with collapsed subtrees", () => {+ test("leaves out a collapsed node's descendants and their edges", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const layout = layoutPlan(tree.root, new Set(["0.0.0"]));++ // The join keeps its card; the two scans and the hash below it go.+ expect(layout.nodes.map((placed) => placed.node.id)).toEqual([+ "0",+ "0.0",+ "0.0.0",+ ]);+ expect(layout.edges.map((edge) => edge.id)).toEqual([+ "0->0.0",+ "0.0->0.0.0",+ ]);+ });++ test("closes the content box up around what is left", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const open = layoutPlan(tree.root);+ const folded = layoutPlan(tree.root, new Set(["0.0.0"]));++ expect(folded.height).toBeLessThan(open.height);+ expect(folded.width).toBeLessThan(open.width);+ expect(folded.width).toBe(PLAN_NODE_WIDTH + 64);+ });++ test("collapsing a leaf changes nothing", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ expect(layoutPlan(tree.root, new Set(["0.0.0.0"]))).toEqual(+ layoutPlan(tree.root)+ );+ });++ test("collapsing the root leaves the root alone on the canvas", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const layout = layoutPlan(tree.root, new Set(["0"]));++ expect(layout.nodes.map((placed) => placed.node.id)).toEqual(["0"]);+ expect(layout.edges).toHaveLength(0);+ });+});++describe("planIndentPixels", () => {+ test("steps with depth and then stops, so deep rows stay readable", () => {+ expect([0, 1, 2, 6, 7, 30].map(planIndentPixels)).toEqual([+ 0, 12, 24, 72, 72, 72,+ ]);+ });+});++describe("planGuideLevels", () => {+ test("draws one level per indent step the row actually has", () => {+ expect(planGuideLevels([])).toEqual([]);+ expect(planGuideLevels([true, false])).toEqual([true, false]);+ });++ test("keeps the levels nearest the row once the indent stops growing", () => {+ const deep = [true, true, false, true, false, true, false, true];+ // Eight levels of nesting, six columns of indent: the six closest to the+ // row survive, so the connector into its own parent is always drawn.+ expect(planGuideLevels(deep)).toEqual(deep.slice(2));+ expect(planGuideLevels(deep)).toHaveLength(planIndentPixels(8) / 12);+ });+});++const VIEW = { scale: 1, x: 0, y: 0 };++describe("planNodeCenter", () => {+ test("is the middle of the card, not its corner", () => {+ expect(planNodeCenter({ node: {} as PlanNode, x: 100, y: 40 })).toEqual({+ x: 100 + PLAN_NODE_WIDTH / 2,+ y: 40 + PLAN_NODE_HEIGHT / 2,+ });+ });+});++describe("planViewportCenteredOn", () => {+ test("puts the point in the middle of the screen at the current zoom", () => {+ const size = { width: 800, height: 600 };++ expect(planViewportCenteredOn({ x: 500, y: 300 }, size, VIEW)).toEqual({+ scale: 1,+ x: 400 - 500,+ y: 300 - 300,+ });+ expect(+ planViewportCenteredOn({ x: 500, y: 300 }, size, { ...VIEW, scale: 0.5 })+ ).toEqual({ scale: 0.5, x: 400 - 250, y: 300 - 150 });+ });+});++describe("planFitsViewport", () => {+ test("is true only while the whole plan is on screen", () => {+ const layout = layoutPlan(parseFixture(hashJoinAggregateSort).root);+ const big = { width: layout.width, height: layout.height };++ expect(planFitsViewport(layout, big, VIEW)).toBe(true);+ expect(+ planFitsViewport(layout, { ...big, width: big.width - 1 }, VIEW)+ ).toBe(false);+ // Zooming out brings the overflow back inside.+ expect(+ planFitsViewport(+ layout,+ { ...big, width: big.width / 2 },+ {+ ...VIEW,+ scale: 0.5,+ }+ )+ ).toBe(true);+ });++ test("treats an unmeasured viewport as having nothing to navigate", () => {+ const layout = layoutPlan(parseFixture(hashJoinAggregateSort).root);+ expect(planFitsViewport(layout, { width: 0, height: 0 }, VIEW)).toBe(true);+ });+});++describe("planNodeOnScreen", () => {+ const placed = { node: {} as PlanNode, x: 300, y: 200 };+ const size = { width: 400, height: 300 };++ test("is true only when the whole card is inside the viewport", () => {+ expect(planNodeOnScreen(placed, size, { scale: 1, x: -250, y: -180 })).toBe(+ true+ );+ // Panned so the card starts past the right edge.+ expect(planNodeOnScreen(placed, size, VIEW)).toBe(false);+ // Panned so the card starts above the top edge.+ expect(planNodeOnScreen(placed, size, { scale: 1, x: -250, y: -250 })).toBe(+ false+ );+ });++ test("moves nothing before the viewport has been measured", () => {+ expect(planNodeOnScreen(placed, { width: 0, height: 0 }, VIEW)).toBe(true);+ });+});++describe("planMiniMap", () => {+ const layout = { nodes: [], edges: [], width: 800, height: 400 };+ const box = { width: 160, height: 112 };++ test("draws the whole plan to fit the box, keeping its proportions", () => {+ const map = planMiniMap(layout, { width: 400, height: 300 }, VIEW, box);++ // 160/800 is tighter than 112/400, so the width is what binds.+ expect(map.scale).toBe(0.2);+ expect(map.width).toBe(160);+ expect(map.height).toBe(80);+ });++ test("never blows a small plan up past its own size", () => {+ const small = { ...layout, width: 80, height: 40 };+ expect(+ planMiniMap(small, { width: 400, height: 300 }, VIEW, box).scale+ ).toBe(1);+ });++ test("marks the screen's share of the plan", () => {+ // A 400x300 window over an 800x400 plan, panned to the middle of it.+ const map = planMiniMap(+ layout,+ { width: 400, height: 300 },+ { scale: 1, x: -200, y: -50 },+ box+ );++ expect(map.viewport).toEqual({ x: 40, y: 10, width: 80, height: 60 });+ });++ test("shrinks the marker as the reader zooms in", () => {+ const zoomed = planMiniMap(+ layout,+ { width: 400, height: 300 },+ { scale: 2, x: 0, y: 0 },+ box+ );++ // At 2x the same window covers half as much plan.+ expect(zoomed.viewport).toEqual({ x: 0, y: 0, width: 40, height: 30 });+ });++ test("trims the marker to the plan rather than past its edges", () => {+ // Panned so the plan sits well to the right of the window, and so far the+ // other way that the window has left the plan entirely.+ const before = planMiniMap(layout, { width: 400, height: 300 }, VIEW, box);+ expect(before.viewport).toMatchObject({ x: 0, width: 80 });++ const past = planMiniMap(+ layout,+ { width: 400, height: 300 },+ { scale: 1, x: -1000, y: 0 },+ box+ );+ expect(past.viewport).toMatchObject({ x: 160, width: 0 });+ });++ test("reports only the part of an over-panned window that is on the plan", () => {+ // Panned 300px past the plan's left edge, so only 100 of the window's 400+ // pixels have any plan under them.+ const map = planMiniMap(+ { ...layout, width: 1000, height: 500 },+ { width: 400, height: 300 },+ { scale: 1, x: 300, y: 0 },+ box+ );++ expect(map.viewport).toMatchObject({ x: 0, width: 16 });+ });++ test("has nothing to draw for an empty or unscaled plan", () => {+ expect(planMiniMap({ ...layout, width: 0 }, box, VIEW, box).scale).toBe(0);+ expect(planMiniMap(layout, box, { scale: 0, x: 0, y: 0 }, box).scale).toBe(+ 0+ );+ });+});diff --git a/frontend/src/apps/explain-visualizer/plan-layout.ts b/frontend/src/apps/explain-visualizer/plan-layout.tsnew file mode 100644index 0000000000..440c33da3b--- /dev/null+++ b/frontend/src/apps/explain-visualizer/plan-layout.ts@@ -0,0 +1,287 @@+import { hierarchy, tree } from "d3-hierarchy";+// Deep import: `@/utils` (the barrel) transitively pulls in Monaco, which this+// standalone entry never loads. `minmax` itself is a leaf math helper.+import { minmax } from "@/utils/math";+import type { PlanNode } from "./plan-model";++/**+ * Top-down tidy-tree layout for a plan.+ *+ * Cards are a fixed size, so the layout is a pure function of the tree shape:+ * no DOM measuring pass, and the same input always produces the same geometry.+ * Coordinates are in content space; the diagram applies pan and zoom on top.+ */++export const PLAN_NODE_WIDTH = 216;+export const PLAN_NODE_HEIGHT = 96;++/**+ * Indent per nesting level for the surfaces that list the plan as rows, capped+ * so a ten-deep plan still leaves the node column readable at phone width.+ * Callers expose the uncapped depth through `aria-level`.+ */+export const PLAN_INDENT_STEP = 12;+const MAX_INDENT_LEVELS = 6;++export function planIndentPixels(depth: number): number {+ return Math.min(Math.max(depth, 0), MAX_INDENT_LEVELS) * PLAN_INDENT_STEP;+}++/**+ * The connector levels a row has room to draw, one per `PLAN_INDENT_STEP` of+ * its indent.+ *+ * Past the indent cap there is no column left to draw in, so the deepest levels+ * are kept: those are the ones that tie the row to its own parent, which is+ * what a reader traces. Mirrors `planIndentPixels`, and each entry says whether+ * that level's branch carries on below the row.+ */+export function planGuideLevels(+ branchContinues: readonly boolean[]+): readonly boolean[] {+ return branchContinues.slice(-MAX_INDENT_LEVELS);+}++const COLUMN_GAP = 32;+const ROW_GAP = 56;+const CONTENT_PADDING = 32;++/** Cousins get a little more room than siblings so subtrees read apart. */+const COUSIN_SEPARATION = 1.25;++export interface PlanLayoutNode {+ readonly node: PlanNode;+ /** Left edge of the card in content space. */+ readonly x: number;+ /** Top edge of the card in content space. */+ readonly y: number;+}++export interface PlanLayoutEdge {+ readonly id: string;+ /** SVG path data from the parent's bottom edge to the child's top edge. */+ readonly path: string;+ /** The child feeding the parent; its row estimate sizes the stroke. */+ readonly target: PlanNode;+}++export interface PlanLayout {+ readonly nodes: readonly PlanLayoutNode[];+ readonly edges: readonly PlanLayoutEdge[];+ readonly width: number;+ readonly height: number;+}++const round = (value: number) => Math.round(value * 100) / 100;++const NOTHING_COLLAPSED: ReadonlySet<string> = new Set();++/**+ * @param collapsed - Ids whose subtrees are folded away. A collapsed node keeps+ * its own card; the layout closes up around the descendants it hides.+ */+export function layoutPlan(+ root: PlanNode,+ collapsed: ReadonlySet<string> = NOTHING_COLLAPSED+): PlanLayout {+ const laidOut = tree<PlanNode>()+ .nodeSize([PLAN_NODE_WIDTH + COLUMN_GAP, PLAN_NODE_HEIGHT + ROW_GAP])+ .separation((a, b) => (a.parent === b.parent ? 1 : COUSIN_SEPARATION))(+ hierarchy<PlanNode>(root, (node) =>+ collapsed.has(node.id) ? [] : (node.children as PlanNode[])+ )+ );++ const points = laidOut.descendants();+ let minCenterX = Number.POSITIVE_INFINITY;+ let maxCenterX = Number.NEGATIVE_INFINITY;+ let maxTop = 0;+ for (const point of points) {+ if (point.x < minCenterX) minCenterX = point.x;+ if (point.x > maxCenterX) maxCenterX = point.x;+ if (point.y > maxTop) maxTop = point.y;+ }++ // d3 centers each node on its own x; shift so the leftmost card's left edge+ // lands on the content padding.+ const offsetX = CONTENT_PADDING + PLAN_NODE_WIDTH / 2 - minCenterX;+ const offsetY = CONTENT_PADDING;++ const nodes = points.map((point) => ({+ node: point.data,+ x: round(point.x + offsetX - PLAN_NODE_WIDTH / 2),+ y: round(point.y + offsetY),+ }));++ const edges = laidOut.links().map(({ source, target }) => {+ const startX = round(source.x + offsetX);+ const startY = round(source.y + offsetY + PLAN_NODE_HEIGHT);+ const endX = round(target.x + offsetX);+ const endY = round(target.y + offsetY);+ const midY = round((startY + endY) / 2);+ return {+ id: `${source.data.id}->${target.data.id}`,+ path: `M${startX},${startY} C${startX},${midY} ${endX},${midY} ${endX},${endY}`,+ target: target.data,+ };+ });++ return {+ nodes,+ edges,+ width: round(+ maxCenterX - minCenterX + PLAN_NODE_WIDTH + CONTENT_PADDING * 2+ ),+ height: round(maxTop + PLAN_NODE_HEIGHT + CONTENT_PADDING * 2),+ };+}++/** The pan and zoom the diagram applies to content space, in CSS pixels. */+export interface PlanViewport {+ readonly scale: number;+ readonly x: number;+ readonly y: number;+}++/** The size of the element content is drawn into, in CSS pixels. */+export interface PlanViewportSize {+ readonly width: number;+ readonly height: number;+}++export interface PlanRect {+ readonly x: number;+ readonly y: number;+ readonly width: number;+ readonly height: number;+}++/** The middle of a card, in content space. */+export function planNodeCenter(placed: PlanLayoutNode): {+ x: number;+ y: number;+} {+ return {+ x: placed.x + PLAN_NODE_WIDTH / 2,+ y: placed.y + PLAN_NODE_HEIGHT / 2,+ };+}++/**+ * The viewport that puts a content-space point in the middle of the screen,+ * at the zoom already in use. Both the mini-map and a deep link land on a node+ * this way.+ */+export function planViewportCenteredOn(+ point: { x: number; y: number },+ size: PlanViewportSize,+ view: PlanViewport+): PlanViewport {+ return {+ scale: view.scale,+ x: size.width / 2 - point.x * view.scale,+ y: size.height / 2 - point.y * view.scale,+ };+}++/**+ * Whether the whole plan is already on screen, which is when the mini-map has+ * nothing to offer. A viewport that has not been measured yet counts as+ * fitting rather than flashing a mini-map over an unsized box.+ */+export function planFitsViewport(+ layout: PlanLayout,+ size: PlanViewportSize,+ view: PlanViewport+): boolean {+ if (size.width <= 0 || size.height <= 0) return true;+ // Content and viewport are both rounded to hundredths, so compare with the+ // tolerance of that rounding rather than exactly.+ const slack = 0.01;+ return (+ layout.width * view.scale <= size.width + slack &&+ layout.height * view.scale <= size.height + slack+ );+}++/**+ * Whether a card is fully on screen at the current pan and zoom. An unmeasured+ * viewport counts as showing everything, so nothing moves before the first+ * layout pass.+ */+export function planNodeOnScreen(+ placed: PlanLayoutNode,+ size: PlanViewportSize,+ view: PlanViewport+): boolean {+ if (size.width <= 0 || size.height <= 0) return true;+ const left = placed.x * view.scale + view.x;+ const top = placed.y * view.scale + view.y;+ return (+ left >= 0 &&+ top >= 0 &&+ left + PLAN_NODE_WIDTH * view.scale <= size.width &&+ top + PLAN_NODE_HEIGHT * view.scale <= size.height+ );+}++export interface PlanMiniMap {+ /** Mini-map pixels per content pixel. */+ readonly scale: number;+ readonly width: number;+ readonly height: number;+ /** The part of the plan currently on screen, in mini-map coordinates. */+ readonly viewport: PlanRect;+}++const EMPTY_MINI_MAP: PlanMiniMap = {+ scale: 0,+ width: 0,+ height: 0,+ viewport: { x: 0, y: 0, width: 0, height: 0 },+};++/**+ * The whole plan drawn to fit `box`, with the screen's share of it marked.+ *+ * The mini-map never enlarges the plan: a plan small enough to fit the box+ * outright is drawn at its own size, so the overview is always an overview.+ */+export function planMiniMap(+ layout: PlanLayout,+ size: PlanViewportSize,+ view: PlanViewport,+ box: PlanViewportSize+): PlanMiniMap {+ if (layout.width <= 0 || layout.height <= 0 || view.scale <= 0) {+ return EMPTY_MINI_MAP;+ }+ const scale = Math.min(+ box.width / layout.width,+ box.height / layout.height,+ 1+ );+ const width = layout.width * scale;+ const height = layout.height * scale;+ // Undo the pan and zoom to place a screen coordinate on the mini-map. Both+ // edges of the window are trimmed to the plan's bounds and the size comes+ // from the trimmed edges: taking it from the untrimmed window instead would+ // draw a pan past the left or top edge as more of the plan than is on screen.+ const onMap = (screen: number, pan: number) =>+ ((screen - pan) / view.scale) * scale;+ const left = minmax(onMap(0, view.x), 0, width);+ const top = minmax(onMap(0, view.y), 0, height);+ const right = minmax(onMap(size.width, view.x), left, width);+ const bottom = minmax(onMap(size.height, view.y), top, height);+ return {+ scale,+ width,+ height,+ viewport: {+ x: left,+ y: top,+ width: right - left,+ height: bottom - top,+ },+ };+}diff --git a/frontend/src/apps/explain-visualizer/plan-model.test.ts b/frontend/src/apps/explain-visualizer/plan-model.test.tsnew file mode 100644index 0000000000..31f988c0d0--- /dev/null+++ b/frontend/src/apps/explain-visualizer/plan-model.test.ts@@ -0,0 +1,503 @@+import { describe, expect, test } from "vitest";+import {+ buildPlanTree,+ findPlanNode,+ flattenPlan,+ formatPlanCost,+ formatPlanCount,+ formatPlanShare,+ isFlaggedFullScan,+ PLAN_EDGE_MAX_WIDTH,+ PLAN_EDGE_MIN_WIDTH,+ type PlanNode,+ type PlanTree,+ planCollapsedAncestor,+ planCostByOperation,+ planCostliestNodes,+ planDescendantCount,+ planEdgeWidth,+ planHighlightIntensity,+ planNodeFragment,+ planNodeIdFromFragment,+ planRevealNode,+ planRows,+ planSelfCostShare,+ planTimeline,+} from "./plan-model";+import { parsePostgresPlan } from "./postgres-plan";+import cteNestedLoopInitplan from "./test-data/cte-nested-loop-initplan.json";+import hashJoinAggregateSort from "./test-data/hash-join-aggregate-sort.json";+import seqScanFilter from "./test-data/seq-scan-filter.json";++const parseFixture = (fixture: unknown): PlanTree => {+ const result = parsePostgresPlan(JSON.stringify(fixture));+ if (!result.ok) throw new Error(result.message);+ return result.tree;+};++const node = (+ id: string,+ overrides: Partial<PlanNode> = {},+ children: PlanNode[] = []+): PlanNode => ({+ id,+ nodeType: "Seq Scan",+ startupCost: 0,+ totalCost: 0,+ selfCost: 0,+ rows: 0,+ width: 0,+ properties: [],+ children,+ ...overrides,+});++const sampleTree = () =>+ buildPlanTree(+ node("0", { selfCost: 10, rows: 100 }, [+ node("0.0", { selfCost: 40, rows: 400 }),+ node("0.1", { selfCost: 0, rows: 0 }, [+ node("0.1.0", { selfCost: 25, rows: 900 }),+ ]),+ ])+ );++describe("flattenPlan", () => {+ test("returns nodes depth-first with the root first", () => {+ const tree = sampleTree();+ expect(flattenPlan(tree.root).map((entry) => entry.id)).toEqual([+ "0",+ "0.0",+ "0.1",+ "0.1.0",+ ]);+ });+});++describe("buildPlanTree", () => {+ test("records the largest self cost and row estimate", () => {+ const tree = sampleTree();+ expect(tree.nodes).toHaveLength(4);+ expect(tree.maxSelfCost).toBe(40);+ expect(tree.maxRows).toBe(900);+ });+});++describe("findPlanNode", () => {+ test("finds a node by id and tolerates no selection", () => {+ const tree = sampleTree();+ expect(findPlanNode(tree, "0.1.0")?.selfCost).toBe(25);+ expect(findPlanNode(tree, "nope")).toBeUndefined();+ expect(findPlanNode(tree, undefined)).toBeUndefined();+ });+});++describe("planHighlightIntensity", () => {+ test("is zero for every node when highlighting is off", () => {+ const tree = sampleTree();+ for (const entry of tree.nodes) {+ expect(planHighlightIntensity(entry, tree, "off")).toBe(0);+ }+ });++ test("saturates the costliest node and ranks the rest below it", () => {+ const tree = sampleTree();+ const [root, first, , deepest] = tree.nodes;++ expect(planHighlightIntensity(first, tree, "cost")).toBe(1);+ expect(planHighlightIntensity(deepest, tree, "cost")).toBeCloseTo(+ Math.sqrt(25 / 40),+ 5+ );+ expect(planHighlightIntensity(root, tree, "cost")).toBeCloseTo(+ Math.sqrt(10 / 40),+ 5+ );+ });++ test("ranks by rows independently of cost", () => {+ const tree = sampleTree();+ const [, first, , deepest] = tree.nodes;++ expect(planHighlightIntensity(deepest, tree, "rows")).toBe(1);+ expect(planHighlightIntensity(first, tree, "rows")).toBeCloseTo(+ Math.sqrt(400 / 900),+ 5+ );+ });++ test("stays at zero when the plan has nothing to rank", () => {+ const flat = buildPlanTree(node("0"));+ expect(planHighlightIntensity(flat.root, flat, "cost")).toBe(0);+ expect(planHighlightIntensity(flat.root, flat, "rows")).toBe(0);+ });+});++describe("number formatting", () => {+ test("keeps planner precision on costs and groups large row counts", () => {+ expect(formatPlanCost(0)).toBe("0");+ expect(formatPlanCost(1465.93)).toBe("1,465.93");+ expect(formatPlanCount(50000)).toBe("50,000");+ });++ test("keeps a share that rounds to nothing from reading as nothing", () => {+ expect(formatPlanShare(0)).toBe("0%");+ expect(formatPlanShare(1)).toBe("100%");+ expect(formatPlanShare(819 / 1465.93)).toBe("55.9%");+ expect(formatPlanShare(0.001)).toBe("0.1%");+ expect(formatPlanShare(0.0004)).toBe("<0.1%");+ });+});++describe("planRows", () => {+ test("pairs every node with how deep the planner nested it", () => {+ const tree = parseFixture(cteNestedLoopInitplan);+ expect(planRows(tree.root).map((row) => [row.node.id, row.depth])).toEqual([+ ["0", 0],+ ["0.0", 1],+ ["0.0.0", 2],+ ["0.1", 1],+ ["0.1.0", 2],+ ["0.1.1", 2],+ ]);+ });++ test("says which branches carry on past each row", () => {+ // The Limit has two children, so the first one's branch continues while+ // the second one's ends; the leaf under the ending branch inherits that.+ const tree = parseFixture(cteNestedLoopInitplan);+ expect(+ planRows(tree.root).map((row) => [row.node.id, row.branchContinues])+ ).toEqual([+ ["0", []],+ ["0.0", [true]],+ ["0.0.0", [true, false]],+ ["0.1", [false]],+ ["0.1.0", [false, true]],+ ["0.1.1", [false, false]],+ ]);+ });++ test("gives every row one entry per level of its depth", () => {+ for (const row of planRows(parseFixture(hashJoinAggregateSort).root)) {+ expect(row.branchContinues).toHaveLength(row.depth);+ }+ });+});++describe("planDescendantCount", () => {+ test("counts everything below a node, at any depth", () => {+ const tree = sampleTree();+ const [root, leaf, branch] = tree.nodes;++ expect(planDescendantCount(root)).toBe(3);+ expect(planDescendantCount(branch)).toBe(1);+ expect(planDescendantCount(leaf)).toBe(0);+ });+});++describe("planCollapsedAncestor", () => {+ const tree = () => parseFixture(cteNestedLoopInitplan);++ test("names the collapse a hidden node disappeared into", () => {+ const collapsed = new Set(["0.1"]);+ const { root } = tree();++ expect(planCollapsedAncestor(root, collapsed, "0.1.1")?.id).toBe("0.1");+ // A collapsed node keeps its own card, so it is not hidden by itself.+ expect(planCollapsedAncestor(root, collapsed, "0.1")).toBeUndefined();+ expect(planCollapsedAncestor(root, collapsed, "0.0")).toBeUndefined();+ });++ test("reports the outermost collapse, which is the one on screen", () => {+ const { root } = tree();+ expect(+ planCollapsedAncestor(root, new Set(["0", "0.1"]), "0.1.1")?.id+ ).toBe("0");+ });++ test("hides nothing without a collapse or a node to look for", () => {+ const { root } = tree();+ expect(planCollapsedAncestor(root, new Set(), "0.1.1")).toBeUndefined();+ expect(+ planCollapsedAncestor(root, new Set(["0.1"]), undefined)+ ).toBeUndefined();+ expect(+ planCollapsedAncestor(root, new Set(["0.1"]), "nope")+ ).toBeUndefined();+ });+});++describe("planRevealNode", () => {+ test("opens every collapse standing between the root and the node", () => {+ const { root } = parseFixture(cteNestedLoopInitplan);+ const revealed = planRevealNode(+ root,+ new Set(["0", "0.1", "0.0"]),+ "0.1.1"+ );++ expect([...revealed].sort()).toEqual(["0.0"]);+ });++ test("leaves a collapsed node folded when it is the node asked for", () => {+ const { root } = parseFixture(cteNestedLoopInitplan);+ const collapsed = new Set(["0.1"]);++ expect(planRevealNode(root, collapsed, "0.1")).toBe(collapsed);+ });++ test("returns the same set when nothing hid the node", () => {+ const { root } = parseFixture(cteNestedLoopInitplan);+ const collapsed = new Set(["0.0"]);++ expect(planRevealNode(root, collapsed, "0.1.1")).toBe(collapsed);+ expect(planRevealNode(root, collapsed, "nope")).toBe(collapsed);+ expect(planRevealNode(root, collapsed, undefined)).toBe(collapsed);+ });+});++describe("plan node fragments", () => {+ test("round-trips a node id through the fragment that names it", () => {+ expect(planNodeFragment("0.1.1")).toBe("#node-0.1.1");+ expect(planNodeIdFromFragment(planNodeFragment("0.1.1"))).toBe("0.1.1");+ expect(planNodeIdFromFragment("node-0")).toBe("0");+ });++ test("ignores a fragment that does not name a node", () => {+ expect(planNodeIdFromFragment(undefined)).toBeUndefined();+ expect(planNodeIdFromFragment("")).toBeUndefined();+ expect(planNodeIdFromFragment("#")).toBeUndefined();+ expect(planNodeIdFromFragment("#node-")).toBeUndefined();+ expect(planNodeIdFromFragment("#section-2")).toBeUndefined();+ expect(planNodeIdFromFragment("#node-%")).toBeUndefined();+ });++ test("escapes an id that is not plain fragment text", () => {+ expect(planNodeFragment("a b#c")).toBe("#node-a%20b%23c");+ expect(planNodeIdFromFragment(planNodeFragment("a b#c"))).toBe("a b#c");+ });+});++describe("costBasis", () => {+ test("is the root's total cost, which the self costs add back up to", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const selfTotal = tree.nodes.reduce((sum, node) => sum + node.selfCost, 0);++ expect(tree.costBasis).toBeCloseTo(1465.93, 5);+ expect(selfTotal).toBeCloseTo(tree.root.totalCost, 5);+ });++ test("covers the self costs a Limit truncates out of the root's total", () => {+ const tree = parseFixture(cteNestedLoopInitplan);++ // The Limit stops its children early, so it reports a total below theirs.+ expect(tree.root.totalCost).toBe(979.51);+ expect(tree.costBasis).toBeCloseTo(2578.21, 5);+ for (const node of tree.nodes) {+ expect(planSelfCostShare(node, tree)).toBeLessThanOrEqual(1);+ }+ });+});++describe("planSelfCostShare", () => {+ test("reports each node's own cost as a fraction of the plan's", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const shareOf = (id: string) => {+ const node = findPlanNode(tree, id);+ if (!node) throw new Error(`no node ${id}`);+ return planSelfCostShare(node, tree);+ };++ // The sequential scan of `orders` under the hash join.+ expect(shareOf("0.0.0.0")).toBeCloseTo(819 / 1465.93, 6);+ // A Hash node adds nothing on top of the scan it hashes.+ expect(shareOf("0.0.0.1")).toBe(0);+ expect(+ tree.nodes.reduce((sum, node) => sum + planSelfCostShare(node, tree), 0)+ ).toBeCloseTo(1, 6);+ });++ test("gives a lone node the whole plan", () => {+ const tree = parseFixture(seqScanFilter);+ expect(planSelfCostShare(tree.root, tree)).toBe(1);+ });++ test("is zero throughout a plan the planner costs at nothing", () => {+ const tree = buildPlanTree(node("0", {}, [node("0.0")]));+ expect(tree.costBasis).toBe(0);+ for (const entry of tree.nodes) {+ expect(planSelfCostShare(entry, tree)).toBe(0);+ }+ });+});++describe("planEdgeWidth", () => {+ test("spans the full range from the smallest to the largest estimate", () => {+ const tree = parseFixture(hashJoinAggregateSort);++ expect(planEdgeWidth(tree.maxRows, tree)).toBe(PLAN_EDGE_MAX_WIDTH);+ expect(planEdgeWidth(1, tree)).toBeGreaterThan(PLAN_EDGE_MIN_WIDTH);+ expect(planEdgeWidth(1, tree)).toBeLessThan(planEdgeWidth(5000, tree));+ expect(planEdgeWidth(5000, tree)).toBeLessThan(PLAN_EDGE_MAX_WIDTH);+ });++ test("keeps a rowless or unrankable edge at the visible minimum", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const rowless = buildPlanTree(node("0"));++ expect(planEdgeWidth(0, tree)).toBe(PLAN_EDGE_MIN_WIDTH);+ expect(planEdgeWidth(10, rowless)).toBe(PLAN_EDGE_MIN_WIDTH);+ });++ test("keeps an estimate far past the plan's largest inside the range", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ expect(planEdgeWidth(10_000_000, tree)).toBe(PLAN_EDGE_MAX_WIDTH);+ });+});++describe("isFlaggedFullScan", () => {+ test("flags a sequential scan of a relation large enough to matter", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const flagged = tree.nodes.filter(isFlaggedFullScan);++ // `orders` at 819 is flagged; `customers` at 78 is a tiny relation.+ expect(flagged.map((entry) => entry.subject)).toEqual(["orders"]);+ });++ test("leaves a scan of a tiny relation alone", () => {+ const tree = parseFixture(seqScanFilter);+ expect(tree.root.totalCost).toBe(90.5);+ expect(isFlaggedFullScan(tree.root)).toBe(false);+ });++ test("flags the parallel variant and no other scan type", () => {+ const scan = (nodeType: string) => node("0", { nodeType, totalCost: 5000 });++ expect(isFlaggedFullScan(scan("Seq Scan"))).toBe(true);+ expect(isFlaggedFullScan(scan("Parallel Seq Scan"))).toBe(true);+ expect(isFlaggedFullScan(scan("Index Scan"))).toBe(false);+ expect(isFlaggedFullScan(scan("Bitmap Heap Scan"))).toBe(false);+ });+});++describe("planTimeline", () => {+ test("spans each node from its startup cost to its total cost", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const rows = planTimeline(tree);+ const basis = tree.costBasis;++ expect(rows.map((row) => row.node.id)).toEqual(+ tree.nodes.map((entry) => entry.id)+ );++ const join = rows[2];+ expect(join.node.nodeType).toBe("Hash Join");+ expect(join.start).toBeCloseTo(140.5 / basis, 6);+ expect(join.end).toBeCloseTo(1090.86 / basis, 6);+ expect(join.share).toBeCloseTo(193.86 / basis, 6);+ });++ test("keeps every span inside the axis, Limit plans included", () => {+ for (const fixture of [+ hashJoinAggregateSort,+ cteNestedLoopInitplan,+ seqScanFilter,+ ]) {+ for (const row of planTimeline(parseFixture(fixture))) {+ expect(row.start).toBeGreaterThanOrEqual(0);+ expect(row.end).toBeLessThanOrEqual(1);+ expect(row.end).toBeGreaterThanOrEqual(row.start);+ }+ }+ });++ test("carries the nesting depth so the rows can be indented", () => {+ const tree = parseFixture(cteNestedLoopInitplan);+ expect(planTimeline(tree).map((row) => row.depth)).toEqual([+ 0, 1, 2, 1, 2, 2,+ ]);+ });++ test("collapses to the origin when the planner costs the plan at zero", () => {+ const tree = buildPlanTree(node("0", {}, [node("0.0")]));+ expect(planTimeline(tree)).toEqual([+ {+ node: tree.nodes[0],+ depth: 0,+ branchContinues: [],+ start: 0,+ end: 0,+ share: 0,+ },+ {+ node: tree.nodes[1],+ depth: 1,+ branchContinues: [false],+ start: 0,+ end: 0,+ share: 0,+ },+ ]);+ });+});++describe("planCostliestNodes", () => {+ test("ranks by the cost a node adds on top of its children", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ expect(+ planCostliestNodes(tree).map((entry) => [entry.nodeType, entry.subject])+ ).toEqual([+ ["Seq Scan", "orders"],+ ["HashAggregate", "c.region"],+ ["Hash Join", "(o.customer_id = c.id)"],+ ["Seq Scan", "customers"],+ ["Sort", "(count(*)) DESC"],+ ]);+ });++ test("leaves out nodes that add nothing and honours the limit", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ // The Hash node's total equals the scan it hashes, so it adds nothing.+ expect(planCostliestNodes(tree, 10)).toHaveLength(5);+ expect(planCostliestNodes(tree, 2).map((entry) => entry.id)).toEqual([+ "0.0.0.0",+ "0.0",+ ]);+ });++ test("is empty for a plan the planner costs at nothing", () => {+ expect(planCostliestNodes(buildPlanTree(node("0")))).toEqual([]);+ });+});++describe("planCostByOperation", () => {+ test("sums each node type's own cost and ranks the types", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const operations = planCostByOperation(tree);++ expect(operations.map((entry) => entry.nodeType)).toEqual([+ "Seq Scan",+ "HashAggregate",+ "Hash Join",+ "Sort",+ "Hash",+ ]);+ expect(operations[0]).toMatchObject({ nodeType: "Seq Scan", count: 2 });+ expect(operations[0].selfCost).toBeCloseTo(897, 5);+ expect(operations[0].share).toBeCloseTo(897 / 1465.93, 6);+ expect(operations.reduce((sum, entry) => sum + entry.count, 0)).toBe(+ tree.nodes.length+ );+ });++ test("lists a zero-cost plan's operations without a share", () => {+ const tree = buildPlanTree(+ node("0", { nodeType: "Limit" }, [node("0.0", { nodeType: "Seq Scan" })])+ );+ expect(planCostByOperation(tree)).toEqual([+ { nodeType: "Limit", count: 1, selfCost: 0, share: 0 },+ { nodeType: "Seq Scan", count: 1, selfCost: 0, share: 0 },+ ]);+ });+});diff --git a/frontend/src/apps/explain-visualizer/plan-model.ts b/frontend/src/apps/explain-visualizer/plan-model.tsnew file mode 100644index 0000000000..531bb354c8--- /dev/null+++ b/frontend/src/apps/explain-visualizer/plan-model.ts@@ -0,0 +1,405 @@+/**+ * Engine-neutral query-plan shape rendered by the visualizer.+ *+ * Engine adapters map their own EXPLAIN output onto this model and the viewer+ * components read nothing else, so adding an engine means adding a parser.+ *+ * Bytebase runs EXPLAIN without ANALYZE, so every number here is a planner+ * estimate: there is no actual timing, loop, buffer, or worker data to model.+ */++/** One free-form attribute the engine reported for a node. */+export interface PlanProperty {+ readonly label: string;+ readonly value: string;+}++export interface PlanNode {+ /** Unique within one tree; derived from the node's path from the root. */+ readonly id: string;+ /** Operation name, such as "Seq Scan" or "Hash Join". */+ readonly nodeType: string;+ /** Table or index the operation reads, when the engine names one. */+ readonly subject?: string;+ /** How the parent consumes this node, such as "Inner" or "InitPlan 1". */+ readonly relationship?: string;+ readonly startupCost: number;+ readonly totalCost: number;+ /** Total cost minus the children's total cost, clamped at zero. */+ readonly selfCost: number;+ readonly rows: number;+ readonly width: number;+ readonly properties: readonly PlanProperty[];+ readonly children: readonly PlanNode[];+}++export interface PlanTree {+ readonly root: PlanNode;+ /** Every node in depth-first order, root first. */+ readonly nodes: readonly PlanNode[];+ readonly maxSelfCost: number;+ readonly maxRows: number;+ /**+ * The whole plan's cost: the denominator of every cost share and the maximum+ * of the summary timeline's axis.+ *+ * Normally this is the root's total cost, which by construction equals the+ * sum of every node's self cost. A node that stops its children early —+ * `Limit` is the common one — reports a total below its children's, and+ * `selfCost` clamps that difference at zero, so the self costs can add up to+ * more than the root reports. Taking the larger of the two keeps every share+ * at or below 100% and every timeline bar inside the axis.+ */+ readonly costBasis: number;+}++export type PlanParseResult =+ | { readonly ok: true; readonly tree: PlanTree }+ | { readonly ok: false; readonly message: string };++/** Which estimate, if any, shades the diagram's node cards. */+export type PlanHighlightMode = "off" | "cost" | "rows";++export function flattenPlan(root: PlanNode): PlanNode[] {+ const nodes: PlanNode[] = [];+ const visit = (node: PlanNode) => {+ nodes.push(node);+ for (const child of node.children) visit(child);+ };+ visit(root);+ return nodes;+}++export function buildPlanTree(root: PlanNode): PlanTree {+ const nodes = flattenPlan(root);+ let maxSelfCost = 0;+ let maxRows = 0;+ let selfCostTotal = 0;+ for (const node of nodes) {+ if (node.selfCost > maxSelfCost) maxSelfCost = node.selfCost;+ if (node.rows > maxRows) maxRows = node.rows;+ selfCostTotal += node.selfCost;+ }+ return {+ root,+ nodes,+ maxSelfCost,+ maxRows,+ costBasis: Math.max(root.totalCost, selfCostTotal),+ };+}++export interface PlanRow {+ readonly node: PlanNode;+ /** Distance from the root; 0 for the root itself. */+ readonly depth: number;+ /**+ * One entry per level between the root and this node, so `depth` of them:+ * whether the node on that level still has a sibling after it. The last+ * entry describes this node, the earlier ones its ancestors. A surface that+ * draws tree guides needs exactly this to know which connector lines carry+ * on past the row and which one turns into it.+ */+ readonly branchContinues: readonly boolean[];+}++/** Every node in plan order, each carrying how deep the planner nested it. */+export function planRows(root: PlanNode): PlanRow[] {+ const rows: PlanRow[] = [];+ const branch: boolean[] = [];+ const visit = (node: PlanNode) => {+ rows.push({ node, depth: branch.length, branchContinues: [...branch] });+ const last = node.children.length - 1;+ node.children.forEach((child, index) => {+ branch.push(index < last);+ visit(child);+ branch.pop();+ });+ };+ visit(root);+ return rows;+}++export function findPlanNode(+ tree: PlanTree,+ id: string | undefined+): PlanNode | undefined {+ if (id === undefined) return undefined;+ return tree.nodes.find((node) => node.id === id);+}++/** How many nodes sit below this one, at any depth. */+export function planDescendantCount(node: PlanNode): number {+ let count = 0;+ for (const child of node.children) count += 1 + planDescendantCount(child);+ return count;+}++/** The chain from the root down to `id`, or undefined when it is not in it. */+function planPath(root: PlanNode, id: string): PlanNode[] | undefined {+ const path: PlanNode[] = [];+ const visit = (node: PlanNode): boolean => {+ path.push(node);+ if (node.id === id) return true;+ for (const child of node.children) {+ if (visit(child)) return true;+ }+ path.pop();+ return false;+ };+ return visit(root) ? path : undefined;+}++/**+ * The collapsed node standing in for `id` on screen, or undefined when `id` is+ * on screen itself.+ *+ * Only strict ancestors hide a node — a collapsed node still shows its own+ * card — and the outermost one wins, since a collapse nested inside another+ * collapse is hidden along with everything else beneath it.+ */+export function planCollapsedAncestor(+ root: PlanNode,+ collapsed: ReadonlySet<string>,+ id: string | undefined+): PlanNode | undefined {+ if (id === undefined || collapsed.size === 0) return undefined;+ const path = planPath(root, id);+ if (!path) return undefined;+ return path.slice(0, -1).find((node) => collapsed.has(node.id));+}++/**+ * `collapsed` with every collapse that hides `id` opened, so the node has a+ * card of its own again. Returns the argument unchanged when nothing hid it,+ * so a caller can use the result as its next state without a needless render.+ */+export function planRevealNode(+ root: PlanNode,+ collapsed: ReadonlySet<string>,+ id: string | undefined+): ReadonlySet<string> {+ if (id === undefined || collapsed.size === 0) return collapsed;+ const path = planPath(root, id);+ if (!path) return collapsed;+ const hiding = path.slice(0, -1).filter((node) => collapsed.has(node.id));+ if (hiding.length === 0) return collapsed;+ const next = new Set(collapsed);+ for (const node of hiding) next.delete(node.id);+ return next;+}++/**+ * The URL fragment naming a plan node, which is what makes one shareable.+ *+ * Ids come from a parser rather than from the user, but they are not promised+ * to stay bare digits and dots, so they are escaped both ways.+ */+const NODE_FRAGMENT_PREFIX = "node-";++export function planNodeFragment(id: string): string {+ return `#${NODE_FRAGMENT_PREFIX}${encodeURIComponent(id)}`;+}++/** The node id a fragment names, or undefined when it names something else. */+export function planNodeIdFromFragment(+ fragment: string | undefined+): string | undefined {+ if (!fragment) return undefined;+ const body = fragment.startsWith("#") ? fragment.slice(1) : fragment;+ if (!body.startsWith(NODE_FRAGMENT_PREFIX)) return undefined;+ const id = body.slice(NODE_FRAGMENT_PREFIX.length);+ if (!id) return undefined;+ try {+ return decodeURIComponent(id);+ } catch {+ // A hand-edited fragment can hold a stray percent sign, which is a bad+ // fragment rather than a reason to fail the page.+ return undefined;+ }+}++// The standalone visualizer entry never initializes i18n, so number formatting+// is pinned to one locale rather than following the workspace language.+const costFormat = new Intl.NumberFormat("en-US", {+ maximumFractionDigits: 2,+});+const countFormat = new Intl.NumberFormat("en-US", {+ maximumFractionDigits: 0,+});++export function formatPlanCost(value: number): string {+ return costFormat.format(value);+}++export function formatPlanCount(value: number): string {+ return countFormat.format(value);+}++const shareFormat = new Intl.NumberFormat("en-US", {+ style: "percent",+ maximumFractionDigits: 1,+});++export function formatPlanShare(value: number): string {+ // A node that costs something must not read as costing nothing, however+ // small its share of the plan is.+ if (value > 0 && value < 0.001) return "<0.1%";+ return shareFormat.format(value);+}++/**+ * A node's self cost as a fraction of the whole plan's cost, from 0 to 1.+ *+ * A literal proportion, unlike `planHighlightIntensity`'s ramp: a bar drawn to+ * this length is read as a quantity, so it has to be one.+ */+export function planSelfCostShare(node: PlanNode, tree: PlanTree): number {+ if (tree.costBasis <= 0) return 0;+ return Math.min(1, Math.max(0, node.selfCost / tree.costBasis));+}++/** Narrowest and widest stroke a diagram edge is drawn with, in pixels. */+export const PLAN_EDGE_MIN_WIDTH = 1;+export const PLAN_EDGE_MAX_WIDTH = 6;++/**+ * How thick the edge carrying `rows` estimated rows to a parent should be.+ *+ * Row estimates within one plan run from a single row to millions, so the+ * scale is logarithmic; a linear one would draw everything but the largest+ * edge as the same hairline.+ */+export function planEdgeWidth(rows: number, tree: PlanTree): number {+ if (tree.maxRows <= 0 || rows <= 0) return PLAN_EDGE_MIN_WIDTH;+ const ratio =+ Math.log1p(Math.min(rows, tree.maxRows)) / Math.log1p(tree.maxRows);+ const width =+ PLAN_EDGE_MIN_WIDTH + ratio * (PLAN_EDGE_MAX_WIDTH - PLAN_EDGE_MIN_WIDTH);+ return Math.round(width * 100) / 100;+}++/**+ * Node types that read a whole relation, spelled as `toNodeType` names them.+ */+const FULL_RELATION_SCAN_TYPES = new Set(["Seq Scan", "Parallel Seq Scan"]);++/**+ * Total cost below which reading a whole relation is not worth flagging.+ *+ * Under PostgreSQL's default settings a sequential scan costs `seq_page_cost`+ * (1.0) per page plus `cpu_tuple_cost` (0.01) per row, so 100 cost units is+ * roughly a 50-page, 5,000-row relation — about 400 KB. Reading all of that is+ * a handful of page fetches that no index lookup would beat, and flagging it+ * would bury the scans a reader can act on.+ */+export const PLAN_FULL_SCAN_COST_THRESHOLD = 100;++/** What a flagged full scan means, shared by every surface that reports one. */+export const PLAN_FULL_SCAN_HINT =+ "Reads every row of this relation. If the query needs only a few of them, an index on the filtered columns could avoid the full read.";++/** Whether the node reads a whole relation large enough to be worth saying so. */+export function isFlaggedFullScan(node: PlanNode): boolean {+ return (+ FULL_RELATION_SCAN_TYPES.has(node.nodeType) &&+ node.totalCost >= PLAN_FULL_SCAN_COST_THRESHOLD+ );+}++export interface PlanTimelineRow extends PlanRow {+ /** Where the node's first row is ready, as a fraction of the plan's cost. */+ readonly start: number;+ /** Where the node's last row is ready, as a fraction of the plan's cost. */+ readonly end: number;+ /** The node's self cost as a fraction of the plan's cost. */+ readonly share: number;+}++/**+ * Every node as a span from its startup cost to its total cost.+ *+ * Both costs include the node's whole subtree, so a span says how much of the+ * plan's cost a node accounts for and how much of that is paid before its first+ * row. It is not a schedule: siblings each start from their own subtree's cost,+ * so two inputs of a join overlap on this axis while actually running one after+ * the other.+ */+export function planTimeline(tree: PlanTree): PlanTimelineRow[] {+ const fraction = (value: number) =>+ tree.costBasis <= 0 ? 0 : Math.min(1, Math.max(0, value / tree.costBasis));+ return planRows(tree.root).map((row) => {+ const start = fraction(row.node.startupCost);+ return {+ ...row,+ start,+ end: Math.max(start, fraction(row.node.totalCost)),+ share: planSelfCostShare(row.node, tree),+ };+ });+}++/** How many operators the summary names before it stops being a summary. */+export const PLAN_COSTLIEST_LIMIT = 5;++/**+ * The nodes that own the most cost, largest first. A node that adds nothing on+ * top of its children is not a cost the reader can go after, so it is left out.+ */+export function planCostliestNodes(+ tree: PlanTree,+ limit: number = PLAN_COSTLIEST_LIMIT+): PlanNode[] {+ return tree.nodes+ .filter((node) => node.selfCost > 0)+ .sort((a, b) => b.selfCost - a.selfCost)+ .slice(0, limit);+}++export interface PlanOperationCost {+ readonly nodeType: string;+ readonly count: number;+ readonly selfCost: number;+ readonly share: number;+}++/** Each node type in the plan with what it costs in total, largest first. */+export function planCostByOperation(tree: PlanTree): PlanOperationCost[] {+ const totals = new Map<string, { count: number; selfCost: number }>();+ for (const node of tree.nodes) {+ const entry = totals.get(node.nodeType) ?? { count: 0, selfCost: 0 };+ entry.count += 1;+ entry.selfCost += node.selfCost;+ totals.set(node.nodeType, entry);+ }+ return [...totals]+ .map(([nodeType, entry]) => ({+ nodeType,+ count: entry.count,+ selfCost: entry.selfCost,+ share:+ tree.costBasis <= 0 ? 0 : Math.min(1, entry.selfCost / tree.costBasis),+ }))+ .sort(+ (a, b) => b.selfCost - a.selfCost || a.nodeType.localeCompare(b.nodeType)+ );+}++/**+ * How strongly a node should be shaded, from 0 (no shading) to 1.+ *+ * Costs and row counts span orders of magnitude within one plan, so a linear+ * ramp leaves everything but the single worst node invisible. The square root+ * keeps the extremes ordered while giving mid-range nodes a readable tint.+ */+export function planHighlightIntensity(+ node: PlanNode,+ tree: PlanTree,+ mode: PlanHighlightMode+): number {+ if (mode === "off") return 0;+ const value = mode === "cost" ? node.selfCost : node.rows;+ const max = mode === "cost" ? tree.maxSelfCost : tree.maxRows;+ if (max <= 0 || value <= 0) return 0;+ return Math.sqrt(Math.min(value, max) / max);+}diff --git a/frontend/src/apps/explain-visualizer/plan-shared.tsx b/frontend/src/apps/explain-visualizer/plan-shared.tsxnew file mode 100644index 0000000000..9555021578--- /dev/null+++ b/frontend/src/apps/explain-visualizer/plan-shared.tsx@@ -0,0 +1,50 @@+import { cn } from "@/lib/utils";++/**+ * Small pieces the diagram, grid, summary and detail pane all draw, kept here+ * so the four surfaces cannot drift into showing the same thing differently.+ */++/** Estimates a phone-width reader can give up to keep the identity readable. */+export const SECONDARY_COLUMN_CLASS = "hidden sm:table-cell";++/**+ * A share of the plan's estimated cost, drawn as a proportion of a track.+ *+ * Decoration: every caller prints the same share, or the cost behind it, as+ * text beside the bar. `className` sizes the track; its height is fixed so the+ * surfaces stay comparable.+ */+export function PlanCostShareBar({+ share,+ className,+}: {+ share: number;+ className?: string;+}) {+ return (+ <span+ aria-hidden="true"+ className={cn(+ "h-1.5 overflow-hidden rounded-full bg-control-bg",+ className+ )}+ >+ <span+ data-testid="plan-cost-share-bar"+ className="block h-full rounded-full bg-warning"+ style={{ width: `${share * 100}%` }}+ />+ </span>+ );+}++/** One labelled estimate in a `<dl>` of them. */+export function PlanMetric({ label, value }: { label: string; value: string }) {+ return (+ <div className="flex min-w-32 flex-1 flex-col gap-1">+ <dt className="text-xs leading-4 text-control-light">{label}</dt>+ <dd className="text-sm leading-5 text-main tabular-nums">{value}</dd>+ </div>+ );+}diff --git a/frontend/src/apps/explain-visualizer/postgres-plan.test.ts b/frontend/src/apps/explain-visualizer/postgres-plan.test.tsnew file mode 100644index 0000000000..6cfc6c79c6--- /dev/null+++ b/frontend/src/apps/explain-visualizer/postgres-plan.test.ts@@ -0,0 +1,245 @@+import { describe, expect, test } from "vitest";+import type { PlanNode, PlanTree } from "./plan-model";+import {+ POSTGRES_PLAN_EMPTY_MESSAGE,+ POSTGRES_PLAN_INVALID_JSON_MESSAGE,+ POSTGRES_PLAN_NO_PLAN_MESSAGE,+ POSTGRES_PLAN_TOO_DEEP_MESSAGE,+ parsePostgresPlan,+} from "./postgres-plan";+import bitmapIndexScan from "./test-data/bitmap-index-scan.json";+import cteNestedLoopInitplan from "./test-data/cte-nested-loop-initplan.json";+import hashJoinAggregateSort from "./test-data/hash-join-aggregate-sort.json";+import seqScanFilter from "./test-data/seq-scan-filter.json";++/** A chain of `depth` nodes, the shape that drives every recursive walk. */+const nestedPlan = (depth: number): string => {+ let plan: Record<string, unknown> = { "Node Type": "Seq Scan" };+ for (let level = 1; level < depth; level += 1) {+ plan = { "Node Type": "Nested Loop", Plans: [plan] };+ }+ return JSON.stringify([{ Plan: plan }]);+};++const parseFixture = (fixture: unknown): PlanTree => {+ const result = parsePostgresPlan(JSON.stringify(fixture));+ if (!result.ok)+ throw new Error(`expected a parsable plan: ${result.message}`);+ return result.tree;+};++const propertyValue = (node: PlanNode, label: string): string | undefined =>+ node.properties.find((property) => property.label === label)?.value;++describe("parsePostgresPlan", () => {+ test("maps a single seq scan with a filter", () => {+ const { root, nodes } = parseFixture(seqScanFilter);++ expect(nodes).toHaveLength(1);+ expect(root).toMatchObject({+ id: "0",+ nodeType: "Seq Scan",+ subject: "customers",+ startupCost: 0,+ totalCost: 90.5,+ selfCost: 90.5,+ rows: 1667,+ width: 12,+ children: [],+ });+ expect(root.relationship).toBeUndefined();+ expect(propertyValue(root, "Filter")).toBe("(region = 'eu'::text)");+ expect(propertyValue(root, "Alias")).toBe("customers");+ });++ test("keeps typed fields out of the property list", () => {+ const { root } = parseFixture(seqScanFilter);+ const labels = root.properties.map((property) => property.label);++ expect(labels).not.toContain("Node Type");+ expect(labels).not.toContain("Total Cost");+ expect(labels).not.toContain("Plan Rows");+ expect(labels).not.toContain("Plan Width");+ expect(labels).not.toContain("Plans");+ });++ test("names an index scan by its index and charges cost to the node itself", () => {+ const { root, nodes } = parseFixture(bitmapIndexScan);+ const [, indexScan] = nodes;++ expect(nodes).toHaveLength(2);+ expect(root.nodeType).toBe("Bitmap Heap Scan");+ expect(root.subject).toBe("orders");+ expect(root.selfCost).toBeCloseTo(39.18 - 4.37, 5);+ expect(indexScan).toMatchObject({+ id: "0.0",+ nodeType: "Bitmap Index Scan",+ subject: "orders_customer_id_idx",+ relationship: "Outer",+ selfCost: 4.37,+ });+ expect(propertyValue(indexScan, "Index Cond")).toBe("(customer_id = 42)");+ });++ test("walks a hash join plan depth-first and joins list-valued properties", () => {+ const { nodes } = parseFixture(hashJoinAggregateSort);++ expect(nodes.map((node) => `${node.id} ${node.nodeType}`)).toEqual([+ "0 Sort",+ // PostgreSQL's JSON says Aggregate + Strategy: Hashed; its text format+ // calls the same node HashAggregate, and so do we.+ "0.0 HashAggregate",+ "0.0.0 Hash Join",+ "0.0.0.0 Seq Scan",+ "0.0.0.1 Hash",+ "0.0.0.1.0 Seq Scan",+ ]);+ expect(propertyValue(nodes[0], "Sort Key")).toBe("(count(*)) DESC");+ expect(propertyValue(nodes[1], "Group Key")).toBe("c.region");+ expect(propertyValue(nodes[2], "Hash Cond")).toBe("(o.customer_id = c.id)");+ expect(propertyValue(nodes[2], "Join Type")).toBe("Inner");+ expect(propertyValue(nodes[2], "Inner Unique")).toBe("true");+ });++ test("names nodes the way PostgreSQL's own text format does", () => {+ const node = (raw: Record<string, unknown>) => {+ const result = parsePostgresPlan(JSON.stringify([{ Plan: raw }]));+ if (!result.ok) throw new Error(result.message);+ return result.tree.root;+ };++ expect(+ node({ "Node Type": "Aggregate", Strategy: "Hashed" }).nodeType+ ).toBe("HashAggregate");+ expect(+ node({ "Node Type": "Aggregate", Strategy: "Sorted" }).nodeType+ ).toBe("GroupAggregate");+ expect(node({ "Node Type": "Aggregate", Strategy: "Plain" }).nodeType).toBe(+ "Aggregate"+ );+ expect(+ node({+ "Node Type": "Aggregate",+ Strategy: "Hashed",+ "Partial Mode": "Partial",+ }).nodeType+ ).toBe("Partial HashAggregate");+ expect(+ node({ "Node Type": "Seq Scan", "Parallel Aware": true }).nodeType+ ).toBe("Parallel Seq Scan");+ expect(+ node({ "Node Type": "Seq Scan", "Parallel Aware": false }).nodeType+ ).toBe("Seq Scan");+ expect(+ node({ "Node Type": "ModifyTable", Operation: "Update" }).nodeType+ ).toBe("Update");+ expect(+ node({ "Node Type": "SetOp", Strategy: "Hashed", Command: "Intersect" })+ .nodeType+ ).toBe("HashSetOp Intersect");+ expect(+ node({ "Node Type": "SetOp", Strategy: "Sorted", Command: "Except All" })+ .nodeType+ ).toBe("SetOp Except All");+ });++ test("falls back to the node's condition when it names no relation", () => {+ const { nodes } = parseFixture(hashJoinAggregateSort);+ const [sort, aggregate, hashJoin] = nodes;++ // None of these three name a table, so the card would otherwise be blank.+ expect(sort.subject).toBe("(count(*)) DESC");+ expect(aggregate.subject).toBe("c.region");+ expect(hashJoin.subject).toBe("(o.customer_id = c.id)");+ });++ test("charges each node only the cost its children do not explain", () => {+ const tree = parseFixture(hashJoinAggregateSort);+ const byId = new Map(tree.nodes.map((node) => [node.id, node]));++ // The Hash Join totals 1090.86 over a 819 scan and a 78 hash.+ expect(byId.get("0.0.0")?.selfCost).toBeCloseTo(1090.86 - 819 - 78, 5);+ // The leaf scan of `orders` therefore dominates the plan's own work.+ expect(tree.maxSelfCost).toBe(819);+ expect(tree.maxRows).toBe(50000);+ });++ test("labels an InitPlan subquery and a nested loop's inner side", () => {+ const { root, nodes } = parseFixture(cteNestedLoopInitplan);+ const byId = new Map(nodes.map((node) => [node.id, node]));++ expect(root.nodeType).toBe("Limit");+ expect(root.children).toHaveLength(2);+ expect(byId.get("0.0")?.relationship).toBe("InitPlan 1");+ expect(byId.get("0.1")?.nodeType).toBe("Nested Loop");+ expect(byId.get("0.1.1")).toMatchObject({+ nodeType: "Index Scan",+ subject: "customers",+ relationship: "Inner",+ });+ expect(propertyValue(byId.get("0.1.0") as PlanNode, "Filter")).toContain(+ "(InitPlan 1).col1"+ );+ });++ test("accepts a bare plan object as well as PostgreSQL's array wrapper", () => {+ const result = parsePostgresPlan(+ JSON.stringify({ Plan: { "Node Type": "Result", "Total Cost": 1 } })+ );++ expect(result.ok).toBe(true);+ expect(result.ok && result.tree.root.nodeType).toBe("Result");+ });++ test("defaults missing numbers and an unnamed node type", () => {+ const result = parsePostgresPlan(JSON.stringify([{ Plan: {} }]));++ expect(result.ok && result.tree.root).toMatchObject({+ nodeType: "Unknown",+ startupCost: 0,+ totalCost: 0,+ selfCost: 0,+ rows: 0,+ width: 0,+ });+ });++ test("parses a plan that arrives wrapped in other output", () => {+ const plan = JSON.stringify([{ Plan: { "Node Type": "Seq Scan" } }]);++ for (const wrapped of [+ `SET\nSET\n${plan}`,+ `${plan}\n(1 row)`,+ `QUERY PLAN\n----------\n${plan}\n`,+ ]) {+ const result = parsePostgresPlan(wrapped);+ expect(result.ok && result.tree.root.nodeType).toBe("Seq Scan");+ }+ });++ test.each([+ ["", POSTGRES_PLAN_EMPTY_MESSAGE],+ [" ", POSTGRES_PLAN_EMPTY_MESSAGE],+ ["Seq Scan on customers", POSTGRES_PLAN_INVALID_JSON_MESSAGE],+ ["[{", POSTGRES_PLAN_INVALID_JSON_MESSAGE],+ ["[]", POSTGRES_PLAN_NO_PLAN_MESSAGE],+ ["{}", POSTGRES_PLAN_NO_PLAN_MESSAGE],+ ['[{"Plan": "not an object"}]', POSTGRES_PLAN_NO_PLAN_MESSAGE],+ ])("rejects %j with a specific message", (source, message) => {+ expect(parsePostgresPlan(source)).toEqual({ ok: false, message });+ });++ test("reads a plan nested deeper than anything the planner produces", () => {+ const result = parsePostgresPlan(nestedPlan(100));+ expect(result.ok && result.tree.nodes).toHaveLength(100);+ });++ test("rejects a plan nested deeper than the walks over it can go", () => {+ // Past the cap, a plan is refused here rather than overflowing the stack+ // later, in a render with no error boundary over it.+ expect(parsePostgresPlan(nestedPlan(2000))).toEqual({+ ok: false,+ message: POSTGRES_PLAN_TOO_DEEP_MESSAGE,+ });+ });+});diff --git a/frontend/src/apps/explain-visualizer/postgres-plan.ts b/frontend/src/apps/explain-visualizer/postgres-plan.tsnew file mode 100644index 0000000000..24fb3d43e8--- /dev/null+++ b/frontend/src/apps/explain-visualizer/postgres-plan.ts@@ -0,0 +1,264 @@+import {+ buildPlanTree,+ type PlanNode,+ type PlanParseResult,+ type PlanProperty,+} from "./plan-model";++/**+ * Maps `EXPLAIN (FORMAT JSON)` output onto the engine-neutral plan model.+ *+ * PostgreSQL emits a one-element array whose element holds a `Plan` object;+ * children are nested under `Plans`. Every other key on a node is carried+ * through verbatim as a property so the detail pane stays useful when a future+ * server version reports something this file has never heard of.+ */++const NODE_TYPE_KEY = "Node Type";+const CHILDREN_KEY = "Plans";++/**+ * Keys the model promotes to typed fields. They are dropped from the property+ * list because the diagram and detail pane already render them.+ */+const PROMOTED_KEYS = new Set([+ NODE_TYPE_KEY,+ CHILDREN_KEY,+ "Startup Cost",+ "Total Cost",+ "Plan Rows",+ "Plan Width",+ "Parent Relationship",+ "Subplan Name",+]);++/**+ * Deepest plan this file will build.+ *+ * Both this parser and the model's walks (`flattenPlan`, `planRows`,+ * `planPath`) recurse once per level, so a pathological nesting depth+ * overflows the stack. Without a cap that happens during render, where there+ * is no error boundary to catch it and React unmounts the page instead of+ * showing the parse error. The cap is an order of magnitude below the depth+ * any of those walks fails at, and far above any plan PostgreSQL produces.+ */+const MAX_PLAN_DEPTH = 500;++export const POSTGRES_PLAN_EMPTY_MESSAGE =+ "PostgreSQL returned no query plan for this statement.";+export const POSTGRES_PLAN_INVALID_JSON_MESSAGE =+ "The query plan is not valid JSON. EXPLAIN (FORMAT JSON) output is expected.";+export const POSTGRES_PLAN_NO_PLAN_MESSAGE =+ 'The query plan JSON does not contain a "Plan" object.';+export const POSTGRES_PLAN_TOO_DEEP_MESSAGE = `The query plan nests more than ${MAX_PLAN_DEPTH} levels deep, which is deeper than this visualizer can draw.`;++/** Raised by `toPlanNode` and caught by `parsePostgresPlan` alone. */+const PLAN_TOO_DEEP = new Error(POSTGRES_PLAN_TOO_DEEP_MESSAGE);++type JsonRecord = Record<string, unknown>;++function isRecord(value: unknown): value is JsonRecord {+ return typeof value === "object" && value !== null && !Array.isArray(value);+}++function toNumber(value: unknown): number {+ if (typeof value === "number" && Number.isFinite(value)) return value;+ if (typeof value === "string") {+ const parsed = Number(value);+ if (Number.isFinite(parsed)) return parsed;+ }+ return 0;+}++function formatValue(value: unknown): string {+ if (value === null || value === undefined) return "";+ if (typeof value === "string") return value;+ if (typeof value === "number" || typeof value === "boolean") {+ return String(value);+ }+ if (Array.isArray(value)) {+ return value.map((entry) => formatValue(entry)).join(", ");+ }+ return JSON.stringify(value);+}++function toProperties(raw: JsonRecord): PlanProperty[] {+ const properties: PlanProperty[] = [];+ for (const [label, value] of Object.entries(raw)) {+ if (PROMOTED_KEYS.has(label)) continue;+ properties.push({ label, value: formatValue(value) });+ }+ return properties;+}++/**+ * Conditions worth putting on the card when the node names no relation, in the+ * order PostgreSQL itself prints them under a node. A join or sort says far more+ * through its condition than through its node type alone.+ */+const SUBJECT_CONDITION_KEYS = [+ "Hash Cond",+ "Merge Cond",+ "Join Filter",+ "Index Cond",+ "Recheck Cond",+ "TID Cond",+ "One-Time Filter",+ "Filter",+ "Sort Key",+ "Group Key",+ "Presorted Key",+] as const;++function toSubject(raw: JsonRecord): string | undefined {+ const relation = raw["Relation Name"];+ if (typeof relation === "string" && relation) return relation;+ const index = raw["Index Name"];+ if (typeof index === "string" && index) return index;+ const cte = raw["CTE Name"];+ if (typeof cte === "string" && cte) return cte;+ const fn = raw["Function Name"];+ if (typeof fn === "string" && fn) return fn;+ for (const key of SUBJECT_CONDITION_KEYS) {+ const value = raw[key];+ if (value === undefined || value === null) continue;+ const formatted = formatValue(value);+ if (formatted) return formatted;+ }+ return undefined;+}++/**+ * Node type as PostgreSQL itself would name it.+ *+ * The JSON format reports the bare node type plus modifier fields, while the+ * text format folds them into the name — an Aggregate with `Strategy: Hashed`+ * prints as "HashAggregate". Following the text format keeps the diagram's+ * vocabulary the same as every other tool and doc a reader has seen, and+ * distinguishes nodes that would otherwise all read "Aggregate".+ */+function toNodeType(raw: JsonRecord): string {+ const nodeType = raw[NODE_TYPE_KEY];+ if (typeof nodeType !== "string" || !nodeType) return "Unknown";++ let name = nodeType;+ const strategy = raw["Strategy"];+ if (nodeType === "Aggregate" || nodeType === "SetOp") {+ if (strategy === "Hashed") {+ name = nodeType === "Aggregate" ? "HashAggregate" : "HashSetOp";+ } else if (strategy === "Sorted" && nodeType === "Aggregate") {+ name = "GroupAggregate";+ } else if (strategy === "Mixed") {+ name = "MixedAggregate";+ }+ }++ // A ModifyTable is named after what it modifies: "Update", not "ModifyTable".+ if (nodeType === "ModifyTable") {+ const operation = raw["Operation"];+ if (typeof operation === "string" && operation) name = operation;+ }+ // A set operation is named with the set it computes: "HashSetOp Intersect".+ if (nodeType === "SetOp") {+ const command = raw["Command"];+ if (typeof command === "string" && command) name = `${name} ${command}`;+ }++ const partialMode = raw["Partial Mode"];+ if (partialMode === "Partial" || partialMode === "Finalize") {+ name = `${partialMode} ${name}`;+ }+ if (raw["Parallel Aware"] === true) {+ name = `Parallel ${name}`;+ }+ if (raw["Async Capable"] === true) {+ name = `Async ${name}`;+ }+ return name;+}++function toRelationship(raw: JsonRecord): string | undefined {+ const subplan = raw["Subplan Name"];+ if (typeof subplan === "string" && subplan) return subplan;+ const parent = raw["Parent Relationship"];+ if (typeof parent === "string" && parent) return parent;+ return undefined;+}++function toChildren(raw: JsonRecord, id: string, depth: number): PlanNode[] {+ const rawChildren = raw[CHILDREN_KEY];+ if (!Array.isArray(rawChildren)) return [];+ return rawChildren+ .filter(isRecord)+ .map((child, index) => toPlanNode(child, `${id}.${index}`, depth + 1));+}++function toPlanNode(raw: JsonRecord, id: string, depth: number): PlanNode {+ if (depth > MAX_PLAN_DEPTH) throw PLAN_TOO_DEEP;+ const children = toChildren(raw, id, depth);+ const totalCost = toNumber(raw["Total Cost"]);+ const childCost = children.reduce((sum, child) => sum + child.totalCost, 0);+ return {+ id,+ nodeType: toNodeType(raw),+ subject: toSubject(raw),+ relationship: toRelationship(raw),+ startupCost: toNumber(raw["Startup Cost"]),+ totalCost,+ selfCost: Math.max(0, totalCost - childCost),+ rows: toNumber(raw["Plan Rows"]),+ width: toNumber(raw["Plan Width"]),+ properties: toProperties(raw),+ children,+ };+}++/** The text between the first `[`/`{` and the last `]`/`}`, when both exist. */+function extractBracketedSpan(source: string): string | undefined {+ const starts = [source.indexOf("["), source.indexOf("{")].filter(+ (i) => i >= 0+ );+ const ends = [source.lastIndexOf("]"), source.lastIndexOf("}")];+ const start = Math.min(...starts);+ const end = Math.max(...ends);+ if (starts.length === 0 || end <= start) return undefined;+ return source.slice(start, end + 1);+}++export function parsePostgresPlan(source: string): PlanParseResult {+ const trimmed = source.trim();+ if (!trimmed) {+ return { ok: false, message: POSTGRES_PLAN_EMPTY_MESSAGE };+ }++ let parsed: unknown;+ try {+ parsed = JSON.parse(trimmed);+ } catch {+ // A plan can arrive with something wrapped around it — a psql command tag,+ // a copied prompt line, a trailing "(1 row)". Retry on the span between the+ // outermost brackets before giving up, so noise around the plan does not+ // cost the user the diagram.+ const embedded = extractBracketedSpan(trimmed);+ if (embedded === undefined) {+ return { ok: false, message: POSTGRES_PLAN_INVALID_JSON_MESSAGE };+ }+ try {+ parsed = JSON.parse(embedded);+ } catch {+ return { ok: false, message: POSTGRES_PLAN_INVALID_JSON_MESSAGE };+ }+ }++ const entry = Array.isArray(parsed) ? parsed[0] : parsed;+ if (!isRecord(entry) || !isRecord(entry["Plan"])) {+ return { ok: false, message: POSTGRES_PLAN_NO_PLAN_MESSAGE };+ }++ try {+ return { ok: true, tree: buildPlanTree(toPlanNode(entry["Plan"], "0", 0)) };+ } catch (error) {+ if (error !== PLAN_TOO_DEEP) throw error;+ return { ok: false, message: POSTGRES_PLAN_TOO_DEEP_MESSAGE };+ }+}diff --git a/frontend/src/apps/explain-visualizer/test-data/README.md b/frontend/src/apps/explain-visualizer/test-data/README.mdnew file mode 100644index 0000000000..e2cf1f3ff2--- /dev/null+++ b/frontend/src/apps/explain-visualizer/test-data/README.md@@ -0,0 +1,23 @@+# Plan test data++Real `EXPLAIN (FORMAT JSON)` output, captured from PostgreSQL 17 against a seeded+schema, one file per plan shape. The tests in this directory parse these instead+of hand-written JSON so the parser is pinned to what the server actually emits —+including the fields nobody thinks to invent, such as `Parent Relationship`,+`Subplan Name`, `Strategy` and `Partial Mode`.++| File | Shape it covers |+| --- | --- |+| `seq-scan-filter.json` | A single node with a filter — the smallest real plan |+| `bitmap-index-scan.json` | An index path: bitmap heap scan over a bitmap index scan |+| `hash-join-aggregate-sort.json` | Hash join under a hashed aggregate under a sort |+| `cte-nested-loop-initplan.json` | A CTE, a nested loop, an InitPlan subquery and a limit |++To add one, run the query against PostgreSQL and save the output verbatim:++```bash+psql -At -c "EXPLAIN (FORMAT JSON) <query>" > <shape>.json+```++Keep them verbatim. Editing one to make a test pass defeats the point of+capturing it.diff --git a/frontend/src/apps/explain-visualizer/test-data/bitmap-index-scan.json b/frontend/src/apps/explain-visualizer/test-data/bitmap-index-scan.jsonnew file mode 100644index 0000000000..651498e229--- /dev/null+++ b/frontend/src/apps/explain-visualizer/test-data/bitmap-index-scan.json@@ -0,0 +1,30 @@+[+ {+ "Plan": {+ "Node Type": "Bitmap Heap Scan",+ "Parallel Aware": false,+ "Async Capable": false,+ "Relation Name": "orders",+ "Alias": "o",+ "Startup Cost": 4.37,+ "Total Cost": 39.18,+ "Plan Rows": 10,+ "Plan Width": 20,+ "Recheck Cond": "(customer_id = 42)",+ "Plans": [+ {+ "Node Type": "Bitmap Index Scan",+ "Parent Relationship": "Outer",+ "Parallel Aware": false,+ "Async Capable": false,+ "Index Name": "orders_customer_id_idx",+ "Startup Cost": 0.0,+ "Total Cost": 4.37,+ "Plan Rows": 10,+ "Plan Width": 0,+ "Index Cond": "(customer_id = 42)"+ }+ ]+ }+ }+]diff --git a/frontend/src/apps/explain-visualizer/test-data/cte-nested-loop-initplan.json b/frontend/src/apps/explain-visualizer/test-data/cte-nested-loop-initplan.jsonnew file mode 100644index 0000000000..89449a3a6c--- /dev/null+++ b/frontend/src/apps/explain-visualizer/test-data/cte-nested-loop-initplan.json@@ -0,0 +1,84 @@+[+ {+ "Plan": {+ "Node Type": "Limit",+ "Parallel Aware": false,+ "Async Capable": false,+ "Startup Cost": 944.3,+ "Total Cost": 979.51,+ "Plan Rows": 10,+ "Plan Width": 9,+ "Plans": [+ {+ "Node Type": "Aggregate",+ "Strategy": "Plain",+ "Partial Mode": "Simple",+ "Parent Relationship": "InitPlan",+ "Subplan Name": "InitPlan 1",+ "Parallel Aware": false,+ "Async Capable": false,+ "Startup Cost": 944.0,+ "Total Cost": 944.01,+ "Plan Rows": 1,+ "Plan Width": 32,+ "Plans": [+ {+ "Node Type": "Seq Scan",+ "Parent Relationship": "Outer",+ "Parallel Aware": false,+ "Async Capable": false,+ "Relation Name": "orders",+ "Alias": "orders_1",+ "Startup Cost": 0.0,+ "Total Cost": 819.0,+ "Plan Rows": 50000,+ "Plan Width": 4+ }+ ]+ },+ {+ "Node Type": "Nested Loop",+ "Parent Relationship": "Outer",+ "Parallel Aware": false,+ "Async Capable": false,+ "Join Type": "Inner",+ "Startup Cost": 0.28,+ "Total Cost": 1634.2,+ "Plan Rows": 464,+ "Plan Width": 9,+ "Inner Unique": true,+ "Plans": [+ {+ "Node Type": "Seq Scan",+ "Parent Relationship": "Outer",+ "Parallel Aware": false,+ "Async Capable": false,+ "Relation Name": "orders",+ "Alias": "orders",+ "Startup Cost": 0.0,+ "Total Cost": 1319.0,+ "Plan Rows": 464,+ "Plan Width": 8,+ "Filter": "((total > (InitPlan 1).col1) AND (created_at > (now() - '1 day'::interval)))"+ },+ {+ "Node Type": "Index Scan",+ "Parent Relationship": "Inner",+ "Parallel Aware": false,+ "Async Capable": false,+ "Scan Direction": "Forward",+ "Index Name": "customers_pkey",+ "Relation Name": "customers",+ "Alias": "c",+ "Startup Cost": 0.28,+ "Total Cost": 0.68,+ "Plan Rows": 1,+ "Plan Width": 9,+ "Index Cond": "(id = orders.customer_id)"+ }+ ]+ }+ ]+ }+ }+]diff --git a/frontend/src/apps/explain-visualizer/test-data/hash-join-aggregate-sort.json b/frontend/src/apps/explain-visualizer/test-data/hash-join-aggregate-sort.jsonnew file mode 100644index 0000000000..f204f1d6ce--- /dev/null+++ b/frontend/src/apps/explain-visualizer/test-data/hash-join-aggregate-sort.json@@ -0,0 +1,83 @@+[+ {+ "Plan": {+ "Node Type": "Sort",+ "Parallel Aware": false,+ "Async Capable": false,+ "Startup Cost": 1465.92,+ "Total Cost": 1465.93,+ "Plan Rows": 3,+ "Plan Width": 43,+ "Sort Key": ["(count(*)) DESC"],+ "Plans": [+ {+ "Node Type": "Aggregate",+ "Strategy": "Hashed",+ "Partial Mode": "Simple",+ "Parent Relationship": "Outer",+ "Parallel Aware": false,+ "Async Capable": false,+ "Startup Cost": 1465.86,+ "Total Cost": 1465.9,+ "Plan Rows": 3,+ "Plan Width": 43,+ "Group Key": ["c.region"],+ "Planned Partitions": 0,+ "Plans": [+ {+ "Node Type": "Hash Join",+ "Parent Relationship": "Outer",+ "Parallel Aware": false,+ "Async Capable": false,+ "Join Type": "Inner",+ "Startup Cost": 140.5,+ "Total Cost": 1090.86,+ "Plan Rows": 50000,+ "Plan Width": 7,+ "Inner Unique": true,+ "Hash Cond": "(o.customer_id = c.id)",+ "Plans": [+ {+ "Node Type": "Seq Scan",+ "Parent Relationship": "Outer",+ "Parallel Aware": false,+ "Async Capable": false,+ "Relation Name": "orders",+ "Alias": "o",+ "Startup Cost": 0.0,+ "Total Cost": 819.0,+ "Plan Rows": 50000,+ "Plan Width": 8+ },+ {+ "Node Type": "Hash",+ "Parent Relationship": "Inner",+ "Parallel Aware": false,+ "Async Capable": false,+ "Startup Cost": 78.0,+ "Total Cost": 78.0,+ "Plan Rows": 5000,+ "Plan Width": 7,+ "Plans": [+ {+ "Node Type": "Seq Scan",+ "Parent Relationship": "Outer",+ "Parallel Aware": false,+ "Async Capable": false,+ "Relation Name": "customers",+ "Alias": "c",+ "Startup Cost": 0.0,+ "Total Cost": 78.0,+ "Plan Rows": 5000,+ "Plan Width": 7+ }+ ]+ }+ ]+ }+ ]+ }+ ]+ }+ }+]diff --git a/frontend/src/apps/explain-visualizer/test-data/seq-scan-filter.json b/frontend/src/apps/explain-visualizer/test-data/seq-scan-filter.jsonnew file mode 100644index 0000000000..59048ec544--- /dev/null+++ b/frontend/src/apps/explain-visualizer/test-data/seq-scan-filter.json@@ -0,0 +1,16 @@+[+ {+ "Plan": {+ "Node Type": "Seq Scan",+ "Parallel Aware": false,+ "Async Capable": false,+ "Relation Name": "customers",+ "Alias": "customers",+ "Startup Cost": 0.0,+ "Total Cost": 90.5,+ "Plan Rows": 1667,+ "Plan Width": 12,+ "Filter": "(region = 'eu'::text)"+ }+ }+]diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex ce8694e274..e75ddf13cf 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -3338,6 +3338,8 @@"view-issue": "View issue","view-schema-text": "View schema text","visualize-explain": "Visualize Explain",+ "visualize-explain-blocked": "The query plan tab was blocked. Allow pop-ups for this site and try again.",+ "visualize-explain-failed": "Failed to load the query plan","web-socket": {"connection-status": {"connected": "connected",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex d3533977ea..7a9d6892a9 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -3338,6 +3338,8 @@"view-issue": "Ver issue","view-schema-text": "Ver texto del esquema","visualize-explain": "Visualizar explicación",+ "visualize-explain-blocked": "Se bloqueó la pestaña del plan de consulta. Permite las ventanas emergentes de este sitio e inténtalo de nuevo.",+ "visualize-explain-failed": "No se pudo cargar el plan de consulta","web-socket": {"connection-status": {"connected": "conectado",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 5040a6565c..68b7dc6ebf 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -3338,6 +3338,8 @@"view-issue": "Issue を表示","view-schema-text": "テキストの表示 スキーマ","visualize-explain": "視覚化の説明",+ "visualize-explain-blocked": "クエリプランのタブがブロックされました。このサイトのポップアップを許可して再試行してください。",+ "visualize-explain-failed": "クエリプランの読み込みに失敗しました","web-socket": {"connection-status": {"connected": "接続済み",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex e2395f9871..33404aa9d0 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -3338,6 +3338,8 @@"view-issue": "Xem Issue","view-schema-text": "Xem văn bản lược đồ","visualize-explain": "Trực quan hóa Giải thích",+ "visualize-explain-blocked": "Tab kế hoạch truy vấn đã bị chặn. Hãy cho phép cửa sổ bật lên cho trang này và thử lại.",+ "visualize-explain-failed": "Không tải được kế hoạch truy vấn","web-socket": {"connection-status": {"connected": "đã kết nối",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 3dffd56481..be122b5fde 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -3338,6 +3338,8 @@"view-issue": "查看工单","view-schema-text": "查看文本 Schema","visualize-explain": "可视化 Explain",+ "visualize-explain-blocked": "查询计划标签页被拦截。请允许本站弹出窗口后重试。",+ "visualize-explain-failed": "加载查询计划失败","web-socket": {"connection-status": {"connected": "已连接",diff --git a/frontend/src/modules/sql-editor/components/ResultView/ResultView.tsx b/frontend/src/modules/sql-editor/components/ResultView/ResultView.tsxindex f075620fc5..66edd7ff0a 100644--- a/frontend/src/modules/sql-editor/components/ResultView/ResultView.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/ResultView.tsx@@ -333,6 +333,7 @@ export function ResultView({params={executeParams}database={database}result={result}+ resultIndex={resultSet.results.indexOf(result)}showExport={false}maximumExportCount={queryDataPolicy?.maximumResultRows}onExport={handleExport}diff --git a/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.test.tsx b/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.test.tsxindex 4e14211fd9..027472f78e 100644--- a/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.test.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.test.tsx@@ -6,6 +6,7 @@ import type { SQLEditorQueryParams } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import type { Database } from "@/types/proto-es/v1/database_service_pb";import {+ QueryOption_ExplainFormat,QueryResultSchema,QueryRowSchema,RowValueSchema,@@ -98,8 +99,14 @@ vi.mock("@/components/monaco/MonacoEditor", () => ({},}));+const { createExplainToken, notify, runQuery } = vi.hoisted(() => ({+ createExplainToken: vi.fn(() => "explain-token"),+ notify: vi.fn(),+ runQuery: vi.fn(),+}));+vi.mock("@/hooks/useExecuteSQL", () => ({- useExecuteSQL: () => ({ runQuery: vi.fn() }),+ useExecuteSQL: () => ({ runQuery }),}));vi.mock("@/lib/clipboard", () => ({@@ -197,12 +204,12 @@ vi.mock("@/modules/sql-editor/store/tab", () => ({vi.mock("@/stores/app", () => ({useAppStore: {- getState: () => ({ notify: vi.fn() }),+ getState: () => ({ notify }),},}));-vi.mock("@/utils/pev2", () => ({- createExplainToken: vi.fn(),+vi.mock("@/utils/explainToken", () => ({+ createExplainToken,}));vi.mock("@/utils/util", () => ({@@ -249,7 +256,21 @@ vi.mock("./ErrorView", () => ({vi.mock("./ResultStatusBar", () => ({formatQueryTime: () => "-",- ResultStatusBar: () => <div data-testid="result-status" />,+ ResultStatusBar: ({+ showVisualizeButton,+ onVisualizeExplain,+ }: {+ showVisualizeButton?: boolean;+ onVisualizeExplain?: () => void;+ }) => (+ <div data-testid="result-status">+ {showVisualizeButton ? (+ <button type="button" onClick={onVisualizeExplain}>+ visualize-explain+ </button>+ ) : null}+ </div>+ ),}));vi.mock("./SelectionCopyTooltips", () => ({@@ -576,3 +597,226 @@ describe("SingleResultView document view", () => {expect(screen.getByTestId("result-table")).toHaveTextContent("hits");});});++describe("SingleResultView explain visualizer", () => {+ beforeEach(() => {+ createExplainToken.mockClear();+ notify.mockClear();+ runQuery.mockReset();+ });++ test("PostgreSQL asks for the JSON plan instead of reusing the text plan", async () => {+ const openSpy = vi.spyOn(window, "open").mockReturnValue(null);+ const planJSON = '[{"Plan": {"Node Type": "Seq Scan"}}]';+ runQuery.mockImplementation(+ async (+ _database: unknown,+ context: {+ resultSet?: { results: unknown[] };+ }+ ) => {+ context.resultSet = {+ results: [+ create(QueryResultSchema, {+ statement: "SELECT 1",+ rows: [+ create(QueryRowSchema, {+ values: [+ create(RowValueSchema, {+ kind: { case: "stringValue", value: planJSON },+ }),+ ],+ }),+ ],+ }),+ ],+ };+ }+ );++ render(+ <SingleResultView+ disallowCopyingData={false}+ params={{ ...params, engine: Engine.POSTGRES, explain: true }}+ database={databaseForEngine(Engine.POSTGRES)}+ result={create(QueryResultSchema, {+ columnNames: ["QUERY PLAN"],+ columnTypeNames: ["TEXT"],+ statement: "SELECT 1",+ rows: [+ create(QueryRowSchema, {+ values: [+ create(RowValueSchema, {+ kind: { case: "stringValue", value: "Seq Scan on t" },+ }),+ ],+ }),+ ],+ })}+ showExport={false}+ />+ );++ fireEvent.click(screen.getByText("visualize-explain"));++ await waitFor(() => expect(openSpy).toHaveBeenCalled());+ expect(runQuery).toHaveBeenCalledTimes(1);+ expect(+ runQuery.mock.calls[0][1].params.queryOption?.explainFormat+ ).toBe(QueryOption_ExplainFormat.JSON);+ expect(createExplainToken).toHaveBeenCalledWith({+ statement: "SELECT 1",+ explain: planJSON,+ engine: Engine.POSTGRES,+ });+ expect(openSpy).toHaveBeenCalledWith(+ "/explain-visualizer.html?token=explain-token",+ "_blank"+ );+ openSpy.mockRestore();+ });++ test("re-runs for the tab the user clicked, not the first result", async () => {+ const openSpy = vi.spyOn(window, "open").mockReturnValue(null);+ runQuery.mockImplementation(+ async (_database: unknown, context: { resultSet?: { results: unknown[] } }) => {+ const plan = (name: string) =>+ create(QueryResultSchema, {+ statement: name,+ rows: [+ create(QueryRowSchema, {+ values: [+ create(RowValueSchema, {+ kind: { case: "stringValue", value: `plan of ${name}` },+ }),+ ],+ }),+ ],+ });+ context.resultSet = { results: [plan("first"), plan("second")] };+ }+ );++ render(+ <SingleResultView+ disallowCopyingData={false}+ params={{ ...params, engine: Engine.POSTGRES, explain: true }}+ database={databaseForEngine(Engine.POSTGRES)}+ result={create(QueryResultSchema, {+ columnNames: ["QUERY PLAN"],+ columnTypeNames: ["TEXT"],+ statement: "second",+ rows: [+ create(QueryRowSchema, {+ values: [+ create(RowValueSchema, {+ kind: { case: "stringValue", value: "Seq Scan on t" },+ }),+ ],+ }),+ ],+ })}+ resultIndex={1}+ showExport={false}+ />+ );++ fireEvent.click(screen.getByText("visualize-explain"));++ await waitFor(() => expect(createExplainToken).toHaveBeenCalled());+ expect(createExplainToken).toHaveBeenCalledWith({+ statement: "second",+ explain: "plan of second",+ engine: Engine.POSTGRES,+ });+ openSpy.mockRestore();+ });++ test("reports a blocked pop-up instead of doing nothing", async () => {+ const openSpy = vi.spyOn(window, "open").mockReturnValue(null);+ runQuery.mockImplementation(+ async (_database: unknown, context: { resultSet?: { results: unknown[] } }) => {+ context.resultSet = {+ results: [+ create(QueryResultSchema, {+ statement: "SELECT 1",+ rows: [+ create(QueryRowSchema, {+ values: [+ create(RowValueSchema, {+ kind: { case: "stringValue", value: "[]" },+ }),+ ],+ }),+ ],+ }),+ ],+ };+ }+ );++ render(+ <SingleResultView+ disallowCopyingData={false}+ params={{ ...params, engine: Engine.POSTGRES, explain: true }}+ database={databaseForEngine(Engine.POSTGRES)}+ result={create(QueryResultSchema, {+ columnNames: ["QUERY PLAN"],+ columnTypeNames: ["TEXT"],+ statement: "SELECT 1",+ rows: [+ create(QueryRowSchema, {+ values: [+ create(RowValueSchema, {+ kind: { case: "stringValue", value: "Seq Scan on t" },+ }),+ ],+ }),+ ],+ })}+ showExport={false}+ />+ );++ fireEvent.click(screen.getByText("visualize-explain"));++ await waitFor(() => expect(notify).toHaveBeenCalled());+ expect(notify.mock.calls[0][0].title).toBe(+ "sql-editor.visualize-explain-blocked"+ );+ openSpy.mockRestore();+ });++ test("Spanner reuses the plan already in the result", async () => {+ const openSpy = vi.spyOn(window, "open").mockReturnValue(null);++ render(+ <SingleResultView+ disallowCopyingData={false}+ params={{ ...params, engine: Engine.SPANNER, explain: true }}+ database={databaseForEngine(Engine.SPANNER)}+ result={create(QueryResultSchema, {+ columnNames: ["QUERY PLAN"],+ columnTypeNames: ["JSON"],+ statement: "SELECT 1",+ rows: [+ create(QueryRowSchema, {+ values: [+ create(RowValueSchema, {+ kind: { case: "stringValue", value: '{"planNodes":[]}' },+ }),+ ],+ }),+ ],+ })}+ showExport={false}+ />+ );++ fireEvent.click(screen.getByText("visualize-explain"));++ await waitFor(() => expect(openSpy).toHaveBeenCalled());+ expect(runQuery).not.toHaveBeenCalled();+ openSpy.mockRestore();+ });+});diff --git a/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.tsx b/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.tsxindex 9c5871fa7f..014bb1e48f 100644--- a/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.tsx@@ -36,6 +36,7 @@ import { cn } from "@/lib/utils";import { useSQLEditorQueryDataPolicy } from "@/modules/sql-editor/hooks/useSQLEditorState";import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import { useSQLEditorTabState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type {SQLEditorDatabaseQueryContext,SQLEditorQueryParams,@@ -43,11 +44,11 @@ import type {import { Engine, ExportFormat } from "@/types/proto-es/v1/common_pb";import type { Database } from "@/types/proto-es/v1/database_service_pb";import {- QueryOption_MSSQLExplainFormat,+ QueryOption_ExplainFormat,QueryOptionSchema,type QueryResult,} from "@/types/proto-es/v1/sql_service_pb";-import { createExplainToken } from "@/utils/pev2";+import { createExplainToken } from "@/utils/explainToken";import {flattenElasticsearchSearchResult,flattenNoSQLQueryResult,@@ -88,6 +89,9 @@ export interface SingleResultViewProps {params: SQLEditorQueryParams;database: Database;result: QueryResult;+ // Which statement of a multi-statement run this view shows. Visualize re-runs+ // the whole statement and has to pick the same one back out.+ resultIndex?: number;showExport: boolean;// Optional tooltip shown on the export button — used to explain when the// export is enabled by a JIT access grant despite the policy disabling it.@@ -272,6 +276,7 @@ function SingleResultViewInner({params,database,result,+ resultIndex = 0,showExport,exportTooltip,maximumExportCount,@@ -396,15 +401,49 @@ function SingleResultViewInner({const visualizeExplain = async () => {let token: string | undefined;try {- if (engine === Engine.POSTGRES || engine === Engine.SPANNER) {+ // Spanner explains as JSON already. PostgreSQL and SQL Server return the+ // readable plan in the grid, so the visualizer re-runs the explain asking+ // for the format it can render.+ if (engine === Engine.SPANNER) {token = getExplainTokenFromResult(result, engine);- } else if (engine === Engine.MSSQL) {- token = await getExplainTokenForMSSQL(database, params, runQuery);+ } else {+ token = await getExplainTokenForFormat(+ database,+ params,+ runQuery,+ engine,+ engine === Engine.POSTGRES+ ? QueryOption_ExplainFormat.JSON+ : QueryOption_ExplainFormat.XML,+ resultIndex+ );+ }+ if (!token) {+ // The plan is fetched by a second query, so a failure here is invisible+ // unless we say so — the button would otherwise do nothing.+ useAppStore.getState().notify({+ module: "bytebase",+ style: "CRITICAL",+ title: t("sql-editor.visualize-explain-failed"),+ });+ return;+ }+ // A blocked popup returns null rather than throwing, and the wait for the+ // plan can outlast the click's user activation, so say so instead of+ // leaving the button looking dead.+ if (!window.open(`/explain-visualizer.html?token=${token}`, "_blank")) {+ useAppStore.getState().notify({+ module: "bytebase",+ style: "CRITICAL",+ title: t("sql-editor.visualize-explain-blocked"),+ });}- if (!token) return;- window.open(`/explain-visualizer.html?token=${token}`, "_blank");} catch {- // ignore+ useAppStore.getState().notify({+ module: "bytebase",+ style: "CRITICAL",+ title: t("sql-editor.visualize-explain-failed"),+ });}};@@ -795,24 +834,29 @@ function getExplainTokenFromResult(return createExplainToken({ statement, explain, engine });}-async function getExplainTokenForMSSQL(+// getExplainTokenForFormat re-runs the explain in a format the visualizer can+// render. The grid keeps the readable plan the user already sees, so the+// renderable one is only fetched when they ask for it.+async function getExplainTokenForFormat(database: Database,params: SQLEditorQueryParams,- runQuery: ReturnType<typeof useExecuteSQL>["runQuery"]+ runQuery: ReturnType<typeof useExecuteSQL>["runQuery"],+ engine: Engine,+ explainFormat: QueryOption_ExplainFormat,+ resultIndex: number): Promise<string | undefined> {const context: SQLEditorDatabaseQueryContext = {id: uuidv4(),params: {...params,- queryOption: create(QueryOptionSchema, {- mssqlExplainFormat:- QueryOption_MSSQLExplainFormat.MSSQL_EXPLAIN_FORMAT_XML,- }),+ queryOption: create(QueryOptionSchema, { explainFormat }),},status: "PENDING",};await runQuery(database, context);- const result = context.resultSet?.results[0];+ // The re-run replays every statement the user submitted, so take the one this+ // view is showing rather than the first.+ const result = context.resultSet?.results[resultIndex];if (!result) return undefined;- return getExplainTokenFromResult(result, Engine.MSSQL);+ return getExplainTokenFromResult(result, engine);}diff --git a/frontend/src/shims-3rd-party.d.ts b/frontend/src/shims-3rd-party.d.tsdeleted file mode 100644index 936d4f708f..0000000000--- a/frontend/src/shims-3rd-party.d.ts+++ /dev/null@@ -1,5 +0,0 @@-declare module "pev2" {- const Plan: import("vue").Component;-- export { Plan };-}diff --git a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts b/frontend/src/types/proto-es/v1/sql_service_pb.d.tsindex 62d4a96789..e670d7ebbb 100644--- a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/sql_service_pb.d.ts@@ -191,9 +191,9 @@ export declare type QueryOption = Message<"bytebase.v1.QueryOption"> & {redisRunCommandsOn: QueryOption_RedisRunCommandsOn;/**- * @generated from field: bytebase.v1.QueryOption.MSSQLExplainFormat mssql_explain_format = 2;+ * @generated from field: bytebase.v1.QueryOption.ExplainFormat explain_format = 3;*/- mssqlExplainFormat: QueryOption_MSSQLExplainFormat;+ explainFormat: QueryOption_ExplainFormat;};/**@@ -234,35 +234,51 @@ export enum QueryOption_RedisRunCommandsOn {export declare const QueryOption_RedisRunCommandsOnSchema: GenEnum<QueryOption_RedisRunCommandsOn>;/**- * @generated from enum bytebase.v1.QueryOption.MSSQLExplainFormat+ * Which explain output the caller wants, for an explain request.+ *+ * Leave it unspecified for the engine's own default, which is the only+ * output most engines have. Naming a format an engine cannot produce is+ * INVALID_ARGUMENT rather than a silent fallback, as is any explain request+ * against an engine that has no explain at all.+ *+ * @generated from enum bytebase.v1.QueryOption.ExplainFormat*/-export enum QueryOption_MSSQLExplainFormat {+export enum QueryOption_ExplainFormat {+ /**+ * The engine's default: PostgreSQL EXPLAIN, SQL Server SHOWPLAN_ALL.+ *+ * @generated from enum value: EXPLAIN_FORMAT_UNSPECIFIED = 0;+ */+ EXPLAIN_FORMAT_UNSPECIFIED = 0,+/**- * defaults to SHOWPLAN_ALL+ * The human-readable plan. PostgreSQL: EXPLAIN (FORMAT TEXT). SQL Server:+ * SHOWPLAN_ALL.*- * @generated from enum value: MSSQL_EXPLAIN_FORMAT_UNSPECIFIED = 0;+ * @generated from enum value: TEXT = 1;*/- MSSQL_EXPLAIN_FORMAT_UNSPECIFIED = 0,+ TEXT = 1,/**- * SHOWPLAN_ALL+ * The plan tree as JSON. PostgreSQL: EXPLAIN (FORMAT JSON).*- * @generated from enum value: MSSQL_EXPLAIN_FORMAT_ALL = 1;+ * @generated from enum value: JSON = 2;*/- MSSQL_EXPLAIN_FORMAT_ALL = 1,+ JSON = 2,/**- * SHOWPLAN_XML+ * The plan tree as XML. PostgreSQL: EXPLAIN (FORMAT XML). SQL Server:+ * SHOWPLAN_XML.*- * @generated from enum value: MSSQL_EXPLAIN_FORMAT_XML = 2;+ * @generated from enum value: XML = 3;*/- MSSQL_EXPLAIN_FORMAT_XML = 2,+ XML = 3,}/**- * Describes the enum bytebase.v1.QueryOption.MSSQLExplainFormat.+ * Describes the enum bytebase.v1.QueryOption.ExplainFormat.*/-export declare const QueryOption_MSSQLExplainFormatSchema: GenEnum<QueryOption_MSSQLExplainFormat>;+export declare const QueryOption_ExplainFormatSchema: GenEnum<QueryOption_ExplainFormat>;/*** @generated from message bytebase.v1.QueryResultdiff --git a/frontend/src/types/proto-es/v1/sql_service_pb.js b/frontend/src/types/proto-es/v1/sql_service_pb.jsindex 0b87d7a374..f4d13fc517 100644--- a/frontend/src/types/proto-es/v1/sql_service_pb.js+++ b/frontend/src/types/proto-es/v1/sql_service_pb.js@@ -15,7 +15,7 @@ import { file_v1_query_history_service } from "./query_history_service_pb";* Describes the file v1/sql_service.proto.*/export const file_v1_sql_service = /*@__PURE__*/- fileDesc("ChR2MS9zcWxfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiqgEKE0FkbWluRXhlY3V0ZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJc3RhdGVtZW50GAIgASgJEg0KBWxpbWl0GAMgASgFEhMKBnNjaGVtYRgEIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgFIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lciJBChRBZG1pbkV4ZWN1dGVSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQi/AEKDFF1ZXJ5UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSFgoOZGF0YV9zb3VyY2VfaWQYBCABKAkSDwoHZXhwbGFpbhgFIAEoCBITCgZzY2hlbWEYBiABKAlIAIgBARIuCgxxdWVyeV9vcHRpb24YByABKAsyGC5ieXRlYmFzZS52MS5RdWVyeU9wdGlvbhIWCgljb250YWluZXIYCCABKAlIAYgBAUIJCgdfc2NoZW1hQgwKCl9jb250YWluZXIiWAoNUXVlcnlSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQSHAoUYXBwbGllZF9hY2Nlc3NfZ3JhbnQYAiABKAki+QIKC1F1ZXJ5T3B0aW9uEkoKFXJlZGlzX3J1bl9jb21tYW5kc19vbhgBIAEoDjIrLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uLlJlZGlzUnVuQ29tbWFuZHNPbhJJChRtc3NxbF9leHBsYWluX2Zvcm1hdBgCIAEoDjIrLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uLk1TU1FMRXhwbGFpbkZvcm1hdCJbChJSZWRpc1J1bkNvbW1hbmRzT24SJQohUkVESVNfUlVOX0NPTU1BTkRTX09OX1VOU1BFQ0lGSUVEEAASDwoLU0lOR0xFX05PREUQARINCglBTExfTk9ERVMQAiJ2ChJNU1NRTEV4cGxhaW5Gb3JtYXQSJAogTVNTUUxfRVhQTEFJTl9GT1JNQVRfVU5TUEVDSUZJRUQQABIcChhNU1NRTF9FWFBMQUlOX0ZPUk1BVF9BTEwQARIcChhNU1NRTF9FWFBMQUlOX0ZPUk1BVF9YTUwQAiKkCgoLUXVlcnlSZXN1bHQSFAoMY29sdW1uX25hbWVzGAEgAygJEhkKEWNvbHVtbl90eXBlX25hbWVzGAIgAygJEikKBHJvd3MYAyADKAsyFS5ieXRlYmFzZS52MS5RdWVyeVJvd0IE0OowAhISCgpyb3dzX2NvdW50GAQgASgDEg0KBWVycm9yGAUgASgJEioKB2xhdGVuY3kYBiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SEQoJc3RhdGVtZW50GAcgASgJEkAKDnBvc3RncmVzX2Vycm9yGAggASgLMiYuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuUG9zdGdyZXNFcnJvckgAEjwKDHN5bnRheF9lcnJvchgJIAEoCzIkLmJ5dGViYXNlLnYxLlF1ZXJ5UmVzdWx0LlN5bnRheEVycm9ySAASQAoRcGVybWlzc2lvbl9kZW5pZWQYCiABKAsyIy5ieXRlYmFzZS52MS5QZXJtaXNzaW9uRGVuaWVkRGV0YWlsSAASPgoNY29tbWFuZF9lcnJvchgNIAEoCzIlLmJ5dGViYXNlLnYxLlF1ZXJ5UmVzdWx0LkNvbW1hbmRFcnJvckgAEjgKCG1lc3NhZ2VzGAsgAygLMiAuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuTWVzc2FnZUIE0OowAhIqCgZtYXNrZWQYDCADKAsyGi5ieXRlYmFzZS52MS5NYXNraW5nUmVhc29uGs4CCg1Qb3N0Z3Jlc0Vycm9yEhAKCHNldmVyaXR5GAEgASgJEgwKBGNvZGUYAiABKAkSDwoHbWVzc2FnZRgDIAEoCRIOCgZkZXRhaWwYBCABKAkSDAoEaGludBgFIAEoCRIQCghwb3NpdGlvbhgGIAEoBRIZChFpbnRlcm5hbF9wb3NpdGlvbhgHIAEoBRIWCg5pbnRlcm5hbF9xdWVyeRgIIAEoCRINCgV3aGVyZRgJIAEoCRITCgtzY2hlbWFfbmFtZRgKIAEoCRISCgp0YWJsZV9uYW1lGAsgASgJEhMKC2NvbHVtbl9uYW1lGAwgASgJEhYKDmRhdGFfdHlwZV9uYW1lGA0gASgJEhcKD2NvbnN0cmFpbnRfbmFtZRgOIAEoCRIMCgRmaWxlGA8gASgJEgwKBGxpbmUYECABKAUSDwoHcm91dGluZRgRIAEoCRo8CgtTeW50YXhFcnJvchItCg5zdGFydF9wb3NpdGlvbhgBIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uGpMBCgxDb21tYW5kRXJyb3ISQAoMY29tbWFuZF90eXBlGAEgASgOMiouYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuQ29tbWFuZEVycm9yLlR5cGUiQQoEVHlwZRIUChBUWVBFX1VOU1BFQ0lGSUVEEAASBwoDRERMEAESBwoDRE1MEAISEQoNTk9OX1JFQURfT05MWRADGrcBCgdNZXNzYWdlEjUKBWxldmVsGAEgASgOMiYuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuTWVzc2FnZS5MZXZlbBIPCgdjb250ZW50GAIgASgJImQKBUxldmVsEhUKEUxFVkVMX1VOU1BFQ0lGSUVEEAASCAoESU5GTxABEgsKB1dBUk5JTkcQAhIJCgVERUJVRxADEgcKA0xPRxAEEgoKBk5PVElDRRAFEg0KCUVYQ0VQVElPThAGQhAKDmRldGFpbGVkX2Vycm9yIsMBCg1NYXNraW5nUmVhc29uEhgKEHNlbWFudGljX3R5cGVfaWQYASABKAkSGwoTc2VtYW50aWNfdHlwZV90aXRsZRgCIAEoCRIXCg9tYXNraW5nX3J1bGVfaWQYAyABKAkSEQoJYWxnb3JpdGhtGAQgASgJEg8KB2NvbnRleHQYBSABKAkSHAoUY2xhc3NpZmljYXRpb25fbGV2ZWwYBiABKAUSIAoSc2VtYW50aWNfdHlwZV9pY29uGAcgASgJQgTQ6jACIjEKCFF1ZXJ5Um93EiUKBnZhbHVlcxgBIAMoCzIVLmJ5dGViYXNlLnYxLlJvd1ZhbHVlIowFCghSb3dWYWx1ZRIwCgpudWxsX3ZhbHVlGAEgASgOMhouZ29vZ2xlLnByb3RvYnVmLk51bGxWYWx1ZUgAEhQKCmJvb2xfdmFsdWUYAiABKAhIABIVCgtieXRlc192YWx1ZRgDIAEoDEgAEhYKDGRvdWJsZV92YWx1ZRgEIAEoAUgAEhUKC2Zsb2F0X3ZhbHVlGAUgASgCSAASFQoLaW50MzJfdmFsdWUYBiABKAVIABIVCgtpbnQ2NF92YWx1ZRgHIAEoA0gAEhYKDHN0cmluZ192YWx1ZRgIIAEoCUgAEhYKDHVpbnQzMl92YWx1ZRgJIAEoDUgAEhYKDHVpbnQ2NF92YWx1ZRgKIAEoBEgAEi0KC3ZhbHVlX3ZhbHVlGAsgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlSAASOgoPdGltZXN0YW1wX3ZhbHVlGAwgASgLMh8uYnl0ZWJhc2UudjEuUm93VmFsdWUuVGltZXN0YW1wSAASPwoSdGltZXN0YW1wX3R6X3ZhbHVlGA0gASgLMiEuYnl0ZWJhc2UudjEuUm93VmFsdWUuVGltZXN0YW1wVFpIABpTCglUaW1lc3RhbXASNAoQZ29vZ2xlX3RpbWVzdGFtcBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASEAoIYWNjdXJhY3kYAiABKAUacwoLVGltZXN0YW1wVFoSNAoQZ29vZ2xlX3RpbWVzdGFtcBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASDAoEem9uZRgCIAEoCRIOCgZvZmZzZXQYAyABKAUSEAoIYWNjdXJhY3kYBCABKAVCBgoEa2luZCKDAwoGQWR2aWNlEikKBnN0YXR1cxgBIAEoDjIZLmJ5dGViYXNlLnYxLkFkdmljZS5MZXZlbBIMCgRjb2RlGAIgASgFEg0KBXRpdGxlGAMgASgJEg8KB2NvbnRlbnQYBCABKAkSLQoOc3RhcnRfcG9zaXRpb24YBSABKAsyFS5ieXRlYmFzZS52MS5Qb3NpdGlvbhIrCgxlbmRfcG9zaXRpb24YBiABKAsyFS5ieXRlYmFzZS52MS5Qb3NpdGlvbhIvCglydWxlX3R5cGUYByABKA4yHC5ieXRlYmFzZS52MS5BZHZpY2UuUnVsZVR5cGUiSgoFTGV2ZWwSHAoYQURWSUNFX0xFVkVMX1VOU1BFQ0lGSUVEEAASCwoHU1VDQ0VTUxABEgsKB1dBUk5JTkcQAhIJCgVFUlJPUhADIkcKCFJ1bGVUeXBlEhkKFVJVTEVfVFlQRV9VTlNQRUNJRklFRBAAEhAKDFBBUlNFUl9CQVNFRBABEg4KCkFJX1BPV0VSRUQQAiKOAgoNRXhwb3J0UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSKQoGZm9ybWF0GAQgASgOMhkuYnl0ZWJhc2UudjEuRXhwb3J0Rm9ybWF0Eg0KBWFkbWluGAUgASgIEhYKCHBhc3N3b3JkGAYgASgJQgTQ6jABEhYKDmRhdGFfc291cmNlX2lkGAcgASgJEhMKBnNjaGVtYRgIIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgJIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lciJFCg5FeHBvcnRSZXNwb25zZRIVCgdjb250ZW50GAEgASgMQgTQ6jACEhwKFGFwcGxpZWRfYWNjZXNzX2dyYW50GAIgASgJMrQHCgpTUUxTZXJ2aWNlEs4BCgVRdWVyeRIZLmJ5dGViYXNlLnYxLlF1ZXJ5UmVxdWVzdBoaLmJ5dGViYXNlLnYxLlF1ZXJ5UmVzcG9uc2UijQGK6jAQYmIuZGF0YWJhc2VzLmdldJDqMAGY6jABoOowAYLT5JMCZzoBKlo4OgEqIjMvdjEve25hbWU9cHJvamVjdHMvKi9pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn06cXVlcnkiKC92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn06cXVlcnkSkQEKDEFkbWluRXhlY3V0ZRIgLmJ5dGViYXNlLnYxLkFkbWluRXhlY3V0ZVJlcXVlc3QaIS5ieXRlYmFzZS52MS5BZG1pbkV4ZWN1dGVSZXNwb25zZSI4iuowDGJiLnNxbC5hZG1pbpDqMAGY6jABoOowBKjqMAuC0+STAhISEC92MTphZG1pbkV4ZWN1dGUoATABEngKFFNlYXJjaFF1ZXJ5SGlzdG9yaWVzEiguYnl0ZWJhc2UudjEuU2VhcmNoUXVlcnlIaXN0b3JpZXNSZXF1ZXN0GikuYnl0ZWJhc2UudjEuU2VhcmNoUXVlcnlIaXN0b3JpZXNSZXNwb25zZSILiAIBkOowAqDqMAESkAEKEkxpc3RRdWVyeUhpc3RvcmllcxImLmJ5dGViYXNlLnYxLkxpc3RRdWVyeUhpc3Rvcmllc1JlcXVlc3QaJy5ieXRlYmFzZS52MS5MaXN0UXVlcnlIaXN0b3JpZXNSZXNwb25zZSIpiAIBiuowFmJiLnF1ZXJ5SGlzdG9yaWVzLmxpc3SQ6jABoOowBKjqMAoSXgoPR2V0UXVlcnlIaXN0b3J5EiMuYnl0ZWJhc2UudjEuR2V0UXVlcnlIaXN0b3J5UmVxdWVzdBoZLmJ5dGViYXNlLnYxLlF1ZXJ5SGlzdG9yeSILiAIBkOowAqDqMAES0wEKBkV4cG9ydBIaLmJ5dGViYXNlLnYxLkV4cG9ydFJlcXVlc3QaGy5ieXRlYmFzZS52MS5FeHBvcnRSZXNwb25zZSKPAYrqMBBiYi5kYXRhYmFzZXMuZ2V0kOowAZjqMAGg6jACgtPkkwJpOgEqWjk6ASoiNC92MS97bmFtZT1wcm9qZWN0cy8qL2luc3RhbmNlcy8qL2RhdGFiYXNlcy8qfTpleHBvcnQiKS92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn06ZXhwb3J0QqUBCg9jb20uYnl0ZWJhc2UudjFCD1NxbFNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_query_history_service]);+ fileDesc("ChR2MS9zcWxfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiqgEKE0FkbWluRXhlY3V0ZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJc3RhdGVtZW50GAIgASgJEg0KBWxpbWl0GAMgASgFEhMKBnNjaGVtYRgEIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgFIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lciJBChRBZG1pbkV4ZWN1dGVSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQi/AEKDFF1ZXJ5UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSFgoOZGF0YV9zb3VyY2VfaWQYBCABKAkSDwoHZXhwbGFpbhgFIAEoCBITCgZzY2hlbWEYBiABKAlIAIgBARIuCgxxdWVyeV9vcHRpb24YByABKAsyGC5ieXRlYmFzZS52MS5RdWVyeU9wdGlvbhIWCgljb250YWluZXIYCCABKAlIAYgBAUIJCgdfc2NoZW1hQgwKCl9jb250YWluZXIiWAoNUXVlcnlSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQSHAoUYXBwbGllZF9hY2Nlc3NfZ3JhbnQYAiABKAki4AIKC1F1ZXJ5T3B0aW9uEkoKFXJlZGlzX3J1bl9jb21tYW5kc19vbhgBIAEoDjIrLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uLlJlZGlzUnVuQ29tbWFuZHNPbhI+Cg5leHBsYWluX2Zvcm1hdBgDIAEoDjImLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uLkV4cGxhaW5Gb3JtYXQiWwoSUmVkaXNSdW5Db21tYW5kc09uEiUKIVJFRElTX1JVTl9DT01NQU5EU19PTl9VTlNQRUNJRklFRBAAEg8KC1NJTkdMRV9OT0RFEAESDQoJQUxMX05PREVTEAIiTAoNRXhwbGFpbkZvcm1hdBIeChpFWFBMQUlOX0ZPUk1BVF9VTlNQRUNJRklFRBAAEggKBFRFWFQQARIICgRKU09OEAISBwoDWE1MEANKBAgCEANSFG1zc3FsX2V4cGxhaW5fZm9ybWF0IqQKCgtRdWVyeVJlc3VsdBIUCgxjb2x1bW5fbmFtZXMYASADKAkSGQoRY29sdW1uX3R5cGVfbmFtZXMYAiADKAkSKQoEcm93cxgDIAMoCzIVLmJ5dGViYXNlLnYxLlF1ZXJ5Um93QgTQ6jACEhIKCnJvd3NfY291bnQYBCABKAMSDQoFZXJyb3IYBSABKAkSKgoHbGF0ZW5jeRgGIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIRCglzdGF0ZW1lbnQYByABKAkSQAoOcG9zdGdyZXNfZXJyb3IYCCABKAsyJi5ieXRlYmFzZS52MS5RdWVyeVJlc3VsdC5Qb3N0Z3Jlc0Vycm9ySAASPAoMc3ludGF4X2Vycm9yGAkgASgLMiQuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuU3ludGF4RXJyb3JIABJAChFwZXJtaXNzaW9uX2RlbmllZBgKIAEoCzIjLmJ5dGViYXNlLnYxLlBlcm1pc3Npb25EZW5pZWREZXRhaWxIABI+Cg1jb21tYW5kX2Vycm9yGA0gASgLMiUuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuQ29tbWFuZEVycm9ySAASOAoIbWVzc2FnZXMYCyADKAsyIC5ieXRlYmFzZS52MS5RdWVyeVJlc3VsdC5NZXNzYWdlQgTQ6jACEioKBm1hc2tlZBgMIAMoCzIaLmJ5dGViYXNlLnYxLk1hc2tpbmdSZWFzb24azgIKDVBvc3RncmVzRXJyb3ISEAoIc2V2ZXJpdHkYASABKAkSDAoEY29kZRgCIAEoCRIPCgdtZXNzYWdlGAMgASgJEg4KBmRldGFpbBgEIAEoCRIMCgRoaW50GAUgASgJEhAKCHBvc2l0aW9uGAYgASgFEhkKEWludGVybmFsX3Bvc2l0aW9uGAcgASgFEhYKDmludGVybmFsX3F1ZXJ5GAggASgJEg0KBXdoZXJlGAkgASgJEhMKC3NjaGVtYV9uYW1lGAogASgJEhIKCnRhYmxlX25hbWUYCyABKAkSEwoLY29sdW1uX25hbWUYDCABKAkSFgoOZGF0YV90eXBlX25hbWUYDSABKAkSFwoPY29uc3RyYWludF9uYW1lGA4gASgJEgwKBGZpbGUYDyABKAkSDAoEbGluZRgQIAEoBRIPCgdyb3V0aW5lGBEgASgJGjwKC1N5bnRheEVycm9yEi0KDnN0YXJ0X3Bvc2l0aW9uGAEgASgLMhUuYnl0ZWJhc2UudjEuUG9zaXRpb24akwEKDENvbW1hbmRFcnJvchJACgxjb21tYW5kX3R5cGUYASABKA4yKi5ieXRlYmFzZS52MS5RdWVyeVJlc3VsdC5Db21tYW5kRXJyb3IuVHlwZSJBCgRUeXBlEhQKEFRZUEVfVU5TUEVDSUZJRUQQABIHCgNEREwQARIHCgNETUwQAhIRCg1OT05fUkVBRF9PTkxZEAMatwEKB01lc3NhZ2USNQoFbGV2ZWwYASABKA4yJi5ieXRlYmFzZS52MS5RdWVyeVJlc3VsdC5NZXNzYWdlLkxldmVsEg8KB2NvbnRlbnQYAiABKAkiZAoFTGV2ZWwSFQoRTEVWRUxfVU5TUEVDSUZJRUQQABIICgRJTkZPEAESCwoHV0FSTklORxACEgkKBURFQlVHEAMSBwoDTE9HEAQSCgoGTk9USUNFEAUSDQoJRVhDRVBUSU9OEAZCEAoOZGV0YWlsZWRfZXJyb3IiwwEKDU1hc2tpbmdSZWFzb24SGAoQc2VtYW50aWNfdHlwZV9pZBgBIAEoCRIbChNzZW1hbnRpY190eXBlX3RpdGxlGAIgASgJEhcKD21hc2tpbmdfcnVsZV9pZBgDIAEoCRIRCglhbGdvcml0aG0YBCABKAkSDwoHY29udGV4dBgFIAEoCRIcChRjbGFzc2lmaWNhdGlvbl9sZXZlbBgGIAEoBRIgChJzZW1hbnRpY190eXBlX2ljb24YByABKAlCBNDqMAIiMQoIUXVlcnlSb3cSJQoGdmFsdWVzGAEgAygLMhUuYnl0ZWJhc2UudjEuUm93VmFsdWUijAUKCFJvd1ZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJvdG9idWYuTnVsbFZhbHVlSAASFAoKYm9vbF92YWx1ZRgCIAEoCEgAEhUKC2J5dGVzX3ZhbHVlGAMgASgMSAASFgoMZG91YmxlX3ZhbHVlGAQgASgBSAASFQoLZmxvYXRfdmFsdWUYBSABKAJIABIVCgtpbnQzMl92YWx1ZRgGIAEoBUgAEhUKC2ludDY0X3ZhbHVlGAcgASgDSAASFgoMc3RyaW5nX3ZhbHVlGAggASgJSAASFgoMdWludDMyX3ZhbHVlGAkgASgNSAASFgoMdWludDY0X3ZhbHVlGAogASgESAASLQoLdmFsdWVfdmFsdWUYCyABKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWVIABI6Cg90aW1lc3RhbXBfdmFsdWUYDCABKAsyHy5ieXRlYmFzZS52MS5Sb3dWYWx1ZS5UaW1lc3RhbXBIABI/ChJ0aW1lc3RhbXBfdHpfdmFsdWUYDSABKAsyIS5ieXRlYmFzZS52MS5Sb3dWYWx1ZS5UaW1lc3RhbXBUWkgAGlMKCVRpbWVzdGFtcBI0ChBnb29nbGVfdGltZXN0YW1wGAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIQCghhY2N1cmFjeRgCIAEoBRpzCgtUaW1lc3RhbXBUWhI0ChBnb29nbGVfdGltZXN0YW1wGAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIMCgR6b25lGAIgASgJEg4KBm9mZnNldBgDIAEoBRIQCghhY2N1cmFjeRgEIAEoBUIGCgRraW5kIoMDCgZBZHZpY2USKQoGc3RhdHVzGAEgASgOMhkuYnl0ZWJhc2UudjEuQWR2aWNlLkxldmVsEgwKBGNvZGUYAiABKAUSDQoFdGl0bGUYAyABKAkSDwoHY29udGVudBgEIAEoCRItCg5zdGFydF9wb3NpdGlvbhgFIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uEisKDGVuZF9wb3NpdGlvbhgGIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uEi8KCXJ1bGVfdHlwZRgHIAEoDjIcLmJ5dGViYXNlLnYxLkFkdmljZS5SdWxlVHlwZSJKCgVMZXZlbBIcChhBRFZJQ0VfTEVWRUxfVU5TUEVDSUZJRUQQABILCgdTVUNDRVNTEAESCwoHV0FSTklORxACEgkKBUVSUk9SEAMiRwoIUnVsZVR5cGUSGQoVUlVMRV9UWVBFX1VOU1BFQ0lGSUVEEAASEAoMUEFSU0VSX0JBU0VEEAESDgoKQUlfUE9XRVJFRBACIo4CCg1FeHBvcnRSZXF1ZXN0EisKBG5hbWUYASABKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlEhEKCXN0YXRlbWVudBgCIAEoCRINCgVsaW1pdBgDIAEoBRIpCgZmb3JtYXQYBCABKA4yGS5ieXRlYmFzZS52MS5FeHBvcnRGb3JtYXQSDQoFYWRtaW4YBSABKAgSFgoIcGFzc3dvcmQYBiABKAlCBNDqMAESFgoOZGF0YV9zb3VyY2VfaWQYByABKAkSEwoGc2NoZW1hGAggASgJSACIAQESFgoJY29udGFpbmVyGAkgASgJSAGIAQFCCQoHX3NjaGVtYUIMCgpfY29udGFpbmVyIkUKDkV4cG9ydFJlc3BvbnNlEhUKB2NvbnRlbnQYASABKAxCBNDqMAISHAoUYXBwbGllZF9hY2Nlc3NfZ3JhbnQYAiABKAkytAcKClNRTFNlcnZpY2USzgEKBVF1ZXJ5EhkuYnl0ZWJhc2UudjEuUXVlcnlSZXF1ZXN0GhouYnl0ZWJhc2UudjEuUXVlcnlSZXNwb25zZSKNAYrqMBBiYi5kYXRhYmFzZXMuZ2V0kOowAZjqMAGg6jABgtPkkwJnOgEqWjg6ASoiMy92MS97bmFtZT1wcm9qZWN0cy8qL2luc3RhbmNlcy8qL2RhdGFiYXNlcy8qfTpxdWVyeSIoL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qfTpxdWVyeRKRAQoMQWRtaW5FeGVjdXRlEiAuYnl0ZWJhc2UudjEuQWRtaW5FeGVjdXRlUmVxdWVzdBohLmJ5dGViYXNlLnYxLkFkbWluRXhlY3V0ZVJlc3BvbnNlIjiK6jAMYmIuc3FsLmFkbWlukOowAZjqMAGg6jAEqOowC4LT5JMCEhIQL3YxOmFkbWluRXhlY3V0ZSgBMAESeAoUU2VhcmNoUXVlcnlIaXN0b3JpZXMSKC5ieXRlYmFzZS52MS5TZWFyY2hRdWVyeUhpc3Rvcmllc1JlcXVlc3QaKS5ieXRlYmFzZS52MS5TZWFyY2hRdWVyeUhpc3Rvcmllc1Jlc3BvbnNlIguIAgGQ6jACoOowARKQAQoSTGlzdFF1ZXJ5SGlzdG9yaWVzEiYuYnl0ZWJhc2UudjEuTGlzdFF1ZXJ5SGlzdG9yaWVzUmVxdWVzdBonLmJ5dGViYXNlLnYxLkxpc3RRdWVyeUhpc3Rvcmllc1Jlc3BvbnNlIimIAgGK6jAWYmIucXVlcnlIaXN0b3JpZXMubGlzdJDqMAGg6jAEqOowChJeCg9HZXRRdWVyeUhpc3RvcnkSIy5ieXRlYmFzZS52MS5HZXRRdWVyeUhpc3RvcnlSZXF1ZXN0GhkuYnl0ZWJhc2UudjEuUXVlcnlIaXN0b3J5IguIAgGQ6jACoOowARLTAQoGRXhwb3J0EhouYnl0ZWJhc2UudjEuRXhwb3J0UmVxdWVzdBobLmJ5dGViYXNlLnYxLkV4cG9ydFJlc3BvbnNlIo8BiuowEGJiLmRhdGFiYXNlcy5nZXSQ6jABmOowAaDqMAKC0+STAmk6ASpaOToBKiI0L3YxL3tuYW1lPXByb2plY3RzLyovaW5zdGFuY2VzLyovZGF0YWJhc2VzLyp9OmV4cG9ydCIpL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qfTpleHBvcnRCpQEKD2NvbS5ieXRlYmFzZS52MUIPU3FsU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_query_history_service]);/*** Describes the message bytebase.v1.AdminExecuteRequest.@@ -65,16 +65,23 @@ export const QueryOption_RedisRunCommandsOn = /*@__PURE__*/tsEnum(QueryOption_RedisRunCommandsOnSchema);/**- * Describes the enum bytebase.v1.QueryOption.MSSQLExplainFormat.+ * Describes the enum bytebase.v1.QueryOption.ExplainFormat.*/-export const QueryOption_MSSQLExplainFormatSchema = /*@__PURE__*/+export const QueryOption_ExplainFormatSchema = /*@__PURE__*/enumDesc(file_v1_sql_service, 4, 1);/**- * @generated from enum bytebase.v1.QueryOption.MSSQLExplainFormat+ * Which explain output the caller wants, for an explain request.+ *+ * Leave it unspecified for the engine's own default, which is the only+ * output most engines have. Naming a format an engine cannot produce is+ * INVALID_ARGUMENT rather than a silent fallback, as is any explain request+ * against an engine that has no explain at all.+ *+ * @generated from enum bytebase.v1.QueryOption.ExplainFormat*/-export const QueryOption_MSSQLExplainFormat = /*@__PURE__*/- tsEnum(QueryOption_MSSQLExplainFormatSchema);+export const QueryOption_ExplainFormat = /*@__PURE__*/+ tsEnum(QueryOption_ExplainFormatSchema);/*** Describes the message bytebase.v1.QueryResult.diff --git a/frontend/src/utils/explainToken.ts b/frontend/src/utils/explainToken.tsnew file mode 100644index 0000000000..ef8fc6fc07--- /dev/null+++ b/frontend/src/utils/explainToken.ts@@ -0,0 +1,71 @@+import { Engine } from "@/types/proto-es/v1/common_pb";++export type StoredExplain = {+ statement: string;+ explain: string;+ engine: Engine;+};++/**+ * Deliberately not `randomString` from `./util`: the visualizer is a separate+ * entry that imports this module and nothing else of the app, and `./util`+ * drags dayjs, semver, DOMPurify and the i18n bundle in behind it.+ *+ * The token only has to be unique within one tab's sessionStorage — it is a+ * lookup key, not a secret.+ */+const tokenSuffix = (): string => {+ const bytes = new Uint8Array(16);+ crypto.getRandomValues(bytes);+ return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join(+ ""+ );+};++const TOKEN_PREFIX = "explain-";++/**+ * Drops the plans this tab stashed earlier.+ *+ * A plan is read once, by the tab this token opens, and `window.open` gives+ * that tab its own copy of sessionStorage — so the opener's copy is dead weight+ * the moment the visualizer has it. Left to accumulate, a few hundred-kilobyte+ * plans fill the origin's quota and every later click fails.+ */+const dropPreviousExplains = () => {+ const stale: string[] = [];+ for (let i = 0; i < sessionStorage.length; i++) {+ const key = sessionStorage.key(i);+ if (key?.startsWith(TOKEN_PREFIX)) stale.push(key);+ }+ for (const key of stale) sessionStorage.removeItem(key);+};++export const createExplainToken = ({+ statement,+ explain,+ engine,+}: StoredExplain): string => {+ const token = `${TOKEN_PREFIX}${tokenSuffix()}`;++ const json = JSON.stringify({ statement, explain, engine });+ dropPreviousExplains();+ sessionStorage.setItem(token, json);++ return token;+};++export const readExplainFromToken = (token: string) => {+ if (!token) return undefined;+ try {+ const json = sessionStorage.getItem(token) || "{}";+ const obj = JSON.parse(json) as StoredExplain;+ if (!obj) return undefined;+ if (typeof obj.statement === "string" && typeof obj.explain === "string") {+ return obj;+ }+ return undefined;+ } catch {+ return undefined;+ }+};diff --git a/frontend/src/utils/index.ts b/frontend/src/utils/index.tsindex 388960dca4..78076ed9de 100644--- a/frontend/src/utils/index.ts+++ b/frontend/src/utils/index.ts@@ -8,7 +8,7 @@ export * from "./datetime";export * from "./label";export * from "./string";export * from "./sqlEditor";-export * from "./pev2";+export * from "./explainToken";export * from "./web-storage";export * from "./dom";export * from "./schemaEditor";diff --git a/frontend/src/utils/pev2.ts b/frontend/src/utils/pev2.tsdeleted file mode 100644index 8eb8293029..0000000000--- a/frontend/src/utils/pev2.ts+++ /dev/null@@ -1,36 +0,0 @@-import { Engine } from "@/types/proto-es/v1/common_pb";-import { randomString } from "./util";--export type StoredExplain = {- statement: string;- explain: string;- engine: Engine;-};--export const createExplainToken = ({- statement,- explain,- engine,-}: StoredExplain): string => {- const token = `pev2-${randomString(32)}`;-- const json = JSON.stringify({ statement, explain, engine });- sessionStorage.setItem(token, json);-- return token;-};--export const readExplainFromToken = (token: string) => {- if (!token) return undefined;- try {- const json = sessionStorage.getItem(token) || "{}";- const obj = JSON.parse(json) as StoredExplain;- if (!obj) return undefined;- if (typeof obj.statement === "string" && typeof obj.explain === "string") {- return obj;- }- return undefined;- } catch {- return undefined;- }-};diff --git a/frontend/vite.config.ts b/frontend/vite.config.tsindex fbbc2a0dea..8c9d0c68b0 100644--- a/frontend/vite.config.ts+++ b/frontend/vite.config.ts@@ -101,14 +101,6 @@ export default defineConfig({},output: {manualChunks: (id) => {- const normalizedId = id.replaceAll("\\", "/");- if (- normalizedId.includes("/node_modules/vue/") ||- normalizedId.includes("/node_modules/@vue/") ||- normalizedId.includes("/node_modules/pev2/")- ) {- return "explain-visualizer-vue";- }// Monaco Editor - separate chunkif (id.includes("monaco-editor") || id.includes("monaco-vscode")) {return "monaco-editor";diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 1cae0ce392..a87e0d23e0 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -1,5 +1,8 @@openapi: 3.1.0-info: {}+info:+ title: API+ description: API documentation for API+ version: 1.0.0paths:/bytebase.v1.SQLService/GetQueryHistory:post:@@ -15,13 +18,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -56,13 +63,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -97,13 +108,17 @@ paths:parameters:- name: Connect-Protocol-Versionin: header+ description: Define the version of the Connect protocolrequired: trueschema:$ref: '#/components/schemas/connect-protocol-version'+ example: 1- name: Connect-Timeout-Msin: header+ description: Define the timeout, in msschema:$ref: '#/components/schemas/connect-timeout-header'+ example: 1000requestBody:content:application/json:@@ -542,16 +557,18 @@ paths:in: querydescription: The type of policy to create.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyType'title: type- $ref: '#/components/schemas/bytebase.v1.PolicyType'requestBody:description: The policy to create.content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: The policy to create.- $ref: '#/components/schemas/bytebase.v1.Policy'responses:"200":description: Success@@ -639,206 +656,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -860,6 +678,8 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: |-The policy to update.@@ -868,7 +688,6 @@ paths:Format: {resource name}/policies/{policy type}Workspace resource name: workspaces/{workspace-id}.Environment resource name: environments/environment-id.- $ref: '#/components/schemas/bytebase.v1.Policy'responses:"200":description: Success@@ -960,9 +779,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Group'title: groupdescription: The group to create.- $ref: '#/components/schemas/bytebase.v1.Group'responses:"200":description: Success@@ -1034,206 +854,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -1253,13 +874,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Group'title: groupdescription: |-The group to update.The group's `name` field is used to identify the group to update.Format: groups/{email}- $ref: '#/components/schemas/bytebase.v1.Group'responses:"200":description: Success@@ -1363,9 +985,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProvider'title: identity_providerdescription: The identity provider to create.- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'responses:"200":description: Success@@ -1458,206 +1081,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -1677,13 +1101,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProvider'title: identity_providerdescription: |-The identity provider to update.The identity provider's `name` field is used to identify the identity provider to update.Format: idps/{identity_provider}- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'responses:"200":description: Success@@ -1839,9 +1264,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Instance'title: instancedescription: The instance to create.- $ref: '#/components/schemas/bytebase.v1.Instance'responses:"200":description: Success@@ -1932,206 +1358,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -2153,13 +1380,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Instance'title: instancedescription: |-The instance to update.The instance's `name` field is used to identify the instance to update.Format: instances/{instance} or projects/{project}/instances/{instance}- $ref: '#/components/schemas/bytebase.v1.Instance'responses:"200":description: Success@@ -2320,224 +1548,26 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:+ description: The list of fields to update.+ schema:+ type: string+ requestBody:+ description: |-+ The database to update.- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.- schema:- type: string- requestBody:- description: |-- The database to update.-- The database's `name` field is used to identify the database to update.- Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- content:- application/json:- schema:- title: database- description: |-- The database to update.+ The database's `name` field is used to identify the database to update.+ Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ content:+ application/json:+ schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Database'+ title: database+ description: |-+ The database to update.The database's `name` field is used to identify the database to update.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- $ref: '#/components/schemas/bytebase.v1.Database'responses:"200":description: Success@@ -2606,6 +1636,8 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'title: catalogdescription: |-The database catalog to update, identified by its `name` field.@@ -2614,7 +1646,6 @@ paths:Replaces the whole catalog: send the complete value, since anything omittedis erased. There is no `update_mask` because `schemas` is a repeated field,and AIP-161 forbids addressing one element of one.- $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'responses:"200":description: Success@@ -2667,9 +1698,11 @@ paths:title: page_token- name: viewin: query+ description: The view query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: view- $ref: '#/components/schemas/bytebase.v1.ChangelogView'- name: filterin: querydescription: |-@@ -2725,9 +1758,11 @@ paths:type: string- name: viewin: query+ description: The view query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: view- $ref: '#/components/schemas/bytebase.v1.ChangelogView'responses:"200":description: Success@@ -2768,37 +1803,38 @@ paths:application/json:schema:type: object- allOf:- - {}- - oneOf:- - type: object- properties:- changelog:- type: string- title: changelog- description: |-- The resource name of the changelog- Format:- instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ anyOf:+ - type: object+ properties:+ changelog:+ type: stringtitle: changelog- required:- - changelog- - type: object- properties:- schema:- type: string- title: schema- description: The target schema.+ description: |-+ The resource name of the changelog+ Format:+ instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ title: changelog+ - type: object+ properties:+ schema:+ type: stringtitle: schema- required:- - schema- - not:- anyOf:- - required:- - changelog- - required:- - schema+ description: The target schema.+ title: schemaunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - changelog+ - required:+ - schema+ - not:+ oneOf:+ - required:+ - changelog+ - required:+ - schematitle: DiffSchemaRequestrequired: trueresponses:@@ -3094,9 +2130,11 @@ paths:type: string- name: typein: query+ description: The type query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'title: type- $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'- name: schemain: querydescription: It's empty for DATABASE.@@ -3147,6 +2185,7 @@ paths:format: int32- name: metadata.schemas.tables.columns.hasDefaultin: query+ description: The metadata.schemas.tables.columns.hasDefault query parameter.schema:type: booleantitle: has_default@@ -3205,16 +2244,20 @@ paths:title: comment- name: metadata.schemas.tables.columns.generation.typein: query+ description: The metadata.schemas.tables.columns.generation.type query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'- name: metadata.schemas.tables.columns.generation.expressionin: query+ description: The metadata.schemas.tables.columns.generation.expression query parameter.schema:type: stringtitle: expression- name: metadata.schemas.tables.columns.isIdentityin: query+ description: The metadata.schemas.tables.columns.isIdentity query parameter.schema:type: booleantitle: is_identity@@ -3222,24 +2265,21 @@ paths:in: querydescription: The identity_generation is for identity columns, PG only.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'title: identity_generation- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'- name: metadata.schemas.tables.columns.identitySeedin: querydescription: The identity_seed is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_seedformat: int64- name: metadata.schemas.tables.columns.identityIncrementin: querydescription: The identity_increment is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_incrementformat: int64- name: metadata.schemas.tables.columns.defaultConstraintName@@ -3308,9 +2348,7 @@ paths:schema:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: key_length- name: metadata.schemas.tables.indexes.descending@@ -3373,9 +2411,7 @@ paths:in: querydescription: The number of granules in the block. It's a ClickHouse specific field.schema:- type:- - integer- - string+ type: stringtitle: granularityformat: int64- name: metadata.schemas.tables.indexes.isConstraint@@ -3467,17 +2503,20 @@ paths:title: tablespace- name: metadata.schemas.tables.indexes.spatialConfig.storage.workTablespacein: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.workTablespace query parameter.schema:type: stringtitle: work_tablespace- name: metadata.schemas.tables.indexes.spatialConfig.storage.sdoLevelin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.sdoLevel query parameter.schema:type: integertitle: sdo_levelformat: int32- name: metadata.schemas.tables.indexes.spatialConfig.storage.commitIntervalin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.commitInterval query parameter.schema:type: integertitle: commit_interval@@ -3496,26 +2535,31 @@ paths:title: sort_in_tempdb- name: metadata.schemas.tables.indexes.spatialConfig.storage.dropExistingin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.dropExisting query parameter.schema:type: booleantitle: drop_existing- name: metadata.schemas.tables.indexes.spatialConfig.storage.onlinein: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.online query parameter.schema:type: booleantitle: online- name: metadata.schemas.tables.indexes.spatialConfig.storage.allowRowLocksin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.allowRowLocks query parameter.schema:type: booleantitle: allow_row_locks- name: metadata.schemas.tables.indexes.spatialConfig.storage.allowPageLocksin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.allowPageLocks query parameter.schema:type: booleantitle: allow_page_locks- name: metadata.schemas.tables.indexes.spatialConfig.storage.maxdopin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.maxdop query parameter.schema:type: integertitle: maxdop@@ -3613,36 +2657,28 @@ paths:in: querydescription: The row_count is the estimated number of rows of a table.schema:- type:- - integer- - string+ type: stringtitle: row_countformat: int64- name: metadata.schemas.tables.dataSizein: querydescription: The data_size is the estimated data size of a table.schema:- type:- - integer- - string+ type: stringtitle: data_sizeformat: int64- name: metadata.schemas.tables.indexSizein: querydescription: The index_size is the estimated index size of a table.schema:- type:- - integer- - string+ type: stringtitle: index_sizeformat: int64- name: metadata.schemas.tables.dataFreein: querydescription: The data_free is the estimated free data size of a table.schema:- type:- - integer- - string+ type: stringtitle: data_freeformat: int64- name: metadata.schemas.tables.createOptions@@ -3724,8 +2760,9 @@ paths:in: querydescription: The type of a table partition.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'- name: metadata.schemas.tables.partitions.expressionin: querydescription: |-@@ -3790,9 +2827,7 @@ paths:schema:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: key_length- name: metadata.schemas.tables.partitions.indexes.descending@@ -3855,9 +2890,7 @@ paths:in: querydescription: The number of granules in the block. It's a ClickHouse specific field.schema:- type:- - integer- - string+ type: stringtitle: granularityformat: int64- name: metadata.schemas.tables.partitions.indexes.isConstraint@@ -3949,17 +2982,20 @@ paths:title: tablespace- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.workTablespacein: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.workTablespace query parameter.schema:type: stringtitle: work_tablespace- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.sdoLevelin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.sdoLevel query parameter.schema:type: integertitle: sdo_levelformat: int32- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.commitIntervalin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.commitInterval query parameter.schema:type: integertitle: commit_interval@@ -3978,26 +3014,31 @@ paths:title: sort_in_tempdb- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.dropExistingin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.dropExisting query parameter.schema:type: booleantitle: drop_existing- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.onlinein: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.online query parameter.schema:type: booleantitle: online- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.allowRowLocksin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.allowRowLocks query parameter.schema:type: booleantitle: allow_row_locks- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.allowPageLocksin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.allowPageLocks query parameter.schema:type: booleantitle: allow_page_locks- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.maxdopin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.maxdop query parameter.schema:type: integertitle: maxdop@@ -4222,6 +3263,7 @@ paths:format: int32- name: metadata.schemas.externalTables.columns.hasDefaultin: query+ description: The metadata.schemas.externalTables.columns.hasDefault query parameter.schema:type: booleantitle: has_default@@ -4280,16 +3322,20 @@ paths:title: comment- name: metadata.schemas.externalTables.columns.generation.typein: query+ description: The metadata.schemas.externalTables.columns.generation.type query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'- name: metadata.schemas.externalTables.columns.generation.expressionin: query+ description: The metadata.schemas.externalTables.columns.generation.expression query parameter.schema:type: stringtitle: expression- name: metadata.schemas.externalTables.columns.isIdentityin: query+ description: The metadata.schemas.externalTables.columns.isIdentity query parameter.schema:type: booleantitle: is_identity@@ -4297,24 +3343,21 @@ paths:in: querydescription: The identity_generation is for identity columns, PG only.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'title: identity_generation- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'- name: metadata.schemas.externalTables.columns.identitySeedin: querydescription: The identity_seed is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_seedformat: int64- name: metadata.schemas.externalTables.columns.identityIncrementin: querydescription: The identity_increment is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_incrementformat: int64- name: metadata.schemas.externalTables.columns.defaultConstraintName@@ -4410,6 +3453,7 @@ paths:format: int32- name: metadata.schemas.views.columns.hasDefaultin: query+ description: The metadata.schemas.views.columns.hasDefault query parameter.schema:type: booleantitle: has_default@@ -4468,16 +3512,20 @@ paths:title: comment- name: metadata.schemas.views.columns.generation.typein: query+ description: The metadata.schemas.views.columns.generation.type query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'- name: metadata.schemas.views.columns.generation.expressionin: query+ description: The metadata.schemas.views.columns.generation.expression query parameter.schema:type: stringtitle: expression- name: metadata.schemas.views.columns.isIdentityin: query+ description: The metadata.schemas.views.columns.isIdentity query parameter.schema:type: booleantitle: is_identity@@ -4485,24 +3533,21 @@ paths:in: querydescription: The identity_generation is for identity columns, PG only.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'title: identity_generation- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'- name: metadata.schemas.views.columns.identitySeedin: querydescription: The identity_seed is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_seedformat: int64- name: metadata.schemas.views.columns.identityIncrementin: querydescription: The identity_increment is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_incrementformat: int64- name: metadata.schemas.views.columns.defaultConstraintName@@ -4605,6 +3650,7 @@ paths:title: skip_dump- name: metadata.schemas.views.skipDumpin: query+ description: The metadata.schemas.views.skipDump query parameter.schema:type: booleantitle: skip_dump@@ -4636,21 +3682,25 @@ paths:title: character_set_client- name: metadata.schemas.functions.collationConnectionin: query+ description: The metadata.schemas.functions.collationConnection query parameter.schema:type: stringtitle: collation_connection- name: metadata.schemas.functions.databaseCollationin: query+ description: The metadata.schemas.functions.databaseCollation query parameter.schema:type: stringtitle: database_collation- name: metadata.schemas.functions.sqlModein: query+ description: The metadata.schemas.functions.sqlMode query parameter.schema:type: stringtitle: sql_mode- name: metadata.schemas.functions.commentin: query+ description: The metadata.schemas.functions.comment query parameter.schema:type: stringtitle: comment@@ -4668,6 +3718,7 @@ paths:title: table- name: metadata.schemas.functions.skipDumpin: query+ description: The metadata.schemas.functions.skipDump query parameter.schema:type: booleantitle: skip_dump@@ -4699,16 +3750,19 @@ paths:title: character_set_client- name: metadata.schemas.procedures.collationConnectionin: query+ description: The metadata.schemas.procedures.collationConnection query parameter.schema:type: stringtitle: collation_connection- name: metadata.schemas.procedures.databaseCollationin: query+ description: The metadata.schemas.procedures.databaseCollation query parameter.schema:type: stringtitle: database_collation- name: metadata.schemas.procedures.sqlModein: query+ description: The metadata.schemas.procedures.sqlMode query parameter.schema:type: stringtitle: sql_mode@@ -4720,6 +3774,7 @@ paths:title: comment- name: metadata.schemas.procedures.skipDumpin: query+ description: The metadata.schemas.procedures.skipDump query parameter.schema:type: booleantitle: skip_dump@@ -4751,8 +3806,9 @@ paths:in: querydescription: The type of the stream.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'- name: metadata.schemas.streams.stalein: querydescription: Indicates whether the stream was last read before the `stale_after` time.@@ -4763,8 +3819,9 @@ paths:in: querydescription: The mode of the stream.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'title: mode- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'- name: metadata.schemas.streams.definitionin: querydescription: The definition of the stream.@@ -4821,8 +3878,9 @@ paths:in: querydescription: The state of the task.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'title: state- $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'- name: metadata.schemas.tasks.conditionin: querydescription: The condition of the task.@@ -4951,9 +4009,7 @@ paths:schema:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: key_length- name: metadata.schemas.materializedViews.indexes.descending@@ -5016,9 +4072,7 @@ paths:in: querydescription: The number of granules in the block. It's a ClickHouse specific field.schema:- type:- - integer- - string+ type: stringtitle: granularityformat: int64- name: metadata.schemas.materializedViews.indexes.isConstraint@@ -5110,17 +4164,20 @@ paths:title: tablespace- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.workTablespacein: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.workTablespace query parameter.schema:type: stringtitle: work_tablespace- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.sdoLevelin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.sdoLevel query parameter.schema:type: integertitle: sdo_levelformat: int32- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.commitIntervalin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.commitInterval query parameter.schema:type: integertitle: commit_interval@@ -5139,26 +4196,31 @@ paths:title: sort_in_tempdb- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.dropExistingin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.dropExisting query parameter.schema:type: booleantitle: drop_existing- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.onlinein: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.online query parameter.schema:type: booleantitle: online- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.allowRowLocksin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.allowRowLocks query parameter.schema:type: booleantitle: allow_row_locks- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.allowPageLocksin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.allowPageLocks query parameter.schema:type: booleantitle: allow_page_locks- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.maxdopin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.maxdop query parameter.schema:type: integertitle: maxdop@@ -5236,6 +4298,7 @@ paths:title: opclass_defaults- name: metadata.schemas.materializedViews.skipDumpin: query+ description: The metadata.schemas.materializedViews.skipDump query parameter.schema:type: booleantitle: skip_dump@@ -5537,8 +4600,9 @@ paths:in: querydescription: The format of the SDL schema output.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'title: format- $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'responses:"200":description: Success@@ -5576,6 +4640,8 @@ paths:type: objectproperties:targetMetadata:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: target_metadatadescription: |-The metadata of the target schema. The source metadata and the engine are@@ -5583,7 +4649,6 @@ paths:Must describe the COMPLETE target schema: the diff runs against the fullstored source, so any object omitted from the target (for example by atruncated metadata fetch) is treated as dropped.- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: DiffMetadataRequestrequired:- targetMetadata@@ -5623,37 +4688,38 @@ paths:application/json:schema:type: object- allOf:- - {}- - oneOf:- - type: object- properties:- changelog:- type: string- title: changelog- description: |-- The resource name of the changelog- Format:- instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ anyOf:+ - type: object+ properties:+ changelog:+ type: stringtitle: changelog- required:- - changelog- - type: object- properties:- schema:- type: string- title: schema- description: The target schema.+ description: |-+ The resource name of the changelog+ Format:+ instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ title: changelog+ - type: object+ properties:+ schema:+ type: stringtitle: schema- required:- - schema- - not:- anyOf:- - required:- - changelog- - required:- - schema+ description: The target schema.+ title: schemaunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - changelog+ - required:+ - schema+ - not:+ oneOf:+ - required:+ - changelog+ - required:+ - schematitle: DiffSchemaRequestrequired: trueresponses:@@ -5701,9 +4767,10 @@ paths:format: int32description: The maximum number of rows to return.format:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ExportFormat'title: formatdescription: The export format.- $ref: '#/components/schemas/bytebase.v1.ExportFormat'admin:type: booleantitle: admin@@ -5808,8 +4875,9 @@ paths:The default schema to search objects. Equals to the current schema inOracle and search path in Postgres.queryOption:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryOption'title: query_option- $ref: '#/components/schemas/bytebase.v1.QueryOption'container:type:- string@@ -6049,11 +5117,12 @@ paths:type: objectproperties:dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: |-Identified by data source ID.Only READ_ONLY data source can be added.- $ref: '#/components/schemas/bytebase.v1.DataSource'validateOnly:type: booleantitle: validate_only@@ -6133,11 +5202,12 @@ paths:type: objectproperties:dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: |-Identified by data source ID.Only READ_ONLY data source can be removed.- $ref: '#/components/schemas/bytebase.v1.DataSource'title: RemoveDataSourceRequestrequired:- dataSource@@ -6231,206 +5301,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: validateOnly@@ -6452,9 +5323,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: Identified by data source ID.- $ref: '#/components/schemas/bytebase.v1.DataSource'responses:"200":description: Success@@ -6597,9 +5469,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Project'title: projectdescription: The project to create.- $ref: '#/components/schemas/bytebase.v1.Project'responses:"200":description: Success@@ -6682,206 +5555,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -6901,13 +5575,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Project'title: projectdescription: |-The project to update.The project's `name` field is used to identify the project to update.Format: projects/{project}- $ref: '#/components/schemas/bytebase.v1.Project'responses:"200":description: Success@@ -7008,9 +5683,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AccessGrant'title: access_grantdescription: The access grant to create.- $ref: '#/components/schemas/bytebase.v1.AccessGrant'responses:"200":description: Success@@ -7184,9 +5860,10 @@ paths:- order_by = "create_time asc"- order_by = "create_time desc"format:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ExportFormat'title: formatdescription: The export format.- $ref: '#/components/schemas/bytebase.v1.ExportFormat'pageSize:type: integertitle: page_size@@ -7313,8 +5990,9 @@ paths:in: querydescription: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: view- $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'responses:"200":description: Success@@ -7359,9 +6037,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'title: database_groupdescription: The database group to create.- $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'responses:"200":description: Success@@ -7395,8 +6074,9 @@ paths:in: querydescription: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: view- $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'responses:"200":description: Success@@ -7456,206 +6136,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -7675,13 +6156,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'title: database_groupdescription: |-The database group to update.The database group's `name` field is used to identify the database group to update.Format: projects/{project}/databaseGroups/{databaseGroup}- $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'responses:"200":description: Success@@ -7965,9 +6447,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Instance'title: instancedescription: The instance to create.- $ref: '#/components/schemas/bytebase.v1.Instance'responses:"200":description: Success@@ -8075,210 +6558,11 @@ paths:schema:type: string- name: updateMask- in: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.- schema:- type: string- - name: allowMissing+ in: query+ description: The list of fields to update.+ schema:+ type: string+ - name: allowMissingin: querydescription: |-If set to true, and the instance is not found, a new instance will be created.@@ -8297,13 +6581,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Instance'title: instancedescription: |-The instance to update.The instance's `name` field is used to identify the instance to update.Format: instances/{instance} or projects/{project}/instances/{instance}- $ref: '#/components/schemas/bytebase.v1.Instance'responses:"200":description: Success@@ -8482,206 +6767,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: stringrequestBody:@@ -8693,13 +6779,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Database'title: databasedescription: |-The database to update.The database's `name` field is used to identify the database to update.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- $ref: '#/components/schemas/bytebase.v1.Database'responses:"200":description: Success@@ -8780,6 +6867,8 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'title: catalogdescription: |-The database catalog to update, identified by its `name` field.@@ -8788,7 +6877,6 @@ paths:Replaces the whole catalog: send the complete value, since anything omittedis erased. There is no `update_mask` because `schemas` is a repeated field,and AIP-161 forbids addressing one element of one.- $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'responses:"200":description: Success@@ -8847,9 +6935,11 @@ paths:title: page_token- name: viewin: query+ description: The view query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: view- $ref: '#/components/schemas/bytebase.v1.ChangelogView'- name: filterin: querydescription: |-@@ -8911,9 +7001,11 @@ paths:type: string- name: viewin: query+ description: The view query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: view- $ref: '#/components/schemas/bytebase.v1.ChangelogView'responses:"200":description: Success@@ -8960,37 +7052,38 @@ paths:application/json:schema:type: object- allOf:- - {}- - oneOf:- - type: object- properties:- changelog:- type: string- title: changelog- description: |-- The resource name of the changelog- Format:- instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ anyOf:+ - type: object+ properties:+ changelog:+ type: stringtitle: changelog- required:- - changelog- - type: object- properties:- schema:- type: string- title: schema- description: The target schema.+ description: |-+ The resource name of the changelog+ Format:+ instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ title: changelog+ - type: object+ properties:+ schema:+ type: stringtitle: schema- required:- - schema- - not:- anyOf:- - required:- - changelog- - required:- - schema+ description: The target schema.+ title: schemaunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - changelog+ - required:+ - schema+ - not:+ oneOf:+ - required:+ - changelog+ - required:+ - schematitle: DiffSchemaRequestrequired: trueresponses:@@ -9328,9 +7421,11 @@ paths:type: string- name: typein: query+ description: The type query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'title: type- $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'- name: schemain: querydescription: It's empty for DATABASE.@@ -9381,6 +7476,7 @@ paths:format: int32- name: metadata.schemas.tables.columns.hasDefaultin: query+ description: The metadata.schemas.tables.columns.hasDefault query parameter.schema:type: booleantitle: has_default@@ -9439,16 +7535,20 @@ paths:title: comment- name: metadata.schemas.tables.columns.generation.typein: query+ description: The metadata.schemas.tables.columns.generation.type query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'- name: metadata.schemas.tables.columns.generation.expressionin: query+ description: The metadata.schemas.tables.columns.generation.expression query parameter.schema:type: stringtitle: expression- name: metadata.schemas.tables.columns.isIdentityin: query+ description: The metadata.schemas.tables.columns.isIdentity query parameter.schema:type: booleantitle: is_identity@@ -9456,24 +7556,21 @@ paths:in: querydescription: The identity_generation is for identity columns, PG only.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'title: identity_generation- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'- name: metadata.schemas.tables.columns.identitySeedin: querydescription: The identity_seed is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_seedformat: int64- name: metadata.schemas.tables.columns.identityIncrementin: querydescription: The identity_increment is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_incrementformat: int64- name: metadata.schemas.tables.columns.defaultConstraintName@@ -9542,9 +7639,7 @@ paths:schema:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: key_length- name: metadata.schemas.tables.indexes.descending@@ -9607,9 +7702,7 @@ paths:in: querydescription: The number of granules in the block. It's a ClickHouse specific field.schema:- type:- - integer- - string+ type: stringtitle: granularityformat: int64- name: metadata.schemas.tables.indexes.isConstraint@@ -9701,17 +7794,20 @@ paths:title: tablespace- name: metadata.schemas.tables.indexes.spatialConfig.storage.workTablespacein: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.workTablespace query parameter.schema:type: stringtitle: work_tablespace- name: metadata.schemas.tables.indexes.spatialConfig.storage.sdoLevelin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.sdoLevel query parameter.schema:type: integertitle: sdo_levelformat: int32- name: metadata.schemas.tables.indexes.spatialConfig.storage.commitIntervalin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.commitInterval query parameter.schema:type: integertitle: commit_interval@@ -9730,26 +7826,31 @@ paths:title: sort_in_tempdb- name: metadata.schemas.tables.indexes.spatialConfig.storage.dropExistingin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.dropExisting query parameter.schema:type: booleantitle: drop_existing- name: metadata.schemas.tables.indexes.spatialConfig.storage.onlinein: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.online query parameter.schema:type: booleantitle: online- name: metadata.schemas.tables.indexes.spatialConfig.storage.allowRowLocksin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.allowRowLocks query parameter.schema:type: booleantitle: allow_row_locks- name: metadata.schemas.tables.indexes.spatialConfig.storage.allowPageLocksin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.allowPageLocks query parameter.schema:type: booleantitle: allow_page_locks- name: metadata.schemas.tables.indexes.spatialConfig.storage.maxdopin: query+ description: The metadata.schemas.tables.indexes.spatialConfig.storage.maxdop query parameter.schema:type: integertitle: maxdop@@ -9847,36 +7948,28 @@ paths:in: querydescription: The row_count is the estimated number of rows of a table.schema:- type:- - integer- - string+ type: stringtitle: row_countformat: int64- name: metadata.schemas.tables.dataSizein: querydescription: The data_size is the estimated data size of a table.schema:- type:- - integer- - string+ type: stringtitle: data_sizeformat: int64- name: metadata.schemas.tables.indexSizein: querydescription: The index_size is the estimated index size of a table.schema:- type:- - integer- - string+ type: stringtitle: index_sizeformat: int64- name: metadata.schemas.tables.dataFreein: querydescription: The data_free is the estimated free data size of a table.schema:- type:- - integer- - string+ type: stringtitle: data_freeformat: int64- name: metadata.schemas.tables.createOptions@@ -9958,8 +8051,9 @@ paths:in: querydescription: The type of a table partition.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'- name: metadata.schemas.tables.partitions.expressionin: querydescription: |-@@ -10024,9 +8118,7 @@ paths:schema:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: key_length- name: metadata.schemas.tables.partitions.indexes.descending@@ -10089,9 +8181,7 @@ paths:in: querydescription: The number of granules in the block. It's a ClickHouse specific field.schema:- type:- - integer- - string+ type: stringtitle: granularityformat: int64- name: metadata.schemas.tables.partitions.indexes.isConstraint@@ -10183,17 +8273,20 @@ paths:title: tablespace- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.workTablespacein: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.workTablespace query parameter.schema:type: stringtitle: work_tablespace- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.sdoLevelin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.sdoLevel query parameter.schema:type: integertitle: sdo_levelformat: int32- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.commitIntervalin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.commitInterval query parameter.schema:type: integertitle: commit_interval@@ -10212,26 +8305,31 @@ paths:title: sort_in_tempdb- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.dropExistingin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.dropExisting query parameter.schema:type: booleantitle: drop_existing- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.onlinein: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.online query parameter.schema:type: booleantitle: online- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.allowRowLocksin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.allowRowLocks query parameter.schema:type: booleantitle: allow_row_locks- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.allowPageLocksin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.allowPageLocks query parameter.schema:type: booleantitle: allow_page_locks- name: metadata.schemas.tables.partitions.indexes.spatialConfig.storage.maxdopin: query+ description: The metadata.schemas.tables.partitions.indexes.spatialConfig.storage.maxdop query parameter.schema:type: integertitle: maxdop@@ -10456,6 +8554,7 @@ paths:format: int32- name: metadata.schemas.externalTables.columns.hasDefaultin: query+ description: The metadata.schemas.externalTables.columns.hasDefault query parameter.schema:type: booleantitle: has_default@@ -10514,16 +8613,20 @@ paths:title: comment- name: metadata.schemas.externalTables.columns.generation.typein: query+ description: The metadata.schemas.externalTables.columns.generation.type query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'- name: metadata.schemas.externalTables.columns.generation.expressionin: query+ description: The metadata.schemas.externalTables.columns.generation.expression query parameter.schema:type: stringtitle: expression- name: metadata.schemas.externalTables.columns.isIdentityin: query+ description: The metadata.schemas.externalTables.columns.isIdentity query parameter.schema:type: booleantitle: is_identity@@ -10531,24 +8634,21 @@ paths:in: querydescription: The identity_generation is for identity columns, PG only.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'title: identity_generation- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'- name: metadata.schemas.externalTables.columns.identitySeedin: querydescription: The identity_seed is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_seedformat: int64- name: metadata.schemas.externalTables.columns.identityIncrementin: querydescription: The identity_increment is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_incrementformat: int64- name: metadata.schemas.externalTables.columns.defaultConstraintName@@ -10644,6 +8744,7 @@ paths:format: int32- name: metadata.schemas.views.columns.hasDefaultin: query+ description: The metadata.schemas.views.columns.hasDefault query parameter.schema:type: booleantitle: has_default@@ -10702,16 +8803,20 @@ paths:title: comment- name: metadata.schemas.views.columns.generation.typein: query+ description: The metadata.schemas.views.columns.generation.type query parameter.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'- name: metadata.schemas.views.columns.generation.expressionin: query+ description: The metadata.schemas.views.columns.generation.expression query parameter.schema:type: stringtitle: expression- name: metadata.schemas.views.columns.isIdentityin: query+ description: The metadata.schemas.views.columns.isIdentity query parameter.schema:type: booleantitle: is_identity@@ -10719,24 +8824,21 @@ paths:in: querydescription: The identity_generation is for identity columns, PG only.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'title: identity_generation- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'- name: metadata.schemas.views.columns.identitySeedin: querydescription: The identity_seed is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_seedformat: int64- name: metadata.schemas.views.columns.identityIncrementin: querydescription: The identity_increment is for identity columns, MSSQL only.schema:- type:- - integer- - string+ type: stringtitle: identity_incrementformat: int64- name: metadata.schemas.views.columns.defaultConstraintName@@ -10839,6 +8941,7 @@ paths:title: skip_dump- name: metadata.schemas.views.skipDumpin: query+ description: The metadata.schemas.views.skipDump query parameter.schema:type: booleantitle: skip_dump@@ -10870,21 +8973,25 @@ paths:title: character_set_client- name: metadata.schemas.functions.collationConnectionin: query+ description: The metadata.schemas.functions.collationConnection query parameter.schema:type: stringtitle: collation_connection- name: metadata.schemas.functions.databaseCollationin: query+ description: The metadata.schemas.functions.databaseCollation query parameter.schema:type: stringtitle: database_collation- name: metadata.schemas.functions.sqlModein: query+ description: The metadata.schemas.functions.sqlMode query parameter.schema:type: stringtitle: sql_mode- name: metadata.schemas.functions.commentin: query+ description: The metadata.schemas.functions.comment query parameter.schema:type: stringtitle: comment@@ -10902,6 +9009,7 @@ paths:title: table- name: metadata.schemas.functions.skipDumpin: query+ description: The metadata.schemas.functions.skipDump query parameter.schema:type: booleantitle: skip_dump@@ -10933,16 +9041,19 @@ paths:title: character_set_client- name: metadata.schemas.procedures.collationConnectionin: query+ description: The metadata.schemas.procedures.collationConnection query parameter.schema:type: stringtitle: collation_connection- name: metadata.schemas.procedures.databaseCollationin: query+ description: The metadata.schemas.procedures.databaseCollation query parameter.schema:type: stringtitle: database_collation- name: metadata.schemas.procedures.sqlModein: query+ description: The metadata.schemas.procedures.sqlMode query parameter.schema:type: stringtitle: sql_mode@@ -10954,6 +9065,7 @@ paths:title: comment- name: metadata.schemas.procedures.skipDumpin: query+ description: The metadata.schemas.procedures.skipDump query parameter.schema:type: booleantitle: skip_dump@@ -10985,8 +9097,9 @@ paths:in: querydescription: The type of the stream.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'- name: metadata.schemas.streams.stalein: querydescription: Indicates whether the stream was last read before the `stale_after` time.@@ -10997,8 +9110,9 @@ paths:in: querydescription: The mode of the stream.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'title: mode- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'- name: metadata.schemas.streams.definitionin: querydescription: The definition of the stream.@@ -11055,8 +9169,9 @@ paths:in: querydescription: The state of the task.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'title: state- $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'- name: metadata.schemas.tasks.conditionin: querydescription: The condition of the task.@@ -11185,9 +9300,7 @@ paths:schema:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: key_length- name: metadata.schemas.materializedViews.indexes.descending@@ -11250,9 +9363,7 @@ paths:in: querydescription: The number of granules in the block. It's a ClickHouse specific field.schema:- type:- - integer- - string+ type: stringtitle: granularityformat: int64- name: metadata.schemas.materializedViews.indexes.isConstraint@@ -11344,17 +9455,20 @@ paths:title: tablespace- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.workTablespacein: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.workTablespace query parameter.schema:type: stringtitle: work_tablespace- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.sdoLevelin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.sdoLevel query parameter.schema:type: integertitle: sdo_levelformat: int32- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.commitIntervalin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.commitInterval query parameter.schema:type: integertitle: commit_interval@@ -11373,26 +9487,31 @@ paths:title: sort_in_tempdb- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.dropExistingin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.dropExisting query parameter.schema:type: booleantitle: drop_existing- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.onlinein: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.online query parameter.schema:type: booleantitle: online- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.allowRowLocksin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.allowRowLocks query parameter.schema:type: booleantitle: allow_row_locks- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.allowPageLocksin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.allowPageLocks query parameter.schema:type: booleantitle: allow_page_locks- name: metadata.schemas.materializedViews.indexes.spatialConfig.storage.maxdopin: query+ description: The metadata.schemas.materializedViews.indexes.spatialConfig.storage.maxdop query parameter.schema:type: integertitle: maxdop@@ -11470,6 +9589,7 @@ paths:title: opclass_defaults- name: metadata.schemas.materializedViews.skipDumpin: query+ description: The metadata.schemas.materializedViews.skipDump query parameter.schema:type: booleantitle: skip_dump@@ -11777,8 +9897,9 @@ paths:in: querydescription: The format of the SDL schema output.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'title: format- $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'responses:"200":description: Success@@ -11822,6 +9943,8 @@ paths:type: objectproperties:targetMetadata:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: target_metadatadescription: |-The metadata of the target schema. The source metadata and the engine are@@ -11829,7 +9952,6 @@ paths:Must describe the COMPLETE target schema: the diff runs against the fullstored source, so any object omitted from the target (for example by atruncated metadata fetch) is treated as dropped.- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: DiffMetadataRequestrequired:- targetMetadata@@ -11875,37 +9997,38 @@ paths:application/json:schema:type: object- allOf:- - {}- - oneOf:- - type: object- properties:- changelog:- type: string- title: changelog- description: |-- The resource name of the changelog- Format:- instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ anyOf:+ - type: object+ properties:+ changelog:+ type: stringtitle: changelog- required:- - changelog- - type: object- properties:- schema:- type: string- title: schema- description: The target schema.+ description: |-+ The resource name of the changelog+ Format:+ instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ title: changelog+ - type: object+ properties:+ schema:+ type: stringtitle: schema- required:- - schema- - not:- anyOf:- - required:- - changelog- - required:- - schema+ description: The target schema.+ title: schemaunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - changelog+ - required:+ - schema+ - not:+ oneOf:+ - required:+ - changelog+ - required:+ - schematitle: DiffSchemaRequestrequired: trueresponses:@@ -11959,9 +10082,10 @@ paths:format: int32description: The maximum number of rows to return.format:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ExportFormat'title: formatdescription: The export format.- $ref: '#/components/schemas/bytebase.v1.ExportFormat'admin:type: booleantitle: admin@@ -12072,8 +10196,9 @@ paths:The default schema to search objects. Equals to the current schema inOracle and search path in Postgres.queryOption:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryOption'title: query_option- $ref: '#/components/schemas/bytebase.v1.QueryOption'container:type:- string@@ -12349,11 +10474,12 @@ paths:type: objectproperties:dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: |-Identified by data source ID.Only READ_ONLY data source can be added.- $ref: '#/components/schemas/bytebase.v1.DataSource'validateOnly:type: booleantitle: validate_only@@ -12445,11 +10571,12 @@ paths:type: objectproperties:dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: |-Identified by data source ID.Only READ_ONLY data source can be removed.- $ref: '#/components/schemas/bytebase.v1.DataSource'title: RemoveDataSourceRequestrequired:- dataSource@@ -12561,206 +10688,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: validateOnly@@ -12782,9 +10710,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: Identified by data source ID.- $ref: '#/components/schemas/bytebase.v1.DataSource'responses:"200":description: Success@@ -13007,9 +10936,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue'title: issuedescription: The issue to create.- $ref: '#/components/schemas/bytebase.v1.Issue'responses:"200":description: Success@@ -13075,206 +11005,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.required: trueschema:type: string@@ -13295,13 +11026,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue'title: issuedescription: |-The issue to update.The issue's `name` field is used to identify the issue to update.Format: projects/{project}/issues/{issue}- $ref: '#/components/schemas/bytebase.v1.Issue'responses:"200":description: Success@@ -13480,9 +11212,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment'title: issue_commentdescription: The comment to create.- $ref: '#/components/schemas/bytebase.v1.IssueComment'responses:"200":description: Success@@ -13512,211 +11245,12 @@ paths:schema:type: string- name: updateMask- in: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.- required: true- schema:- type: string- - name: allowMissing+ in: query+ description: The list of fields to update.+ required: true+ schema:+ type: string+ - name: allowMissingin: querydescription: |-If set to true, and the issue comment is not found, a new issue comment will be created.@@ -13729,9 +11263,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment'title: issue_commentdescription: The comment to update.- $ref: '#/components/schemas/bytebase.v1.IssueComment'responses:"200":description: Success@@ -13890,9 +11425,10 @@ paths:The list of issues to update.Format: projects/{project}/issues/{issue}status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueStatus'title: statusdescription: The new status.- $ref: '#/components/schemas/bytebase.v1.IssueStatus'reason:type: stringtitle: reason@@ -14067,9 +11603,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan'title: plandescription: The plan to create.- $ref: '#/components/schemas/bytebase.v1.Plan'responses:"200":description: Success@@ -14130,206 +11667,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.required: trueschema:type: string@@ -14350,13 +11688,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan'title: plandescription: |-The plan to update.The plan's `name` field is used to identify the plan to update.Format: projects/{project}/plans/{plan}- $ref: '#/components/schemas/bytebase.v1.Plan'responses:"200":description: Success@@ -15032,16 +12371,18 @@ paths:in: querydescription: The type of policy to create.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyType'title: type- $ref: '#/components/schemas/bytebase.v1.PolicyType'requestBody:description: The policy to create.content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: The policy to create.- $ref: '#/components/schemas/bytebase.v1.Policy'responses:"200":description: Success@@ -15129,206 +12470,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -15350,6 +12492,8 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: |-The policy to update.@@ -15358,7 +12502,6 @@ paths:Format: {resource name}/policies/{policy type}Workspace resource name: workspaces/{workspace-id}.Environment resource name: environments/environment-id.- $ref: '#/components/schemas/bytebase.v1.Policy'responses:"200":description: Success@@ -15625,9 +12768,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to create.- $ref: '#/components/schemas/bytebase.v1.Release'responses:"200":description: Success@@ -15716,206 +12860,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to be updated.schema:type: stringrequestBody:@@ -15923,9 +12868,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to update.- $ref: '#/components/schemas/bytebase.v1.Release'responses:"200":description: Success@@ -15985,9 +12931,10 @@ paths:type: objectproperties:release:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to check.- $ref: '#/components/schemas/bytebase.v1.Release'targets:type: arrayitems:@@ -16009,11 +12956,12 @@ paths:Example: "All tables must have a primary key"Example: "VARCHAR columns should specify a maximum length"vcsUser:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.VCSUser'title: vcs_userdescription: |-The non-bot VCS pull request or merge request creator observed by bytebase-release.If absent, Bytebase skips VCS user tracking and VCS user limit enforcement.- $ref: '#/components/schemas/bytebase.v1.VCSUser'title: CheckReleaseRequestrequired:- release@@ -16201,9 +13149,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQuery'title: saved_querydescription: The saved query to create.- $ref: '#/components/schemas/bytebase.v1.SavedQuery'responses:"200":description: Success@@ -16296,205 +13245,9 @@ paths:- name: updateMaskin: querydescription: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ Fields to update, relative to the saved query (`title`, not+ `saved_query.title`). Supported: `title`, `content`, `database`, `folder`.+ At least one path is required.schema:type: stringrequestBody:@@ -16504,11 +13257,12 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQuery'title: saved_querydescription: |-`saved_query.name` identifies the saved query to update.Format: projects/{project}/savedQueries/{savedQuery}- $ref: '#/components/schemas/bytebase.v1.SavedQuery'responses:"200":description: Success@@ -16577,11 +13331,12 @@ paths:type: objectproperties:policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQueryPolicy'title: policydescription: |-The new policy, replacing the stored one in full. Empty `bindings` makesthe saved query private again.- $ref: '#/components/schemas/bytebase.v1.SavedQueryPolicy'title: SetSavedQueryPolicyRequestrequired:- policy@@ -16907,9 +13662,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: service_accountdescription: The service account to create.- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'responses:"200":description: Success@@ -16938,9 +13694,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Sheet'title: sheetdescription: The sheet to create.- $ref: '#/components/schemas/bytebase.v1.Sheet'responses:"200":description: Success@@ -17051,9 +13808,10 @@ paths:type: objectproperties:webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to remove. Identified by its url.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: RemoveWebhookRequestrequired:- webhook@@ -17090,206 +13848,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -17305,9 +13864,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to modify.- $ref: '#/components/schemas/bytebase.v1.Webhook'responses:"200":description: Success@@ -17418,9 +13978,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: workload_identitydescription: The workload identity to create.- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'responses:"200":description: Success@@ -17451,9 +14012,10 @@ paths:type: objectproperties:webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to add.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: AddWebhookRequestrequired:- webhook@@ -17512,8 +14074,9 @@ paths:type: objectproperties:policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IamPolicy'title: policy- $ref: '#/components/schemas/bytebase.v1.IamPolicy'etag:type: stringtitle: etag@@ -17556,6 +14119,8 @@ paths:type: objectproperties:webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: |-The webhook to test.@@ -17563,7 +14128,6 @@ paths:The url is what gets posted to. Reads do not return a saved webhook's url,so leave url empty and set name to test the one already stored; set url totest a url before saving it.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: TestWebhookRequestrequired:- webhook@@ -17702,9 +14266,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewConfig'title: review_configdescription: The SQL review config to create.- $ref: '#/components/schemas/bytebase.v1.ReviewConfig'responses:"200":description: Success@@ -17775,206 +14340,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -17993,12 +14359,13 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewConfig'title: review_configdescription: |-The SQL review config to update.The name field is used to identify the SQL review config to update.- $ref: '#/components/schemas/bytebase.v1.ReviewConfig'responses:"200":description: Success@@ -18048,9 +14415,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Role'title: roledescription: The role to create.- $ref: '#/components/schemas/bytebase.v1.Role'responses:"200":description: Success@@ -18121,206 +14489,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -18336,9 +14505,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Role'title: roledescription: The role to update.- $ref: '#/components/schemas/bytebase.v1.Role'responses:"200":description: Success@@ -18409,205 +14579,8 @@ paths:- name: updateMaskin: querydescription: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The list of fields to update.+ Supported fields: title, service_key (triggers key rotation)schema:type: stringrequestBody:@@ -18619,13 +14592,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: service_accountdescription: |-The service account to update.The service account's `name` field is used to identify the service account to update.Format: serviceAccounts/{email}- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'responses:"200":description: Success@@ -18718,213 +14692,15 @@ paths:schema:type: booleantitle: validate_only- - name: allowMissing- in: query- schema:- type: boolean- title: allow_missing- - name: updateMask- in: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ - name: allowMissing+ in: query+ description: The allowMissing query parameter.+ schema:+ type: boolean+ title: allow_missing+ - name: updateMask+ in: query+ description: Comma-separated field paths in lowerCamelCase (for example, `user.displayName,photo`).schema:type: stringrequestBody:@@ -18932,9 +14708,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Setting'title: settingdescription: The setting to update.- $ref: '#/components/schemas/bytebase.v1.Setting'responses:"200":description: Success@@ -19217,9 +14994,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User'title: userdescription: The user to create.- $ref: '#/components/schemas/bytebase.v1.User'responses:"200":description: Success@@ -19307,206 +15085,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -19526,13 +15105,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User'title: userdescription: |-The user to update.The user's `name` field is used to identify the user to update.Format: users/{email}- $ref: '#/components/schemas/bytebase.v1.User'responses:"200":description: Success@@ -19571,8 +15151,9 @@ paths:description: |string.max_bytes = 72credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credential- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: ChangePasswordRequestrequired:- newPassword@@ -19611,14 +15192,16 @@ paths:type: objectproperties:pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: |-The pending_version of the codes being confirmed. Confirming promotesexactly the set this version identifies, or nothing.- $ref: '#/components/schemas/google.protobuf.Timestamp'credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credential- $ref: '#/components/schemas/bytebase.v1.CredentialProof'otpCode:type: stringtitle: otp_code@@ -19665,11 +15248,12 @@ paths:type: objectproperties:credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credentialdescription: |-(OPTIONAL) Required for a self-service call against a live factor, and then onlyotp_code or recovery_code. Unused on an admin-assisted call.- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: DisableMFARequestadditionalProperties: falserequired: true@@ -19714,15 +15298,17 @@ paths:maxLength: 64description: A code from the authenticator the pending secret was just added to.pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: The pending_version this enrollment was minted with.- $ref: '#/components/schemas/google.protobuf.Timestamp'credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credentialdescription: |-(OPTIONAL) Proof of the *existing* factor, not the new device above. Required for arotation, and for first-time enrollment on an account with a password.- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: EnableMFARequestrequired:- otpCode@@ -19968,205 +15554,8 @@ paths:- name: updateMaskin: querydescription: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The list of fields to update.+ Supported fields: title, workload_identity_configschema:type: stringrequestBody:@@ -20178,13 +15567,14 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: workload_identitydescription: |-The workload identity to update.The workload identity's `name` field is used to identify the workload identity to update.Format: workloadIdentities/{email}- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'responses:"200":description: Success@@ -20298,11 +15688,13 @@ paths:type: objectproperties:workspace:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Workspace'title: workspace- $ref: '#/components/schemas/bytebase.v1.Workspace'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_mask- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateWorkspaceRequestrequired:- workspace@@ -20525,16 +15917,18 @@ paths:in: querydescription: The type of policy to create.schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyType'title: type- $ref: '#/components/schemas/bytebase.v1.PolicyType'requestBody:description: The policy to create.content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: The policy to create.- $ref: '#/components/schemas/bytebase.v1.Policy'responses:"200":description: Success@@ -20622,206 +16016,7 @@ paths:type: string- name: updateMaskin: query- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: The list of fields to update.schema:type: string- name: allowMissing@@ -20843,6 +16038,8 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: |-The policy to update.@@ -20851,7 +16048,6 @@ paths:Format: {resource name}/policies/{policy type}Workspace resource name: workspaces/{workspace-id}.Environment resource name: environments/environment-id.- $ref: '#/components/schemas/bytebase.v1.Policy'responses:"200":description: Success@@ -20962,9 +16158,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: service_accountdescription: The service account to create.- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'responses:"200":description: Success@@ -20995,8 +16192,9 @@ paths:type: objectproperties:emailSetting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting'title: email_setting- $ref: '#/components/schemas/bytebase.v1.EmailSetting'to:type: stringtitle: to@@ -21116,9 +16314,10 @@ paths:content:application/json:schema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: workload_identitydescription: The workload identity to create.- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'responses:"200":description: Success@@ -21222,8 +16421,9 @@ paths:type: objectproperties:policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IamPolicy'title: policy- $ref: '#/components/schemas/bytebase.v1.IamPolicy'etag:type: stringtitle: etag@@ -21305,9 +16505,10 @@ components:type: objectproperties:role:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AIChatMessageRole'title: roledescription: The role of the message sender.- $ref: '#/components/schemas/bytebase.v1.AIChatMessageRole'content:type:- string@@ -21443,8 +16644,9 @@ components:type: booleantitle: enabledprovider:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AISetting.Provider'title: provider- $ref: '#/components/schemas/bytebase.v1.AISetting.Provider'endpoint:type: stringtitle: endpoint@@ -21453,123 +16655,130 @@ components:title: api_keymodel:type: string- title: model- version:+ title: model+ version:+ type: string+ title: version+ title: AISetting+ additionalProperties: false+ bytebase.v1.AISetting.Provider:+ type: string+ title: Provider+ enum:+ - PROVIDER_UNSPECIFIED+ - OPEN_AI+ - CLAUDE+ - GEMINI+ - AZURE_OPENAI+ bytebase.v1.AccessGrant:+ type: object+ anyOf:+ - type: object+ properties:+ expireTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: expire_time+ description: The expiration time of the access grant.+ title: expire_time+ - type: object+ properties:+ ttl:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'+ title: ttl+ description: |-+ Input only. The time-to-live duration for the access grant.+ The server computes `expire_time` from this value at activation time.+ writeOnly: true+ title: ttl+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - expireTime+ - required:+ - ttl+ - not:+ oneOf:+ - required:+ - expireTime+ - required:+ - ttl+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the access grant, generated by the server.+ Format: projects/{project}/accessGrants/{access_grant}+ The {access_grant} segment is a server-generated unique ID.+ creator:+ type: string+ title: creator+ description: |-+ The creator of the access grant.+ Format: users/{email}+ status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AccessGrant.Status'+ title: status+ description: |-+ The status of the access grant.+ An ACTIVE grant with `expire_time` in the past is effectively expired+ and no longer authorizes access. Use `expire_time` to determine+ whether an ACTIVE grant has expired.+ readOnly: true+ issue:+ type: string+ title: issue+ description: |-+ The issue associated with the access grant.+ Can be empty.+ Format: projects/{project}/issues/{issue}+ readOnly: true+ targets:+ type: array+ items:+ type: string+ title: targets+ description: |-+ The target databases for this access grant.+ Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ query:+ type: string+ title: query+ description: The query permission granted.+ unmask:+ type: boolean+ title: unmask+ description: Whether the grant allows unmasking sensitive data.+ createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: create_time+ readOnly: true+ updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: update_time+ readOnly: true+ reason:+ type: string+ title: reason+ export:+ type: boolean+ title: export+ description: Whether export the query result.+ schema:type: string- title: version- title: AISetting- additionalProperties: false- bytebase.v1.AISetting.Provider:- type: string- title: Provider- enum:- - PROVIDER_UNSPECIFIED- - OPEN_AI- - CLAUDE- - GEMINI- - AZURE_OPENAI- bytebase.v1.AccessGrant:- type: object- allOf:- - properties:- name:- type: string- title: name- description: |-- The name of the access grant, generated by the server.- Format: projects/{project}/accessGrants/{access_grant}- The {access_grant} segment is a server-generated unique ID.- creator:- type: string- title: creator- description: |-- The creator of the access grant.- Format: users/{email}- status:- title: status- description: |-- The status of the access grant.- An ACTIVE grant with `expire_time` in the past is effectively expired- and no longer authorizes access. Use `expire_time` to determine- whether an ACTIVE grant has expired.- readOnly: true- $ref: '#/components/schemas/bytebase.v1.AccessGrant.Status'- issue:- type: string- title: issue- description: |-- The issue associated with the access grant.- Can be empty.- Format: projects/{project}/issues/{issue}- readOnly: true- targets:- type: array- items:- type: string- title: targets- description: |-- The target databases for this access grant.- Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- query:- type: string- title: query- description: The query permission granted.- unmask:- type: boolean- title: unmask- description: Whether the grant allows unmasking sensitive data.- createTime:- title: create_time- readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'- updateTime:- title: update_time- readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'- reason:- type: string- title: reason- export:- type: boolean- title: export- description: Whether export the query result.- schema:- type: string- title: schema- description: The default schema to execute the query.- container:- type: string- title: container- description: The container name to execute the query against, used for CosmosDB only.- - oneOf:- - type: object- properties:- expireTime:- title: expire_time- description: The expiration time of the access grant.- $ref: '#/components/schemas/google.protobuf.Timestamp'- title: expire_time- required:- - expireTime- - type: object- properties:- ttl:- title: ttl- description: |-- Input only. The time-to-live duration for the access grant.- The server computes `expire_time` from this value at activation time.- writeOnly: true- $ref: '#/components/schemas/google.protobuf.Duration'- title: ttl- required:- - ttl- - not:- anyOf:- - required:- - expireTime- - required:- - ttl- unevaluatedProperties: false+ title: schema+ description: The default schema to execute the query.+ container:+ type: string+ title: container+ description: The container name to execute the query against, used for CosmosDB only.title: AccessGrantrequired:- creator@@ -21637,10 +16846,11 @@ components:description: The external URL where users or webhook callbacks access Bytebase.readOnly: truelastActiveTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_active_timedescription: The last time any API call was made, refreshed on each request.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'workspace:type: stringtitle: workspace@@ -21699,15 +16909,17 @@ components:description: The number of active VCS users seen in the active window.readOnly: truesample:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SampleInfo'title: sampledescription: Sample setup availability and provisioned resources.readOnly: true- $ref: '#/components/schemas/bytebase.v1.SampleInfo'mcpSetting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: mcp_settingdescription: The MCP (Model Context Protocol) setting in the current workspace.readOnly: true- $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: ActuatorInfoadditionalProperties: falsedescription: |-@@ -21723,11 +16935,12 @@ components:The name of the instance to add a data source to.Format: instances/{instance} or projects/{project}/instances/{instance}dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: |-Identified by data source ID.Only READ_ONLY data source can be added.- $ref: '#/components/schemas/bytebase.v1.DataSource'validateOnly:type: booleantitle: validate_only@@ -21747,9 +16960,10 @@ components:The name of the project to add the webhook to.Format: projects/{project}webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to add.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: AddWebhookRequestrequired:- project@@ -21809,9 +17023,10 @@ components:type: objectproperties:status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Advice.Level'title: statusdescription: The advice level.- $ref: '#/components/schemas/bytebase.v1.Advice.Level'code:type: integertitle: code@@ -21826,18 +17041,21 @@ components:title: contentdescription: The advice content.startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: |-The start_position is inclusive and the end_position is exclusive.TODO: use range instead- $ref: '#/components/schemas/bytebase.v1.Position'endPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: end_position- $ref: '#/components/schemas/bytebase.v1.Position'ruleType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Advice.RuleType'title: rule_typedescription: The type of linting rule that generated this advice.- $ref: '#/components/schemas/bytebase.v1.Advice.RuleType'title: AdviceadditionalProperties: falsebytebase.v1.Advice.Level:@@ -21859,41 +17077,39 @@ components:description: RuleType indicates the source of the linting rule.bytebase.v1.Algorithm:type: object- oneOf:+ anyOf:- type: objectproperties:fullMask:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.FullMask'title: full_mask- $ref: '#/components/schemas/bytebase.v1.Algorithm.FullMask'title: full_mask- required:- - fullMask- type: objectproperties:innerOuterMask:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask'title: inner_outer_mask- $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask'title: inner_outer_mask- required:- - innerOuterMask- type: objectproperties:md5Mask:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.MD5Mask'title: md5_mask- $ref: '#/components/schemas/bytebase.v1.Algorithm.MD5Mask'title: md5_mask- required:- - md5Mask- type: objectproperties:rangeMask:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.RangeMask'title: range_mask- $ref: '#/components/schemas/bytebase.v1.Algorithm.RangeMask'title: range_mask- required:- - rangeMask- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- fullMask- required:@@ -21902,7 +17118,16 @@ components:- md5Mask- required:- rangeMask- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - fullMask+ - required:+ - innerOuterMask+ - required:+ - md5Mask+ - required:+ - rangeMasktitle: Algorithmbytebase.v1.Algorithm.FullMask:type: object@@ -21927,8 +17152,9 @@ components:title: suffix_lenformat: int32type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask.MaskType'title: type- $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask.MaskType'substitution:type: stringtitle: substitution@@ -21999,22 +17225,25 @@ components:title: linkdescription: The optional link, user can follow the link to check extra detailstheme:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Announcement.AnnouncementTheme'title: themedescription: |-Banner colors. Built-in presets (info/warning/critical) are afrontend-only concept that seeds these colors; the store only holds them.- $ref: '#/components/schemas/bytebase.v1.Announcement.AnnouncementTheme'title: AnnouncementadditionalProperties: falsebytebase.v1.Announcement.AnnouncementTheme:type: objectproperties:background:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: background- $ref: '#/components/schemas/google.type.Color'text:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: text- $ref: '#/components/schemas/google.type.Color'title: AnnouncementThemeadditionalProperties: falsebytebase.v1.AppIMSetting:@@ -22059,75 +17288,84 @@ components:additionalProperties: falsebytebase.v1.AppIMSetting.IMSetting:type: object- allOf:- - properties:- type:- title: type- $ref: '#/components/schemas/bytebase.v1.WebhookType'- - oneOf:- - type: object- properties:- dingtalk:- title: dingtalk- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.DingTalk'+ anyOf:+ - type: object+ properties:+ dingtalk:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.DingTalk'title: dingtalk- required:- - dingtalk- - type: object- properties:- feishu:- title: feishu- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Feishu'+ title: dingtalk+ - type: object+ properties:+ feishu:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Feishu'title: feishu- required:- - feishu- - type: object- properties:- lark:- title: lark- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Lark'+ title: feishu+ - type: object+ properties:+ lark:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Lark'title: lark- required:- - lark- - type: object- properties:- slack:- title: slack- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Slack'+ title: lark+ - type: object+ properties:+ slack:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Slack'title: slack- required:- - slack- - type: object- properties:- teams:- title: teams- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Teams'+ title: slack+ - type: object+ properties:+ teams:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Teams'title: teams- required:- - teams- - type: object- properties:- wecom:- title: wecom- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Wecom'+ title: teams+ - type: object+ properties:+ wecom:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Wecom'title: wecom- required:- - wecom- - not:- anyOf:- - required:- - dingtalk- - required:- - feishu- - required:- - lark- - required:- - slack- - required:- - teams- - required:- - wecom+ title: wecomunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - dingtalk+ - required:+ - feishu+ - required:+ - lark+ - required:+ - slack+ - required:+ - teams+ - required:+ - wecom+ - not:+ oneOf:+ - required:+ - dingtalk+ - required:+ - feishu+ - required:+ - lark+ - required:+ - slack+ - required:+ - teams+ - required:+ - wecom+ properties:+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WebhookType'+ title: typetitle: IMSettingbytebase.v1.AppIMSetting.Lark:type: object@@ -22217,9 +17455,10 @@ components:type: objectproperties:flow:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalFlow'title: flowdescription: The approval flow definition.- $ref: '#/components/schemas/bytebase.v1.ApprovalFlow'title:type: stringtitle: title@@ -22261,9 +17500,10 @@ components:type: objectproperties:policyDelta:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyDelta'title: policy_deltadescription: Changes to IAM policies.- $ref: '#/components/schemas/bytebase.v1.PolicyDelta'title: AuditDataadditionalProperties: falsedescription: Additional audit data specific to certain operations.@@ -22280,10 +17520,11 @@ components:- workspaces/{workspace}/auditLogs/{uid}readOnly: truecreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the audit log was created.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'user:type: stringtitle: user@@ -22297,9 +17538,10 @@ components:The method or action being audited.For example: /bytebase.v1.SQLService/Query or bb.project.repository.pushseverity:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AuditLog.Severity'title: severitydescription: The severity level of this audit log entry.- $ref: '#/components/schemas/bytebase.v1.AuditLog.Severity'resource:type: stringtitle: resource@@ -22315,29 +17557,34 @@ components:The response payload in JSON format.Some fields may be omitted if they are too large or contain sensitive information.status:+ allOf:+ - $ref: '#/components/schemas/google.rpc.Status'title: statusdescription: The status of the operation.- $ref: '#/components/schemas/google.rpc.Status'latency:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: latencydescription: The duration of the operation.- $ref: '#/components/schemas/google.protobuf.Duration'serviceData:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Any'title: service_datadescription: Service-specific metadata about the request, response, and activities.- $ref: '#/components/schemas/google.protobuf.Any'requestMetadata:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RequestMetadata'title: request_metadatadescription: Metadata about the request context.- $ref: '#/components/schemas/bytebase.v1.RequestMetadata'mcpDelegation:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MCPDelegation'title: mcp_delegationdescription: |-MCP delegation provenance. Present exactly when the audited call arrivedthrough the MCP server's delegated credential; never set for public APIcalls. Presence of this message is the MCP-origin marker.readOnly: true- $ref: '#/components/schemas/bytebase.v1.MCPDelegation'title: AuditLogadditionalProperties: falsedescription: Audit log entry recording system activity or API call.@@ -22374,10 +17621,11 @@ components:Format: workspaces/{workspace}readOnly: truerestriction:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Restriction'title: restrictiondescription: The effective authentication restrictions.readOnly: true- $ref: '#/components/schemas/bytebase.v1.Restriction'identityProviders:type: arrayitems:@@ -22887,9 +18135,10 @@ components:The list of issues to update.Format: projects/{project}/issues/{issue}status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueStatus'title: statusdescription: The new status.- $ref: '#/components/schemas/bytebase.v1.IssueStatus'reason:type: stringtitle: reason@@ -22930,6 +18179,8 @@ components:For service accounts, the member should be: serviceAccount:{email}For workload identities, the member should be: workloadIdentity:{email}condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: |-The condition that is associated with this binding, only used in the project IAM policy.@@ -22963,12 +18214,12 @@ components:resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"]resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"]request.time < timestamp("2025-04-26T11:24:48.655Z")- $ref: '#/components/schemas/google.type.Expr'parsedExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: parsed_exprdescription: The parsed expression of the condition.readOnly: true- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: BindingadditionalProperties: falsedescription: Binding associates members with a role and optional conditions.@@ -22976,9 +18227,10 @@ components:type: objectproperties:action:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BindingDelta.Action'title: actiondescription: The action that was performed on a Binding.- $ref: '#/components/schemas/bytebase.v1.BindingDelta.Action'role:type: stringtitle: role@@ -22990,9 +18242,10 @@ components:title: memberdescription: Follows the same format of Binding.members.condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: The condition that is associated with this binding.- $ref: '#/components/schemas/google.type.Expr'title: BindingDeltaadditionalProperties: falsedescription: A single change to a binding.@@ -23078,8 +18331,9 @@ components:description: |string.max_bytes = 72credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credential- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: ChangePasswordRequestrequired:- name@@ -23094,18 +18348,18 @@ components:title: namedescription: 'Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_time- $ref: '#/components/schemas/google.protobuf.Timestamp'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Changelog.Status'title: status- $ref: '#/components/schemas/bytebase.v1.Changelog.Status'schema:type: stringtitle: schemaschemaSize:- type:- - integer- - string+ type: stringtitle: schema_sizeformat: int64taskRun:@@ -23158,9 +18412,10 @@ components:title: parentdescription: 'Format: projects/{project}'release:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to check.- $ref: '#/components/schemas/bytebase.v1.Release'targets:type: arrayitems:@@ -23182,11 +18437,12 @@ components:Example: "All tables must have a primary key"Example: "VARCHAR columns should specify a maximum length"vcsUser:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.VCSUser'title: vcs_userdescription: |-The non-bot VCS pull request or merge request creator observed by bytebase-release.If absent, Bytebase skips VCS user tracking and VCS user limit enforcement.- $ref: '#/components/schemas/bytebase.v1.VCSUser'title: CheckReleaseRequestrequired:- parent@@ -23202,16 +18458,15 @@ components:title: resultsdescription: The check results for each file and target combination.affectedRows:- type:- - integer- - string+ type: stringtitle: affected_rowsformat: int64description: The total affected rows across all checks.riskLevel:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: risk_leveldescription: The aggregated risk level of the check.- $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: CheckReleaseResponseadditionalProperties: falsebytebase.v1.CheckReleaseResponse.CheckResult:@@ -23235,16 +18490,15 @@ components:title: advicesdescription: The list of advice for the file and the target.affectedRows:- type:- - integer- - string+ type: stringtitle: affected_rowsformat: int64description: The count of affected rows of the statement on the target.riskLevel:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: risk_leveldescription: The risk level of the statement on the target.- $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: CheckResultadditionalProperties: falsedescription: Check result for a single release file on a target database.@@ -23279,17 +18533,6 @@ components:title: ColumnCatalogadditionalProperties: falsedescription: Column metadata within a table.- bytebase.v1.ColumnCatalog.LabelsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: LabelsEntry- additionalProperties: falsebytebase.v1.ColumnMetadata:type: objectproperties:@@ -23343,27 +18586,25 @@ components:title: commentdescription: The comment is the comment of a column.generation:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata'title: generationdescription: The generation is the generation of a column.- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata'isIdentity:type: booleantitle: is_identityidentityGeneration:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'title: identity_generationdescription: The identity_generation is for identity columns, PG only.- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'identitySeed:- type:- - integer- - string+ type: stringtitle: identity_seedformat: int64description: The identity_seed is for identity columns, MSSQL only.identityIncrement:- type:- - integer- - string+ type: stringtitle: identity_incrementformat: int64description: The identity_increment is for identity columns, MSSQL only.@@ -23467,14 +18708,16 @@ components:maxLength: 260description: 'Format: users/{email}. Must be the caller''s own name.'pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: |-The pending_version of the codes being confirmed. Confirming promotesexactly the set this version identifies, or nothing.- $ref: '#/components/schemas/google.protobuf.Timestamp'credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credential- $ref: '#/components/schemas/bytebase.v1.CredentialProof'otpCode:type: stringtitle: otp_code@@ -23498,9 +18741,10 @@ components:The parent project for the access grant.Format: projects/{project}accessGrant:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AccessGrant'title: access_grantdescription: The access grant to create.- $ref: '#/components/schemas/bytebase.v1.AccessGrant'title: CreateAccessGrantRequestrequired:- parent@@ -23516,9 +18760,10 @@ components:The parent resource where this database group will be created.Format: projects/{project}databaseGroup:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'title: database_groupdescription: The database group to create.- $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'databaseGroupId:type: stringtitle: database_group_id@@ -23542,9 +18787,10 @@ components:type: objectproperties:group:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Group'title: groupdescription: The group to create.- $ref: '#/components/schemas/bytebase.v1.Group'groupEmail:type: stringtitle: group_email@@ -23561,9 +18807,10 @@ components:type: objectproperties:identityProvider:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProvider'title: identity_providerdescription: The identity provider to create.- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'identityProviderId:type: stringtitle: identity_provider_id@@ -23594,9 +18841,10 @@ components:Format: projects/{project}. If omitted, the instance is created in theworkspace collection.instance:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Instance'title: instancedescription: The instance to create.- $ref: '#/components/schemas/bytebase.v1.Instance'instanceId:type: stringtitle: instance_id@@ -23624,9 +18872,10 @@ components:The issue nameFormat: projects/{project}/issues/{issue}issueComment:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment'title: issue_commentdescription: The comment to create.- $ref: '#/components/schemas/bytebase.v1.IssueComment'title: CreateIssueCommentRequestrequired:- parent@@ -23641,9 +18890,10 @@ components:The parent, which owns this collection of issues.Format: projects/{project}issue:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue'title: issuedescription: The issue to create.- $ref: '#/components/schemas/bytebase.v1.Issue'title: CreateIssueRequestrequired:- parent@@ -23659,9 +18909,10 @@ components:The parent project where this plan will be created.Format: projects/{project}plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan'title: plandescription: The plan to create.- $ref: '#/components/schemas/bytebase.v1.Plan'title: CreatePlanRequestrequired:- parent@@ -23678,13 +18929,15 @@ components:Workspace resource name: workspaces/{workspace-id}.Environment resource name: environments/environment-id.policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: The policy to create.- $ref: '#/components/schemas/bytebase.v1.Policy'type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyType'title: typedescription: The type of policy to create.- $ref: '#/components/schemas/bytebase.v1.PolicyType'title: CreatePolicyRequestrequired:- parent@@ -23694,9 +18947,10 @@ components:type: objectproperties:project:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Project'title: projectdescription: The project to create.- $ref: '#/components/schemas/bytebase.v1.Project'projectId:type: stringtitle: project_id@@ -23714,11 +18968,13 @@ components:type: objectproperties:plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: plan- $ref: '#/components/schemas/bytebase.v1.PlanType'interval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BillingInterval'title: interval- $ref: '#/components/schemas/bytebase.v1.BillingInterval'seats:type: integertitle: seats@@ -23733,9 +18989,10 @@ components:title: parentdescription: 'Format: projects/{project}'release:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to create.- $ref: '#/components/schemas/bytebase.v1.Release'releaseIdTemplate:type: stringtitle: release_id_template@@ -23760,9 +19017,10 @@ components:type: objectproperties:reviewConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewConfig'title: review_configdescription: The SQL review config to create.- $ref: '#/components/schemas/bytebase.v1.ReviewConfig'title: CreateReviewConfigRequestrequired:- reviewConfig@@ -23775,9 +19033,10 @@ components:title: parentdescription: 'Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}'revision:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Revision'title: revisiondescription: The revision to create.- $ref: '#/components/schemas/bytebase.v1.Revision'title: CreateRevisionRequestrequired:- parent@@ -23787,9 +19046,10 @@ components:type: objectproperties:role:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Role'title: roledescription: The role to create.- $ref: '#/components/schemas/bytebase.v1.Role'roleId:type: stringtitle: role_id@@ -23837,9 +19097,10 @@ components:The project to create the saved query in.Format: projects/{project}savedQuery:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQuery'title: saved_querydescription: The saved query to create.- $ref: '#/components/schemas/bytebase.v1.SavedQuery'title: CreateSavedQueryRequestrequired:- parent@@ -23862,9 +19123,10 @@ components:of the service account's email in the format: {service_account_id}@service.bytebase.comor {service_account_id}@{project-id}.service.bytebase.comserviceAccount:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: service_accountdescription: The service account to create.- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: CreateServiceAccountRequestrequired:- serviceAccountId@@ -23881,9 +19143,10 @@ components:The parent resource where this sheet will be created.Format: projects/{project}sheet:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Sheet'title: sheetdescription: The sheet to create.- $ref: '#/components/schemas/bytebase.v1.Sheet'title: CreateSheetRequestrequired:- parent@@ -23893,9 +19156,10 @@ components:type: objectproperties:user:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User'title: userdescription: The user to create.- $ref: '#/components/schemas/bytebase.v1.User'title: CreateUserRequestrequired:- user@@ -23917,9 +19181,10 @@ components:of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.comor {workload_identity_id}@{project-id}.workload.bytebase.comworkloadIdentity:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: workload_identitydescription: The workload identity to create.- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: CreateWorkloadIdentityRequestrequired:- workloadIdentityId@@ -23928,7 +19193,7 @@ components:description: Request message for creating a workload identity.bytebase.v1.CredentialProof:type: object- oneOf:+ anyOf:- type: objectproperties:currentPassword:@@ -23939,8 +19204,6 @@ components:while a live MFA factor exists.string.max_bytes = 72title: current_password- required:- - currentPassword- type: objectproperties:emailCode:@@ -23951,8 +19214,6 @@ components:A one-time code from RequestReauthCode. Bytebase Cloud only, and onlywhile the account has no live MFA factor.title: email_code- required:- - emailCode- type: objectproperties:otpCode:@@ -23961,8 +19222,6 @@ components:maxLength: 64description: A live code from the account's enrolled TOTP authenticator.title: otp_code- required:- - otpCode- type: objectproperties:recoveryCode:@@ -23971,10 +19230,10 @@ components:maxLength: 64description: A single-use MFA recovery code.title: recovery_code- required:- - recoveryCode- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- currentPassword- required:@@ -23983,7 +19242,16 @@ components:- otpCode- required:- recoveryCode- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - currentPassword+ - required:+ - emailCode+ - required:+ - otpCode+ - required:+ - recoveryCodetitle: CredentialProofdescription: |-One proof that the caller currently controls a credential on the account.@@ -24018,24 +19286,14 @@ components:type: objecttitle: classificationadditionalProperties:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'title: value- $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'description: |-classification is the id - DataClassification map.The id should in [0-9]+-[0-9]+-[0-9]+ format.title: DataClassificationConfigadditionalProperties: false- bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry:- type: object- properties:- key:- type: string- title: key- value:- title: value- $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'- title: ClassificationEntry- additionalProperties: falsebytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification:type: objectproperties:@@ -24060,285 +19318,296 @@ components:properties:title:type: string- title: title- level:- type: integer- title: level- format: int32- description: The numeric level for ordering. Higher = more sensitive.- title: Level- additionalProperties: false- bytebase.v1.DataSource:- type: object- allOf:- - properties:- id:- type: string- title: id- description: The unique identifier for this data source.- type:- title: type- description: The type of data source (ADMIN or READ_ONLY).- $ref: '#/components/schemas/bytebase.v1.DataSourceType'- username:- type: string- title: username- description: The username for database authentication.- password:- type: string- title: password- description: The password for database authentication.- writeOnly: true- useSsl:- type: boolean- title: use_ssl- description: Use SSL to connect to the data source. By default, we use system default SSL configuration.- sslCa:- type: string- title: ssl_ca- description: The SSL certificate authority certificate.- writeOnly: true- sslCert:- type: string- title: ssl_cert- description: The SSL client certificate.- writeOnly: true- sslKey:- type: string- title: ssl_key- description: The SSL client private key.- writeOnly: true- sslCaPath:- type: string- title: ssl_ca_path- description: The local filesystem path to the SSL certificate authority certificate.- writeOnly: true- sslCertPath:- type: string- title: ssl_cert_path- description: The local filesystem path to the SSL client certificate.- writeOnly: true- sslKeyPath:- type: string- title: ssl_key_path- description: The local filesystem path to the SSL client private key.- writeOnly: true- sslCaSet:- type: boolean- title: ssl_ca_set- description: Whether an SSL certificate authority certificate has been configured.- readOnly: true- sslCertSet:- type: boolean- title: ssl_cert_set- description: Whether an SSL client certificate has been configured.- readOnly: true- sslKeySet:- type: boolean- title: ssl_key_set- description: Whether an SSL client private key has been configured.- readOnly: true- sslCaPathSet:- type: boolean- title: ssl_ca_path_set- description: Whether an SSL certificate authority path has been configured.- readOnly: true- sslCertPathSet:- type: boolean- title: ssl_cert_path_set- description: Whether an SSL client certificate path has been configured.- readOnly: true- sslKeyPathSet:- type: boolean- title: ssl_key_path_set- description: Whether an SSL client private key path has been configured.- readOnly: true- verifyTlsCertificate:- type: boolean- title: verify_tls_certificate- description: |-- verify_tls_certificate enables TLS certificate verification for SSL connections.- Default is false (no verification) for backward compatibility.- Set to true for secure connections (recommended for production).- Only set to false for development or when certificates cannot be properly- validated (e.g., self-signed certs, VPN environments).- host:- type: string- title: host- description: The hostname or IP address of the database server.- port:- type: string- title: port- description: The port number of the database server.- database:- type: string- title: database- description: The name of the database to connect to.- srv:- type: boolean- title: srv- description: |-- srv, authentication_database and replica_set are used for MongoDB.- srv is a boolean flag that indicates whether the host is a DNS SRV record.- authenticationDatabase:- type: string- title: authentication_database- description: authentication_database is the database name to authenticate against, which stores the user credentials.- replicaSet:- type: string- title: replica_set- description: replica_set is used for MongoDB replica set.- sid:- type: string- title: sid- description: sid and service_name are used for Oracle.- serviceName:- type: string- title: service_name- sshHost:- type: string- title: ssh_host- description: |-- Connection over SSH.- The hostname of the SSH server agent.- Required.- sshPort:- type: string- title: ssh_port- description: |-- The port of the SSH server agent. It's 22 typically.- Required.- sshUser:- type: string- title: ssh_user- description: |-- The user to login the server.- Required.- sshPassword:- type: string- title: ssh_password- description: The password to login the server. If it's empty string, no password is required.- writeOnly: true- sshPrivateKey:- type: string- title: ssh_private_key- description: The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK").- writeOnly: true- authenticationPrivateKey:- type: string- title: authentication_private_key- description: |-- PKCS#8 private key in PEM format. If it's empty string, no private key is required.- Used for authentication when connecting to the data source.- writeOnly: true- authenticationPrivateKeyPassphrase:- type: string- title: authentication_private_key_passphrase- description: Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted.- writeOnly: true- externalSecret:- title: external_secret- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret'- authenticationType:- title: authentication_type- $ref: '#/components/schemas/bytebase.v1.DataSource.AuthenticationType'- cloudSqlIpType:- title: cloud_sql_ip_type- description: |-- cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections.- CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility.- $ref: '#/components/schemas/bytebase.v1.DataSource.CloudSQLIPType'- saslConfig:- title: sasl_config- $ref: '#/components/schemas/bytebase.v1.SASLConfig'- additionalAddresses:- type: array- items:- $ref: '#/components/schemas/bytebase.v1.DataSource.Address'- title: additional_addresses- description: (OPTIONAL) additional_addresses is used for MongoDB replica set.- directConnection:- type: boolean- title: direct_connection- description: direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.- region:- type: string- title: region- description: region is the location of where the DB is, works for AWS RDS. For example, us-east-1.- warehouseId:- type: string- title: warehouse_id- description: warehouse_id is used by Databricks.- masterName:- type: string- title: master_name- description: master_name is the master name used by connecting redis-master via redis sentinel.- masterUsername:- type: string- title: master_username- description: master_username and master_password are master credentials used by redis sentinel mode.- masterPassword:- type: string- title: master_password- writeOnly: true- redisType:- title: redis_type- $ref: '#/components/schemas/bytebase.v1.DataSource.RedisType'- extraConnectionParameters:- type: object- title: extra_connection_parameters- additionalProperties:- type: string- title: value- description: |-- Extra connection parameters for the database connection.- For PostgreSQL HA, this can be used to set target_session_attrs=read-write- projectId:- type: string- title: project_id- description: |-- project_id and instance_id are the GCP resource identifiers.- project_id is used by Spanner and BigQuery; instance_id is used by Spanner.- For these engines, host and port optionally override the default Google API- endpoint (e.g. a Private Service Connect endpoint like- spanner-nonprod.p.googleapis.com).- instanceId:- type: string- title: instance_id- - oneOf:- - type: object- properties:- awsCredential:- title: aws_credential- $ref: '#/components/schemas/bytebase.v1.DataSource.AWSCredential'- title: aws_credential- required:- - awsCredential- - type: object- properties:- azureCredential:- title: azure_credential- $ref: '#/components/schemas/bytebase.v1.DataSource.AzureCredential'- title: azure_credential- required:- - azureCredential- - type: object- properties:- gcpCredential:- title: gcp_credential- $ref: '#/components/schemas/bytebase.v1.DataSource.GCPCredential'- title: gcp_credential- required:- - gcpCredential- - not:- anyOf:- - required:- - awsCredential- - required:- - azureCredential- - required:- - gcpCredential- unevaluatedProperties: false+ title: title+ level:+ type: integer+ title: level+ format: int32+ description: The numeric level for ordering. Higher = more sensitive.+ title: Level+ additionalProperties: false+ bytebase.v1.DataSource:+ type: object+ anyOf:+ - type: object+ properties:+ awsCredential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.AWSCredential'+ title: aws_credential+ title: aws_credential+ - type: object+ properties:+ azureCredential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.AzureCredential'+ title: azure_credential+ title: azure_credential+ - type: object+ properties:+ gcpCredential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.GCPCredential'+ title: gcp_credential+ title: gcp_credential+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - awsCredential+ - required:+ - azureCredential+ - required:+ - gcpCredential+ - not:+ oneOf:+ - required:+ - awsCredential+ - required:+ - azureCredential+ - required:+ - gcpCredential+ properties:+ id:+ type: string+ title: id+ description: The unique identifier for this data source.+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceType'+ title: type+ description: The type of data source (ADMIN or READ_ONLY).+ username:+ type: string+ title: username+ description: The username for database authentication.+ password:+ type: string+ title: password+ description: The password for database authentication.+ writeOnly: true+ useSsl:+ type: boolean+ title: use_ssl+ description: Use SSL to connect to the data source. By default, we use system default SSL configuration.+ sslCa:+ type: string+ title: ssl_ca+ description: The SSL certificate authority certificate.+ writeOnly: true+ sslCert:+ type: string+ title: ssl_cert+ description: The SSL client certificate.+ writeOnly: true+ sslKey:+ type: string+ title: ssl_key+ description: The SSL client private key.+ writeOnly: true+ sslCaPath:+ type: string+ title: ssl_ca_path+ description: The local filesystem path to the SSL certificate authority certificate.+ writeOnly: true+ sslCertPath:+ type: string+ title: ssl_cert_path+ description: The local filesystem path to the SSL client certificate.+ writeOnly: true+ sslKeyPath:+ type: string+ title: ssl_key_path+ description: The local filesystem path to the SSL client private key.+ writeOnly: true+ sslCaSet:+ type: boolean+ title: ssl_ca_set+ description: Whether an SSL certificate authority certificate has been configured.+ readOnly: true+ sslCertSet:+ type: boolean+ title: ssl_cert_set+ description: Whether an SSL client certificate has been configured.+ readOnly: true+ sslKeySet:+ type: boolean+ title: ssl_key_set+ description: Whether an SSL client private key has been configured.+ readOnly: true+ sslCaPathSet:+ type: boolean+ title: ssl_ca_path_set+ description: Whether an SSL certificate authority path has been configured.+ readOnly: true+ sslCertPathSet:+ type: boolean+ title: ssl_cert_path_set+ description: Whether an SSL client certificate path has been configured.+ readOnly: true+ sslKeyPathSet:+ type: boolean+ title: ssl_key_path_set+ description: Whether an SSL client private key path has been configured.+ readOnly: true+ verifyTlsCertificate:+ type: boolean+ title: verify_tls_certificate+ description: |-+ verify_tls_certificate enables TLS certificate verification for SSL connections.+ Default is false (no verification) for backward compatibility.+ Set to true for secure connections (recommended for production).+ Only set to false for development or when certificates cannot be properly+ validated (e.g., self-signed certs, VPN environments).+ host:+ type: string+ title: host+ description: The hostname or IP address of the database server.+ port:+ type: string+ title: port+ description: The port number of the database server.+ database:+ type: string+ title: database+ description: The name of the database to connect to.+ srv:+ type: boolean+ title: srv+ description: |-+ srv, authentication_database and replica_set are used for MongoDB.+ srv is a boolean flag that indicates whether the host is a DNS SRV record.+ authenticationDatabase:+ type: string+ title: authentication_database+ description: authentication_database is the database name to authenticate against, which stores the user credentials.+ replicaSet:+ type: string+ title: replica_set+ description: replica_set is used for MongoDB replica set.+ sid:+ type: string+ title: sid+ description: sid and service_name are used for Oracle.+ serviceName:+ type: string+ title: service_name+ sshHost:+ type: string+ title: ssh_host+ description: |-+ Connection over SSH.+ The hostname of the SSH server agent.+ Required.+ sshPort:+ type: string+ title: ssh_port+ description: |-+ The port of the SSH server agent. It's 22 typically.+ Required.+ sshUser:+ type: string+ title: ssh_user+ description: |-+ The user to login the server.+ Required.+ sshPassword:+ type: string+ title: ssh_password+ description: The password to login the server. If it's empty string, no password is required.+ writeOnly: true+ sshPrivateKey:+ type: string+ title: ssh_private_key+ description: The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK").+ writeOnly: true+ authenticationPrivateKey:+ type: string+ title: authentication_private_key+ description: |-+ PKCS#8 private key in PEM format. If it's empty string, no private key is required.+ Used for authentication when connecting to the data source.+ writeOnly: true+ authenticationPrivateKeyPassphrase:+ type: string+ title: authentication_private_key_passphrase+ description: Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted.+ writeOnly: true+ externalSecret:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret'+ title: external_secret+ authenticationType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.AuthenticationType'+ title: authentication_type+ cloudSqlIpType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.CloudSQLIPType'+ title: cloud_sql_ip_type+ description: |-+ cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections.+ CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility.+ saslConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SASLConfig'+ title: sasl_config+ additionalAddresses:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.DataSource.Address'+ title: additional_addresses+ description: (OPTIONAL) additional_addresses is used for MongoDB replica set.+ directConnection:+ type: boolean+ title: direct_connection+ description: direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.+ region:+ type: string+ title: region+ description: region is the location of where the DB is, works for AWS RDS. For example, us-east-1.+ warehouseId:+ type: string+ title: warehouse_id+ description: warehouse_id is used by Databricks.+ masterName:+ type: string+ title: master_name+ description: master_name is the master name used by connecting redis-master via redis sentinel.+ masterUsername:+ type: string+ title: master_username+ description: master_username and master_password are master credentials used by redis sentinel mode.+ masterPassword:+ type: string+ title: master_password+ writeOnly: true+ redisType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource.RedisType'+ title: redis_type+ extraConnectionParameters:+ type: object+ title: extra_connection_parameters+ additionalProperties:+ type: string+ title: value+ description: |-+ Extra connection parameters for the database connection.+ For PostgreSQL HA, this can be used to set target_session_attrs=read-write+ projectId:+ type: string+ title: project_id+ description: |-+ project_id and instance_id are the GCP resource identifiers.+ project_id is used by Spanner and BigQuery; instance_id is used by Spanner.+ For these engines, host and port optionally override the default Google API+ endpoint (e.g. a Private Service Connect endpoint like+ spanner-nonprod.p.googleapis.com).+ instanceId:+ type: string+ title: instance_idtitle: DataSourcebytebase.v1.DataSource.AWSCredential:type: object@@ -24415,17 +19684,6 @@ components:- PRIVATE- PSCdescription: CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.- bytebase.v1.DataSource.ExtraConnectionParametersEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: ExtraConnectionParametersEntry- additionalProperties: falsebytebase.v1.DataSource.GCPCredential:type: objectproperties:@@ -24445,90 +19703,96 @@ components:- CLUSTERbytebase.v1.DataSourceExternalSecret:type: object- allOf:- - properties:- secretType:- title: secret_type- description: The type of external secret store.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.SecretType'- url:- type: string- title: url- description: The URL of the external secret store.- authType:- title: auth_type- description: The authentication method for accessing the secret store.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AuthType'- tokenType:- title: token_type- description: How to interpret the token field when auth_type is TOKEN.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.TokenType'- engineName:- type: string- title: engine_name- description: engine name is the name for secret engine.- secretName:- type: string- title: secret_name- description: the secret name in the engine to store the password.- passwordKeyName:+ anyOf:+ - type: object+ properties:+ appRole:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption'+ title: app_role+ description: AppRole authentication configuration.+ title: app_role+ - type: object+ properties:+ token:type: string- title: password_key_name- description: the key name for the password.- skipVaultTlsVerification:- type: boolean- title: skip_vault_tls_verification+ title: tokendescription: |-- TLS configuration for connecting to Vault server.- These fields are separate from the database TLS configuration in DataSource.- skip_vault_tls_verification disables TLS certificate verification for Vault connections.- Default is false (verification enabled) for security.- Only set to true for development or when certificates cannot be properly validated.- vaultSslCa:- type: string- title: vault_ssl_ca- description: CA certificate for Vault server verification.- writeOnly: true- vaultSslCert:- type: string- title: vault_ssl_cert- description: Client certificate for mutual TLS authentication with Vault.+ Token for direct authentication. Interpreted according to token_type:+ the literal token (PLAIN), an environment variable name (ENVIRONMENT),+ or a file path (FILE).writeOnly: true- vaultSslKey:- type: string- title: vault_ssl_key- description: Client private key for mutual TLS authentication with Vault.- writeOnly: true- - oneOf:- - type: object- properties:- appRole:- title: app_role- description: AppRole authentication configuration.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption'- title: app_role- required:- - appRole- - type: object- properties:- token:- type: string- title: token- description: |-- Token for direct authentication. Interpreted according to token_type:- the literal token (PLAIN), an environment variable name (ENVIRONMENT),- or a file path (FILE).- writeOnly: true- title: token- required:- - token- - not:- anyOf:- - required:- - appRole- - required:- - token+ title: tokenunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - appRole+ - required:+ - token+ - not:+ oneOf:+ - required:+ - appRole+ - required:+ - token+ properties:+ secretType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.SecretType'+ title: secret_type+ description: The type of external secret store.+ url:+ type: string+ title: url+ description: The URL of the external secret store.+ authType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AuthType'+ title: auth_type+ description: The authentication method for accessing the secret store.+ tokenType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.TokenType'+ title: token_type+ description: How to interpret the token field when auth_type is TOKEN.+ engineName:+ type: string+ title: engine_name+ description: engine name is the name for secret engine.+ secretName:+ type: string+ title: secret_name+ description: the secret name in the engine to store the password.+ passwordKeyName:+ type: string+ title: password_key_name+ description: the key name for the password.+ skipVaultTlsVerification:+ type: boolean+ title: skip_vault_tls_verification+ description: |-+ TLS configuration for connecting to Vault server.+ These fields are separate from the database TLS configuration in DataSource.+ skip_vault_tls_verification disables TLS certificate verification for Vault connections.+ Default is false (verification enabled) for security.+ Only set to true for development or when certificates cannot be properly validated.+ vaultSslCa:+ type: string+ title: vault_ssl_ca+ description: CA certificate for Vault server verification.+ writeOnly: true+ vaultSslCert:+ type: string+ title: vault_ssl_cert+ description: Client certificate for mutual TLS authentication with Vault.+ writeOnly: true+ vaultSslKey:+ type: string+ title: vault_ssl_key+ description: Client private key for mutual TLS authentication with Vault.+ writeOnly: truetitle: DataSourceExternalSecretbytebase.v1.DataSourceExternalSecret.AppRoleAuthOption:type: object@@ -24544,9 +19808,10 @@ components:description: the secret id for the role without ttl.writeOnly: truetype:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType'title: typedescription: The type of secret for AppRole authentication.- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType'mountPath:type: stringtitle: mount_path@@ -24602,15 +19867,17 @@ components:Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}{database} is the database name in the instance.state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The existence of a database.readOnly: true- $ref: '#/components/schemas/bytebase.v1.State'successfulSyncTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: successful_sync_timedescription: The latest synchronization time.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'project:type: stringtitle: project@@ -24651,20 +19918,22 @@ components:title: valuedescription: Labels will be used for deployment and policy control.instanceResource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.InstanceResource'title: instance_resourcedescription: The instance resource.readOnly: true- $ref: '#/components/schemas/bytebase.v1.InstanceResource'backupAvailable:type: booleantitle: backup_availabledescription: The database is available for DML prior backup.readOnly: truesyncStatus:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SyncStatus'title: sync_statusdescription: The sync status of the database.readOnly: true- $ref: '#/components/schemas/bytebase.v1.SyncStatus'syncError:type: stringtitle: sync_error@@ -24672,17 +19941,6 @@ components:readOnly: truetitle: DatabaseadditionalProperties: false- bytebase.v1.Database.LabelsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: LabelsEntry- additionalProperties: falsebytebase.v1.DatabaseCatalog:type: objectproperties:@@ -24723,6 +19981,8 @@ components:maxLength: 200description: The short name used in actual databases specified by users.databaseExpr:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: database_exprdescription: |-The condition that is associated with this database group.@@ -24738,7 +19998,6 @@ components:For example:resource.environment_id == "test" && resource.database_name.startsWith("sample_")resource.database_labels["tenant"] == "tenant1"- $ref: '#/components/schemas/google.type.Expr'matchedDatabases:type: arrayitems:@@ -25109,6 +20368,8 @@ components:The database whose current schema is the diff source.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}targetMetadata:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: target_metadatadescription: |-The metadata of the target schema. The source metadata and the engine are@@ -25116,7 +20377,6 @@ components:Must describe the COMPLETE target schema: the diff runs against the fullstored source, so any object omitted from the target (for example by atruncated metadata fetch) is treated as dropped.- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: DiffMetadataRequestrequired:- name@@ -25133,45 +20393,47 @@ components:additionalProperties: falsebytebase.v1.DiffSchemaRequest:type: object- allOf:- - properties:- name:+ anyOf:+ - type: object+ properties:+ changelog:type: string- title: name+ title: changelogdescription: |-- The name of the database or changelog.+ The resource name of the changelogFormat:- database: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- changelog: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}- - oneOf:- - type: object- properties:- changelog:- type: string- title: changelog- description: |-- The resource name of the changelog- Format:- instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}- title: changelog- required:- - changelog- - type: object- properties:- schema:- type: string- title: schema- description: The target schema.+ instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}+ title: changelog+ - type: object+ properties:+ schema:+ type: stringtitle: schema- required:- - schema- - not:- anyOf:- - required:- - changelog- - required:- - schema+ description: The target schema.+ title: schemaunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - changelog+ - required:+ - schema+ - not:+ oneOf:+ - required:+ - changelog+ - required:+ - schema+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the database or changelog.+ Format:+ database: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ changelog: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}title: DiffSchemaRequestrequired:- name@@ -25245,42 +20507,38 @@ components:Format: users/{email}. The caller's own, or another user's withbb.users.update.credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credentialdescription: |-(OPTIONAL) Required for a self-service call against a live factor, and then onlyotp_code or recovery_code. Unused on an admin-assisted call.- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: DisableMFARequestrequired:- nameadditionalProperties: falsebytebase.v1.EmailSetting:type: object- allOf:- - properties:- from:- type: string- title: from- fromName:- type: string- title: from_name- type:- title: type- $ref: '#/components/schemas/bytebase.v1.EmailSetting.Type'- - oneOf:- - type: object- properties:- smtp:- title: smtp- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig'+ anyOf:+ - type: object+ properties:+ smtp:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig'title: smtp- required:- - smtp- - not:- anyOf:- - required:- - smtp+ title: smtpunevaluatedProperties: false+ properties:+ from:+ type: string+ title: from+ fromName:+ type: string+ title: from_name+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting.Type'+ title: typetitle: EmailSettingbytebase.v1.EmailSetting.SMTPConfig:type: object@@ -25300,11 +20558,13 @@ components:title: passwordwriteOnly: trueencryption:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Encryption'title: encryption- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Encryption'authentication:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Authentication'title: authentication- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Authentication'title: SMTPConfigadditionalProperties: falsebytebase.v1.EmailSetting.SMTPConfig.Authentication:@@ -25344,15 +20604,17 @@ components:maxLength: 64description: A code from the authenticator the pending secret was just added to.pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: The pending_version this enrollment was minted with.- $ref: '#/components/schemas/google.protobuf.Timestamp'credential:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: credentialdescription: |-(OPTIONAL) Proof of the *existing* factor, not the new device above. Required for arotation, and for first-time enrollment on an account with a password.- $ref: '#/components/schemas/bytebase.v1.CredentialProof'title: EnableMFARequestrequired:- name@@ -25451,21 +20713,11 @@ components:type: stringtitle: valuecolor:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: color- $ref: '#/components/schemas/google.type.Color'title: EnvironmentadditionalProperties: false- bytebase.v1.EnvironmentSetting.Environment.TagsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: TagsEntry- additionalProperties: falsebytebase.v1.EventMetadata:type: objectproperties:@@ -25547,9 +20799,10 @@ components:- order_by = "create_time asc"- order_by = "create_time desc"format:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ExportFormat'title: formatdescription: The export format.- $ref: '#/components/schemas/bytebase.v1.ExportFormat'pageSize:type: integertitle: page_size@@ -25618,9 +20871,10 @@ components:format: int32description: The maximum number of rows to return.format:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ExportFormat'title: formatdescription: The export format.- $ref: '#/components/schemas/bytebase.v1.ExportFormat'admin:type: booleantitle: admin@@ -25862,8 +21116,9 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'title: type- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'expression:type: stringtitle: expression@@ -25917,8 +21172,9 @@ components:The name of the changelog to retrieve.Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}view:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: view- $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: GetChangelogRequestrequired:- name@@ -25947,9 +21203,10 @@ components:The name of the database group to retrieve.Format: projects/{project}/databaseGroups/{databaseGroup}view:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: viewdescription: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.- $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: GetDatabaseGroupRequestrequired:- name@@ -26018,9 +21275,10 @@ components:The name of the database to retrieve SDL schema.Format: instances/{instance}/databases/{database}/sdlSchema or projects/{project}/instances/{instance}/databases/{database}/sdlSchemaformat:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'title: formatdescription: The format of the SDL schema output.- $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'title: GetDatabaseSDLSchemaRequestrequired:- name@@ -26283,8 +21541,9 @@ components:The name of the database.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'title: type- $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'schema:type: stringtitle: schema@@ -26294,11 +21553,12 @@ components:title: objectdescription: It's empty for DATABASE and SCHEMA.metadata:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: metadatadescription: |-If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.Also the schema and object are empty.- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'title: GetSchemaStringRequestrequired:- name@@ -26354,8 +21614,9 @@ components:type: objectproperties:setting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Setting'title: setting- $ref: '#/components/schemas/bytebase.v1.Setting'title: GetSettingResponseadditionalProperties: falsedescription: The response message for getting a setting.@@ -26514,9 +21775,10 @@ components:Format: users/[email protected]role:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.GroupMember.Role'title: roledescription: The member's role in the group.- $ref: '#/components/schemas/bytebase.v1.GroupMember.Role'title: GroupMemberadditionalProperties: falsedescription: A member of a group with a role.@@ -26569,83 +21831,96 @@ components:title: domaindescription: The domain for email matching when using this identity provider.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'title: typedescription: The type of identity provider protocol.- $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'config:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProviderConfig'title: configdescription: The configuration details for the identity provider.- $ref: '#/components/schemas/bytebase.v1.IdentityProviderConfig'title: IdentityProvideradditionalProperties: falsebytebase.v1.IdentityProviderConfig:type: object- oneOf:+ anyOf:- type: objectproperties:ldapConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig'title: ldap_configdescription: LDAP protocol configuration.- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig'title: ldap_config- required:- - ldapConfig- type: objectproperties:oauth2Config:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderConfig'title: oauth2_configdescription: OAuth2 protocol configuration.- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderConfig'title: oauth2_config- required:- - oauth2Config- type: objectproperties:oidcConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderConfig'title: oidc_configdescription: OIDC protocol configuration.- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderConfig'title: oidc_config- required:- - oidcConfig- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- ldapConfig- required:- oauth2Config- required:- oidcConfig- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - ldapConfig+ - required:+ - oauth2Config+ - required:+ - oidcConfigtitle: IdentityProviderConfigbytebase.v1.IdentityProviderContext:type: object- oneOf:+ anyOf:- type: objectproperties:oauth2Context:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderContext'title: oauth2_contextdescription: OAuth2 authentication context.- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderContext'title: oauth2_context- required:- - oauth2Context- type: objectproperties:oidcContext:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderContext'title: oidc_contextdescription: OpenID Connect authentication context.- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderContext'title: oidc_context- required:- - oidcContext- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- oauth2Context- required:- oidcContext- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - oauth2Context+ - required:+ - oidcContexttitle: IdentityProviderContextdescription: Context for identity provider authentication.bytebase.v1.IdentityProviderType:@@ -26674,9 +21949,7 @@ components:keyLength:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: key_lengthdescription: |-@@ -26721,9 +21994,7 @@ components:title: parent_index_namedescription: The index name of the parent index.granularity:- type:- - integer- - string+ type: stringtitle: granularityformat: int64description: The number of granules in the block. It's a ClickHouse specific field.@@ -26734,9 +22005,10 @@ components:It's a PostgreSQL specific field.The unique constraint and unique index are not the same thing in PostgreSQL.spatialConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SpatialIndexConfig'title: spatial_configdescription: Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc.- $ref: '#/components/schemas/bytebase.v1.SpatialIndexConfig'opclassNames:type: arrayitems:@@ -26764,18 +22036,20 @@ components:The name of the instance.Format: instances/{instance} or projects/{project}/instances/{instance}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the instance.- $ref: '#/components/schemas/bytebase.v1.State'title:type: stringtitle: titlemaxLength: 200description: The display title of the instance.engine:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Engine'title: enginedescription: The database engine type.- $ref: '#/components/schemas/bytebase.v1.Engine'engineVersion:type: stringtitle: engine_version@@ -26811,20 +22085,23 @@ components:description: Database roles available in this instance.readOnly: truesyncInterval:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: sync_intervaldescription: How often the instance is synced.- $ref: '#/components/schemas/google.protobuf.Duration'syncDatabases:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SyncDatabases'title: sync_databasesdescription: |-Enable sync for following databases.Not set means sync all schemas & databases.- $ref: '#/components/schemas/bytebase.v1.SyncDatabases'lastSyncTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_sync_timedescription: The last time the instance was synced.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'labels:type: objecttitle: labels@@ -26836,17 +22113,6 @@ components:For example, { "org_group": "infrastructure", "environment": "production" }title: InstanceadditionalProperties: false- bytebase.v1.Instance.LabelsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: LabelsEntry- additionalProperties: falsebytebase.v1.InstanceResource:type: objectproperties:@@ -26855,9 +22121,10 @@ components:title: titledescription: The display title of the instance.engine:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Engine'title: enginedescription: The database engine type.- $ref: '#/components/schemas/bytebase.v1.Engine'engineVersion:type: stringtitle: engine_version@@ -26955,34 +22222,39 @@ components:maxLength: 10000description: The description of the issue.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue.Type'title: type- $ref: '#/components/schemas/bytebase.v1.Issue.Type'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueStatus'title: statusdescription: The status of the issue.- $ref: '#/components/schemas/bytebase.v1.IssueStatus'approvers:type: arrayitems:$ref: '#/components/schemas/bytebase.v1.Issue.Approver'title: approversapprovalTemplate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'title: approval_templatedescription: The approval template for the issue.- $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'creator:type: stringtitle: creatordescription: 'Format: users/[email protected]'readOnly: truecreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'plan:type: stringtitle: plan@@ -26991,13 +22263,15 @@ components:Can be empty.Format: projects/{project}/plans/{plan}roleGrant:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RoleGrant'title: role_grantdescription: Used if the issue type is ROLE_GRANT.- $ref: '#/components/schemas/bytebase.v1.RoleGrant'riskLevel:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RiskLevel'title: risk_leveldescription: The risk level of the issue.- $ref: '#/components/schemas/bytebase.v1.RiskLevel'labels:type: arrayitems:@@ -27005,10 +22279,11 @@ components:title: labelsdescription: Labels attached to the issue for categorization and filtering.approvalStatus:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'title: approval_statusdescription: The overall approval status for the issue.readOnly: true- $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'accessGrant:type: stringtitle: access_grant@@ -27026,9 +22301,10 @@ components:type: objectproperties:status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue.Approver.Status'title: statusdescription: The new status.- $ref: '#/components/schemas/bytebase.v1.Issue.Approver.Status'principal:type: stringtitle: principal@@ -27056,118 +22332,128 @@ components:description: The type of issue.bytebase.v1.IssueComment:type: object- allOf:- - properties:- name:- type: string- title: name- description: 'Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid}'- comment:- type: string- title: comment- maxLength: 65536- description: The text content of the comment.- payload:- type: string- title: payload- description: 'TODO: use struct message instead.'- createTime:- title: create_time- readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'- updateTime:- title: update_time- readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'- creator:- type: string- title: creator- description: 'Format: users/{email}'- readOnly: true- root:- type:- - string- - "null"- title: root- description: |-- (IMMUTABLE) The thread root's name, set only on replies. Immutable after creation.- Format: projects/{project}/issues/{issue}/issueComments/{issueComment}- Must name a thread root in the same issue, never a general comment or reply.- threadState:- oneOf:- - $ref: '#/components/schemas/bytebase.v1.IssueComment.ThreadState'- - type: "null"- title: thread_state- description: |-- Present only on thread roots. Set OPEN on create to start a thread; an- anchored root starts one without it. Omit root, thread_state, and- statement_anchor to create a general comment.- Update through the thread_state field mask to resolve or reopen.- Adding a reply does not reopen a resolved thread.- statementAnchor:- title: statement_anchor- description: |-- (IMMUTABLE) Optional source context on a root or reply. A reply's anchor must share- the root's spec and sheet_sha256; it may narrow the range.- Cannot be set on events. Immutable after creation.- $ref: '#/components/schemas/bytebase.v1.StatementAnchor'- - oneOf:- - type: object- properties:- approval:- title: approval- description: Approval event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval'+ anyOf:+ - type: object+ properties:+ approval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval'title: approval- required:- - approval- - type: object- properties:- issueUpdate:- title: issue_update- description: Issue update event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.IssueUpdate'+ description: Approval event.+ title: approval+ - type: object+ properties:+ issueUpdate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.IssueUpdate'title: issue_update- required:- - issueUpdate- - type: object- properties:- planUpdate:- title: plan_update- description: Plan update event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanUpdate'+ description: Issue update event.+ title: issue_update+ - type: object+ properties:+ planUpdate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanUpdate'title: plan_update- required:- - planUpdate- - type: object- properties:- reviewSubmission:- title: review_submission- description: Review submission event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.ReviewSubmission'+ description: Plan update event.+ title: plan_update+ - type: object+ properties:+ reviewSubmission:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.ReviewSubmission'title: review_submission- required:- - reviewSubmission- - not:- anyOf:- - required:- - approval- - required:- - issueUpdate- - required:- - planUpdate- - required:- - reviewSubmission+ description: Review submission event.+ title: review_submissionunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - approval+ - required:+ - issueUpdate+ - required:+ - planUpdate+ - required:+ - reviewSubmission+ - not:+ oneOf:+ - required:+ - approval+ - required:+ - issueUpdate+ - required:+ - planUpdate+ - required:+ - reviewSubmission+ properties:+ name:+ type: string+ title: name+ description: 'Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid}'+ comment:+ type: string+ title: comment+ maxLength: 65536+ description: The text content of the comment.+ payload:+ type: string+ title: payload+ description: 'TODO: use struct message instead.'+ createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: create_time+ readOnly: true+ updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: update_time+ readOnly: true+ creator:+ type: string+ title: creator+ description: 'Format: users/{email}'+ readOnly: true+ root:+ type:+ - string+ - "null"+ title: root+ description: |-+ (IMMUTABLE) The thread root's name, set only on replies. Immutable after creation.+ Format: projects/{project}/issues/{issue}/issueComments/{issueComment}+ Must name a thread root in the same issue, never a general comment or reply.+ threadState:+ oneOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.ThreadState'+ - type: "null"+ title: thread_state+ description: |-+ Present only on thread roots. Set OPEN on create to start a thread; an+ anchored root starts one without it. Omit root, thread_state, and+ statement_anchor to create a general comment.+ Update through the thread_state field mask to resolve or reopen.+ Adding a reply does not reopen a resolved thread.+ statementAnchor:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StatementAnchor'+ title: statement_anchor+ description: |-+ (IMMUTABLE) Optional source context on a root or reply. A reply's anchor must share+ the root's spec and sheet_sha256; it may narrow the range.+ Cannot be set on events. Immutable after creation.title: IssueCommentdescription: A comment on an issue.bytebase.v1.IssueComment.Approval:type: objectproperties:status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval.Status'title: statusdescription: The approval status.- $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval.Status'title: ApprovaladditionalProperties: falsedescription: Approval event information.@@ -27343,17 +22629,19 @@ components:title: user_filterdescription: UserFilter is the filter to search for users, e.g., "(uid=%s)".securityProtocol:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol'title: security_protocoldescription: |-SecurityProtocol is the security protocol to be used for establishingconnections with the LDAP server.- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol'fieldMapping:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.FieldMapping'title: field_mappingdescription: |-FieldMapping is the mapping of the user attributes returned by the LDAPserver.- $ref: '#/components/schemas/bytebase.v1.FieldMapping'title: LDAPIdentityProviderConfigadditionalProperties: falsedescription: LDAPIdentityProviderConfig is the structure for LDAP identity provider config.@@ -27385,9 +22673,10 @@ components:title: valuedescription: The label value/name.color:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: colordescription: The label color.- $ref: '#/components/schemas/google.type.Color'group:type: stringtitle: group@@ -27509,8 +22798,9 @@ components:When paginating, all other parameters provided must matchthe call that provided the page token.view:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ChangelogView'title: view- $ref: '#/components/schemas/bytebase.v1.ChangelogView'filter:type: stringtitle: filter@@ -27558,9 +22848,10 @@ components:The parent resource whose database groups are to be listed.Format: projects/{project}view:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: viewdescription: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.- $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'title: ListDatabaseGroupsRequestrequired:- parent@@ -28922,19 +24213,21 @@ components:The name of the identity provider.Format: idps/{idp}type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'title: typedescription: The type of identity provider protocol.- $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'title:type: stringtitle: titledescription: The display title of the identity provider.authorizationRequest:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AuthorizationRequest'title: authorization_requestdescription: |-The parameters the browser needs to start the authorization redirect.Set for OAUTH2 and OIDC, absent for LDAP, whose bind happens server-side.- $ref: '#/components/schemas/bytebase.v1.AuthorizationRequest'title: LoginIdentityProvideradditionalProperties: falsedescription: |-@@ -28975,9 +24268,10 @@ components:The name of the identity provider.Format: idps/{idp}idpContext:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProviderContext'title: idp_contextdescription: The idp_context is used to get the user information from identity provider.- $ref: '#/components/schemas/bytebase.v1.IdentityProviderContext'otpCode:type:- string@@ -29042,9 +24336,10 @@ components:title: require_reset_passworddescription: Whether user must reset password before continuing.user:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User'title: userdescription: The user from the successful login.- $ref: '#/components/schemas/bytebase.v1.User'title: LoginResponseadditionalProperties: falsebytebase.v1.LogoutRequest:@@ -29147,6 +24442,8 @@ components:type: objectproperties:capability:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MCPSetting.Capability'title: capabilitydescription: |-The maximum capability available to MCP sessions in this workspace, acting@@ -29155,7 +24452,6 @@ components:on the internal MCP chain decides, per request, which method classes areserved, and under READ_ONLY the SQL clamp decides, per statement, whetherit only reads.- $ref: '#/components/schemas/bytebase.v1.MCPSetting.Capability'ignoreMaskingExemptions:type: booleantitle: ignore_masking_exemptions@@ -29213,6 +24509,8 @@ components:For service accounts, the member should be: serviceAccount:{email}For workload identities, the member should be: workloadIdentity:{email}condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: |-The condition that is associated with this exception policy instance.@@ -29231,7 +24529,6 @@ components:For example:resource.instance_id == "local" && resource.database_name == "employee" && request.time < timestamp("2025-04-30T11:10:39.000Z")resource.instance_id == "local" && resource.database_name == "employee"- $ref: '#/components/schemas/google.type.Expr'title: ExemptionadditionalProperties: falsebytebase.v1.MaskingReason:@@ -29288,6 +24585,8 @@ components:title: iddescription: A unique identifier for the rule in UUID format.condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: |-The condition for the masking rule.@@ -29314,7 +24613,6 @@ components:resource.instance_id == "sample-instance" && resource.database_name == "employee" && resource.table_name in ["table1", "table2"]resource.environment_id != "test" || !(resource.project_id in ["poject1", "prject2"])resource.instance_id == "sample-instance" && (resource.database_name == "db1" || resource.database_name == "db2")- $ref: '#/components/schemas/google.type.Expr'semanticType:type: stringtitle: semantic_type@@ -29435,17 +24733,19 @@ components:title: scopesdescription: The list of OAuth2 scopes to request.fieldMapping:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.FieldMapping'title: field_mappingdescription: Mapping configuration for user attributes from OAuth2 response.- $ref: '#/components/schemas/bytebase.v1.FieldMapping'skipTlsVerify:type: booleantitle: skip_tls_verifydescription: Whether to skip TLS certificate verification.authStyle:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'title: auth_styledescription: The authentication style for client credentials.- $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'title: OAuth2IdentityProviderConfigadditionalProperties: falsedescription: OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.@@ -29493,17 +24793,19 @@ components:The scopes that the OIDC provider supports.Should be fetched from the well-known configuration file of the OIDC provider.fieldMapping:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.FieldMapping'title: field_mappingdescription: Mapping configuration for user attributes from OIDC claims.- $ref: '#/components/schemas/bytebase.v1.FieldMapping'skipTlsVerify:type: booleantitle: skip_tls_verifydescription: Whether to skip TLS certificate verification.authStyle:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'title: auth_styledescription: The authentication style for client credentials.- $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'authEndpoint:type: stringtitle: auth_endpoint@@ -29536,51 +24838,57 @@ components:additionalProperties: falsebytebase.v1.ObjectSchema:type: object- allOf:- - properties:- type:- title: type- description: The data type of this object.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.Type'- semanticType:- type: string- title: semantic_type- description: The semantic type of this object.- - oneOf:- - type: object- properties:- arrayKind:- title: array_kind- description: Array schema.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.ArrayKind'+ anyOf:+ - type: object+ properties:+ arrayKind:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema.ArrayKind'title: array_kind- required:- - arrayKind- - type: object- properties:- structKind:- title: struct_kind- description: Struct schema.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.StructKind'+ description: Array schema.+ title: array_kind+ - type: object+ properties:+ structKind:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema.StructKind'title: struct_kind- required:- - structKind- - not:- anyOf:- - required:- - arrayKind- - required:- - structKind+ description: Struct schema.+ title: struct_kindunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - arrayKind+ - required:+ - structKind+ - not:+ oneOf:+ - required:+ - arrayKind+ - required:+ - structKind+ properties:+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema.Type'+ title: type+ description: The data type of this object.+ semanticType:+ type: string+ title: semantic_type+ description: The semantic type of this object.title: ObjectSchemadescription: Schema definition for object-type columns.bytebase.v1.ObjectSchema.ArrayKind:type: objectproperties:kind:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema'title: kinddescription: The schema of array elements.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'title: ArrayKindadditionalProperties: falsedescription: Array type with element schema.@@ -29591,23 +24899,13 @@ components:type: objecttitle: propertiesadditionalProperties:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema'title: value- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'description: Properties of the struct.title: StructKindadditionalProperties: falsedescription: Structure type with named properties.- bytebase.v1.ObjectSchema.StructKind.PropertiesEntry:- type: object- properties:- key:- type: string- title: key- value:- title: value- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'- title: PropertiesEntry- additionalProperties: falsebytebase.v1.ObjectSchema.Type:type: stringtitle: Type@@ -29700,9 +24998,10 @@ components:`plan` is a system generated ID.Format: projects/{project}/plans/{plan}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The state of the plan.- $ref: '#/components/schemas/bytebase.v1.State'issue:type: stringtitle: issue@@ -29733,13 +25032,15 @@ components:description: 'Format: users/[email protected]'readOnly: truecreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'planCheckRunStatusCount:type: objecttitle: plan_check_run_status_count@@ -29761,12 +25062,13 @@ components:description: Whether the plan has started the rollout.readOnly: trueapprovalStatus:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'title: approval_statusdescription: |-The approval status of the linked issue.Unspecified when no linked issue exists or the linked issue is a draft.readOnly: true- $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'rolloutStageSummaries:type: arrayitems:@@ -29777,12 +25079,13 @@ components:Ordered by environment deployment order. Empty when no rollout exists.readOnly: trueissueStatus:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueStatus'title: issue_statusdescription: |-The lifecycle status of the linked issue.Unspecified when no linked issue exists.readOnly: true- $ref: '#/components/schemas/bytebase.v1.IssueStatus'lastPlanEditor:type: stringtitle: last_plan_editor@@ -29869,18 +25172,6 @@ components:- target- databaseadditionalProperties: false- bytebase.v1.Plan.PlanCheckRunStatusCountEntry:- type: object- properties:- key:- type: string- title: key- value:- type: integer- title: value- format: int32- title: PlanCheckRunStatusCountEntry- additionalProperties: falsebytebase.v1.Plan.RolloutStageSummary:type: objectproperties:@@ -29900,44 +25191,49 @@ components:additionalProperties: falsebytebase.v1.Plan.Spec:type: object- allOf:- - properties:- id:- type: string- title: id- description: A UUID4 string that uniquely identifies the Spec.- - oneOf:- - type: object- properties:- changeDatabaseConfig:- title: change_database_config- $ref: '#/components/schemas/bytebase.v1.Plan.ChangeDatabaseConfig'+ anyOf:+ - type: object+ properties:+ changeDatabaseConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan.ChangeDatabaseConfig'title: change_database_config- required:- - changeDatabaseConfig- - type: object- properties:- createDatabaseConfig:- title: create_database_config- $ref: '#/components/schemas/bytebase.v1.Plan.CreateDatabaseConfig'+ title: change_database_config+ - type: object+ properties:+ createDatabaseConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan.CreateDatabaseConfig'title: create_database_config- required:- - createDatabaseConfig- - not:- anyOf:- - required:- - changeDatabaseConfig- - required:- - createDatabaseConfig+ title: create_database_configunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - changeDatabaseConfig+ - required:+ - createDatabaseConfig+ - not:+ oneOf:+ - required:+ - changeDatabaseConfig+ - required:+ - createDatabaseConfig+ properties:+ id:+ type: string+ title: id+ description: A UUID4 string that uniquely identifies the Spec.title: Specbytebase.v1.Plan.TaskStatusCount:type: objectproperties:status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.Status'title: statusdescription: The task status.- $ref: '#/components/schemas/bytebase.v1.Task.Status'count:type: integertitle: count@@ -29953,8 +25249,9 @@ components:title: namedescription: 'Format: projects/{project}/plans/{plan}/planCheckRun'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Status'title: status- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Status'results:type: arrayitems:@@ -29965,72 +25262,81 @@ components:title: errordescription: error is set if the Status is FAILED.createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'title: PlanCheckRunadditionalProperties: falsebytebase.v1.PlanCheckRun.Result:type: object- allOf:- - properties:- status:- title: status- $ref: '#/components/schemas/bytebase.v1.Advice.Level'- title:- type: string- title: title- content:- type: string- title: content- code:- type: integer- title: code- format: int32- target:- type: string- title: target- description: |-- Target identification for consolidated results.- Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- type:- title: type- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.Type'- - oneOf:- - type: object- properties:- sqlReviewReport:- title: sql_review_report- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlReviewReport'+ anyOf:+ - type: object+ properties:+ sqlReviewReport:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlReviewReport'title: sql_review_report- required:- - sqlReviewReport- - type: object- properties:- sqlSummaryReport:- title: sql_summary_report- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlSummaryReport'+ title: sql_review_report+ - type: object+ properties:+ sqlSummaryReport:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlSummaryReport'title: sql_summary_report- required:- - sqlSummaryReport- - not:- anyOf:- - required:- - sqlReviewReport- - required:- - sqlSummaryReport+ title: sql_summary_reportunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - sqlReviewReport+ - required:+ - sqlSummaryReport+ - not:+ oneOf:+ - required:+ - sqlReviewReport+ - required:+ - sqlSummaryReport+ properties:+ status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Advice.Level'+ title: status+ title:+ type: string+ title: title+ content:+ type: string+ title: content+ code:+ type: integer+ title: code+ format: int32+ target:+ type: string+ title: target+ description: |-+ Target identification for consolidated results.+ Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.Type'+ title: typetitle: Resultbytebase.v1.PlanCheckRun.Result.SqlReviewReport:type: objectproperties:startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: Position of the SQL statement.- $ref: '#/components/schemas/bytebase.v1.Position'endPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: end_position- $ref: '#/components/schemas/bytebase.v1.Position'title: SqlReviewReportadditionalProperties: falsebytebase.v1.PlanCheckRun.Result.SqlSummaryReport:@@ -30043,9 +25349,7 @@ components:title: statement_typesdescription: statement_types are the types of statements that are found in the sql.affectedRows:- type:- - integer- - string+ type: stringtitle: affected_rowsformat: int64title: SqlSummaryReport@@ -30164,8 +25468,9 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: type- $ref: '#/components/schemas/bytebase.v1.PlanType'maximumInstanceCount:type: integertitle: maximum_instance_count@@ -30192,87 +25497,96 @@ components:- ENTERPRISEbytebase.v1.Policy:type: object- allOf:- - properties:- name:- type: string- title: name- description: |-- The name of the policy.- Format: {resource name}/policies/{policy type}- Workspace resource name: workspaces/{workspace-id}.- Environment resource name: environments/environment-id.- inheritFromParent:- type: boolean- title: inherit_from_parent- description: Whether this policy inherits from its parent resource.- type:- title: type- description: The type of policy.- $ref: '#/components/schemas/bytebase.v1.PolicyType'- enforce:- type: boolean- title: enforce- description: Whether the policy is enforced.- resourceType:- title: resource_type- description: The resource type for the policy.- readOnly: true- $ref: '#/components/schemas/bytebase.v1.PolicyResourceType'- - oneOf:- - type: object- properties:- maskingExemptionPolicy:- title: masking_exemption_policy- $ref: '#/components/schemas/bytebase.v1.MaskingExemptionPolicy'+ anyOf:+ - type: object+ properties:+ maskingExemptionPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MaskingExemptionPolicy'title: masking_exemption_policy- required:- - maskingExemptionPolicy- - type: object- properties:- maskingRulePolicy:- title: masking_rule_policy- $ref: '#/components/schemas/bytebase.v1.MaskingRulePolicy'+ title: masking_exemption_policy+ - type: object+ properties:+ maskingRulePolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MaskingRulePolicy'title: masking_rule_policy- required:- - maskingRulePolicy- - type: object- properties:- queryDataPolicy:- title: query_data_policy- $ref: '#/components/schemas/bytebase.v1.QueryDataPolicy'+ title: masking_rule_policy+ - type: object+ properties:+ queryDataPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryDataPolicy'title: query_data_policy- required:- - queryDataPolicy- - type: object- properties:- rolloutPolicy:- title: rollout_policy- $ref: '#/components/schemas/bytebase.v1.RolloutPolicy'+ title: query_data_policy+ - type: object+ properties:+ rolloutPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RolloutPolicy'title: rollout_policy- required:- - rolloutPolicy- - type: object- properties:- tagPolicy:- title: tag_policy- $ref: '#/components/schemas/bytebase.v1.TagPolicy'+ title: rollout_policy+ - type: object+ properties:+ tagPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TagPolicy'title: tag_policy- required:- - tagPolicy- - not:- anyOf:- - required:- - maskingExemptionPolicy- - required:- - maskingRulePolicy- - required:- - queryDataPolicy- - required:- - rolloutPolicy- - required:- - tagPolicy+ title: tag_policyunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - maskingExemptionPolicy+ - required:+ - maskingRulePolicy+ - required:+ - queryDataPolicy+ - required:+ - rolloutPolicy+ - required:+ - tagPolicy+ - not:+ oneOf:+ - required:+ - maskingExemptionPolicy+ - required:+ - maskingRulePolicy+ - required:+ - queryDataPolicy+ - required:+ - rolloutPolicy+ - required:+ - tagPolicy+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the policy.+ Format: {resource name}/policies/{policy type}+ Workspace resource name: workspaces/{workspace-id}.+ Environment resource name: environments/environment-id.+ inheritFromParent:+ type: boolean+ title: inherit_from_parent+ description: Whether this policy inherits from its parent resource.+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyType'+ title: type+ description: The type of policy.+ enforce:+ type: boolean+ title: enforce+ description: Whether the policy is enforced.+ resourceType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PolicyResourceType'+ title: resource_type+ description: The resource type for the policy.+ readOnly: truetitle: Policybytebase.v1.PolicyDelta:type: object@@ -30421,9 +25735,10 @@ components:The name of the project.Format: projects/{project}state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the project.- $ref: '#/components/schemas/bytebase.v1.State'title:type: stringtitle: title@@ -30464,9 +25779,10 @@ components:title: allow_self_approvaldescription: Whether to allow issue creators to self-approve their own issues.executionRetryPolicy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Project.ExecutionRetryPolicy'title: execution_retry_policydescription: Execution retry policy for task runs.- $ref: '#/components/schemas/bytebase.v1.Project.ExecutionRetryPolicy'ciSamplingSize:type: integertitle: ci_sampling_size@@ -30526,34 +25842,26 @@ components:title: ExecutionRetryPolicyadditionalProperties: falsedescription: Execution retry policy configuration.- bytebase.v1.Project.LabelsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: LabelsEntry- additionalProperties: falsebytebase.v1.PurchaseBillingMethod:type: objectproperties:interval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BillingInterval'title: interval- $ref: '#/components/schemas/bytebase.v1.BillingInterval'discount:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount'title: discount- $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount'title: PurchaseBillingMethodadditionalProperties: falsebytebase.v1.PurchaseDiscount:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount.Type'title: type- $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount.Type'value:type: integertitle: value@@ -30572,8 +25880,9 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: type- $ref: '#/components/schemas/bytebase.v1.PlanType'selfServicePurchase:type: booleantitle: self_service_purchase@@ -30593,8 +25902,9 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PurchasePlanAdditional.Type'title: type- $ref: '#/components/schemas/bytebase.v1.PurchasePlanAdditional.Type'unitPrice:type: integertitle: unit_price@@ -30694,9 +26004,10 @@ components:title: creatorreadOnly: truecreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'statement:type: stringtitle: statement@@ -30708,12 +26019,14 @@ components:title: errorreadOnly: trueduration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: durationreadOnly: true- $ref: '#/components/schemas/google.protobuf.Duration'type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryHistory.Type'title: type- $ref: '#/components/schemas/bytebase.v1.QueryHistory.Type'title: QueryHistoryadditionalProperties: falsebytebase.v1.QueryHistory.Type:@@ -30727,20 +26040,30 @@ components:type: objectproperties:redisRunCommandsOn:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryOption.RedisRunCommandsOn'title: redis_run_commands_on- $ref: '#/components/schemas/bytebase.v1.QueryOption.RedisRunCommandsOn'- mssqlExplainFormat:- title: mssql_explain_format- $ref: '#/components/schemas/bytebase.v1.QueryOption.MSSQLExplainFormat'+ explainFormat:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryOption.ExplainFormat'+ title: explain_formattitle: QueryOptionadditionalProperties: false- bytebase.v1.QueryOption.MSSQLExplainFormat:+ bytebase.v1.QueryOption.ExplainFormat:type: string- title: MSSQLExplainFormat+ title: ExplainFormatenum:- - MSSQL_EXPLAIN_FORMAT_UNSPECIFIED- - MSSQL_EXPLAIN_FORMAT_ALL- - MSSQL_EXPLAIN_FORMAT_XML+ - EXPLAIN_FORMAT_UNSPECIFIED+ - TEXT+ - JSON+ - XML+ description: |-+ Which explain output the caller wants, for an explain request.++ Leave it unspecified for the engine's own default, which is the only+ output most engines have. Naming a format an engine cannot produce is+ INVALID_ARGUMENT rather than a silent fallback, as is any explain request+ against an engine that has no explain at all.bytebase.v1.QueryOption.RedisRunCommandsOn:type: stringtitle: RedisRunCommandsOn@@ -30789,8 +26112,9 @@ components:The default schema to search objects. Equals to the current schema inOracle and search path in Postgres.queryOption:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryOption'title: query_option- $ref: '#/components/schemas/bytebase.v1.QueryOption'container:type:- string@@ -30823,112 +26147,118 @@ components:additionalProperties: falsebytebase.v1.QueryResult:type: object- allOf:- - properties:- columnNames:- type: array- items:- type: string- title: column_names- description: Column names of the query result.- columnTypeNames:- type: array- items:- type: string- title: column_type_names- description: |-- Column types of the query result.- The types come from the Golang SQL driver.- rows:- type: array- items:- $ref: '#/components/schemas/bytebase.v1.QueryRow'- title: rows- description: Rows of the query result.- rowsCount:- type:- - integer- - string- title: rows_count- format: int64- error:- type: string- title: error- description: The error message if the query failed.- latency:- title: latency- description: The time it takes to execute the query.- $ref: '#/components/schemas/google.protobuf.Duration'- statement:- type: string- title: statement- description: The query statement for the result.- messages:- type: array- items:- $ref: '#/components/schemas/bytebase.v1.QueryResult.Message'- title: messages- description: |-- Informational or debug messages returned by the database engine during query execution.- Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE.- masked:- type: array- items:- $ref: '#/components/schemas/bytebase.v1.MaskingReason'- title: masked- description: Masking reasons for each column (empty for non-masked columns).- - oneOf:- - type: object- properties:- commandError:- title: command_error- $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError'+ anyOf:+ - type: object+ properties:+ commandError:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError'title: command_error- required:- - commandError- - type: object- properties:- permissionDenied:- title: permission_denied- $ref: '#/components/schemas/bytebase.v1.PermissionDeniedDetail'+ title: command_error+ - type: object+ properties:+ permissionDenied:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PermissionDeniedDetail'title: permission_denied- required:- - permissionDenied- - type: object- properties:- postgresError:- title: postgres_error- $ref: '#/components/schemas/bytebase.v1.QueryResult.PostgresError'+ title: permission_denied+ - type: object+ properties:+ postgresError:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.PostgresError'title: postgres_error- required:- - postgresError- - type: object- properties:- syntaxError:- title: syntax_error- $ref: '#/components/schemas/bytebase.v1.QueryResult.SyntaxError'+ title: postgres_error+ - type: object+ properties:+ syntaxError:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.SyntaxError'title: syntax_error- required:- - syntaxError- - not:- anyOf:- - required:- - commandError- - required:- - permissionDenied- - required:- - postgresError- - required:- - syntaxError+ title: syntax_errorunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - commandError+ - required:+ - permissionDenied+ - required:+ - postgresError+ - required:+ - syntaxError+ - not:+ oneOf:+ - required:+ - commandError+ - required:+ - permissionDenied+ - required:+ - postgresError+ - required:+ - syntaxError+ properties:+ columnNames:+ type: array+ items:+ type: string+ title: column_names+ description: Column names of the query result.+ columnTypeNames:+ type: array+ items:+ type: string+ title: column_type_names+ description: |-+ Column types of the query result.+ The types come from the Golang SQL driver.+ rows:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.QueryRow'+ title: rows+ description: Rows of the query result.+ rowsCount:+ type: string+ title: rows_count+ format: int64+ error:+ type: string+ title: error+ description: The error message if the query failed.+ latency:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'+ title: latency+ description: The time it takes to execute the query.+ statement:+ type: string+ title: statement+ description: The query statement for the result.+ messages:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.QueryResult.Message'+ title: messages+ description: |-+ Informational or debug messages returned by the database engine during query execution.+ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE.+ masked:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.MaskingReason'+ title: masked+ description: Masking reasons for each column (empty for non-masked columns).title: QueryResultbytebase.v1.QueryResult.CommandError:type: objectproperties:commandType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError.Type'title: command_typedescription: Disallowed command_type.- $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError.Type'title: CommandErroradditionalProperties: falsedescription: |-@@ -30946,8 +26276,9 @@ components:type: objectproperties:level:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.QueryResult.Message.Level'title: level- $ref: '#/components/schemas/bytebase.v1.QueryResult.Message.Level'content:type: stringtitle: content@@ -31030,9 +26361,10 @@ components:type: objectproperties:startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: Position information for highlighting in editor- $ref: '#/components/schemas/bytebase.v1.Position'title: SyntaxErroradditionalProperties: falsedescription: Syntax error with position information for editor highlighting@@ -31098,9 +26430,10 @@ components:title: recovery_codesdescription: The pending recovery codes, shown once for the caller to save.pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: Identifies this mint; see StartMFAEnrollmentResponse.pending_version.- $ref: '#/components/schemas/google.protobuf.Timestamp'title: RegenerateRecoveryCodesResponseadditionalProperties: falsebytebase.v1.RejectIssueRequest:@@ -31141,27 +26474,31 @@ components:title: filesdescription: The SQL files included in the release.vcsSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release.VCSSource'title: vcs_sourcedescription: The version control source of the release.- $ref: '#/components/schemas/bytebase.v1.Release.VCSSource'creator:type: stringtitle: creatordescription: 'Format: users/[email protected]'readOnly: truecreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the release.readOnly: true- $ref: '#/components/schemas/bytebase.v1.State'type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release.Type'title: typedescription: The type of schema change for all files in this release.- $ref: '#/components/schemas/bytebase.v1.Release.Type'title: ReleaseadditionalProperties: falsebytebase.v1.Release.File:@@ -31210,9 +26547,10 @@ components:type: objectproperties:vcsType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.VCSType'title: vcs_typedescription: The type of VCS.- $ref: '#/components/schemas/bytebase.v1.VCSType'url:type: stringtitle: url@@ -31230,11 +26568,12 @@ components:The name of the instance to remove a data source from.Format: instances/{instance} or projects/{project}/instances/{instance}dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: |-Identified by data source ID.Only READ_ONLY data source can be removed.- $ref: '#/components/schemas/bytebase.v1.DataSource'title: RemoveDataSourceRequestrequired:- name@@ -31244,9 +26583,10 @@ components:type: objectproperties:webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to remove. Identified by its url.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: RemoveWebhookRequestrequired:- webhook@@ -31358,10 +26698,11 @@ components:description: Whether password sign-in is disabled for all end users.readOnly: truepasswordRestriction:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'title: password_restrictiondescription: Password complexity and restriction requirements.readOnly: true- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'allowEmailCodeSignin:type: booleantitle: allow_email_code_signin@@ -31435,26 +26776,30 @@ components:The {reviewRun} id is the reviewer: "rule" or "guideline". The nameaddresses a slot, not an execution.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewRun.Type'title: typedescription: Derived from the name.readOnly: true- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Type'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewRun.Status'title: statusreadOnly: true- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Status'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: When the current run was triggered. Reset on every re-run.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: |-When the run reached a terminal status. Unset while AVAILABLE orRUNNING.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -31499,9 +26844,10 @@ components:Format: projects/{project}/releases/{release}Can be empty.createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'deleter:type: stringtitle: deleter@@ -31510,10 +26856,11 @@ components:Can be empty.readOnly: truedeleteTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: delete_timedescription: Can be empty.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'file:type: stringtitle: file@@ -31544,9 +26891,10 @@ components:Can be empty.Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Revision.Type'title: typedescription: The type of the revision.- $ref: '#/components/schemas/bytebase.v1.Revision.Type'title: RevisionadditionalProperties: falsebytebase.v1.Revision.Type:@@ -31603,9 +26951,10 @@ components:title: permissionsdescription: List of permission identifiers granted by this role.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Role.Type'title: typedescription: Role type indicating if it's built-in or custom.- $ref: '#/components/schemas/bytebase.v1.Role.Type'title: RoleadditionalProperties: falsedescription: Role defines a set of permissions that can be assigned to users.@@ -31632,13 +26981,15 @@ components:The user to be granted.Format: users/{email}.condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: The condition for the role. Same as the condition in IAM Binding message.- $ref: '#/components/schemas/google.type.Expr'expiration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: expirationdescription: The duration for which the grant is valid.- $ref: '#/components/schemas/google.protobuf.Duration'title: RoleGrantadditionalProperties: falsebytebase.v1.Rollout:@@ -31665,13 +27016,15 @@ components:description: Stages and thus tasks of the rollout.readOnly: truecreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'title: RolloutadditionalProperties: falsebytebase.v1.RolloutPolicy:@@ -31715,15 +27068,13 @@ components:additionalProperties: falsebytebase.v1.RowValue:type: object- oneOf:+ anyOf:- type: objectproperties:boolValue:type: booleantitle: bool_valuetitle: bool_value- required:- - boolValue- type: objectproperties:bytesValue:@@ -31731,8 +27082,6 @@ components:title: bytes_valueformat: bytetitle: bytes_value- required:- - bytesValue- type: objectproperties:doubleValue:@@ -31740,8 +27089,6 @@ components:title: double_valueformat: doubletitle: double_value- required:- - doubleValue- type: objectproperties:floatValue:@@ -31749,8 +27096,6 @@ components:title: float_valueformat: floattitle: float_value- required:- - floatValue- type: objectproperties:int32Value:@@ -31758,89 +27103,73 @@ components:title: int32_valueformat: int32title: int32_value- required:- - int32Value- type: objectproperties:int64Value:- type:- - integer- - string+ type: stringtitle: int64_valueformat: int64title: int64_value- required:- - int64Value- type: objectproperties:nullValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.NullValue'title: null_value- $ref: '#/components/schemas/google.protobuf.NullValue'title: null_value- required:- - nullValue- type: objectproperties:stringValue:type: stringtitle: string_valuetitle: string_value- required:- - stringValue- type: objectproperties:timestampTzValue:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RowValue.TimestampTZ'title: timestamp_tz_valuedescription: |-timestamp_tz_value is used for the timestamptz data type, whichaccurately represents the timestamp with location information.- $ref: '#/components/schemas/bytebase.v1.RowValue.TimestampTZ'title: timestamp_tz_value- required:- - timestampTzValue- type: objectproperties:timestampValue:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.RowValue.Timestamp'title: timestamp_valuedescription: |-timestamp_value is used for the timestamp without time zone data type,meaning it only includes the timestamp without any time zone or locationinfo. Although it may be expressed as a UTC value, it should be seen as atimestamp missing location context.- $ref: '#/components/schemas/bytebase.v1.RowValue.Timestamp'title: timestamp_value- required:- - timestampValue- type: objectproperties:uint32Value:type: integertitle: uint32_valuetitle: uint32_value- required:- - uint32Value- type: objectproperties:uint64Value:- type:- - integer- - string+ type: stringtitle: uint64_valueformat: int64title: uint64_value- required:- - uint64Value- type: objectproperties:valueValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Value'title: value_valuedescription: value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only.- $ref: '#/components/schemas/google.protobuf.Value'title: value_value- required:- - valueValue- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- boolValue- required:@@ -31867,14 +27196,42 @@ components:- uint64Value- required:- valueValue- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - boolValue+ - required:+ - bytesValue+ - required:+ - doubleValue+ - required:+ - floatValue+ - required:+ - int32Value+ - required:+ - int64Value+ - required:+ - nullValue+ - required:+ - stringValue+ - required:+ - timestampTzValue+ - required:+ - timestampValue+ - required:+ - uint32Value+ - required:+ - uint64Value+ - required:+ - valueValuetitle: RowValuebytebase.v1.RowValue.Timestamp:type: objectproperties:googleTimestamp:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: google_timestamp- $ref: '#/components/schemas/google.protobuf.Timestamp'accuracy:type: integertitle: accuracy@@ -31886,8 +27243,9 @@ components:type: objectproperties:googleTimestamp:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: google_timestamp- $ref: '#/components/schemas/google.protobuf.Timestamp'zone:type: stringtitle: zone@@ -31948,20 +27306,15 @@ components:additionalProperties: falsebytebase.v1.SASLConfig:type: object- oneOf:+ anyOf:- type: objectproperties:krbConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.KerberosConfig'title: krb_configdescription: Kerberos authentication configuration.- $ref: '#/components/schemas/bytebase.v1.KerberosConfig'title: krb_config- required:- - krbConfig- - not:- anyOf:- - required:- - krbConfigunevaluatedProperties: falsetitle: SASLConfigbytebase.v1.SQLEditorThemeSetting:@@ -31980,102 +27333,103 @@ components:type: objecttitle: tokensadditionalProperties:+ allOf:+ - $ref: '#/components/schemas/google.type.Color'title: value- $ref: '#/components/schemas/google.type.Color'description: CSS token colors.title: SQLEditorThemeSettingadditionalProperties: false- bytebase.v1.SQLEditorThemeSetting.TokensEntry:- type: object- properties:- key:- type: string- title: key- value:- title: value- $ref: '#/components/schemas/google.type.Color'- title: TokensEntry- additionalProperties: falsebytebase.v1.SQLReviewRule:type: object- allOf:- - properties:- type:- title: type- description: The type of SQL review rule.- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Type'- level:- title: level- description: The severity level of the rule.- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Level'- engine:- title: engine- description: The database engine this rule applies to.- $ref: '#/components/schemas/bytebase.v1.Engine'- - oneOf:- - type: object- properties:- commentConventionPayload:- title: comment_convention_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.CommentConventionRulePayload'+ anyOf:+ - type: object+ properties:+ commentConventionPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.CommentConventionRulePayload'title: comment_convention_payload- required:- - commentConventionPayload- - type: object- properties:- namingCasePayload:- title: naming_case_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingCaseRulePayload'+ title: comment_convention_payload+ - type: object+ properties:+ namingCasePayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingCaseRulePayload'title: naming_case_payload- required:- - namingCasePayload- - type: object- properties:- namingPayload:- title: naming_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingRulePayload'+ title: naming_case_payload+ - type: object+ properties:+ namingPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingRulePayload'title: naming_payload- required:- - namingPayload- - type: object- properties:- numberPayload:- title: number_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NumberRulePayload'+ title: naming_payload+ - type: object+ properties:+ numberPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NumberRulePayload'title: number_payload- required:- - numberPayload- - type: object- properties:- stringArrayPayload:- title: string_array_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringArrayRulePayload'+ title: number_payload+ - type: object+ properties:+ stringArrayPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringArrayRulePayload'title: string_array_payload- required:- - stringArrayPayload- - type: object- properties:- stringPayload:- title: string_payload- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringRulePayload'+ title: string_array_payload+ - type: object+ properties:+ stringPayload:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringRulePayload'title: string_payload- required:- - stringPayload- - not:- anyOf:- - required:- - commentConventionPayload- - required:- - namingCasePayload- - required:- - namingPayload- - required:- - numberPayload- - required:- - stringArrayPayload- - required:- - stringPayload+ title: string_payloadunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - commentConventionPayload+ - required:+ - namingCasePayload+ - required:+ - namingPayload+ - required:+ - numberPayload+ - required:+ - stringArrayPayload+ - required:+ - stringPayload+ - not:+ oneOf:+ - required:+ - commentConventionPayload+ - required:+ - namingCasePayload+ - required:+ - namingPayload+ - required:+ - numberPayload+ - required:+ - stringArrayPayload+ - required:+ - stringPayload+ properties:+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Type'+ title: type+ description: The type of SQL review rule.+ level:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Level'+ title: level+ description: The severity level of the rule.+ engine:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Engine'+ title: engine+ description: The database engine this rule applies to.title: SQLReviewRuledescription: SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.bytebase.v1.SQLReviewRule.CommentConventionRulePayload:@@ -32285,10 +27639,11 @@ components:Format: instances/{instance} or projects/{project}/instances/{instance}readOnly: trueexpireTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: expire_timedescription: The time when the provisioned sample instance expires.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'title: InstanceadditionalProperties: falsedescription: Instance describes one provisioned sample instance.@@ -32327,13 +27682,15 @@ components:Format: users/{email}readOnly: truecreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'content:type: stringtitle: content@@ -32342,9 +27699,7 @@ components:The SQL text. SearchSavedQueries returns a truncated preview;GetSavedQuery returns the full text.contentSize:- type:- - integer- - string+ type: stringtitle: content_sizeformat: int64description: The full size of the content, which may exceed the `content` returned.@@ -32371,8 +27726,9 @@ components:type: objectproperties:level:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQueryBinding.Level'title: level- $ref: '#/components/schemas/bytebase.v1.SavedQueryBinding.Level'members:type: arrayitems:@@ -33025,8 +28381,9 @@ components:title: descriptiondescription: the description of the semantic type, it can be empty.algorithm:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Algorithm'title: algorithm- $ref: '#/components/schemas/bytebase.v1.Algorithm'icon:type: stringtitle: icon@@ -33125,9 +28482,10 @@ components:Format: serviceAccounts/{email}readOnly: truestate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The state of the service account.- $ref: '#/components/schemas/bytebase.v1.State'email:type: stringtitle: email@@ -33147,10 +28505,11 @@ components:description: The service key for authentication. Only returned on creation or key rotation.readOnly: truecreateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the service account was created.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'title: ServiceAccountadditionalProperties: falsedescription: ServiceAccount represents an API integration account.@@ -33165,8 +28524,9 @@ components:Format: projects/{project}Format: workspaces/{workspace}policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IamPolicy'title: policy- $ref: '#/components/schemas/bytebase.v1.IamPolicy'etag:type: stringtitle: etag@@ -33187,11 +28547,12 @@ components:title: resourcedescription: 'Format: projects/{project}/savedQueries/{savedQuery}'policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQueryPolicy'title: policydescription: |-The new policy, replacing the stored one in full. Empty `bindings` makesthe saved query private again.- $ref: '#/components/schemas/bytebase.v1.SavedQueryPolicy'title: SetSavedQueryPolicyRequestrequired:- resource@@ -33208,9 +28569,10 @@ components:Format: settings/{setting}Example: "settings/SEMANTIC_TYPES"value:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SettingValue'title: valuedescription: The configuration value of the setting.- $ref: '#/components/schemas/bytebase.v1.SettingValue'title: Settingrequired:- value@@ -33232,81 +28594,74 @@ components:- MCPbytebase.v1.SettingValue:type: object- oneOf:+ anyOf:- type: objectproperties:ai:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AISetting'title: ai- $ref: '#/components/schemas/bytebase.v1.AISetting'title: ai- required:- - ai- type: objectproperties:appIm:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.AppIMSetting'title: app_im- $ref: '#/components/schemas/bytebase.v1.AppIMSetting'title: app_im- required:- - appIm- type: objectproperties:dataClassification:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting'title: data_classification- $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting'title: data_classification- required:- - dataClassification- type: objectproperties:email:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting'title: email- $ref: '#/components/schemas/bytebase.v1.EmailSetting'title: email- required:- type: objectproperties:environment:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EnvironmentSetting'title: environment- $ref: '#/components/schemas/bytebase.v1.EnvironmentSetting'title: environment- required:- - environment- type: objectproperties:mcp:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: mcp- $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: mcp- required:- - mcp- type: objectproperties:semanticType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SemanticTypeSetting'title: semantic_type- $ref: '#/components/schemas/bytebase.v1.SemanticTypeSetting'title: semantic_type- required:- - semanticType- type: objectproperties:workspaceApproval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting'title: workspace_approval- $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting'title: workspace_approval- required:- - workspaceApproval- type: objectproperties:workspaceProfile:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting'title: workspace_profile- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting'title: workspace_profile- required:- - workspaceProfile- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- ai- required:@@ -33325,7 +28680,26 @@ components:- workspaceApproval- required:- workspaceProfile- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - ai+ - required:+ - appIm+ - required:+ - dataClassification+ - required:+ - required:+ - environment+ - required:+ - mcp+ - required:+ - semanticType+ - required:+ - workspaceApproval+ - required:+ - workspaceProfiletitle: SettingValuedescription: The data in setting value.bytebase.v1.Sheet:@@ -33347,9 +28721,7 @@ components:By default, it will be cut off, if it doesn't match the `content_size`, you canset the `raw` to true in GetSheet request to retrieve the full content.contentSize:- type:- - integer- - string+ type: stringtitle: content_sizeformat: int64description: content_size is the full size of the content, may not match the size of the `content` field.@@ -33391,17 +28763,20 @@ components:title: methoddescription: Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST")tessellation:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TessellationConfig'title: tessellationdescription: Tessellation configuration for grid-based spatial indexes- $ref: '#/components/schemas/bytebase.v1.TessellationConfig'storage:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StorageConfig'title: storagedescription: Storage and performance configuration- $ref: '#/components/schemas/bytebase.v1.StorageConfig'dimensional:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DimensionalConfig'title: dimensionaldescription: Dimensional configuration- $ref: '#/components/schemas/bytebase.v1.DimensionalConfig'title: SpatialIndexConfigadditionalProperties: falsedescription: SpatialIndexConfig defines the spatial index configuration for spatial databases.@@ -33464,17 +28839,19 @@ components:title: recovery_codesdescription: The pending recovery codes, shown once for the caller to save.expireTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: expire_timedescription: When this enrollment stops being confirmable.- $ref: '#/components/schemas/google.protobuf.Timestamp'pendingVersion:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: pending_versiondescription: |-Identifies this mint. Echo it back to EnableMFA andConfirmRecoveryCodes; a mint from another tab or device replaces thepending state, and those methods refuse a version that is no longer thepending one rather than promoting something this caller never saw.- $ref: '#/components/schemas/google.protobuf.Timestamp'title: StartMFAEnrollmentResponseadditionalProperties: falsebytebase.v1.StartTrialRequest:@@ -33501,15 +28878,17 @@ components:title: sheet_sha256description: SHA256 of the saved sheet, as 64 lowercase hexadecimal characters.startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: |-One-based lines and Unicode code-point columns. When both columns are zero,the range covers whole lines, including the end line. Otherwise both columnsmust be positive, start_position is inclusive, and end_position is exclusive.- $ref: '#/components/schemas/bytebase.v1.Position'endPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: end_position- $ref: '#/components/schemas/bytebase.v1.Position'title: StatementAnchoradditionalProperties: falsedescription: |-@@ -33641,17 +29020,19 @@ components:title: commentdescription: The comment of the stream.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'title: typedescription: The type of the stream.- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'stale:type: booleantitle: staledescription: Indicates whether the stream was last read before the `stale_after` time.mode:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'title: modedescription: The mode of the stream.- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'definition:type: stringtitle: definition@@ -33676,9 +29057,10 @@ components:type: objectproperties:plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: planreadOnly: true- $ref: '#/components/schemas/bytebase.v1.PlanType'seats:type: integertitle: seats@@ -33695,9 +29077,10 @@ components:format: int32readOnly: trueexpiresTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: expires_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'trialing:type: booleantitle: trialing@@ -33822,42 +29205,46 @@ components:description: SyncStatus is the status of the database sync operation.bytebase.v1.TableCatalog:type: object- allOf:- - properties:- name:- type: string- title: name- description: The table name.- classification:- type: string- title: classification- description: The data classification level for this table.- - oneOf:- - type: object- properties:- columns:- title: columns- description: Regular table columns.- $ref: '#/components/schemas/bytebase.v1.TableCatalog.Columns'+ anyOf:+ - type: object+ properties:+ columns:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TableCatalog.Columns'title: columns- required:- - columns- - type: object- properties:- objectSchema:- title: object_schema- description: Object schema for JSON/XML columns.- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'+ description: Regular table columns.+ title: columns+ - type: object+ properties:+ objectSchema:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ObjectSchema'title: object_schema- required:- - objectSchema- - not:- anyOf:- - required:- - columns- - required:- - objectSchema+ description: Object schema for JSON/XML columns.+ title: object_schemaunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - columns+ - required:+ - objectSchema+ - not:+ oneOf:+ - required:+ - columns+ - required:+ - objectSchema+ properties:+ name:+ type: string+ title: name+ description: The table name.+ classification:+ type: string+ title: classification+ description: The data classification level for this table.title: TableCatalogdescription: Table metadata within a schema.bytebase.v1.TableCatalog.Columns:@@ -33904,30 +29291,22 @@ components:title: charsetdescription: The character set of table.rowCount:- type:- - integer- - string+ type: stringtitle: row_countformat: int64description: The row_count is the estimated number of rows of a table.dataSize:- type:- - integer- - string+ type: stringtitle: data_sizeformat: int64description: The data_size is the estimated data size of a table.indexSize:- type:- - integer- - string+ type: stringtitle: index_sizeformat: int64description: The index_size is the estimated index size of a table.dataFree:- type:- - integer- - string+ type: stringtitle: data_freeformat: int64description: The data_free is the estimated free data size of a table.@@ -34000,9 +29379,10 @@ components:title: namedescription: The name is the name of a table partition.type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'title: typedescription: The type of a table partition.- $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'expression:type: stringtitle: expression@@ -34092,88 +29472,83 @@ components:title: TagPolicyadditionalProperties: falsedescription: Policy for tagging resources with metadata.- bytebase.v1.TagPolicy.TagsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: TagsEntry- additionalProperties: falsebytebase.v1.Task:type: object- allOf:- - properties:- name:- type: string- title: name- description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}'- specId:- type: string- title: spec_id- description: A UUID4 string that uniquely identifies the Spec.- status:- title: status- description: Status is the status of the task.- $ref: '#/components/schemas/bytebase.v1.Task.Status'- skippedReason:- type: string- title: skipped_reason- description: The reason why the task was skipped.- type:- title: type- $ref: '#/components/schemas/bytebase.v1.Task.Type'- target:- type: string- title: target- description: |-- Format: instances/{instance} or projects/{project}/instances/{instance} if the task is DatabaseCreate.- Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- updateTime:- oneOf:- - $ref: '#/components/schemas/google.protobuf.Timestamp'- - type: "null"- title: update_time- description: |-- The update_time is the update time of latest task run.- If there are no task runs, it will be empty.- readOnly: true- runTime:- oneOf:- - $ref: '#/components/schemas/google.protobuf.Timestamp'- - type: "null"- title: run_time- description: |-- The run_time is the scheduled run time of latest task run.- If there are no task runs or the task run is not scheduled, it will be empty.- readOnly: true- - oneOf:- - type: object- properties:- databaseCreate:- title: database_create- $ref: '#/components/schemas/bytebase.v1.Task.DatabaseCreate'+ anyOf:+ - type: object+ properties:+ databaseCreate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.DatabaseCreate'title: database_create- required:- - databaseCreate- - type: object- properties:- databaseUpdate:- title: database_update- $ref: '#/components/schemas/bytebase.v1.Task.DatabaseUpdate'+ title: database_create+ - type: object+ properties:+ databaseUpdate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.DatabaseUpdate'title: database_update- required:- - databaseUpdate- - not:- anyOf:- - required:- - databaseCreate- - required:- - databaseUpdate+ title: database_updateunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - databaseCreate+ - required:+ - databaseUpdate+ - not:+ oneOf:+ - required:+ - databaseCreate+ - required:+ - databaseUpdate+ properties:+ name:+ type: string+ title: name+ description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}'+ specId:+ type: string+ title: spec_id+ description: A UUID4 string that uniquely identifies the Spec.+ status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.Status'+ title: status+ description: Status is the status of the task.+ skippedReason:+ type: string+ title: skipped_reason+ description: The reason why the task was skipped.+ type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Task.Type'+ title: type+ target:+ type: string+ title: target+ description: |-+ Format: instances/{instance} or projects/{project}/instances/{instance} if the task is DatabaseCreate.+ Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}+ updateTime:+ oneOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ - type: "null"+ title: update_time+ description: |-+ The update_time is the update time of latest task run.+ If there are no task runs, it will be empty.+ readOnly: true+ runTime:+ oneOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'+ - type: "null"+ title: run_time+ description: |-+ The run_time is the scheduled run time of latest task run.+ If there are no task runs or the task run is not scheduled, it will be empty.+ readOnly: truetitle: Taskbytebase.v1.Task.DatabaseCreate:type: object@@ -34187,7 +29562,7 @@ components:description: Payload for creating a new database.bytebase.v1.Task.DatabaseUpdate:type: object- oneOf:+ anyOf:- type: objectproperties:release:@@ -34195,8 +29570,6 @@ components:title: releasedescription: 'Format: projects/{project}/releases/{release}'title: release- required:- - release- type: objectproperties:sheet:@@ -34204,15 +29577,20 @@ components:title: sheetdescription: 'Format: projects/{project}/sheets/{sheet}'title: sheet- required:- - sheet- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- release- required:- sheet- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - release+ - required:+ - sheettitle: DatabaseUpdatedescription: Payload for updating a database schema.bytebase.v1.Task.Status:@@ -34271,9 +29649,10 @@ components:title: predecessorsdescription: The predecessor tasks of the task.state:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'title: statedescription: The state of the task.- $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'condition:type: stringtitle: condition@@ -34303,17 +29682,20 @@ components:title: creatordescription: 'Format: users/[email protected]'createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'updateTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: update_timereadOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'status:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRun.Status'title: statusdescription: The current execution status of the task run.- $ref: '#/components/schemas/bytebase.v1.TaskRun.Status'detail:type: stringtitle: detail@@ -34321,10 +29703,11 @@ components:Below are the results of a task run.Detailed information about the task run result.startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: The time when the task run started execution.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'hasPriorBackup:type: booleantitle: has_prior_backup@@ -34333,10 +29716,11 @@ components:When true, rollback SQL can be generated via PreviewTaskRunRollback.Backup details are available in the task run logs.schedulerInfo:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo'title: scheduler_infodescription: Scheduling information about the task run.readOnly: true- $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo'runTime:oneOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'@@ -34352,19 +29736,21 @@ components:type: objectproperties:reportTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: report_timedescription: The time when the scheduling info was reported.- $ref: '#/components/schemas/google.protobuf.Timestamp'waitingCause:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo.WaitingCause'title: waiting_causedescription: The cause for the task run waiting.- $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo.WaitingCause'title: SchedulerInfoadditionalProperties: falsedescription: Information about task run scheduling.bytebase.v1.TaskRun.SchedulerInfo.WaitingCause:type: object- oneOf:+ anyOf:- type: objectproperties:parallelTasksLimit:@@ -34372,12 +29758,6 @@ components:title: parallel_tasks_limitdescription: Waiting due to parallel tasks limit.title: parallel_tasks_limit- required:- - parallelTasksLimit- - not:- anyOf:- - required:- - parallelTasksLimitunevaluatedProperties: falsetitle: WaitingCausedescription: Information about why a task run is waiting.@@ -34411,77 +29791,91 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.Type'title: typedescription: The type of this log entry.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.Type'logTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: log_timedescription: The time when the log was recorded.- $ref: '#/components/schemas/google.protobuf.Timestamp'replicaId:type: stringtitle: replica_iddescription: The replica ID for this log entry.schemaDump:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.SchemaDump'title: schema_dumpdescription: Schema dump details (if type is SCHEMA_DUMP).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.SchemaDump'commandExecute:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute'title: command_executedescription: Command execution details (if type is COMMAND_EXECUTE).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute'databaseSync:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.DatabaseSync'title: database_syncdescription: Database sync details (if type is DATABASE_SYNC).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.DatabaseSync'transactionControl:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl'title: transaction_controldescription: Transaction control details (if type is TRANSACTION_CONTROL).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl'priorBackup:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup'title: prior_backupdescription: Prior backup details (if type is PRIOR_BACKUP).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup'retryInfo:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.RetryInfo'title: retry_infodescription: Retry information details (if type is RETRY_INFO).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.RetryInfo'computeDiff:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ComputeDiff'title: compute_diffdescription: Compute diff details (if type is COMPUTE_DIFF).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ComputeDiff'releaseFileExecute:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ReleaseFileExecute'title: release_file_executedescription: Release file execution details (if type is RELEASE_FILE_EXECUTE).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ReleaseFileExecute'ghostMigration:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.GhostMigration'title: ghost_migrationdescription: gh-ost migration details (if type is GHOST_MIGRATION).- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.GhostMigration'title: TaskRunLogEntryadditionalProperties: falsebytebase.v1.TaskRunLogEntry.CommandExecute:type: objectproperties:logTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: log_timedescription: When the command was logged.- $ref: '#/components/schemas/google.protobuf.Timestamp'range:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Range'title: rangedescription: |-The byte offset range of the executed command in the sheet.Uses byte offsets (not character indices) for efficient slicing of sheet content bytes.Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes.- $ref: '#/components/schemas/bytebase.v1.Range'statement:type: stringtitle: statementdescription: The executed statement.response:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse'title: responsedescription: The response from executing the command.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse'title: CommandExecuteadditionalProperties: falsedescription: Command execution details.@@ -34489,26 +29883,23 @@ components:type: objectproperties:logTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: log_timedescription: When the response was logged.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: errordescription: Error message if command execution failed.affectedRows:- type:- - integer- - string+ type: stringtitle: affected_rowsformat: int64description: Total affected rows.allAffectedRows:type: arrayitems:- type:- - integer- - string+ type: stringformat: int64title: all_affected_rowsdescription: |-@@ -34521,13 +29912,15 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When diff computation started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When diff computation ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -34539,13 +29932,15 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When the database sync started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When the database sync ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -34557,13 +29952,15 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When the gh-ost migration started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When the gh-ost migration ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -34575,17 +29972,20 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When the backup started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When the backup ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'priorBackupDetail:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail'title: prior_backup_detaildescription: The backup details.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail'error:type: stringtitle: error@@ -34609,21 +30009,25 @@ components:type: objectproperties:sourceTable:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'title: source_tabledescription: The original table information.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'targetTable:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'title: target_tabledescription: The target backup table information.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'startPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: start_positiondescription: The start position in the SQL statement.- $ref: '#/components/schemas/bytebase.v1.Position'endPosition:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Position'title: end_positiondescription: The end position in the SQL statement.- $ref: '#/components/schemas/bytebase.v1.Position'title: ItemadditionalProperties: falsedescription: A single backup table mapping.@@ -34685,13 +30089,15 @@ components:type: objectproperties:startTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: start_timedescription: When the schema dump started.- $ref: '#/components/schemas/google.protobuf.Timestamp'endTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: end_timedescription: When the schema dump ended.- $ref: '#/components/schemas/google.protobuf.Timestamp'error:type: stringtitle: error@@ -34703,9 +30109,10 @@ components:type: objectproperties:type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl.Type'title: typedescription: The type of transaction control.- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl.Type'error:type: stringtitle: error@@ -34739,35 +30146,30 @@ components:description: The type of log entry.bytebase.v1.TaskRunSession:type: object- allOf:- - properties:- name:- type: string- title: name- description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session'- - oneOf:- - type: object- properties:- postgres:- title: postgres- description: PostgreSQL session information.- $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres'+ anyOf:+ - type: object+ properties:+ postgres:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres'title: postgres- required:- - postgres- - not:- anyOf:- - required:- - postgres+ description: PostgreSQL session information.+ title: postgresunevaluatedProperties: false+ properties:+ name:+ type: string+ title: name+ description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session'title: TaskRunSessionbytebase.v1.TaskRunSession.Postgres:type: objectproperties:session:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres.Session'title: sessiondescription: '`session` is the session of the task run executing commands.'- $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres.Session'blockingSessions:type: arrayitems:@@ -34847,9 +30249,10 @@ components:title: client_portdescription: Client port number.backendStart:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: backend_startdescription: When the backend process started.- $ref: '#/components/schemas/google.protobuf.Timestamp'xactStart:oneOf:- $ref: '#/components/schemas/google.protobuf.Timestamp'@@ -34884,9 +30287,10 @@ components:format: int32description: Number of cells per object (1-8192 for SQL Server)boundingBox:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BoundingBox'title: bounding_boxdescription: Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY)- $ref: '#/components/schemas/bytebase.v1.BoundingBox'title: TessellationConfigadditionalProperties: falsedescription: TessellationConfig defines tessellation parameters for spatial indexes.@@ -34897,8 +30301,9 @@ components:type: stringtitle: parentemailSetting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.EmailSetting'title: email_setting- $ref: '#/components/schemas/bytebase.v1.EmailSetting'to:type: stringtitle: to@@ -34921,48 +30326,54 @@ components:additionalProperties: falsebytebase.v1.TestIdentityProviderRequest:type: object- allOf:- - properties:- identityProvider:- title: identity_provider- description: The identity provider to test connection including uncreated.- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'- - oneOf:- - type: object- properties:- ldapContext:- title: ldap_context- description: LDAP credentials context for test connection.- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderTestRequestContext'+ anyOf:+ - type: object+ properties:+ ldapContext:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderTestRequestContext'title: ldap_context- required:- - ldapContext- - type: object- properties:- oauth2Context:- title: oauth2_context- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderTestRequestContext'+ description: LDAP credentials context for test connection.+ title: ldap_context+ - type: object+ properties:+ oauth2Context:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderTestRequestContext'title: oauth2_context- required:- - oauth2Context- - type: object- properties:- oidcContext:- title: oidc_context- description: OIDC authentication context for test connection.- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderTestRequestContext'+ title: oauth2_context+ - type: object+ properties:+ oidcContext:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderTestRequestContext'title: oidc_context- required:- - oidcContext- - not:- anyOf:- - required:- - ldapContext- - required:- - oauth2Context- - required:- - oidcContext+ description: OIDC authentication context for test connection.+ title: oidc_contextunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - ldapContext+ - required:+ - oauth2Context+ - required:+ - oidcContext+ - not:+ oneOf:+ - required:+ - ldapContext+ - required:+ - oauth2Context+ - required:+ - oidcContext+ properties:+ identityProvider:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProvider'+ title: identity_provider+ description: The identity provider to test connection including uncreated.title: TestIdentityProviderRequestbytebase.v1.TestIdentityProviderResponse:type: object@@ -34983,28 +30394,6 @@ components:description: The matched user info from the claims.title: TestIdentityProviderResponseadditionalProperties: false- bytebase.v1.TestIdentityProviderResponse.ClaimsEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: ClaimsEntry- additionalProperties: false- bytebase.v1.TestIdentityProviderResponse.UserInfoEntry:- type: object- properties:- key:- type: string- title: key- value:- type: string- title: value- title: UserInfoEntry- additionalProperties: falsebytebase.v1.TestWebhookRequest:type: objectproperties:@@ -35015,6 +30404,8 @@ components:The name of the project which owns the webhook to test.Format: projects/{project}webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: |-The webhook to test.@@ -35022,7 +30413,6 @@ components:The url is what gets posted to. Reads do not return a saved webhook's url,so leave url empty and set name to test the one already stored; set url totest a url before saving it.- $ref: '#/components/schemas/bytebase.v1.Webhook'title: TestWebhookRequestrequired:- project@@ -35170,13 +30560,15 @@ components:The name of the instance to update a data source.Format: instances/{instance} or projects/{project}/instances/{instance}dataSource:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DataSource'title: data_sourcedescription: Identified by data source ID.- $ref: '#/components/schemas/bytebase.v1.DataSource'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'validateOnly:type: booleantitle: validate_only@@ -35196,6 +30588,8 @@ components:type: objectproperties:catalog:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'title: catalogdescription: |-The database catalog to update, identified by its `name` field.@@ -35204,7 +30598,6 @@ components:Replaces the whole catalog: send the complete value, since anything omittedis erased. There is no `update_mask` because `schemas` is a repeated field,and AIP-161 forbids addressing one element of one.- $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'title: UpdateDatabaseCatalogRequestrequired:- catalog@@ -35214,17 +30607,19 @@ components:type: objectproperties:databaseGroup:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'title: database_groupdescription: |-The database group to update.The database group's `name` field is used to identify the database group to update.Format: projects/{project}/databaseGroups/{databaseGroup}- $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35240,17 +30635,19 @@ components:type: objectproperties:database:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Database'title: databasedescription: |-The database to update.The database's `name` field is used to identify the database to update.Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}- $ref: '#/components/schemas/bytebase.v1.Database'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateDatabaseRequestrequired:- database@@ -35279,17 +30676,19 @@ components:type: objectproperties:group:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Group'title: groupdescription: |-The group to update.The group's `name` field is used to identify the group to update.Format: groups/{email}- $ref: '#/components/schemas/bytebase.v1.Group'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35305,17 +30704,19 @@ components:type: objectproperties:identityProvider:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IdentityProvider'title: identity_providerdescription: |-The identity provider to update.The identity provider's `name` field is used to identify the identity provider to update.Format: idps/{identity_provider}- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35330,17 +30731,19 @@ components:type: objectproperties:instance:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Instance'title: instancedescription: |-The instance to update.The instance's `name` field is used to identify the instance to update.Format: instances/{instance} or projects/{project}/instances/{instance}- $ref: '#/components/schemas/bytebase.v1.Instance'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35363,13 +30766,15 @@ components:The issue nameFormat: projects/{project}/issues/{issue}issueComment:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.IssueComment'title: issue_commentdescription: The comment to update.- $ref: '#/components/schemas/bytebase.v1.IssueComment'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35385,17 +30790,19 @@ components:type: objectproperties:issue:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Issue'title: issuedescription: |-The issue to update.The issue's `name` field is used to identify the issue to update.Format: projects/{project}/issues/{issue}- $ref: '#/components/schemas/bytebase.v1.Issue'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35411,17 +30818,19 @@ components:type: objectproperties:plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Plan'title: plandescription: |-The plan to update.The plan's `name` field is used to identify the plan to update.Format: projects/{project}/plans/{plan}- $ref: '#/components/schemas/bytebase.v1.Plan'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35437,6 +30846,8 @@ components:type: objectproperties:policy:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Policy'title: policydescription: |-The policy to update.@@ -35445,11 +30856,11 @@ components:Format: {resource name}/policies/{policy type}Workspace resource name: workspaces/{workspace-id}.Environment resource name: environments/environment-id.- $ref: '#/components/schemas/bytebase.v1.Policy'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35464,17 +30875,19 @@ components:type: objectproperties:project:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Project'title: projectdescription: |-The project to update.The project's `name` field is used to identify the project to update.Format: projects/{project}- $ref: '#/components/schemas/bytebase.v1.Project'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35489,11 +30902,13 @@ components:type: objectproperties:plan:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.PlanType'title: plan- $ref: '#/components/schemas/bytebase.v1.PlanType'interval:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.BillingInterval'title: interval- $ref: '#/components/schemas/bytebase.v1.BillingInterval'seats:type: integertitle: seats@@ -35507,13 +30922,15 @@ components:type: objectproperties:release:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Release'title: releasedescription: The release to update.- $ref: '#/components/schemas/bytebase.v1.Release'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to be updated.- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateReleaseRequestrequired:- release@@ -35522,16 +30939,18 @@ components:type: objectproperties:reviewConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ReviewConfig'title: review_configdescription: |-The SQL review config to update.The name field is used to identify the SQL review config to update.- $ref: '#/components/schemas/bytebase.v1.ReviewConfig'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35546,13 +30965,15 @@ components:type: objectproperties:role:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Role'title: roledescription: The role to update.- $ref: '#/components/schemas/bytebase.v1.Role'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35567,18 +30988,20 @@ components:type: objectproperties:savedQuery:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SavedQuery'title: saved_querydescription: |-`saved_query.name` identifies the saved query to update.Format: projects/{project}/savedQueries/{savedQuery}- $ref: '#/components/schemas/bytebase.v1.SavedQuery'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: |-Fields to update, relative to the saved query (`title`, not`saved_query.title`). Supported: `title`, `content`, `database`, `folder`.At least one path is required.- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateSavedQueryRequestrequired:- savedQuery@@ -35602,19 +31025,21 @@ components:type: objectproperties:serviceAccount:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ServiceAccount'title: service_accountdescription: |-The service account to update.The service account's `name` field is used to identify the service account to update.Format: serviceAccounts/{email}- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: |-The list of fields to update.Supported fields: title, service_key (triggers key rotation)- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateServiceAccountRequestrequired:- serviceAccount@@ -35624,9 +31049,10 @@ components:type: objectproperties:setting:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Setting'title: settingdescription: The setting to update.- $ref: '#/components/schemas/bytebase.v1.Setting'validateOnly:type: booleantitle: validate_only@@ -35637,8 +31063,9 @@ components:type: booleantitle: allow_missingupdateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_mask- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateSettingRequestrequired:- setting@@ -35648,17 +31075,19 @@ components:type: objectproperties:user:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User'title: userdescription: |-The user to update.The user's `name` field is used to identify the user to update.Format: users/{email}- $ref: '#/components/schemas/bytebase.v1.User'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35673,13 +31102,15 @@ components:type: objectproperties:webhook:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Webhook'title: webhookdescription: The webhook to modify.- $ref: '#/components/schemas/bytebase.v1.Webhook'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: The list of fields to update.- $ref: '#/components/schemas/google.protobuf.FieldMask'allowMissing:type: booleantitle: allow_missing@@ -35694,19 +31125,21 @@ components:type: objectproperties:workloadIdentity:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'title: workload_identitydescription: |-The workload identity to update.The workload identity's `name` field is used to identify the workload identity to update.Format: workloadIdentities/{email}- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_maskdescription: |-The list of fields to update.Supported fields: title, workload_identity_config- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateWorkloadIdentityRequestrequired:- workloadIdentity@@ -35716,11 +31149,13 @@ components:type: objectproperties:workspace:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Workspace'title: workspace- $ref: '#/components/schemas/bytebase.v1.Workspace'updateMask:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FieldMask'title: update_mask- $ref: '#/components/schemas/google.protobuf.FieldMask'title: UpdateWorkspaceRequestrequired:- workspace@@ -35744,9 +31179,10 @@ components:Format: users/{email}readOnly: truestate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The lifecycle state of the user account.- $ref: '#/components/schemas/bytebase.v1.State'email:type: stringtitle: email@@ -35778,9 +31214,10 @@ components:Should be a valid E.164 compliant phone number.Could be empty.profile:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.User.Profile'title: profiledescription: User profile metadata.- $ref: '#/components/schemas/bytebase.v1.User.Profile'groups:type: arrayitems:@@ -35804,13 +31241,15 @@ components:type: objectproperties:lastLoginTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_login_timedescription: The last time the user successfully logged in.- $ref: '#/components/schemas/google.protobuf.Timestamp'lastChangePasswordTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: last_change_password_timedescription: The last time the user changed their password.- $ref: '#/components/schemas/google.protobuf.Timestamp'source:type: stringtitle: source@@ -35831,8 +31270,9 @@ components:type: objectproperties:vcsType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.VCSType'title: vcs_type- $ref: '#/components/schemas/bytebase.v1.VCSType'userId:type: stringtitle: user_id@@ -35916,11 +31356,12 @@ components:name is the name of the webhook, generated by the server.format: projects/{project}/webhooks/{webhook}type:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WebhookType'title: typedescription: |-Webhook integration type.type is the type of the webhook.- $ref: '#/components/schemas/bytebase.v1.WebhookType'title:type: stringtitle: title@@ -36005,9 +31446,10 @@ components:Format: workloadIdentities/{email}readOnly: truestate:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.State'title: statedescription: The state of the workload identity.- $ref: '#/components/schemas/bytebase.v1.State'email:type: stringtitle: email@@ -36022,14 +31464,16 @@ components:maxLength: 200description: The display title of the workload identity.createTime:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: create_timedescription: The timestamp when the workload identity was created.readOnly: true- $ref: '#/components/schemas/google.protobuf.Timestamp'workloadIdentityConfig:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'title: workload_identity_configdescription: The workload identity configuration for OIDC token validation.- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'title: WorkloadIdentityrequired:- workloadIdentityConfig@@ -36039,9 +31483,10 @@ components:type: objectproperties:providerType:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig.ProviderType'title: provider_typedescription: Provider configuration mode.- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig.ProviderType'issuerUrl:type: stringtitle: issuer_url@@ -36117,9 +31562,12 @@ components:type: objectproperties:template:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'title: template- $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'condition:+ allOf:+ - $ref: '#/components/schemas/google.type.Expr'title: conditiondescription: |-The condition that is associated with the rule.@@ -36149,10 +31597,10 @@ components:For examples:resource.environment_id == "prod" && statement.affected_rows >= 100resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL"- $ref: '#/components/schemas/google.type.Expr'source:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting.Rule.Source'title: source- $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting.Rule.Source'title: RuleadditionalProperties: falsebytebase.v1.WorkspaceApprovalSetting.Rule.Source:@@ -36180,17 +31628,20 @@ components:title: require_mfadescription: Require MFA for all users.refreshTokenDuration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: refresh_token_durationdescription: The duration for refresh token. Default is 7 days.- $ref: '#/components/schemas/google.protobuf.Duration'announcement:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.Announcement'title: announcementdescription: The setting of custom announcement- $ref: '#/components/schemas/bytebase.v1.Announcement'maximumRequestExpiration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: maximum_request_expirationdescription: The max expiration duration for data access requests.- $ref: '#/components/schemas/google.protobuf.Duration'domains:type: arrayitems:@@ -36202,9 +31653,10 @@ components:title: enforce_identity_domaindescription: Only user and group from the domains can be created and login.databaseChangeMode:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.DatabaseChangeMode'title: database_change_modedescription: The workspace database change mode.- $ref: '#/components/schemas/bytebase.v1.DatabaseChangeMode'disallowPasswordSignin:type: booleantitle: disallow_password_signin@@ -36214,9 +31666,10 @@ components:title: enable_metric_collectiondescription: Whether to enable metric collection for the workspace.inactiveSessionTimeout:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: inactive_session_timeoutdescription: The session expiration time if not activity detected for the user. Value <= 0 means no limit.- $ref: '#/components/schemas/google.protobuf.Duration'enableAuditLogStdout:type: booleantitle: enable_audit_log_stdout@@ -36230,30 +31683,31 @@ components:Whether to display watermark on pages.Requires ENTERPRISE license.passwordRestriction:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'title: password_restrictiondescription: Password restriction settings.- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'accessTokenDuration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: access_token_durationdescription: The duration for access token. Default is 1 hour.- $ref: '#/components/schemas/google.protobuf.Duration'enableDebug:type: booleantitle: enable_debugdescription: Whether debug mode is enabled.sqlResultSize:- type:- - integer- - string+ type: stringtitle: sql_result_sizeformat: int64description: |-The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.queryTimeout:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: query_timeoutdescription: The query timeout duration for query and export, works for the SQL Editor and Export Center.- $ref: '#/components/schemas/google.protobuf.Duration'allowEmailCodeSignin:type: booleantitle: allow_email_code_signin@@ -36267,17 +31721,19 @@ components:Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset idOR a custom theme's uuid. Empty ⇒ default light.sqlEditorCustomTheme:+ allOf:+ - $ref: '#/components/schemas/bytebase.v1.SQLEditorThemeSetting'title: sql_editor_custom_themedescription: |-The enforced CUSTOM theme's full definition — present ONLY whensql_editor_theme_id is a custom uuid. tokens is always complete.- $ref: '#/components/schemas/bytebase.v1.SQLEditorThemeSetting'maximumRoleExpiration:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: maximum_role_expirationdescription: |-The max expiration duration for request role.Deprecated: use just-in-time access request flows instead.- $ref: '#/components/schemas/google.protobuf.Duration'directorySyncTokenConfigured:type: booleantitle: directory_sync_token_configured@@ -36317,20 +31773,23 @@ components:title: require_reset_password_for_first_logindescription: require_reset_password_for_first_login requires users to reset their password after the 1st login.passwordRotation:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: password_rotationdescription: password_rotation requires users to reset their password after the duration.- $ref: '#/components/schemas/google.protobuf.Duration'title: PasswordRestrictionadditionalProperties: falseconnect-protocol-version:type: number- title: Connect-Protocol-Version- enum:+ examples:- 1+ title: Connect-Protocol-Versiondescription: Define the version of the Connect protocolconst: 1connect-timeout-header:type: number+ examples:+ - 1000title: Connect-Timeout-Msdescription: Define the timeout, in msconnect.error:@@ -36374,26 +31833,21 @@ components:properties:type:type: string- description: 'A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`. This is used to determine the schema of the data in the `value` field and is the discriminator for the `debug` field.'+ description: 'A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`.'value:type: stringformat: binarydescription: The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the `type` field.debug:- oneOf:- - type: object- title: Any- additionalProperties: true- description: Detailed error information.- discriminator:- propertyName: type+ type: objecttitle: Debug+ additionalProperties: truedescription: Deserialized error detail payload. The 'type' field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.additionalProperties: truedescription: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.google.api.expr.v1alpha1.Constant:type: object- oneOf:+ anyOf:- type: objectproperties:boolValue:@@ -36401,8 +31855,6 @@ components:title: bool_valuedescription: boolean value.title: bool_value- required:- - boolValue- type: objectproperties:bytesValue:@@ -36411,8 +31863,6 @@ components:format: bytedescription: bytes value.title: bytes_value- required:- - bytesValue- type: objectproperties:doubleValue:@@ -36421,42 +31871,34 @@ components:format: doubledescription: double value.title: double_value- required:- - doubleValue- type: objectproperties:durationValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Duration'title: duration_valuedescription: |-protobuf.Duration value.Deprecated: duration is no longer considered a builtin cel type.deprecated: true- $ref: '#/components/schemas/google.protobuf.Duration'title: duration_value- required:- - durationValue- type: objectproperties:int64Value:- type:- - integer- - string+ type: stringtitle: int64_valueformat: int64description: int64 value.title: int64_value- required:- - int64Value- type: objectproperties:nullValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.NullValue'title: null_valuedescription: null value.- $ref: '#/components/schemas/google.protobuf.NullValue'title: null_value- required:- - nullValue- type: objectproperties:stringValue:@@ -36464,35 +31906,30 @@ components:title: string_valuedescription: string value.title: string_value- required:- - stringValue- type: objectproperties:timestampValue:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.Timestamp'title: timestamp_valuedescription: |-protobuf.Timestamp value.Deprecated: timestamp is no longer considered a builtin cel type.deprecated: true- $ref: '#/components/schemas/google.protobuf.Timestamp'title: timestamp_value- required:- - timestampValue- type: objectproperties:uint64Value:- type:- - integer- - string+ type: stringtitle: uint64_valueformat: int64description: uint64 value.title: uint64_value- required:- - uint64Value- - not:- anyOf:+ unevaluatedProperties: false+ not:+ allOf:+ - anyOf:- required:- boolValue- required:@@ -36511,7 +31948,26 @@ components:- timestampValue- required:- uint64Value- unevaluatedProperties: false+ - not:+ oneOf:+ - required:+ - boolValue+ - required:+ - bytesValue+ - required:+ - doubleValue+ - required:+ - durationValue+ - required:+ - int64Value+ - required:+ - nullValue+ - required:+ - stringValue+ - required:+ - timestampValue+ - required:+ - uint64Valuetitle: Constantdescription: |-Represents a primitive literal.@@ -36530,99 +31986,106 @@ components:`true`, `null`.google.api.expr.v1alpha1.Expr:type: object- allOf:- - properties:- id:- type:- - integer- - string- title: id- format: int64- description: |-- Required. An id assigned to this node by the parser which is unique in a- given expression tree. This is used to associate type information and other- attributes to a node in the parse tree.- - oneOf:- - type: object- properties:- callExpr:- title: call_expr- description: A call expression, including calls to predefined functions and operators.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Call'+ anyOf:+ - type: object+ properties:+ callExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Call'title: call_expr- required:- - callExpr- - type: object- properties:- comprehensionExpr:- title: comprehension_expr- description: A comprehension expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Comprehension'+ description: A call expression, including calls to predefined functions and operators.+ title: call_expr+ - type: object+ properties:+ comprehensionExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Comprehension'title: comprehension_expr- required:- - comprehensionExpr- - type: object- properties:- constExpr:- title: const_expr- description: A literal expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Constant'+ description: A comprehension expression.+ title: comprehension_expr+ - type: object+ properties:+ constExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Constant'title: const_expr- required:- - constExpr- - type: object- properties:- identExpr:- title: ident_expr- description: An identifier expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Ident'+ description: A literal expression.+ title: const_expr+ - type: object+ properties:+ identExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Ident'title: ident_expr- required:- - identExpr- - type: object- properties:- listExpr:- title: list_expr- description: A list creation expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateList'+ description: An identifier expression.+ title: ident_expr+ - type: object+ properties:+ listExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateList'title: list_expr- required:- - listExpr- - type: object- properties:- selectExpr:- title: select_expr- description: A field selection expression, e.g. `request.auth`.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Select'+ description: A list creation expression.+ title: list_expr+ - type: object+ properties:+ selectExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Select'title: select_expr- required:- - selectExpr- - type: object- properties:- structExpr:- title: struct_expr- description: A map or message creation expression.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateStruct'+ description: A field selection expression, e.g. `request.auth`.+ title: select_expr+ - type: object+ properties:+ structExpr:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateStruct'title: struct_expr- required:- - structExpr- - not:- anyOf:- - required:- - callExpr- - required:- - comprehensionExpr- - required:- - constExpr- - required:- - identExpr- - required:- - listExpr- - required:- - selectExpr- - required:- - structExpr+ description: A map or message creation expression.+ title: struct_exprunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - callExpr+ - required:+ - comprehensionExpr+ - required:+ - constExpr+ - required:+ - identExpr+ - required:+ - listExpr+ - required:+ - selectExpr+ - required:+ - structExpr+ - not:+ oneOf:+ - required:+ - callExpr+ - required:+ - comprehensionExpr+ - required:+ - constExpr+ - required:+ - identExpr+ - required:+ - listExpr+ - required:+ - selectExpr+ - required:+ - structExpr+ properties:+ id:+ type: string+ title: id+ format: int64+ description: |-+ Required. An id assigned to this node by the parser which is unique in a+ given expression tree. This is used to associate type information and other+ attributes to a node in the parse tree.title: Exprdescription: |-An abstract representation of a common expression.@@ -36646,11 +32109,12 @@ components:type: objectproperties:target:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: targetdescription: |-The target of an method call-style expression. For example, `x` in`x.f()`.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'function:type: stringtitle: function@@ -36686,39 +32150,44 @@ components:When the iter_range is a map, this variable is the map entry value.This field is only set for comprehension v2 macros.iterRange:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: iter_rangedescription: The range over which the comprehension iterates.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'accuVar:type: stringtitle: accu_vardescription: The name of the variable used for accumulation of the result.accuInit:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: accu_initdescription: The initial value of the accumulator.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'loopCondition:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: loop_conditiondescription: |-An expression which can contain iter_var, iter_var2, and accu_var.Returns false when the result has been computed and may be used asa hint to short-circuit the remainder of the comprehension.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'loopStep:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: loop_stepdescription: |-An expression which can contain iter_var, iter_var2, and accu_var.Computes the next value of accu_var.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'result:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: resultdescription: |-An expression which can contain accu_var.Computes the result.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: ComprehensionadditionalProperties: falsedescription: |-@@ -36832,57 +32301,59 @@ components:`types.MyType{field_id: 'value'}`.google.api.expr.v1alpha1.Expr.CreateStruct.Entry:type: object- allOf:- - properties:- id:- type:- - integer- - string- title: id- format: int64- description: |-- Required. An id assigned to this node by the parser which is unique- in a given expression tree. This is used to associate type- information and other attributes to the node.- value:- title: value- description: |-- Required. The value assigned to the key.-- If the optional_entry field is true, the expression must resolve to an- optional-typed value. If the optional value is present, the key will be- set; however, if the optional value is absent, the key will be unset.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'- optionalEntry:- type: boolean- title: optional_entry- description: Whether the key-value pair is optional.- - oneOf:- - type: object- properties:- fieldKey:- type: string- title: field_key- description: The field key for a message creator statement.+ anyOf:+ - type: object+ properties:+ fieldKey:+ type: stringtitle: field_key- required:- - fieldKey- - type: object- properties:- mapKey:- title: map_key- description: The key expression for a map creation statement.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'+ description: The field key for a message creator statement.+ title: field_key+ - type: object+ properties:+ mapKey:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: map_key- required:- - mapKey- - not:- anyOf:- - required:- - fieldKey- - required:- - mapKey+ description: The key expression for a map creation statement.+ title: map_keyunevaluatedProperties: false+ not:+ allOf:+ - anyOf:+ - required:+ - fieldKey+ - required:+ - mapKey+ - not:+ oneOf:+ - required:+ - fieldKey+ - required:+ - mapKey+ properties:+ id:+ type: string+ title: id+ format: int64+ description: |-+ Required. An id assigned to this node by the parser which is unique+ in a given expression tree. This is used to associate type+ information and other attributes to the node.+ value:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'+ title: value+ description: |-+ Required. The value assigned to the key.++ If the optional_entry field is true, the expression must resolve to an+ optional-typed value. If the optional value is present, the key will be+ set; however, if the optional value is absent, the key will be unset.+ optionalEntry:+ type: boolean+ title: optional_entry+ description: Whether the key-value pair is optional.title: Entrydescription: Represents an entry.google.api.expr.v1alpha1.Expr.Ident:@@ -36904,13 +32375,14 @@ components:type: objectproperties:operand:+ allOf:+ - $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'title: operanddescription: |-Required. The target of the selection expression.For example, in the select expression `request.auth`, the `request`portion of the expression is the `operand`.- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'field:type: stringtitle: field@@ -36938,307 +32410,27 @@ components:type: stringformat: binaryadditionalProperties: true- description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.+ description: An arbitrary message with a type URL identifying the encoded message type.google.protobuf.Duration:type: stringformat: duration- description: |-- A Duration represents a signed, fixed-length span of time represented- as a count of seconds and fractions of seconds at nanosecond- resolution. It is independent of any calendar and concepts like "day"- or "month". It is related to Timestamp in that the difference between- two Timestamp values is a Duration and it can be added or subtracted- from a Timestamp. Range is approximately +-10,000 years.-- # Examples-- Example 1: Compute Duration from two Timestamps in pseudo code.-- Timestamp start = ...;- Timestamp end = ...;- Duration duration = ...;-- duration.seconds = end.seconds - start.seconds;- duration.nanos = end.nanos - start.nanos;-- if (duration.seconds < 0 && duration.nanos > 0) {- duration.seconds += 1;- duration.nanos -= 1000000000;- } else if (duration.seconds > 0 && duration.nanos < 0) {- duration.seconds -= 1;- duration.nanos += 1000000000;- }-- Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.-- Timestamp start = ...;- Duration duration = ...;- Timestamp end = ...;-- end.seconds = start.seconds + duration.seconds;- end.nanos = start.nanos + duration.nanos;-- if (end.nanos < 0) {- end.seconds -= 1;- end.nanos += 1000000000;- } else if (end.nanos >= 1000000000) {- end.seconds += 1;- end.nanos -= 1000000000;- }-- Example 3: Compute Duration from datetime.timedelta in Python.-- td = datetime.timedelta(days=3, minutes=10)- duration = Duration()- duration.FromTimedelta(td)-- # JSON Mapping-- In JSON format, the Duration type is encoded as a string rather than an- object, where the string ends in the suffix "s" (indicating seconds) and- is preceded by the number of seconds, with nanoseconds expressed as- fractional seconds. For example, 3 seconds with 0 nanoseconds should be- encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should- be expressed in JSON format as "3.000000001s", and 3 seconds and 1- microsecond should be expressed in JSON format as "3.000001s".+ description: A signed duration in seconds, with up to nine fractional digits and an `s` suffix (for example, `3s` or `-0.001s`).google.protobuf.Empty:type: object- description: |-- A generic empty message that you can re-use to avoid defining duplicated- empty messages in your APIs. A typical example is to use it as the request- or the response type of an API method. For instance:-- service Foo {- rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);- }+ description: An empty JSON object.google.protobuf.FieldMask:type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:-- paths: "f.a"- paths: "f.b.d"-- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.-- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).-- # Field Masks in Projections-- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:-- f {- a : 22- b {- d : 1- x : 2- }- y : 13- }- z: 8-- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):--- f {- a : 22- b {- d : 1- }- }-- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]- }-- And an update message:-- f {- b {- d: 10- }- c: [2]- }-- then if the field mask is:-- paths: ["f.b", "f.c"]-- then the result will be:-- f {- b {- d: 10- x: 2- }- c: [1, 2]- }-- An implementation may provide options to override this default behavior for- repeated and message fields.-- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.-- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.-- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.-- ## Considerations for HTTP REST-- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).-- # JSON Encoding of Field Masks-- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.-- As an example, consider the following message declarations:-- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }-- In proto a field mask for `Profile` may look as such:-- mask {- paths: "user.display_name"- paths: "photo"- }-- In JSON, the same mask is represented as below:-- {- mask: "user.displayName,photo"- }-- # Field Masks and Oneof Fields-- Field masks treat fields in oneofs just as regular fields. Consider the- following message:-- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }- }-- The field mask can be:-- mask {- paths: "name"- }-- Or:-- mask {- paths: "sub_message"- }-- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.-- ## Field Mask Verification-- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ description: Comma-separated field paths in lowerCamelCase (for example, `user.displayName,photo`).google.protobuf.FloatValue:oneOf:- type: string- type: number- description: |-- Wrapper message for `float`.-- The JSON representation for `FloatValue` is JSON number.-- Not recommended for use in new APIs, but still useful for legacy APIs and- has no plan to be removed.+ description: A single-precision number. The non-finite values `NaN`, `Infinity`, and `-Infinity` are encoded as strings; `null` is also accepted.google.protobuf.ListValue:- type: object- properties:- values:- type: array- items:- $ref: '#/components/schemas/google.protobuf.Value'- title: values- description: Repeated field of dynamically typed values.- title: ListValue- additionalProperties: false- description: |-- `ListValue` is a wrapper around a repeated field of values.-- The JSON representation for `ListValue` is JSON array.+ type: array+ items:+ $ref: '#/components/schemas/google.protobuf.Value'+ description: A JSON array whose elements may be any JSON value.google.protobuf.NullValue:type: stringtitle: NullValue@@ -37253,122 +32445,14 @@ components:type: objectadditionalProperties:$ref: '#/components/schemas/google.protobuf.Value'- description: |-- `Struct` represents a structured data value, consisting of fields- which map to dynamically typed values. In some languages, `Struct`- might be supported by a native representation. For example, in- scripting languages like JS a struct is represented as an- object. The details of that representation are described together- with the proto support for the language.-- The JSON representation for `Struct` is JSON object.- google.protobuf.Struct.FieldsEntry:- type: object- properties:- key:- type: string- title: key- value:- title: value- $ref: '#/components/schemas/google.protobuf.Value'- title: FieldsEntry- additionalProperties: false+ description: A JSON object whose property values may be any JSON value.google.protobuf.Timestamp:type: stringexamples:- "2023-01-15T01:30:15.01Z"- "2024-12-25T12:00:00Z"format: date-time- description: |-- A Timestamp represents a point in time independent of any time zone or local- calendar, encoded as a count of seconds and fractions of seconds at- nanosecond resolution. The count is relative to an epoch at UTC midnight on- January 1, 1970, in the proleptic Gregorian calendar which extends the- Gregorian calendar backwards to year one.-- All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap- second table is needed for interpretation, using a [24-hour linear- smear](https://developers.google.com/time/smear).-- The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By- restricting to that range, we ensure that we can convert to and from [RFC- 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.-- # Examples-- Example 1: Compute Timestamp from POSIX `time()`.-- Timestamp timestamp;- timestamp.set_seconds(time(NULL));- timestamp.set_nanos(0);-- Example 2: Compute Timestamp from POSIX `gettimeofday()`.-- struct timeval tv;- gettimeofday(&tv, NULL);-- Timestamp timestamp;- timestamp.set_seconds(tv.tv_sec);- timestamp.set_nanos(tv.tv_usec * 1000);-- Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.-- FILETIME ft;- GetSystemTimeAsFileTime(&ft);- UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;-- // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z- // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.- Timestamp timestamp;- timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));- timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));-- Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.-- long millis = System.currentTimeMillis();-- Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)- .setNanos((int) ((millis % 1000) * 1000000)).build();-- Example 5: Compute Timestamp from Java `Instant.now()`.-- Instant now = Instant.now();-- Timestamp timestamp =- Timestamp.newBuilder().setSeconds(now.getEpochSecond())- .setNanos(now.getNano()).build();-- Example 6: Compute Timestamp from current time in Python.-- timestamp = Timestamp()- timestamp.GetCurrentTime()-- # JSON Mapping-- In JSON format, the Timestamp type is encoded as a string in the- [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the- format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"- where {year} is always expressed using four digits while {month}, {day},- {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional- seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),- are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone- is required. A proto3 JSON serializer should always use UTC (as indicated by- "Z") when printing the Timestamp type and a proto3 JSON parser should be- able to accept both UTC and other timezones (as indicated by an offset).-- For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past- 01:30 UTC on January 15, 2017.-- In JavaScript, one can convert a Date object to this format using the- standard- [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)- method. In Python, a standard `datetime.datetime` object can be converted- to this format using- [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with- the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use- the Joda Time's [`ISODateTimeFormat.dateTime()`](- http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()- ) to obtain a formatter capable of generating timestamps in this format.+ description: A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC.google.protobuf.Value:oneOf:- type: "null"@@ -37378,13 +32462,7 @@ components:- type: array- type: objectadditionalProperties: true- description: |-- `Value` represents a dynamically typed value which can be either- null, a number, a string, a boolean, a recursive struct value, or a- list of values. A producer of value is expected to set one of these- variants. Absence of any variant indicates an error.-- The JSON representation for `Value` is JSON value.+ description: 'Any JSON value: `null`, number, string, boolean, array, or object.'google.rpc.Status:type: objectproperties:@@ -37440,6 +32518,8 @@ components:format: floatdescription: The amount of blue in the color as a value in the interval [0, 1].alpha:+ allOf:+ - $ref: '#/components/schemas/google.protobuf.FloatValue'title: alphadescription: |-The fraction of this color that should be applied to the pixel. That is,@@ -37453,7 +32533,6 @@ components:possible to distinguish between a default value and the value being unset.If omitted, this color object is rendered as a solid color(as if the alpha value had been explicitly given a value of 1.0).- $ref: '#/components/schemas/google.protobuf.FloatValue'title: ColoradditionalProperties: falsedescription: |-diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex fd048bbc4f..a4f0525e55 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -134,7 +134,7 @@- [Advice.Level](#bytebase-v1-Advice-Level)- [Advice.RuleType](#bytebase-v1-Advice-RuleType)- - [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat)+ - [QueryOption.ExplainFormat](#bytebase-v1-QueryOption-ExplainFormat)- [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn)- [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type)- [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level)@@ -2561,7 +2561,7 @@ QueryHistoryService manages query history records of SQL Editor queries and expo| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |-| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |+| explain_format | [QueryOption.ExplainFormat](#bytebase-v1-QueryOption-ExplainFormat) | | |@@ -2817,16 +2817,22 @@ RuleType indicates the source of the linting rule.-<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>+<a name="bytebase-v1-QueryOption-ExplainFormat"></a>-### QueryOption.MSSQLExplainFormat+### QueryOption.ExplainFormat+Which explain output the caller wants, for an explain request.+Leave it unspecified for the engine's own default, which is the only+output most engines have. Naming a format an engine cannot produce is+INVALID_ARGUMENT rather than a silent fallback, as is any explain request+against an engine that has no explain at all.| Name | Number | Description || ---- | ------ | ----------- |-| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |-| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |-| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |+| EXPLAIN_FORMAT_UNSPECIFIED | 0 | The engine's default: PostgreSQL EXPLAIN, SQL Server SHOWPLAN_ALL. |+| TEXT | 1 | The human-readable plan. PostgreSQL: EXPLAIN (FORMAT TEXT). SQL Server: SHOWPLAN_ALL. |+| JSON | 2 | The plan tree as JSON. PostgreSQL: EXPLAIN (FORMAT JSON). |+| XML | 3 | The plan tree as XML. PostgreSQL: EXPLAIN (FORMAT XML). SQL Server: SHOWPLAN_XML. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex e576f09a02..a2733bff16 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -679,7 +679,7 @@</li><li>- <a href="#bytebase.v1.QueryOption.MSSQLExplainFormat"><span class="badge">E</span>QueryOption.MSSQLExplainFormat</a>+ <a href="#bytebase.v1.QueryOption.ExplainFormat"><span class="badge">E</span>QueryOption.ExplainFormat</a></li><li>@@ -8056,8 +8056,8 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><</tr><tr>- <td>mssql_explain_format</td>- <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>+ <td>explain_format</td>+ <td><a href="#bytebase.v1.QueryOption.ExplainFormat">QueryOption.ExplainFormat</a></td><td></td><td><p> </p></td></tr>@@ -8793,8 +8793,8 @@ These are custom, flexible checks powered by AI models.</p></td></tbody></table>- <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>- <p></p>+ <h3 id="bytebase.v1.QueryOption.ExplainFormat">QueryOption.ExplainFormat</h3>+ <p>Which explain output the caller wants, for an explain request.</p><p>Leave it unspecified for the engine's own default, which is the only</p><p>output most engines have. Naming a format an engine cannot produce is</p><p>INVALID_ARGUMENT rather than a silent fallback, as is any explain request</p><p>against an engine that has no explain at all.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -8802,21 +8802,29 @@ These are custom, flexible checks powered by AI models.</p></td><tbody><tr>- <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>+ <td>EXPLAIN_FORMAT_UNSPECIFIED</td><td>0</td>- <td><p>defaults to SHOWPLAN_ALL</p></td>+ <td><p>The engine's default: PostgreSQL EXPLAIN, SQL Server SHOWPLAN_ALL.</p></td></tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_ALL</td>+ <td>TEXT</td><td>1</td>- <td><p>SHOWPLAN_ALL</p></td>+ <td><p>The human-readable plan. PostgreSQL: EXPLAIN (FORMAT TEXT). SQL Server:+SHOWPLAN_ALL.</p></td></tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_XML</td>+ <td>JSON</td><td>2</td>- <td><p>SHOWPLAN_XML</p></td>+ <td><p>The plan tree as JSON. PostgreSQL: EXPLAIN (FORMAT JSON).</p></td>+ </tr>++ <tr>+ <td>XML</td>+ <td>3</td>+ <td><p>The plan tree as XML. PostgreSQL: EXPLAIN (FORMAT XML). SQL Server:+SHOWPLAN_XML.</p></td></tr></tbody>diff --git a/proto/v1/v1/sql_service.proto b/proto/v1/v1/sql_service.protoindex 7857cf6b59..516433ef16 100644--- a/proto/v1/v1/sql_service.proto+++ b/proto/v1/v1/sql_service.proto@@ -188,15 +188,29 @@ message QueryOption {}RedisRunCommandsOn redis_run_commands_on = 1;- enum MSSQLExplainFormat {- // defaults to SHOWPLAN_ALL- MSSQL_EXPLAIN_FORMAT_UNSPECIFIED = 0;- // SHOWPLAN_ALL- MSSQL_EXPLAIN_FORMAT_ALL = 1;- // SHOWPLAN_XML- MSSQL_EXPLAIN_FORMAT_XML = 2;+ // 2 was mssql_explain_format, replaced by the engine-neutral explain_format.+ reserved 2;+ reserved "mssql_explain_format";++ // Which explain output the caller wants, for an explain request.+ //+ // Leave it unspecified for the engine's own default, which is the only+ // output most engines have. Naming a format an engine cannot produce is+ // INVALID_ARGUMENT rather than a silent fallback, as is any explain request+ // against an engine that has no explain at all.+ enum ExplainFormat {+ // The engine's default: PostgreSQL EXPLAIN, SQL Server SHOWPLAN_ALL.+ EXPLAIN_FORMAT_UNSPECIFIED = 0;+ // The human-readable plan. PostgreSQL: EXPLAIN (FORMAT TEXT). SQL Server:+ // SHOWPLAN_ALL.+ TEXT = 1;+ // The plan tree as JSON. PostgreSQL: EXPLAIN (FORMAT JSON).+ JSON = 2;+ // The plan tree as XML. PostgreSQL: EXPLAIN (FORMAT XML). SQL Server:+ // SHOWPLAN_XML.+ XML = 3;}- MSSQLExplainFormat mssql_explain_format = 2;+ ExplainFormat explain_format = 3;}message QueryResult {